commit f8591a73ec13b01a67d093934a55514577fdff93 Author: Salted <44394537+xian18@users.noreply.github.com> Date: Sat Jan 29 14:02:02 2022 +0800 init repo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..75ec3f0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/* \ No newline at end of file diff --git a/Game.rpgproject b/Game.rpgproject new file mode 100644 index 0000000..e2ed5ce --- /dev/null +++ b/Game.rpgproject @@ -0,0 +1 @@ +RPGMV 1.6.2 \ No newline at end of file diff --git a/GameusQuestEditor.exe b/GameusQuestEditor.exe new file mode 100644 index 0000000..d29f745 Binary files /dev/null and b/GameusQuestEditor.exe differ diff --git a/audio/bgm/Battle1.m4a b/audio/bgm/Battle1.m4a new file mode 100644 index 0000000..e46f5a1 Binary files /dev/null and b/audio/bgm/Battle1.m4a differ diff --git a/audio/bgm/Battle1.ogg b/audio/bgm/Battle1.ogg new file mode 100644 index 0000000..1740f46 Binary files /dev/null and b/audio/bgm/Battle1.ogg differ diff --git a/audio/bgm/Battle2.m4a b/audio/bgm/Battle2.m4a new file mode 100644 index 0000000..93e45ab Binary files /dev/null and b/audio/bgm/Battle2.m4a differ diff --git a/audio/bgm/Battle2.ogg b/audio/bgm/Battle2.ogg new file mode 100644 index 0000000..0124411 Binary files /dev/null and b/audio/bgm/Battle2.ogg differ diff --git a/audio/bgm/Battle3.m4a b/audio/bgm/Battle3.m4a new file mode 100644 index 0000000..df029e4 Binary files /dev/null and b/audio/bgm/Battle3.m4a differ diff --git a/audio/bgm/Battle3.ogg b/audio/bgm/Battle3.ogg new file mode 100644 index 0000000..67e5b7c Binary files /dev/null and b/audio/bgm/Battle3.ogg differ diff --git a/audio/bgm/Castle1.m4a b/audio/bgm/Castle1.m4a new file mode 100644 index 0000000..1a614d6 Binary files /dev/null and b/audio/bgm/Castle1.m4a differ diff --git a/audio/bgm/Castle1.ogg b/audio/bgm/Castle1.ogg new file mode 100644 index 0000000..f2f4309 Binary files /dev/null and b/audio/bgm/Castle1.ogg differ diff --git a/audio/bgm/Castle2.m4a b/audio/bgm/Castle2.m4a new file mode 100644 index 0000000..b01973d Binary files /dev/null and b/audio/bgm/Castle2.m4a differ diff --git a/audio/bgm/Castle2.ogg b/audio/bgm/Castle2.ogg new file mode 100644 index 0000000..9abf1f5 Binary files /dev/null and b/audio/bgm/Castle2.ogg differ diff --git a/audio/bgm/Dungeon1.m4a b/audio/bgm/Dungeon1.m4a new file mode 100644 index 0000000..9182a78 Binary files /dev/null and b/audio/bgm/Dungeon1.m4a differ diff --git a/audio/bgm/Dungeon1.ogg b/audio/bgm/Dungeon1.ogg new file mode 100644 index 0000000..e219411 Binary files /dev/null and b/audio/bgm/Dungeon1.ogg differ diff --git a/audio/bgm/Dungeon2.m4a b/audio/bgm/Dungeon2.m4a new file mode 100644 index 0000000..9d12f1b Binary files /dev/null and b/audio/bgm/Dungeon2.m4a differ diff --git a/audio/bgm/Dungeon2.ogg b/audio/bgm/Dungeon2.ogg new file mode 100644 index 0000000..5491645 Binary files /dev/null and b/audio/bgm/Dungeon2.ogg differ diff --git a/audio/bgm/Dungeon3.m4a b/audio/bgm/Dungeon3.m4a new file mode 100644 index 0000000..da189ab Binary files /dev/null and b/audio/bgm/Dungeon3.m4a differ diff --git a/audio/bgm/Dungeon3.ogg b/audio/bgm/Dungeon3.ogg new file mode 100644 index 0000000..c212fbf Binary files /dev/null and b/audio/bgm/Dungeon3.ogg differ diff --git a/audio/bgm/Field1.m4a b/audio/bgm/Field1.m4a new file mode 100644 index 0000000..293b9a7 Binary files /dev/null and b/audio/bgm/Field1.m4a differ diff --git a/audio/bgm/Field1.ogg b/audio/bgm/Field1.ogg new file mode 100644 index 0000000..84671bd Binary files /dev/null and b/audio/bgm/Field1.ogg differ diff --git a/audio/bgm/Field2.m4a b/audio/bgm/Field2.m4a new file mode 100644 index 0000000..dd3437f Binary files /dev/null and b/audio/bgm/Field2.m4a differ diff --git a/audio/bgm/Field2.ogg b/audio/bgm/Field2.ogg new file mode 100644 index 0000000..dbc1395 Binary files /dev/null and b/audio/bgm/Field2.ogg differ diff --git a/audio/bgm/Ship1.m4a b/audio/bgm/Ship1.m4a new file mode 100644 index 0000000..2b3b6cb Binary files /dev/null and b/audio/bgm/Ship1.m4a differ diff --git a/audio/bgm/Ship1.ogg b/audio/bgm/Ship1.ogg new file mode 100644 index 0000000..888bd3d Binary files /dev/null and b/audio/bgm/Ship1.ogg differ diff --git a/audio/bgm/Ship2.m4a b/audio/bgm/Ship2.m4a new file mode 100644 index 0000000..6a40fac Binary files /dev/null and b/audio/bgm/Ship2.m4a differ diff --git a/audio/bgm/Ship2.ogg b/audio/bgm/Ship2.ogg new file mode 100644 index 0000000..647aa66 Binary files /dev/null and b/audio/bgm/Ship2.ogg differ diff --git a/audio/bgm/Ship3.m4a b/audio/bgm/Ship3.m4a new file mode 100644 index 0000000..02ffcf7 Binary files /dev/null and b/audio/bgm/Ship3.m4a differ diff --git a/audio/bgm/Ship3.ogg b/audio/bgm/Ship3.ogg new file mode 100644 index 0000000..ab0010b Binary files /dev/null and b/audio/bgm/Ship3.ogg differ diff --git a/audio/bgm/Theme1.m4a b/audio/bgm/Theme1.m4a new file mode 100644 index 0000000..f05aecf Binary files /dev/null and b/audio/bgm/Theme1.m4a differ diff --git a/audio/bgm/Theme1.ogg b/audio/bgm/Theme1.ogg new file mode 100644 index 0000000..bec24fa Binary files /dev/null and b/audio/bgm/Theme1.ogg differ diff --git a/audio/bgm/Theme2.m4a b/audio/bgm/Theme2.m4a new file mode 100644 index 0000000..f086601 Binary files /dev/null and b/audio/bgm/Theme2.m4a differ diff --git a/audio/bgm/Theme2.ogg b/audio/bgm/Theme2.ogg new file mode 100644 index 0000000..bf57c24 Binary files /dev/null and b/audio/bgm/Theme2.ogg differ diff --git a/audio/bgm/Theme6.m4a b/audio/bgm/Theme6.m4a new file mode 100644 index 0000000..3be9d81 Binary files /dev/null and b/audio/bgm/Theme6.m4a differ diff --git a/audio/bgm/Theme6.ogg b/audio/bgm/Theme6.ogg new file mode 100644 index 0000000..5e27b66 Binary files /dev/null and b/audio/bgm/Theme6.ogg differ diff --git a/audio/bgm/Town1.m4a b/audio/bgm/Town1.m4a new file mode 100644 index 0000000..30de5c5 Binary files /dev/null and b/audio/bgm/Town1.m4a differ diff --git a/audio/bgm/Town1.ogg b/audio/bgm/Town1.ogg new file mode 100644 index 0000000..36725c7 Binary files /dev/null and b/audio/bgm/Town1.ogg differ diff --git a/audio/bgm/Town2.m4a b/audio/bgm/Town2.m4a new file mode 100644 index 0000000..1f2c69c Binary files /dev/null and b/audio/bgm/Town2.m4a differ diff --git a/audio/bgm/Town2.ogg b/audio/bgm/Town2.ogg new file mode 100644 index 0000000..a92843d Binary files /dev/null and b/audio/bgm/Town2.ogg differ diff --git a/audio/bgs/City.m4a b/audio/bgs/City.m4a new file mode 100644 index 0000000..bf3f19b Binary files /dev/null and b/audio/bgs/City.m4a differ diff --git a/audio/bgs/City.ogg b/audio/bgs/City.ogg new file mode 100644 index 0000000..52ff005 Binary files /dev/null and b/audio/bgs/City.ogg differ diff --git a/audio/bgs/Darkness.m4a b/audio/bgs/Darkness.m4a new file mode 100644 index 0000000..c106d35 Binary files /dev/null and b/audio/bgs/Darkness.m4a differ diff --git a/audio/bgs/Darkness.ogg b/audio/bgs/Darkness.ogg new file mode 100644 index 0000000..90126f7 Binary files /dev/null and b/audio/bgs/Darkness.ogg differ diff --git a/audio/bgs/Drips.m4a b/audio/bgs/Drips.m4a new file mode 100644 index 0000000..0a34994 Binary files /dev/null and b/audio/bgs/Drips.m4a differ diff --git a/audio/bgs/Drips.ogg b/audio/bgs/Drips.ogg new file mode 100644 index 0000000..7ee51b3 Binary files /dev/null and b/audio/bgs/Drips.ogg differ diff --git a/audio/bgs/Night.m4a b/audio/bgs/Night.m4a new file mode 100644 index 0000000..bf0233b Binary files /dev/null and b/audio/bgs/Night.m4a differ diff --git a/audio/bgs/Night.ogg b/audio/bgs/Night.ogg new file mode 100644 index 0000000..2ec26a2 Binary files /dev/null and b/audio/bgs/Night.ogg differ diff --git a/audio/bgs/Quake.m4a b/audio/bgs/Quake.m4a new file mode 100644 index 0000000..074df39 Binary files /dev/null and b/audio/bgs/Quake.m4a differ diff --git a/audio/bgs/Quake.ogg b/audio/bgs/Quake.ogg new file mode 100644 index 0000000..8e3f246 Binary files /dev/null and b/audio/bgs/Quake.ogg differ diff --git a/audio/bgs/River.m4a b/audio/bgs/River.m4a new file mode 100644 index 0000000..c7661c5 Binary files /dev/null and b/audio/bgs/River.m4a differ diff --git a/audio/bgs/River.ogg b/audio/bgs/River.ogg new file mode 100644 index 0000000..c554d2c Binary files /dev/null and b/audio/bgs/River.ogg differ diff --git a/audio/bgs/Sea.m4a b/audio/bgs/Sea.m4a new file mode 100644 index 0000000..6129322 Binary files /dev/null and b/audio/bgs/Sea.m4a differ diff --git a/audio/bgs/Sea.ogg b/audio/bgs/Sea.ogg new file mode 100644 index 0000000..c99ed08 Binary files /dev/null and b/audio/bgs/Sea.ogg differ diff --git a/audio/bgs/Storm1.m4a b/audio/bgs/Storm1.m4a new file mode 100644 index 0000000..515219f Binary files /dev/null and b/audio/bgs/Storm1.m4a differ diff --git a/audio/bgs/Storm1.ogg b/audio/bgs/Storm1.ogg new file mode 100644 index 0000000..0adc7af Binary files /dev/null and b/audio/bgs/Storm1.ogg differ diff --git a/audio/bgs/Storm2.m4a b/audio/bgs/Storm2.m4a new file mode 100644 index 0000000..bd9c3bf Binary files /dev/null and b/audio/bgs/Storm2.m4a differ diff --git a/audio/bgs/Storm2.ogg b/audio/bgs/Storm2.ogg new file mode 100644 index 0000000..6fb0b14 Binary files /dev/null and b/audio/bgs/Storm2.ogg differ diff --git a/audio/bgs/Wind.m4a b/audio/bgs/Wind.m4a new file mode 100644 index 0000000..e3004ac Binary files /dev/null and b/audio/bgs/Wind.m4a differ diff --git a/audio/bgs/Wind.ogg b/audio/bgs/Wind.ogg new file mode 100644 index 0000000..7cb2861 Binary files /dev/null and b/audio/bgs/Wind.ogg differ diff --git a/audio/me/Curse1.m4a b/audio/me/Curse1.m4a new file mode 100644 index 0000000..7146047 Binary files /dev/null and b/audio/me/Curse1.m4a differ diff --git a/audio/me/Curse1.ogg b/audio/me/Curse1.ogg new file mode 100644 index 0000000..bfc5849 Binary files /dev/null and b/audio/me/Curse1.ogg differ diff --git a/audio/me/Curse2.m4a b/audio/me/Curse2.m4a new file mode 100644 index 0000000..362643a Binary files /dev/null and b/audio/me/Curse2.m4a differ diff --git a/audio/me/Curse2.ogg b/audio/me/Curse2.ogg new file mode 100644 index 0000000..0d15150 Binary files /dev/null and b/audio/me/Curse2.ogg differ diff --git a/audio/me/Defeat1.m4a b/audio/me/Defeat1.m4a new file mode 100644 index 0000000..c002002 Binary files /dev/null and b/audio/me/Defeat1.m4a differ diff --git a/audio/me/Defeat1.ogg b/audio/me/Defeat1.ogg new file mode 100644 index 0000000..d4cfcdf Binary files /dev/null and b/audio/me/Defeat1.ogg differ diff --git a/audio/me/Defeat2.m4a b/audio/me/Defeat2.m4a new file mode 100644 index 0000000..81d8b9c Binary files /dev/null and b/audio/me/Defeat2.m4a differ diff --git a/audio/me/Defeat2.ogg b/audio/me/Defeat2.ogg new file mode 100644 index 0000000..8c46793 Binary files /dev/null and b/audio/me/Defeat2.ogg differ diff --git a/audio/me/Fanfare1.m4a b/audio/me/Fanfare1.m4a new file mode 100644 index 0000000..9021f59 Binary files /dev/null and b/audio/me/Fanfare1.m4a differ diff --git a/audio/me/Fanfare1.ogg b/audio/me/Fanfare1.ogg new file mode 100644 index 0000000..87c7c29 Binary files /dev/null and b/audio/me/Fanfare1.ogg differ diff --git a/audio/me/Fanfare2.m4a b/audio/me/Fanfare2.m4a new file mode 100644 index 0000000..92c1d28 Binary files /dev/null and b/audio/me/Fanfare2.m4a differ diff --git a/audio/me/Fanfare2.ogg b/audio/me/Fanfare2.ogg new file mode 100644 index 0000000..6277e55 Binary files /dev/null and b/audio/me/Fanfare2.ogg differ diff --git a/audio/me/Gameover1.m4a b/audio/me/Gameover1.m4a new file mode 100644 index 0000000..af6c6c9 Binary files /dev/null and b/audio/me/Gameover1.m4a differ diff --git a/audio/me/Gameover1.ogg b/audio/me/Gameover1.ogg new file mode 100644 index 0000000..fc00de6 Binary files /dev/null and b/audio/me/Gameover1.ogg differ diff --git a/audio/me/Gameover2.m4a b/audio/me/Gameover2.m4a new file mode 100644 index 0000000..c167c3d Binary files /dev/null and b/audio/me/Gameover2.m4a differ diff --git a/audio/me/Gameover2.ogg b/audio/me/Gameover2.ogg new file mode 100644 index 0000000..74fe4f5 Binary files /dev/null and b/audio/me/Gameover2.ogg differ diff --git a/audio/me/Inn.m4a b/audio/me/Inn.m4a new file mode 100644 index 0000000..40c84f5 Binary files /dev/null and b/audio/me/Inn.m4a differ diff --git a/audio/me/Inn.ogg b/audio/me/Inn.ogg new file mode 100644 index 0000000..57eba7e Binary files /dev/null and b/audio/me/Inn.ogg differ diff --git a/audio/me/Musical1.m4a b/audio/me/Musical1.m4a new file mode 100644 index 0000000..7af76de Binary files /dev/null and b/audio/me/Musical1.m4a differ diff --git a/audio/me/Musical1.ogg b/audio/me/Musical1.ogg new file mode 100644 index 0000000..81b9ca5 Binary files /dev/null and b/audio/me/Musical1.ogg differ diff --git a/audio/me/Musical2.m4a b/audio/me/Musical2.m4a new file mode 100644 index 0000000..ce327e7 Binary files /dev/null and b/audio/me/Musical2.m4a differ diff --git a/audio/me/Musical2.ogg b/audio/me/Musical2.ogg new file mode 100644 index 0000000..04930d8 Binary files /dev/null and b/audio/me/Musical2.ogg differ diff --git a/audio/me/Musical3.m4a b/audio/me/Musical3.m4a new file mode 100644 index 0000000..5349e81 Binary files /dev/null and b/audio/me/Musical3.m4a differ diff --git a/audio/me/Musical3.ogg b/audio/me/Musical3.ogg new file mode 100644 index 0000000..4b48cb9 Binary files /dev/null and b/audio/me/Musical3.ogg differ diff --git a/audio/me/Mystery.m4a b/audio/me/Mystery.m4a new file mode 100644 index 0000000..43f56b0 Binary files /dev/null and b/audio/me/Mystery.m4a differ diff --git a/audio/me/Mystery.ogg b/audio/me/Mystery.ogg new file mode 100644 index 0000000..63d3986 Binary files /dev/null and b/audio/me/Mystery.ogg differ diff --git a/audio/me/Organ.m4a b/audio/me/Organ.m4a new file mode 100644 index 0000000..8f83b2e Binary files /dev/null and b/audio/me/Organ.m4a differ diff --git a/audio/me/Organ.ogg b/audio/me/Organ.ogg new file mode 100644 index 0000000..e0f2889 Binary files /dev/null and b/audio/me/Organ.ogg differ diff --git a/audio/me/Shock1.m4a b/audio/me/Shock1.m4a new file mode 100644 index 0000000..71b700c Binary files /dev/null and b/audio/me/Shock1.m4a differ diff --git a/audio/me/Shock1.ogg b/audio/me/Shock1.ogg new file mode 100644 index 0000000..3dadfe9 Binary files /dev/null and b/audio/me/Shock1.ogg differ diff --git a/audio/me/Shock2.m4a b/audio/me/Shock2.m4a new file mode 100644 index 0000000..1c80a23 Binary files /dev/null and b/audio/me/Shock2.m4a differ diff --git a/audio/me/Shock2.ogg b/audio/me/Shock2.ogg new file mode 100644 index 0000000..c177620 Binary files /dev/null and b/audio/me/Shock2.ogg differ diff --git a/audio/me/Victory1.m4a b/audio/me/Victory1.m4a new file mode 100644 index 0000000..757a03b Binary files /dev/null and b/audio/me/Victory1.m4a differ diff --git a/audio/me/Victory1.ogg b/audio/me/Victory1.ogg new file mode 100644 index 0000000..acc4163 Binary files /dev/null and b/audio/me/Victory1.ogg differ diff --git a/audio/me/Victory2.m4a b/audio/me/Victory2.m4a new file mode 100644 index 0000000..622daba Binary files /dev/null and b/audio/me/Victory2.m4a differ diff --git a/audio/me/Victory2.ogg b/audio/me/Victory2.ogg new file mode 100644 index 0000000..9155a9d Binary files /dev/null and b/audio/me/Victory2.ogg differ diff --git a/audio/se/Absorb1.m4a b/audio/se/Absorb1.m4a new file mode 100644 index 0000000..eb127ef Binary files /dev/null and b/audio/se/Absorb1.m4a differ diff --git a/audio/se/Absorb1.ogg b/audio/se/Absorb1.ogg new file mode 100644 index 0000000..c88d7f3 Binary files /dev/null and b/audio/se/Absorb1.ogg differ diff --git a/audio/se/Absorb2.m4a b/audio/se/Absorb2.m4a new file mode 100644 index 0000000..48edd5f Binary files /dev/null and b/audio/se/Absorb2.m4a differ diff --git a/audio/se/Absorb2.ogg b/audio/se/Absorb2.ogg new file mode 100644 index 0000000..15e346d Binary files /dev/null and b/audio/se/Absorb2.ogg differ diff --git a/audio/se/Applause1.m4a b/audio/se/Applause1.m4a new file mode 100644 index 0000000..ad5e45f Binary files /dev/null and b/audio/se/Applause1.m4a differ diff --git a/audio/se/Applause1.ogg b/audio/se/Applause1.ogg new file mode 100644 index 0000000..4494751 Binary files /dev/null and b/audio/se/Applause1.ogg differ diff --git a/audio/se/Applause2.m4a b/audio/se/Applause2.m4a new file mode 100644 index 0000000..d677417 Binary files /dev/null and b/audio/se/Applause2.m4a differ diff --git a/audio/se/Applause2.ogg b/audio/se/Applause2.ogg new file mode 100644 index 0000000..4be0e61 Binary files /dev/null and b/audio/se/Applause2.ogg differ diff --git a/audio/se/Attack1.m4a b/audio/se/Attack1.m4a new file mode 100644 index 0000000..ab50794 Binary files /dev/null and b/audio/se/Attack1.m4a differ diff --git a/audio/se/Attack1.ogg b/audio/se/Attack1.ogg new file mode 100644 index 0000000..ce9be70 Binary files /dev/null and b/audio/se/Attack1.ogg differ diff --git a/audio/se/Attack2.m4a b/audio/se/Attack2.m4a new file mode 100644 index 0000000..460be28 Binary files /dev/null and b/audio/se/Attack2.m4a differ diff --git a/audio/se/Attack2.ogg b/audio/se/Attack2.ogg new file mode 100644 index 0000000..36bb1b5 Binary files /dev/null and b/audio/se/Attack2.ogg differ diff --git a/audio/se/Attack3.m4a b/audio/se/Attack3.m4a new file mode 100644 index 0000000..c10ee5f Binary files /dev/null and b/audio/se/Attack3.m4a differ diff --git a/audio/se/Attack3.ogg b/audio/se/Attack3.ogg new file mode 100644 index 0000000..62a642f Binary files /dev/null and b/audio/se/Attack3.ogg differ diff --git a/audio/se/Battle1.m4a b/audio/se/Battle1.m4a new file mode 100644 index 0000000..f4f3a1a Binary files /dev/null and b/audio/se/Battle1.m4a differ diff --git a/audio/se/Battle1.ogg b/audio/se/Battle1.ogg new file mode 100644 index 0000000..cb9f3dd Binary files /dev/null and b/audio/se/Battle1.ogg differ diff --git a/audio/se/Battle2.m4a b/audio/se/Battle2.m4a new file mode 100644 index 0000000..108d6a9 Binary files /dev/null and b/audio/se/Battle2.m4a differ diff --git a/audio/se/Battle2.ogg b/audio/se/Battle2.ogg new file mode 100644 index 0000000..072b2af Binary files /dev/null and b/audio/se/Battle2.ogg differ diff --git a/audio/se/Battle3.m4a b/audio/se/Battle3.m4a new file mode 100644 index 0000000..469ef69 Binary files /dev/null and b/audio/se/Battle3.m4a differ diff --git a/audio/se/Battle3.ogg b/audio/se/Battle3.ogg new file mode 100644 index 0000000..d0dff90 Binary files /dev/null and b/audio/se/Battle3.ogg differ diff --git a/audio/se/Bell1.m4a b/audio/se/Bell1.m4a new file mode 100644 index 0000000..f93f4fe Binary files /dev/null and b/audio/se/Bell1.m4a differ diff --git a/audio/se/Bell1.ogg b/audio/se/Bell1.ogg new file mode 100644 index 0000000..73828c8 Binary files /dev/null and b/audio/se/Bell1.ogg differ diff --git a/audio/se/Bell2.m4a b/audio/se/Bell2.m4a new file mode 100644 index 0000000..0567826 Binary files /dev/null and b/audio/se/Bell2.m4a differ diff --git a/audio/se/Bell2.ogg b/audio/se/Bell2.ogg new file mode 100644 index 0000000..5998c0c Binary files /dev/null and b/audio/se/Bell2.ogg differ diff --git a/audio/se/Bell3.m4a b/audio/se/Bell3.m4a new file mode 100644 index 0000000..71895b1 Binary files /dev/null and b/audio/se/Bell3.m4a differ diff --git a/audio/se/Bell3.ogg b/audio/se/Bell3.ogg new file mode 100644 index 0000000..ee9915a Binary files /dev/null and b/audio/se/Bell3.ogg differ diff --git a/audio/se/Blind.m4a b/audio/se/Blind.m4a new file mode 100644 index 0000000..2e857f5 Binary files /dev/null and b/audio/se/Blind.m4a differ diff --git a/audio/se/Blind.ogg b/audio/se/Blind.ogg new file mode 100644 index 0000000..9099ee6 Binary files /dev/null and b/audio/se/Blind.ogg differ diff --git a/audio/se/Blow1.m4a b/audio/se/Blow1.m4a new file mode 100644 index 0000000..b8fc22d Binary files /dev/null and b/audio/se/Blow1.m4a differ diff --git a/audio/se/Blow1.ogg b/audio/se/Blow1.ogg new file mode 100644 index 0000000..f8e6493 Binary files /dev/null and b/audio/se/Blow1.ogg differ diff --git a/audio/se/Blow2.m4a b/audio/se/Blow2.m4a new file mode 100644 index 0000000..ae3dbb9 Binary files /dev/null and b/audio/se/Blow2.m4a differ diff --git a/audio/se/Blow2.ogg b/audio/se/Blow2.ogg new file mode 100644 index 0000000..0ca6127 Binary files /dev/null and b/audio/se/Blow2.ogg differ diff --git a/audio/se/Blow3.m4a b/audio/se/Blow3.m4a new file mode 100644 index 0000000..8d73fe9 Binary files /dev/null and b/audio/se/Blow3.m4a differ diff --git a/audio/se/Blow3.ogg b/audio/se/Blow3.ogg new file mode 100644 index 0000000..b86be58 Binary files /dev/null and b/audio/se/Blow3.ogg differ diff --git a/audio/se/Book1.m4a b/audio/se/Book1.m4a new file mode 100644 index 0000000..08956d6 Binary files /dev/null and b/audio/se/Book1.m4a differ diff --git a/audio/se/Book1.ogg b/audio/se/Book1.ogg new file mode 100644 index 0000000..76dbf72 Binary files /dev/null and b/audio/se/Book1.ogg differ diff --git a/audio/se/Book2.m4a b/audio/se/Book2.m4a new file mode 100644 index 0000000..770df0d Binary files /dev/null and b/audio/se/Book2.m4a differ diff --git a/audio/se/Book2.ogg b/audio/se/Book2.ogg new file mode 100644 index 0000000..a5434ef Binary files /dev/null and b/audio/se/Book2.ogg differ diff --git a/audio/se/Break.m4a b/audio/se/Break.m4a new file mode 100644 index 0000000..c29ae6c Binary files /dev/null and b/audio/se/Break.m4a differ diff --git a/audio/se/Break.ogg b/audio/se/Break.ogg new file mode 100644 index 0000000..0318cd7 Binary files /dev/null and b/audio/se/Break.ogg differ diff --git a/audio/se/Buzzer1.m4a b/audio/se/Buzzer1.m4a new file mode 100644 index 0000000..4ecd892 Binary files /dev/null and b/audio/se/Buzzer1.m4a differ diff --git a/audio/se/Buzzer1.ogg b/audio/se/Buzzer1.ogg new file mode 100644 index 0000000..f778e4a Binary files /dev/null and b/audio/se/Buzzer1.ogg differ diff --git a/audio/se/Buzzer2.m4a b/audio/se/Buzzer2.m4a new file mode 100644 index 0000000..5f32828 Binary files /dev/null and b/audio/se/Buzzer2.m4a differ diff --git a/audio/se/Buzzer2.ogg b/audio/se/Buzzer2.ogg new file mode 100644 index 0000000..e0b63fb Binary files /dev/null and b/audio/se/Buzzer2.ogg differ diff --git a/audio/se/Cancel1.m4a b/audio/se/Cancel1.m4a new file mode 100644 index 0000000..4e37ba8 Binary files /dev/null and b/audio/se/Cancel1.m4a differ diff --git a/audio/se/Cancel1.ogg b/audio/se/Cancel1.ogg new file mode 100644 index 0000000..7f96026 Binary files /dev/null and b/audio/se/Cancel1.ogg differ diff --git a/audio/se/Cancel2.m4a b/audio/se/Cancel2.m4a new file mode 100644 index 0000000..ba6dd62 Binary files /dev/null and b/audio/se/Cancel2.m4a differ diff --git a/audio/se/Cancel2.ogg b/audio/se/Cancel2.ogg new file mode 100644 index 0000000..e9218d0 Binary files /dev/null and b/audio/se/Cancel2.ogg differ diff --git a/audio/se/Cat.m4a b/audio/se/Cat.m4a new file mode 100644 index 0000000..f08f19c Binary files /dev/null and b/audio/se/Cat.m4a differ diff --git a/audio/se/Cat.ogg b/audio/se/Cat.ogg new file mode 100644 index 0000000..65b6388 Binary files /dev/null and b/audio/se/Cat.ogg differ diff --git a/audio/se/Chest1.m4a b/audio/se/Chest1.m4a new file mode 100644 index 0000000..fd5d365 Binary files /dev/null and b/audio/se/Chest1.m4a differ diff --git a/audio/se/Chest1.ogg b/audio/se/Chest1.ogg new file mode 100644 index 0000000..26b5b4a Binary files /dev/null and b/audio/se/Chest1.ogg differ diff --git a/audio/se/Chest2.m4a b/audio/se/Chest2.m4a new file mode 100644 index 0000000..8b7b471 Binary files /dev/null and b/audio/se/Chest2.m4a differ diff --git a/audio/se/Chest2.ogg b/audio/se/Chest2.ogg new file mode 100644 index 0000000..58301a0 Binary files /dev/null and b/audio/se/Chest2.ogg differ diff --git a/audio/se/Close1.m4a b/audio/se/Close1.m4a new file mode 100644 index 0000000..ef723d7 Binary files /dev/null and b/audio/se/Close1.m4a differ diff --git a/audio/se/Close1.ogg b/audio/se/Close1.ogg new file mode 100644 index 0000000..ce9b595 Binary files /dev/null and b/audio/se/Close1.ogg differ diff --git a/audio/se/Close2.m4a b/audio/se/Close2.m4a new file mode 100644 index 0000000..a657ef1 Binary files /dev/null and b/audio/se/Close2.m4a differ diff --git a/audio/se/Close2.ogg b/audio/se/Close2.ogg new file mode 100644 index 0000000..294b684 Binary files /dev/null and b/audio/se/Close2.ogg differ diff --git a/audio/se/Close3.m4a b/audio/se/Close3.m4a new file mode 100644 index 0000000..1e6d60b Binary files /dev/null and b/audio/se/Close3.m4a differ diff --git a/audio/se/Close3.ogg b/audio/se/Close3.ogg new file mode 100644 index 0000000..248a358 Binary files /dev/null and b/audio/se/Close3.ogg differ diff --git a/audio/se/Coin.m4a b/audio/se/Coin.m4a new file mode 100644 index 0000000..49d8294 Binary files /dev/null and b/audio/se/Coin.m4a differ diff --git a/audio/se/Coin.ogg b/audio/se/Coin.ogg new file mode 100644 index 0000000..9d79ccd Binary files /dev/null and b/audio/se/Coin.ogg differ diff --git a/audio/se/Collapse1.m4a b/audio/se/Collapse1.m4a new file mode 100644 index 0000000..b1acea3 Binary files /dev/null and b/audio/se/Collapse1.m4a differ diff --git a/audio/se/Collapse1.ogg b/audio/se/Collapse1.ogg new file mode 100644 index 0000000..99013cf Binary files /dev/null and b/audio/se/Collapse1.ogg differ diff --git a/audio/se/Collapse2.m4a b/audio/se/Collapse2.m4a new file mode 100644 index 0000000..4ec416e Binary files /dev/null and b/audio/se/Collapse2.m4a differ diff --git a/audio/se/Collapse2.ogg b/audio/se/Collapse2.ogg new file mode 100644 index 0000000..3e8ffff Binary files /dev/null and b/audio/se/Collapse2.ogg differ diff --git a/audio/se/Collapse3.m4a b/audio/se/Collapse3.m4a new file mode 100644 index 0000000..e29a3d4 Binary files /dev/null and b/audio/se/Collapse3.m4a differ diff --git a/audio/se/Collapse3.ogg b/audio/se/Collapse3.ogg new file mode 100644 index 0000000..e27b923 Binary files /dev/null and b/audio/se/Collapse3.ogg differ diff --git a/audio/se/Collapse4.m4a b/audio/se/Collapse4.m4a new file mode 100644 index 0000000..03a12bc Binary files /dev/null and b/audio/se/Collapse4.m4a differ diff --git a/audio/se/Collapse4.ogg b/audio/se/Collapse4.ogg new file mode 100644 index 0000000..1a54361 Binary files /dev/null and b/audio/se/Collapse4.ogg differ diff --git a/audio/se/Computer.m4a b/audio/se/Computer.m4a new file mode 100644 index 0000000..ed6f96d Binary files /dev/null and b/audio/se/Computer.m4a differ diff --git a/audio/se/Computer.ogg b/audio/se/Computer.ogg new file mode 100644 index 0000000..54dc016 Binary files /dev/null and b/audio/se/Computer.ogg differ diff --git a/audio/se/Cow.m4a b/audio/se/Cow.m4a new file mode 100644 index 0000000..9b71d9a Binary files /dev/null and b/audio/se/Cow.m4a differ diff --git a/audio/se/Cow.ogg b/audio/se/Cow.ogg new file mode 100644 index 0000000..afe5ed9 Binary files /dev/null and b/audio/se/Cow.ogg differ diff --git a/audio/se/Crash.m4a b/audio/se/Crash.m4a new file mode 100644 index 0000000..ad41f6b Binary files /dev/null and b/audio/se/Crash.m4a differ diff --git a/audio/se/Crash.ogg b/audio/se/Crash.ogg new file mode 100644 index 0000000..7782f11 Binary files /dev/null and b/audio/se/Crash.ogg differ diff --git a/audio/se/Crossbow.m4a b/audio/se/Crossbow.m4a new file mode 100644 index 0000000..d37e140 Binary files /dev/null and b/audio/se/Crossbow.m4a differ diff --git a/audio/se/Crossbow.ogg b/audio/se/Crossbow.ogg new file mode 100644 index 0000000..b9ddce5 Binary files /dev/null and b/audio/se/Crossbow.ogg differ diff --git a/audio/se/Crow.m4a b/audio/se/Crow.m4a new file mode 100644 index 0000000..b664d4d Binary files /dev/null and b/audio/se/Crow.m4a differ diff --git a/audio/se/Crow.ogg b/audio/se/Crow.ogg new file mode 100644 index 0000000..9b2e077 Binary files /dev/null and b/audio/se/Crow.ogg differ diff --git a/audio/se/Cursor1.m4a b/audio/se/Cursor1.m4a new file mode 100644 index 0000000..55810dd Binary files /dev/null and b/audio/se/Cursor1.m4a differ diff --git a/audio/se/Cursor1.ogg b/audio/se/Cursor1.ogg new file mode 100644 index 0000000..aaba611 Binary files /dev/null and b/audio/se/Cursor1.ogg differ diff --git a/audio/se/Cursor2.m4a b/audio/se/Cursor2.m4a new file mode 100644 index 0000000..698219f Binary files /dev/null and b/audio/se/Cursor2.m4a differ diff --git a/audio/se/Cursor2.ogg b/audio/se/Cursor2.ogg new file mode 100644 index 0000000..59c3e7d Binary files /dev/null and b/audio/se/Cursor2.ogg differ diff --git a/audio/se/Damage1.m4a b/audio/se/Damage1.m4a new file mode 100644 index 0000000..19b340d Binary files /dev/null and b/audio/se/Damage1.m4a differ diff --git a/audio/se/Damage1.ogg b/audio/se/Damage1.ogg new file mode 100644 index 0000000..bd50b39 Binary files /dev/null and b/audio/se/Damage1.ogg differ diff --git a/audio/se/Damage2.m4a b/audio/se/Damage2.m4a new file mode 100644 index 0000000..f2b09d8 Binary files /dev/null and b/audio/se/Damage2.m4a differ diff --git a/audio/se/Damage2.ogg b/audio/se/Damage2.ogg new file mode 100644 index 0000000..9b0dcc5 Binary files /dev/null and b/audio/se/Damage2.ogg differ diff --git a/audio/se/Damage3.m4a b/audio/se/Damage3.m4a new file mode 100644 index 0000000..57bf8c4 Binary files /dev/null and b/audio/se/Damage3.m4a differ diff --git a/audio/se/Damage3.ogg b/audio/se/Damage3.ogg new file mode 100644 index 0000000..4130b27 Binary files /dev/null and b/audio/se/Damage3.ogg differ diff --git a/audio/se/Damage4.m4a b/audio/se/Damage4.m4a new file mode 100644 index 0000000..6a94ef5 Binary files /dev/null and b/audio/se/Damage4.m4a differ diff --git a/audio/se/Damage4.ogg b/audio/se/Damage4.ogg new file mode 100644 index 0000000..07372d2 Binary files /dev/null and b/audio/se/Damage4.ogg differ diff --git a/audio/se/Damage5.m4a b/audio/se/Damage5.m4a new file mode 100644 index 0000000..c2a4a35 Binary files /dev/null and b/audio/se/Damage5.m4a differ diff --git a/audio/se/Damage5.ogg b/audio/se/Damage5.ogg new file mode 100644 index 0000000..f71a60e Binary files /dev/null and b/audio/se/Damage5.ogg differ diff --git a/audio/se/Darkness1.m4a b/audio/se/Darkness1.m4a new file mode 100644 index 0000000..6d9ef4e Binary files /dev/null and b/audio/se/Darkness1.m4a differ diff --git a/audio/se/Darkness1.ogg b/audio/se/Darkness1.ogg new file mode 100644 index 0000000..600a60c Binary files /dev/null and b/audio/se/Darkness1.ogg differ diff --git a/audio/se/Darkness2.m4a b/audio/se/Darkness2.m4a new file mode 100644 index 0000000..8ca0472 Binary files /dev/null and b/audio/se/Darkness2.m4a differ diff --git a/audio/se/Darkness2.ogg b/audio/se/Darkness2.ogg new file mode 100644 index 0000000..28b622b Binary files /dev/null and b/audio/se/Darkness2.ogg differ diff --git a/audio/se/Darkness3.m4a b/audio/se/Darkness3.m4a new file mode 100644 index 0000000..0e7aac7 Binary files /dev/null and b/audio/se/Darkness3.m4a differ diff --git a/audio/se/Darkness3.ogg b/audio/se/Darkness3.ogg new file mode 100644 index 0000000..df599b0 Binary files /dev/null and b/audio/se/Darkness3.ogg differ diff --git a/audio/se/Darkness4.m4a b/audio/se/Darkness4.m4a new file mode 100644 index 0000000..3ad02cb Binary files /dev/null and b/audio/se/Darkness4.m4a differ diff --git a/audio/se/Darkness4.ogg b/audio/se/Darkness4.ogg new file mode 100644 index 0000000..ebede4d Binary files /dev/null and b/audio/se/Darkness4.ogg differ diff --git a/audio/se/Darkness5.m4a b/audio/se/Darkness5.m4a new file mode 100644 index 0000000..ff2af2b Binary files /dev/null and b/audio/se/Darkness5.m4a differ diff --git a/audio/se/Darkness5.ogg b/audio/se/Darkness5.ogg new file mode 100644 index 0000000..ba64a27 Binary files /dev/null and b/audio/se/Darkness5.ogg differ diff --git a/audio/se/Decision1.m4a b/audio/se/Decision1.m4a new file mode 100644 index 0000000..da70188 Binary files /dev/null and b/audio/se/Decision1.m4a differ diff --git a/audio/se/Decision1.ogg b/audio/se/Decision1.ogg new file mode 100644 index 0000000..8fecb02 Binary files /dev/null and b/audio/se/Decision1.ogg differ diff --git a/audio/se/Decision2.m4a b/audio/se/Decision2.m4a new file mode 100644 index 0000000..e5b4adf Binary files /dev/null and b/audio/se/Decision2.m4a differ diff --git a/audio/se/Decision2.ogg b/audio/se/Decision2.ogg new file mode 100644 index 0000000..07723fd Binary files /dev/null and b/audio/se/Decision2.ogg differ diff --git a/audio/se/Devil1.m4a b/audio/se/Devil1.m4a new file mode 100644 index 0000000..89699f6 Binary files /dev/null and b/audio/se/Devil1.m4a differ diff --git a/audio/se/Devil1.ogg b/audio/se/Devil1.ogg new file mode 100644 index 0000000..44a096e Binary files /dev/null and b/audio/se/Devil1.ogg differ diff --git a/audio/se/Devil2.m4a b/audio/se/Devil2.m4a new file mode 100644 index 0000000..792ca37 Binary files /dev/null and b/audio/se/Devil2.m4a differ diff --git a/audio/se/Devil2.ogg b/audio/se/Devil2.ogg new file mode 100644 index 0000000..3b545d8 Binary files /dev/null and b/audio/se/Devil2.ogg differ diff --git a/audio/se/Disappointment.m4a b/audio/se/Disappointment.m4a new file mode 100644 index 0000000..ab5d864 Binary files /dev/null and b/audio/se/Disappointment.m4a differ diff --git a/audio/se/Disappointment.ogg b/audio/se/Disappointment.ogg new file mode 100644 index 0000000..0668c79 Binary files /dev/null and b/audio/se/Disappointment.ogg differ diff --git a/audio/se/Dive.m4a b/audio/se/Dive.m4a new file mode 100644 index 0000000..7a2b445 Binary files /dev/null and b/audio/se/Dive.m4a differ diff --git a/audio/se/Dive.ogg b/audio/se/Dive.ogg new file mode 100644 index 0000000..04ecb08 Binary files /dev/null and b/audio/se/Dive.ogg differ diff --git a/audio/se/Dog.m4a b/audio/se/Dog.m4a new file mode 100644 index 0000000..095b7f4 Binary files /dev/null and b/audio/se/Dog.m4a differ diff --git a/audio/se/Dog.ogg b/audio/se/Dog.ogg new file mode 100644 index 0000000..df9e5e7 Binary files /dev/null and b/audio/se/Dog.ogg differ diff --git a/audio/se/Door1.m4a b/audio/se/Door1.m4a new file mode 100644 index 0000000..3b66156 Binary files /dev/null and b/audio/se/Door1.m4a differ diff --git a/audio/se/Door1.ogg b/audio/se/Door1.ogg new file mode 100644 index 0000000..778f7d0 Binary files /dev/null and b/audio/se/Door1.ogg differ diff --git a/audio/se/Door2.m4a b/audio/se/Door2.m4a new file mode 100644 index 0000000..b0d3959 Binary files /dev/null and b/audio/se/Door2.m4a differ diff --git a/audio/se/Door2.ogg b/audio/se/Door2.ogg new file mode 100644 index 0000000..8458254 Binary files /dev/null and b/audio/se/Door2.ogg differ diff --git a/audio/se/Door3.m4a b/audio/se/Door3.m4a new file mode 100644 index 0000000..b123cb1 Binary files /dev/null and b/audio/se/Door3.m4a differ diff --git a/audio/se/Door3.ogg b/audio/se/Door3.ogg new file mode 100644 index 0000000..eaaeedd Binary files /dev/null and b/audio/se/Door3.ogg differ diff --git a/audio/se/Door4.m4a b/audio/se/Door4.m4a new file mode 100644 index 0000000..938572b Binary files /dev/null and b/audio/se/Door4.m4a differ diff --git a/audio/se/Door4.ogg b/audio/se/Door4.ogg new file mode 100644 index 0000000..c888dd8 Binary files /dev/null and b/audio/se/Door4.ogg differ diff --git a/audio/se/Down1.m4a b/audio/se/Down1.m4a new file mode 100644 index 0000000..dddf9b4 Binary files /dev/null and b/audio/se/Down1.m4a differ diff --git a/audio/se/Down1.ogg b/audio/se/Down1.ogg new file mode 100644 index 0000000..e4ef9ff Binary files /dev/null and b/audio/se/Down1.ogg differ diff --git a/audio/se/Down2.m4a b/audio/se/Down2.m4a new file mode 100644 index 0000000..67900ca Binary files /dev/null and b/audio/se/Down2.m4a differ diff --git a/audio/se/Down2.ogg b/audio/se/Down2.ogg new file mode 100644 index 0000000..cea96c3 Binary files /dev/null and b/audio/se/Down2.ogg differ diff --git a/audio/se/Earth1.m4a b/audio/se/Earth1.m4a new file mode 100644 index 0000000..3188a99 Binary files /dev/null and b/audio/se/Earth1.m4a differ diff --git a/audio/se/Earth1.ogg b/audio/se/Earth1.ogg new file mode 100644 index 0000000..375f0d3 Binary files /dev/null and b/audio/se/Earth1.ogg differ diff --git a/audio/se/Earth2.m4a b/audio/se/Earth2.m4a new file mode 100644 index 0000000..d115a26 Binary files /dev/null and b/audio/se/Earth2.m4a differ diff --git a/audio/se/Earth2.ogg b/audio/se/Earth2.ogg new file mode 100644 index 0000000..2bcf265 Binary files /dev/null and b/audio/se/Earth2.ogg differ diff --git a/audio/se/Earth3.m4a b/audio/se/Earth3.m4a new file mode 100644 index 0000000..8ed49b2 Binary files /dev/null and b/audio/se/Earth3.m4a differ diff --git a/audio/se/Earth3.ogg b/audio/se/Earth3.ogg new file mode 100644 index 0000000..a18de1d Binary files /dev/null and b/audio/se/Earth3.ogg differ diff --git a/audio/se/Earth4.m4a b/audio/se/Earth4.m4a new file mode 100644 index 0000000..10ed2c7 Binary files /dev/null and b/audio/se/Earth4.m4a differ diff --git a/audio/se/Earth4.ogg b/audio/se/Earth4.ogg new file mode 100644 index 0000000..f361e07 Binary files /dev/null and b/audio/se/Earth4.ogg differ diff --git a/audio/se/Earth5.m4a b/audio/se/Earth5.m4a new file mode 100644 index 0000000..62cdf68 Binary files /dev/null and b/audio/se/Earth5.m4a differ diff --git a/audio/se/Earth5.ogg b/audio/se/Earth5.ogg new file mode 100644 index 0000000..69ef39d Binary files /dev/null and b/audio/se/Earth5.ogg differ diff --git a/audio/se/Electrocardiogram.m4a b/audio/se/Electrocardiogram.m4a new file mode 100644 index 0000000..7da6dff Binary files /dev/null and b/audio/se/Electrocardiogram.m4a differ diff --git a/audio/se/Electrocardiogram.ogg b/audio/se/Electrocardiogram.ogg new file mode 100644 index 0000000..077afab Binary files /dev/null and b/audio/se/Electrocardiogram.ogg differ diff --git a/audio/se/Equip1.m4a b/audio/se/Equip1.m4a new file mode 100644 index 0000000..fbdbe11 Binary files /dev/null and b/audio/se/Equip1.m4a differ diff --git a/audio/se/Equip1.ogg b/audio/se/Equip1.ogg new file mode 100644 index 0000000..762c2a6 Binary files /dev/null and b/audio/se/Equip1.ogg differ diff --git a/audio/se/Equip2.m4a b/audio/se/Equip2.m4a new file mode 100644 index 0000000..e591d89 Binary files /dev/null and b/audio/se/Equip2.m4a differ diff --git a/audio/se/Equip2.ogg b/audio/se/Equip2.ogg new file mode 100644 index 0000000..b04f392 Binary files /dev/null and b/audio/se/Equip2.ogg differ diff --git a/audio/se/Evasion1.m4a b/audio/se/Evasion1.m4a new file mode 100644 index 0000000..7a754ba Binary files /dev/null and b/audio/se/Evasion1.m4a differ diff --git a/audio/se/Evasion1.ogg b/audio/se/Evasion1.ogg new file mode 100644 index 0000000..4889b0e Binary files /dev/null and b/audio/se/Evasion1.ogg differ diff --git a/audio/se/Evasion2.m4a b/audio/se/Evasion2.m4a new file mode 100644 index 0000000..a7d8c5f Binary files /dev/null and b/audio/se/Evasion2.m4a differ diff --git a/audio/se/Evasion2.ogg b/audio/se/Evasion2.ogg new file mode 100644 index 0000000..2d63656 Binary files /dev/null and b/audio/se/Evasion2.ogg differ diff --git a/audio/se/Explosion1.m4a b/audio/se/Explosion1.m4a new file mode 100644 index 0000000..1b87906 Binary files /dev/null and b/audio/se/Explosion1.m4a differ diff --git a/audio/se/Explosion1.ogg b/audio/se/Explosion1.ogg new file mode 100644 index 0000000..c628732 Binary files /dev/null and b/audio/se/Explosion1.ogg differ diff --git a/audio/se/Explosion2.m4a b/audio/se/Explosion2.m4a new file mode 100644 index 0000000..6694771 Binary files /dev/null and b/audio/se/Explosion2.m4a differ diff --git a/audio/se/Explosion2.ogg b/audio/se/Explosion2.ogg new file mode 100644 index 0000000..fd0006e Binary files /dev/null and b/audio/se/Explosion2.ogg differ diff --git a/audio/se/Fall.m4a b/audio/se/Fall.m4a new file mode 100644 index 0000000..fc43e5c Binary files /dev/null and b/audio/se/Fall.m4a differ diff --git a/audio/se/Fall.ogg b/audio/se/Fall.ogg new file mode 100644 index 0000000..a1a0ea9 Binary files /dev/null and b/audio/se/Fall.ogg differ diff --git a/audio/se/Fire1.m4a b/audio/se/Fire1.m4a new file mode 100644 index 0000000..31dfd51 Binary files /dev/null and b/audio/se/Fire1.m4a differ diff --git a/audio/se/Fire1.ogg b/audio/se/Fire1.ogg new file mode 100644 index 0000000..23ffae9 Binary files /dev/null and b/audio/se/Fire1.ogg differ diff --git a/audio/se/Fire2.m4a b/audio/se/Fire2.m4a new file mode 100644 index 0000000..cd6599a Binary files /dev/null and b/audio/se/Fire2.m4a differ diff --git a/audio/se/Fire2.ogg b/audio/se/Fire2.ogg new file mode 100644 index 0000000..371f853 Binary files /dev/null and b/audio/se/Fire2.ogg differ diff --git a/audio/se/Fire3.m4a b/audio/se/Fire3.m4a new file mode 100644 index 0000000..05bf6e8 Binary files /dev/null and b/audio/se/Fire3.m4a differ diff --git a/audio/se/Fire3.ogg b/audio/se/Fire3.ogg new file mode 100644 index 0000000..006023b Binary files /dev/null and b/audio/se/Fire3.ogg differ diff --git a/audio/se/Flash1.m4a b/audio/se/Flash1.m4a new file mode 100644 index 0000000..b310bc9 Binary files /dev/null and b/audio/se/Flash1.m4a differ diff --git a/audio/se/Flash1.ogg b/audio/se/Flash1.ogg new file mode 100644 index 0000000..35145b0 Binary files /dev/null and b/audio/se/Flash1.ogg differ diff --git a/audio/se/Flash2.m4a b/audio/se/Flash2.m4a new file mode 100644 index 0000000..5fab80b Binary files /dev/null and b/audio/se/Flash2.m4a differ diff --git a/audio/se/Flash2.ogg b/audio/se/Flash2.ogg new file mode 100644 index 0000000..cfd323e Binary files /dev/null and b/audio/se/Flash2.ogg differ diff --git a/audio/se/Frog.m4a b/audio/se/Frog.m4a new file mode 100644 index 0000000..2834fa7 Binary files /dev/null and b/audio/se/Frog.m4a differ diff --git a/audio/se/Frog.ogg b/audio/se/Frog.ogg new file mode 100644 index 0000000..e894acc Binary files /dev/null and b/audio/se/Frog.ogg differ diff --git a/audio/se/Growl.m4a b/audio/se/Growl.m4a new file mode 100644 index 0000000..fab26f1 Binary files /dev/null and b/audio/se/Growl.m4a differ diff --git a/audio/se/Growl.ogg b/audio/se/Growl.ogg new file mode 100644 index 0000000..a0035d1 Binary files /dev/null and b/audio/se/Growl.ogg differ diff --git a/audio/se/Gun1.m4a b/audio/se/Gun1.m4a new file mode 100644 index 0000000..dd0455e Binary files /dev/null and b/audio/se/Gun1.m4a differ diff --git a/audio/se/Gun1.ogg b/audio/se/Gun1.ogg new file mode 100644 index 0000000..8e7ff20 Binary files /dev/null and b/audio/se/Gun1.ogg differ diff --git a/audio/se/Gun2.m4a b/audio/se/Gun2.m4a new file mode 100644 index 0000000..832511a Binary files /dev/null and b/audio/se/Gun2.m4a differ diff --git a/audio/se/Gun2.ogg b/audio/se/Gun2.ogg new file mode 100644 index 0000000..8a9bc1c Binary files /dev/null and b/audio/se/Gun2.ogg differ diff --git a/audio/se/Hammer.m4a b/audio/se/Hammer.m4a new file mode 100644 index 0000000..7ba957f Binary files /dev/null and b/audio/se/Hammer.m4a differ diff --git a/audio/se/Hammer.ogg b/audio/se/Hammer.ogg new file mode 100644 index 0000000..5bfec73 Binary files /dev/null and b/audio/se/Hammer.ogg differ diff --git a/audio/se/Heal1.m4a b/audio/se/Heal1.m4a new file mode 100644 index 0000000..8e04644 Binary files /dev/null and b/audio/se/Heal1.m4a differ diff --git a/audio/se/Heal1.ogg b/audio/se/Heal1.ogg new file mode 100644 index 0000000..778a753 Binary files /dev/null and b/audio/se/Heal1.ogg differ diff --git a/audio/se/Heal2.m4a b/audio/se/Heal2.m4a new file mode 100644 index 0000000..e61ea94 Binary files /dev/null and b/audio/se/Heal2.m4a differ diff --git a/audio/se/Heal2.ogg b/audio/se/Heal2.ogg new file mode 100644 index 0000000..6e86692 Binary files /dev/null and b/audio/se/Heal2.ogg differ diff --git a/audio/se/Heal3.m4a b/audio/se/Heal3.m4a new file mode 100644 index 0000000..3f4d4f9 Binary files /dev/null and b/audio/se/Heal3.m4a differ diff --git a/audio/se/Heal3.ogg b/audio/se/Heal3.ogg new file mode 100644 index 0000000..2c5a683 Binary files /dev/null and b/audio/se/Heal3.ogg differ diff --git a/audio/se/Horn.m4a b/audio/se/Horn.m4a new file mode 100644 index 0000000..1a54428 Binary files /dev/null and b/audio/se/Horn.m4a differ diff --git a/audio/se/Horn.ogg b/audio/se/Horn.ogg new file mode 100644 index 0000000..c9fae73 Binary files /dev/null and b/audio/se/Horn.ogg differ diff --git a/audio/se/Horse.m4a b/audio/se/Horse.m4a new file mode 100644 index 0000000..9c38fc7 Binary files /dev/null and b/audio/se/Horse.m4a differ diff --git a/audio/se/Horse.ogg b/audio/se/Horse.ogg new file mode 100644 index 0000000..f955347 Binary files /dev/null and b/audio/se/Horse.ogg differ diff --git a/audio/se/Ice1.m4a b/audio/se/Ice1.m4a new file mode 100644 index 0000000..4bb8b39 Binary files /dev/null and b/audio/se/Ice1.m4a differ diff --git a/audio/se/Ice1.ogg b/audio/se/Ice1.ogg new file mode 100644 index 0000000..d033f2f Binary files /dev/null and b/audio/se/Ice1.ogg differ diff --git a/audio/se/Ice2.m4a b/audio/se/Ice2.m4a new file mode 100644 index 0000000..754caa5 Binary files /dev/null and b/audio/se/Ice2.m4a differ diff --git a/audio/se/Ice2.ogg b/audio/se/Ice2.ogg new file mode 100644 index 0000000..e846859 Binary files /dev/null and b/audio/se/Ice2.ogg differ diff --git a/audio/se/Ice3.m4a b/audio/se/Ice3.m4a new file mode 100644 index 0000000..a47ad3f Binary files /dev/null and b/audio/se/Ice3.m4a differ diff --git a/audio/se/Ice3.ogg b/audio/se/Ice3.ogg new file mode 100644 index 0000000..7a5b5c7 Binary files /dev/null and b/audio/se/Ice3.ogg differ diff --git a/audio/se/Ice4.m4a b/audio/se/Ice4.m4a new file mode 100644 index 0000000..bdf7297 Binary files /dev/null and b/audio/se/Ice4.m4a differ diff --git a/audio/se/Ice4.ogg b/audio/se/Ice4.ogg new file mode 100644 index 0000000..bd760ce Binary files /dev/null and b/audio/se/Ice4.ogg differ diff --git a/audio/se/Ice5.m4a b/audio/se/Ice5.m4a new file mode 100644 index 0000000..8a65b4b Binary files /dev/null and b/audio/se/Ice5.m4a differ diff --git a/audio/se/Ice5.ogg b/audio/se/Ice5.ogg new file mode 100644 index 0000000..38dbd9d Binary files /dev/null and b/audio/se/Ice5.ogg differ diff --git a/audio/se/Item1.m4a b/audio/se/Item1.m4a new file mode 100644 index 0000000..3d2a060 Binary files /dev/null and b/audio/se/Item1.m4a differ diff --git a/audio/se/Item1.ogg b/audio/se/Item1.ogg new file mode 100644 index 0000000..55f1732 Binary files /dev/null and b/audio/se/Item1.ogg differ diff --git a/audio/se/Item2.m4a b/audio/se/Item2.m4a new file mode 100644 index 0000000..50b1a63 Binary files /dev/null and b/audio/se/Item2.m4a differ diff --git a/audio/se/Item2.ogg b/audio/se/Item2.ogg new file mode 100644 index 0000000..690b943 Binary files /dev/null and b/audio/se/Item2.ogg differ diff --git a/audio/se/Item3.m4a b/audio/se/Item3.m4a new file mode 100644 index 0000000..2711757 Binary files /dev/null and b/audio/se/Item3.m4a differ diff --git a/audio/se/Item3.ogg b/audio/se/Item3.ogg new file mode 100644 index 0000000..dd88a94 Binary files /dev/null and b/audio/se/Item3.ogg differ diff --git a/audio/se/Jump1.m4a b/audio/se/Jump1.m4a new file mode 100644 index 0000000..2520b28 Binary files /dev/null and b/audio/se/Jump1.m4a differ diff --git a/audio/se/Jump1.ogg b/audio/se/Jump1.ogg new file mode 100644 index 0000000..1c41708 Binary files /dev/null and b/audio/se/Jump1.ogg differ diff --git a/audio/se/Jump2.m4a b/audio/se/Jump2.m4a new file mode 100644 index 0000000..ed4fe45 Binary files /dev/null and b/audio/se/Jump2.m4a differ diff --git a/audio/se/Jump2.ogg b/audio/se/Jump2.ogg new file mode 100644 index 0000000..69a33cc Binary files /dev/null and b/audio/se/Jump2.ogg differ diff --git a/audio/se/Key.m4a b/audio/se/Key.m4a new file mode 100644 index 0000000..ce788fb Binary files /dev/null and b/audio/se/Key.m4a differ diff --git a/audio/se/Key.ogg b/audio/se/Key.ogg new file mode 100644 index 0000000..4a8e838 Binary files /dev/null and b/audio/se/Key.ogg differ diff --git a/audio/se/Knock.m4a b/audio/se/Knock.m4a new file mode 100644 index 0000000..15e2b73 Binary files /dev/null and b/audio/se/Knock.m4a differ diff --git a/audio/se/Knock.ogg b/audio/se/Knock.ogg new file mode 100644 index 0000000..2253a52 Binary files /dev/null and b/audio/se/Knock.ogg differ diff --git a/audio/se/Laser1.m4a b/audio/se/Laser1.m4a new file mode 100644 index 0000000..5dae62d Binary files /dev/null and b/audio/se/Laser1.m4a differ diff --git a/audio/se/Laser1.ogg b/audio/se/Laser1.ogg new file mode 100644 index 0000000..8d190b2 Binary files /dev/null and b/audio/se/Laser1.ogg differ diff --git a/audio/se/Laser2.m4a b/audio/se/Laser2.m4a new file mode 100644 index 0000000..57939f7 Binary files /dev/null and b/audio/se/Laser2.m4a differ diff --git a/audio/se/Laser2.ogg b/audio/se/Laser2.ogg new file mode 100644 index 0000000..7189bc0 Binary files /dev/null and b/audio/se/Laser2.ogg differ diff --git a/audio/se/Laugh.m4a b/audio/se/Laugh.m4a new file mode 100644 index 0000000..bdb5a3f Binary files /dev/null and b/audio/se/Laugh.m4a differ diff --git a/audio/se/Laugh.ogg b/audio/se/Laugh.ogg new file mode 100644 index 0000000..655ab1c Binary files /dev/null and b/audio/se/Laugh.ogg differ diff --git a/audio/se/Launch.m4a b/audio/se/Launch.m4a new file mode 100644 index 0000000..6621e3c Binary files /dev/null and b/audio/se/Launch.m4a differ diff --git a/audio/se/Launch.ogg b/audio/se/Launch.ogg new file mode 100644 index 0000000..0394d6a Binary files /dev/null and b/audio/se/Launch.ogg differ diff --git a/audio/se/Leakage.m4a b/audio/se/Leakage.m4a new file mode 100644 index 0000000..59d90e8 Binary files /dev/null and b/audio/se/Leakage.m4a differ diff --git a/audio/se/Leakage.ogg b/audio/se/Leakage.ogg new file mode 100644 index 0000000..711bf21 Binary files /dev/null and b/audio/se/Leakage.ogg differ diff --git a/audio/se/Liquid.m4a b/audio/se/Liquid.m4a new file mode 100644 index 0000000..d06026a Binary files /dev/null and b/audio/se/Liquid.m4a differ diff --git a/audio/se/Liquid.ogg b/audio/se/Liquid.ogg new file mode 100644 index 0000000..0b91cf8 Binary files /dev/null and b/audio/se/Liquid.ogg differ diff --git a/audio/se/Load.m4a b/audio/se/Load.m4a new file mode 100644 index 0000000..fe95a4d Binary files /dev/null and b/audio/se/Load.m4a differ diff --git a/audio/se/Load.ogg b/audio/se/Load.ogg new file mode 100644 index 0000000..4ae76c4 Binary files /dev/null and b/audio/se/Load.ogg differ diff --git a/audio/se/Machine.m4a b/audio/se/Machine.m4a new file mode 100644 index 0000000..ddcbbcc Binary files /dev/null and b/audio/se/Machine.m4a differ diff --git a/audio/se/Machine.ogg b/audio/se/Machine.ogg new file mode 100644 index 0000000..e168ee7 Binary files /dev/null and b/audio/se/Machine.ogg differ diff --git a/audio/se/Magic1.m4a b/audio/se/Magic1.m4a new file mode 100644 index 0000000..8a91c6f Binary files /dev/null and b/audio/se/Magic1.m4a differ diff --git a/audio/se/Magic1.ogg b/audio/se/Magic1.ogg new file mode 100644 index 0000000..68b36b8 Binary files /dev/null and b/audio/se/Magic1.ogg differ diff --git a/audio/se/Magic2.m4a b/audio/se/Magic2.m4a new file mode 100644 index 0000000..2e51d8a Binary files /dev/null and b/audio/se/Magic2.m4a differ diff --git a/audio/se/Magic2.ogg b/audio/se/Magic2.ogg new file mode 100644 index 0000000..4f8af5e Binary files /dev/null and b/audio/se/Magic2.ogg differ diff --git a/audio/se/Magic3.m4a b/audio/se/Magic3.m4a new file mode 100644 index 0000000..d2d936e Binary files /dev/null and b/audio/se/Magic3.m4a differ diff --git a/audio/se/Magic3.ogg b/audio/se/Magic3.ogg new file mode 100644 index 0000000..4b9b7fb Binary files /dev/null and b/audio/se/Magic3.ogg differ diff --git a/audio/se/Magic4.m4a b/audio/se/Magic4.m4a new file mode 100644 index 0000000..06b60f8 Binary files /dev/null and b/audio/se/Magic4.m4a differ diff --git a/audio/se/Magic4.ogg b/audio/se/Magic4.ogg new file mode 100644 index 0000000..8cb7fab Binary files /dev/null and b/audio/se/Magic4.ogg differ diff --git a/audio/se/Miss.m4a b/audio/se/Miss.m4a new file mode 100644 index 0000000..86004f3 Binary files /dev/null and b/audio/se/Miss.m4a differ diff --git a/audio/se/Miss.ogg b/audio/se/Miss.ogg new file mode 100644 index 0000000..dc779a0 Binary files /dev/null and b/audio/se/Miss.ogg differ diff --git a/audio/se/Monster1.m4a b/audio/se/Monster1.m4a new file mode 100644 index 0000000..350a012 Binary files /dev/null and b/audio/se/Monster1.m4a differ diff --git a/audio/se/Monster1.ogg b/audio/se/Monster1.ogg new file mode 100644 index 0000000..3138d13 Binary files /dev/null and b/audio/se/Monster1.ogg differ diff --git a/audio/se/Monster2.m4a b/audio/se/Monster2.m4a new file mode 100644 index 0000000..31dd49b Binary files /dev/null and b/audio/se/Monster2.m4a differ diff --git a/audio/se/Monster2.ogg b/audio/se/Monster2.ogg new file mode 100644 index 0000000..d7491c7 Binary files /dev/null and b/audio/se/Monster2.ogg differ diff --git a/audio/se/Monster3.m4a b/audio/se/Monster3.m4a new file mode 100644 index 0000000..e274bc7 Binary files /dev/null and b/audio/se/Monster3.m4a differ diff --git a/audio/se/Monster3.ogg b/audio/se/Monster3.ogg new file mode 100644 index 0000000..6bebe2c Binary files /dev/null and b/audio/se/Monster3.ogg differ diff --git a/audio/se/Monster4.m4a b/audio/se/Monster4.m4a new file mode 100644 index 0000000..0cff76a Binary files /dev/null and b/audio/se/Monster4.m4a differ diff --git a/audio/se/Monster4.ogg b/audio/se/Monster4.ogg new file mode 100644 index 0000000..365f045 Binary files /dev/null and b/audio/se/Monster4.ogg differ diff --git a/audio/se/Monster5.m4a b/audio/se/Monster5.m4a new file mode 100644 index 0000000..c629cd0 Binary files /dev/null and b/audio/se/Monster5.m4a differ diff --git a/audio/se/Monster5.ogg b/audio/se/Monster5.ogg new file mode 100644 index 0000000..ffe96cf Binary files /dev/null and b/audio/se/Monster5.ogg differ diff --git a/audio/se/Move1.m4a b/audio/se/Move1.m4a new file mode 100644 index 0000000..f66c405 Binary files /dev/null and b/audio/se/Move1.m4a differ diff --git a/audio/se/Move1.ogg b/audio/se/Move1.ogg new file mode 100644 index 0000000..9cd2492 Binary files /dev/null and b/audio/se/Move1.ogg differ diff --git a/audio/se/Move2.m4a b/audio/se/Move2.m4a new file mode 100644 index 0000000..69a7319 Binary files /dev/null and b/audio/se/Move2.m4a differ diff --git a/audio/se/Move2.ogg b/audio/se/Move2.ogg new file mode 100644 index 0000000..5a1c268 Binary files /dev/null and b/audio/se/Move2.ogg differ diff --git a/audio/se/Move3.m4a b/audio/se/Move3.m4a new file mode 100644 index 0000000..c272614 Binary files /dev/null and b/audio/se/Move3.m4a differ diff --git a/audio/se/Move3.ogg b/audio/se/Move3.ogg new file mode 100644 index 0000000..64a153c Binary files /dev/null and b/audio/se/Move3.ogg differ diff --git a/audio/se/Move4.m4a b/audio/se/Move4.m4a new file mode 100644 index 0000000..135d2cc Binary files /dev/null and b/audio/se/Move4.m4a differ diff --git a/audio/se/Move4.ogg b/audio/se/Move4.ogg new file mode 100644 index 0000000..53b41d2 Binary files /dev/null and b/audio/se/Move4.ogg differ diff --git a/audio/se/Move5.m4a b/audio/se/Move5.m4a new file mode 100644 index 0000000..85e63bd Binary files /dev/null and b/audio/se/Move5.m4a differ diff --git a/audio/se/Move5.ogg b/audio/se/Move5.ogg new file mode 100644 index 0000000..4588486 Binary files /dev/null and b/audio/se/Move5.ogg differ diff --git a/audio/se/Neon.m4a b/audio/se/Neon.m4a new file mode 100644 index 0000000..71e0a7a Binary files /dev/null and b/audio/se/Neon.m4a differ diff --git a/audio/se/Neon.ogg b/audio/se/Neon.ogg new file mode 100644 index 0000000..35298b7 Binary files /dev/null and b/audio/se/Neon.ogg differ diff --git a/audio/se/Noise.m4a b/audio/se/Noise.m4a new file mode 100644 index 0000000..7de28dd Binary files /dev/null and b/audio/se/Noise.m4a differ diff --git a/audio/se/Noise.ogg b/audio/se/Noise.ogg new file mode 100644 index 0000000..4e05117 Binary files /dev/null and b/audio/se/Noise.ogg differ diff --git a/audio/se/Open1.m4a b/audio/se/Open1.m4a new file mode 100644 index 0000000..4748923 Binary files /dev/null and b/audio/se/Open1.m4a differ diff --git a/audio/se/Open1.ogg b/audio/se/Open1.ogg new file mode 100644 index 0000000..2097997 Binary files /dev/null and b/audio/se/Open1.ogg differ diff --git a/audio/se/Open2.m4a b/audio/se/Open2.m4a new file mode 100644 index 0000000..8c210e5 Binary files /dev/null and b/audio/se/Open2.m4a differ diff --git a/audio/se/Open2.ogg b/audio/se/Open2.ogg new file mode 100644 index 0000000..be1078d Binary files /dev/null and b/audio/se/Open2.ogg differ diff --git a/audio/se/Open3.m4a b/audio/se/Open3.m4a new file mode 100644 index 0000000..3428491 Binary files /dev/null and b/audio/se/Open3.m4a differ diff --git a/audio/se/Open3.ogg b/audio/se/Open3.ogg new file mode 100644 index 0000000..af1e454 Binary files /dev/null and b/audio/se/Open3.ogg differ diff --git a/audio/se/Open4.m4a b/audio/se/Open4.m4a new file mode 100644 index 0000000..3d69be5 Binary files /dev/null and b/audio/se/Open4.m4a differ diff --git a/audio/se/Open4.ogg b/audio/se/Open4.ogg new file mode 100644 index 0000000..bd9bf22 Binary files /dev/null and b/audio/se/Open4.ogg differ diff --git a/audio/se/Open5.m4a b/audio/se/Open5.m4a new file mode 100644 index 0000000..f882185 Binary files /dev/null and b/audio/se/Open5.m4a differ diff --git a/audio/se/Open5.ogg b/audio/se/Open5.ogg new file mode 100644 index 0000000..62e358a Binary files /dev/null and b/audio/se/Open5.ogg differ diff --git a/audio/se/Paralyze1.m4a b/audio/se/Paralyze1.m4a new file mode 100644 index 0000000..510151c Binary files /dev/null and b/audio/se/Paralyze1.m4a differ diff --git a/audio/se/Paralyze1.ogg b/audio/se/Paralyze1.ogg new file mode 100644 index 0000000..65085ff Binary files /dev/null and b/audio/se/Paralyze1.ogg differ diff --git a/audio/se/Paralyze2.m4a b/audio/se/Paralyze2.m4a new file mode 100644 index 0000000..0ba2099 Binary files /dev/null and b/audio/se/Paralyze2.m4a differ diff --git a/audio/se/Paralyze2.ogg b/audio/se/Paralyze2.ogg new file mode 100644 index 0000000..69f29c7 Binary files /dev/null and b/audio/se/Paralyze2.ogg differ diff --git a/audio/se/Paralyze3.m4a b/audio/se/Paralyze3.m4a new file mode 100644 index 0000000..aa4b9a6 Binary files /dev/null and b/audio/se/Paralyze3.m4a differ diff --git a/audio/se/Paralyze3.ogg b/audio/se/Paralyze3.ogg new file mode 100644 index 0000000..c5b5475 Binary files /dev/null and b/audio/se/Paralyze3.ogg differ diff --git a/audio/se/Parry.m4a b/audio/se/Parry.m4a new file mode 100644 index 0000000..94a97c5 Binary files /dev/null and b/audio/se/Parry.m4a differ diff --git a/audio/se/Parry.ogg b/audio/se/Parry.ogg new file mode 100644 index 0000000..8044751 Binary files /dev/null and b/audio/se/Parry.ogg differ diff --git a/audio/se/Phone.m4a b/audio/se/Phone.m4a new file mode 100644 index 0000000..93fb6ac Binary files /dev/null and b/audio/se/Phone.m4a differ diff --git a/audio/se/Phone.ogg b/audio/se/Phone.ogg new file mode 100644 index 0000000..7ef04bb Binary files /dev/null and b/audio/se/Phone.ogg differ diff --git a/audio/se/Poison.m4a b/audio/se/Poison.m4a new file mode 100644 index 0000000..e567a5e Binary files /dev/null and b/audio/se/Poison.m4a differ diff --git a/audio/se/Poison.ogg b/audio/se/Poison.ogg new file mode 100644 index 0000000..9d51b7f Binary files /dev/null and b/audio/se/Poison.ogg differ diff --git a/audio/se/Pollen.m4a b/audio/se/Pollen.m4a new file mode 100644 index 0000000..83cf9d0 Binary files /dev/null and b/audio/se/Pollen.m4a differ diff --git a/audio/se/Pollen.ogg b/audio/se/Pollen.ogg new file mode 100644 index 0000000..532d80c Binary files /dev/null and b/audio/se/Pollen.ogg differ diff --git a/audio/se/Powerup.m4a b/audio/se/Powerup.m4a new file mode 100644 index 0000000..4c0ae8e Binary files /dev/null and b/audio/se/Powerup.m4a differ diff --git a/audio/se/Powerup.ogg b/audio/se/Powerup.ogg new file mode 100644 index 0000000..8967d31 Binary files /dev/null and b/audio/se/Powerup.ogg differ diff --git a/audio/se/Push.m4a b/audio/se/Push.m4a new file mode 100644 index 0000000..9d62486 Binary files /dev/null and b/audio/se/Push.m4a differ diff --git a/audio/se/Push.ogg b/audio/se/Push.ogg new file mode 100644 index 0000000..8878e77 Binary files /dev/null and b/audio/se/Push.ogg differ diff --git a/audio/se/Raise1.m4a b/audio/se/Raise1.m4a new file mode 100644 index 0000000..10993fd Binary files /dev/null and b/audio/se/Raise1.m4a differ diff --git a/audio/se/Raise1.ogg b/audio/se/Raise1.ogg new file mode 100644 index 0000000..26cd14c Binary files /dev/null and b/audio/se/Raise1.ogg differ diff --git a/audio/se/Raise2.m4a b/audio/se/Raise2.m4a new file mode 100644 index 0000000..ce66687 Binary files /dev/null and b/audio/se/Raise2.m4a differ diff --git a/audio/se/Raise2.ogg b/audio/se/Raise2.ogg new file mode 100644 index 0000000..81587f0 Binary files /dev/null and b/audio/se/Raise2.ogg differ diff --git a/audio/se/Recovery.m4a b/audio/se/Recovery.m4a new file mode 100644 index 0000000..6b79e35 Binary files /dev/null and b/audio/se/Recovery.m4a differ diff --git a/audio/se/Recovery.ogg b/audio/se/Recovery.ogg new file mode 100644 index 0000000..7ad6dbf Binary files /dev/null and b/audio/se/Recovery.ogg differ diff --git a/audio/se/Reflection.m4a b/audio/se/Reflection.m4a new file mode 100644 index 0000000..5bdf673 Binary files /dev/null and b/audio/se/Reflection.m4a differ diff --git a/audio/se/Reflection.ogg b/audio/se/Reflection.ogg new file mode 100644 index 0000000..5928681 Binary files /dev/null and b/audio/se/Reflection.ogg differ diff --git a/audio/se/Run.m4a b/audio/se/Run.m4a new file mode 100644 index 0000000..4d53e58 Binary files /dev/null and b/audio/se/Run.m4a differ diff --git a/audio/se/Run.ogg b/audio/se/Run.ogg new file mode 100644 index 0000000..087ba8f Binary files /dev/null and b/audio/se/Run.ogg differ diff --git a/audio/se/Saint1.m4a b/audio/se/Saint1.m4a new file mode 100644 index 0000000..696181b Binary files /dev/null and b/audio/se/Saint1.m4a differ diff --git a/audio/se/Saint1.ogg b/audio/se/Saint1.ogg new file mode 100644 index 0000000..309c06a Binary files /dev/null and b/audio/se/Saint1.ogg differ diff --git a/audio/se/Saint2.m4a b/audio/se/Saint2.m4a new file mode 100644 index 0000000..85f9202 Binary files /dev/null and b/audio/se/Saint2.m4a differ diff --git a/audio/se/Saint2.ogg b/audio/se/Saint2.ogg new file mode 100644 index 0000000..f167b94 Binary files /dev/null and b/audio/se/Saint2.ogg differ diff --git a/audio/se/Saint3.m4a b/audio/se/Saint3.m4a new file mode 100644 index 0000000..10ee36f Binary files /dev/null and b/audio/se/Saint3.m4a differ diff --git a/audio/se/Saint3.ogg b/audio/se/Saint3.ogg new file mode 100644 index 0000000..8d06876 Binary files /dev/null and b/audio/se/Saint3.ogg differ diff --git a/audio/se/Saint4.m4a b/audio/se/Saint4.m4a new file mode 100644 index 0000000..e881533 Binary files /dev/null and b/audio/se/Saint4.m4a differ diff --git a/audio/se/Saint4.ogg b/audio/se/Saint4.ogg new file mode 100644 index 0000000..c41e7d0 Binary files /dev/null and b/audio/se/Saint4.ogg differ diff --git a/audio/se/Saint5.m4a b/audio/se/Saint5.m4a new file mode 100644 index 0000000..c6bfe01 Binary files /dev/null and b/audio/se/Saint5.m4a differ diff --git a/audio/se/Saint5.ogg b/audio/se/Saint5.ogg new file mode 100644 index 0000000..ae7e3c2 Binary files /dev/null and b/audio/se/Saint5.ogg differ diff --git a/audio/se/Sand.m4a b/audio/se/Sand.m4a new file mode 100644 index 0000000..82bb3f6 Binary files /dev/null and b/audio/se/Sand.m4a differ diff --git a/audio/se/Sand.ogg b/audio/se/Sand.ogg new file mode 100644 index 0000000..4bf5fa7 Binary files /dev/null and b/audio/se/Sand.ogg differ diff --git a/audio/se/Save.m4a b/audio/se/Save.m4a new file mode 100644 index 0000000..16e42e9 Binary files /dev/null and b/audio/se/Save.m4a differ diff --git a/audio/se/Save.ogg b/audio/se/Save.ogg new file mode 100644 index 0000000..b6ef5e0 Binary files /dev/null and b/audio/se/Save.ogg differ diff --git a/audio/se/Scream.m4a b/audio/se/Scream.m4a new file mode 100644 index 0000000..58a3fd3 Binary files /dev/null and b/audio/se/Scream.m4a differ diff --git a/audio/se/Scream.ogg b/audio/se/Scream.ogg new file mode 100644 index 0000000..31c2a60 Binary files /dev/null and b/audio/se/Scream.ogg differ diff --git a/audio/se/Sheep.m4a b/audio/se/Sheep.m4a new file mode 100644 index 0000000..ad762bb Binary files /dev/null and b/audio/se/Sheep.m4a differ diff --git a/audio/se/Sheep.ogg b/audio/se/Sheep.ogg new file mode 100644 index 0000000..ba32df1 Binary files /dev/null and b/audio/se/Sheep.ogg differ diff --git a/audio/se/Shop1.m4a b/audio/se/Shop1.m4a new file mode 100644 index 0000000..cb9ee82 Binary files /dev/null and b/audio/se/Shop1.m4a differ diff --git a/audio/se/Shop1.ogg b/audio/se/Shop1.ogg new file mode 100644 index 0000000..d4dab84 Binary files /dev/null and b/audio/se/Shop1.ogg differ diff --git a/audio/se/Shop2.m4a b/audio/se/Shop2.m4a new file mode 100644 index 0000000..16803e1 Binary files /dev/null and b/audio/se/Shop2.m4a differ diff --git a/audio/se/Shop2.ogg b/audio/se/Shop2.ogg new file mode 100644 index 0000000..469399d Binary files /dev/null and b/audio/se/Shop2.ogg differ diff --git a/audio/se/Shot1.m4a b/audio/se/Shot1.m4a new file mode 100644 index 0000000..ecd50e1 Binary files /dev/null and b/audio/se/Shot1.m4a differ diff --git a/audio/se/Shot1.ogg b/audio/se/Shot1.ogg new file mode 100644 index 0000000..fdda2ca Binary files /dev/null and b/audio/se/Shot1.ogg differ diff --git a/audio/se/Shot2.m4a b/audio/se/Shot2.m4a new file mode 100644 index 0000000..be27bba Binary files /dev/null and b/audio/se/Shot2.m4a differ diff --git a/audio/se/Shot2.ogg b/audio/se/Shot2.ogg new file mode 100644 index 0000000..a60f43f Binary files /dev/null and b/audio/se/Shot2.ogg differ diff --git a/audio/se/Shot3.m4a b/audio/se/Shot3.m4a new file mode 100644 index 0000000..0746469 Binary files /dev/null and b/audio/se/Shot3.m4a differ diff --git a/audio/se/Shot3.ogg b/audio/se/Shot3.ogg new file mode 100644 index 0000000..deec48c Binary files /dev/null and b/audio/se/Shot3.ogg differ diff --git a/audio/se/Silence.m4a b/audio/se/Silence.m4a new file mode 100644 index 0000000..4ef3d93 Binary files /dev/null and b/audio/se/Silence.m4a differ diff --git a/audio/se/Silence.ogg b/audio/se/Silence.ogg new file mode 100644 index 0000000..8a54d0d Binary files /dev/null and b/audio/se/Silence.ogg differ diff --git a/audio/se/Siren.m4a b/audio/se/Siren.m4a new file mode 100644 index 0000000..d844b1c Binary files /dev/null and b/audio/se/Siren.m4a differ diff --git a/audio/se/Siren.ogg b/audio/se/Siren.ogg new file mode 100644 index 0000000..958377f Binary files /dev/null and b/audio/se/Siren.ogg differ diff --git a/audio/se/Skill1.m4a b/audio/se/Skill1.m4a new file mode 100644 index 0000000..7d685f1 Binary files /dev/null and b/audio/se/Skill1.m4a differ diff --git a/audio/se/Skill1.ogg b/audio/se/Skill1.ogg new file mode 100644 index 0000000..aef5fcb Binary files /dev/null and b/audio/se/Skill1.ogg differ diff --git a/audio/se/Skill2.m4a b/audio/se/Skill2.m4a new file mode 100644 index 0000000..ebffcf6 Binary files /dev/null and b/audio/se/Skill2.m4a differ diff --git a/audio/se/Skill2.ogg b/audio/se/Skill2.ogg new file mode 100644 index 0000000..fc52ccd Binary files /dev/null and b/audio/se/Skill2.ogg differ diff --git a/audio/se/Skill3.m4a b/audio/se/Skill3.m4a new file mode 100644 index 0000000..c1427e8 Binary files /dev/null and b/audio/se/Skill3.m4a differ diff --git a/audio/se/Skill3.ogg b/audio/se/Skill3.ogg new file mode 100644 index 0000000..50eb2a4 Binary files /dev/null and b/audio/se/Skill3.ogg differ diff --git a/audio/se/Slash1.m4a b/audio/se/Slash1.m4a new file mode 100644 index 0000000..899a63c Binary files /dev/null and b/audio/se/Slash1.m4a differ diff --git a/audio/se/Slash1.ogg b/audio/se/Slash1.ogg new file mode 100644 index 0000000..e7397eb Binary files /dev/null and b/audio/se/Slash1.ogg differ diff --git a/audio/se/Slash2.m4a b/audio/se/Slash2.m4a new file mode 100644 index 0000000..4e5d33c Binary files /dev/null and b/audio/se/Slash2.m4a differ diff --git a/audio/se/Slash2.ogg b/audio/se/Slash2.ogg new file mode 100644 index 0000000..5c0e9ec Binary files /dev/null and b/audio/se/Slash2.ogg differ diff --git a/audio/se/Slash3.m4a b/audio/se/Slash3.m4a new file mode 100644 index 0000000..48171fd Binary files /dev/null and b/audio/se/Slash3.m4a differ diff --git a/audio/se/Slash3.ogg b/audio/se/Slash3.ogg new file mode 100644 index 0000000..660222d Binary files /dev/null and b/audio/se/Slash3.ogg differ diff --git a/audio/se/Slash4.m4a b/audio/se/Slash4.m4a new file mode 100644 index 0000000..9107f57 Binary files /dev/null and b/audio/se/Slash4.m4a differ diff --git a/audio/se/Slash4.ogg b/audio/se/Slash4.ogg new file mode 100644 index 0000000..58126ea Binary files /dev/null and b/audio/se/Slash4.ogg differ diff --git a/audio/se/Slash5.m4a b/audio/se/Slash5.m4a new file mode 100644 index 0000000..e9c5f4c Binary files /dev/null and b/audio/se/Slash5.m4a differ diff --git a/audio/se/Slash5.ogg b/audio/se/Slash5.ogg new file mode 100644 index 0000000..1c8dff8 Binary files /dev/null and b/audio/se/Slash5.ogg differ diff --git a/audio/se/Sleep.m4a b/audio/se/Sleep.m4a new file mode 100644 index 0000000..47e2235 Binary files /dev/null and b/audio/se/Sleep.m4a differ diff --git a/audio/se/Sleep.ogg b/audio/se/Sleep.ogg new file mode 100644 index 0000000..a8dae00 Binary files /dev/null and b/audio/se/Sleep.ogg differ diff --git a/audio/se/Sound1.m4a b/audio/se/Sound1.m4a new file mode 100644 index 0000000..a94ddf9 Binary files /dev/null and b/audio/se/Sound1.m4a differ diff --git a/audio/se/Sound1.ogg b/audio/se/Sound1.ogg new file mode 100644 index 0000000..a421bcc Binary files /dev/null and b/audio/se/Sound1.ogg differ diff --git a/audio/se/Sound2.m4a b/audio/se/Sound2.m4a new file mode 100644 index 0000000..1cab947 Binary files /dev/null and b/audio/se/Sound2.m4a differ diff --git a/audio/se/Sound2.ogg b/audio/se/Sound2.ogg new file mode 100644 index 0000000..0495000 Binary files /dev/null and b/audio/se/Sound2.ogg differ diff --git a/audio/se/Sound3.m4a b/audio/se/Sound3.m4a new file mode 100644 index 0000000..9e7ea3d Binary files /dev/null and b/audio/se/Sound3.m4a differ diff --git a/audio/se/Sound3.ogg b/audio/se/Sound3.ogg new file mode 100644 index 0000000..2b31a9f Binary files /dev/null and b/audio/se/Sound3.ogg differ diff --git a/audio/se/Splash.m4a b/audio/se/Splash.m4a new file mode 100644 index 0000000..0e21161 Binary files /dev/null and b/audio/se/Splash.m4a differ diff --git a/audio/se/Splash.ogg b/audio/se/Splash.ogg new file mode 100644 index 0000000..a1ea3e5 Binary files /dev/null and b/audio/se/Splash.ogg differ diff --git a/audio/se/Stare.m4a b/audio/se/Stare.m4a new file mode 100644 index 0000000..bcc99d9 Binary files /dev/null and b/audio/se/Stare.m4a differ diff --git a/audio/se/Stare.ogg b/audio/se/Stare.ogg new file mode 100644 index 0000000..8e4a179 Binary files /dev/null and b/audio/se/Stare.ogg differ diff --git a/audio/se/Starlight.m4a b/audio/se/Starlight.m4a new file mode 100644 index 0000000..6ee7f76 Binary files /dev/null and b/audio/se/Starlight.m4a differ diff --git a/audio/se/Starlight.ogg b/audio/se/Starlight.ogg new file mode 100644 index 0000000..3fb5670 Binary files /dev/null and b/audio/se/Starlight.ogg differ diff --git a/audio/se/Switch1.m4a b/audio/se/Switch1.m4a new file mode 100644 index 0000000..54f416f Binary files /dev/null and b/audio/se/Switch1.m4a differ diff --git a/audio/se/Switch1.ogg b/audio/se/Switch1.ogg new file mode 100644 index 0000000..68bc2b3 Binary files /dev/null and b/audio/se/Switch1.ogg differ diff --git a/audio/se/Switch2.m4a b/audio/se/Switch2.m4a new file mode 100644 index 0000000..364f6ff Binary files /dev/null and b/audio/se/Switch2.m4a differ diff --git a/audio/se/Switch2.ogg b/audio/se/Switch2.ogg new file mode 100644 index 0000000..9499cd9 Binary files /dev/null and b/audio/se/Switch2.ogg differ diff --git a/audio/se/Switch3.m4a b/audio/se/Switch3.m4a new file mode 100644 index 0000000..2a599b6 Binary files /dev/null and b/audio/se/Switch3.m4a differ diff --git a/audio/se/Switch3.ogg b/audio/se/Switch3.ogg new file mode 100644 index 0000000..8679915 Binary files /dev/null and b/audio/se/Switch3.ogg differ diff --git a/audio/se/Sword1.m4a b/audio/se/Sword1.m4a new file mode 100644 index 0000000..cc86a80 Binary files /dev/null and b/audio/se/Sword1.m4a differ diff --git a/audio/se/Sword1.ogg b/audio/se/Sword1.ogg new file mode 100644 index 0000000..56d510f Binary files /dev/null and b/audio/se/Sword1.ogg differ diff --git a/audio/se/Sword2.m4a b/audio/se/Sword2.m4a new file mode 100644 index 0000000..87a233e Binary files /dev/null and b/audio/se/Sword2.m4a differ diff --git a/audio/se/Sword2.ogg b/audio/se/Sword2.ogg new file mode 100644 index 0000000..d919b98 Binary files /dev/null and b/audio/se/Sword2.ogg differ diff --git a/audio/se/Sword3.m4a b/audio/se/Sword3.m4a new file mode 100644 index 0000000..fdbccb3 Binary files /dev/null and b/audio/se/Sword3.m4a differ diff --git a/audio/se/Sword3.ogg b/audio/se/Sword3.ogg new file mode 100644 index 0000000..d7ef56a Binary files /dev/null and b/audio/se/Sword3.ogg differ diff --git a/audio/se/Sword4.m4a b/audio/se/Sword4.m4a new file mode 100644 index 0000000..f49fc27 Binary files /dev/null and b/audio/se/Sword4.m4a differ diff --git a/audio/se/Sword4.ogg b/audio/se/Sword4.ogg new file mode 100644 index 0000000..0acc3bd Binary files /dev/null and b/audio/se/Sword4.ogg differ diff --git a/audio/se/Sword5.m4a b/audio/se/Sword5.m4a new file mode 100644 index 0000000..fa25b2d Binary files /dev/null and b/audio/se/Sword5.m4a differ diff --git a/audio/se/Sword5.ogg b/audio/se/Sword5.ogg new file mode 100644 index 0000000..2f03b57 Binary files /dev/null and b/audio/se/Sword5.ogg differ diff --git a/audio/se/Teleport.m4a b/audio/se/Teleport.m4a new file mode 100644 index 0000000..eb6b17f Binary files /dev/null and b/audio/se/Teleport.m4a differ diff --git a/audio/se/Teleport.ogg b/audio/se/Teleport.ogg new file mode 100644 index 0000000..fa2bfaa Binary files /dev/null and b/audio/se/Teleport.ogg differ diff --git a/audio/se/Thunder1.m4a b/audio/se/Thunder1.m4a new file mode 100644 index 0000000..6a1974e Binary files /dev/null and b/audio/se/Thunder1.m4a differ diff --git a/audio/se/Thunder1.ogg b/audio/se/Thunder1.ogg new file mode 100644 index 0000000..0d984bb Binary files /dev/null and b/audio/se/Thunder1.ogg differ diff --git a/audio/se/Thunder10.m4a b/audio/se/Thunder10.m4a new file mode 100644 index 0000000..c29d060 Binary files /dev/null and b/audio/se/Thunder10.m4a differ diff --git a/audio/se/Thunder10.ogg b/audio/se/Thunder10.ogg new file mode 100644 index 0000000..66e37a9 Binary files /dev/null and b/audio/se/Thunder10.ogg differ diff --git a/audio/se/Thunder2.m4a b/audio/se/Thunder2.m4a new file mode 100644 index 0000000..8bbda5c Binary files /dev/null and b/audio/se/Thunder2.m4a differ diff --git a/audio/se/Thunder2.ogg b/audio/se/Thunder2.ogg new file mode 100644 index 0000000..b2a988c Binary files /dev/null and b/audio/se/Thunder2.ogg differ diff --git a/audio/se/Thunder3.m4a b/audio/se/Thunder3.m4a new file mode 100644 index 0000000..4235977 Binary files /dev/null and b/audio/se/Thunder3.m4a differ diff --git a/audio/se/Thunder3.ogg b/audio/se/Thunder3.ogg new file mode 100644 index 0000000..4aba207 Binary files /dev/null and b/audio/se/Thunder3.ogg differ diff --git a/audio/se/Thunder4.m4a b/audio/se/Thunder4.m4a new file mode 100644 index 0000000..3b4472f Binary files /dev/null and b/audio/se/Thunder4.m4a differ diff --git a/audio/se/Thunder4.ogg b/audio/se/Thunder4.ogg new file mode 100644 index 0000000..24975e2 Binary files /dev/null and b/audio/se/Thunder4.ogg differ diff --git a/audio/se/Thunder5.m4a b/audio/se/Thunder5.m4a new file mode 100644 index 0000000..c0eedd0 Binary files /dev/null and b/audio/se/Thunder5.m4a differ diff --git a/audio/se/Thunder5.ogg b/audio/se/Thunder5.ogg new file mode 100644 index 0000000..9198f06 Binary files /dev/null and b/audio/se/Thunder5.ogg differ diff --git a/audio/se/Thunder6.m4a b/audio/se/Thunder6.m4a new file mode 100644 index 0000000..5f00548 Binary files /dev/null and b/audio/se/Thunder6.m4a differ diff --git a/audio/se/Thunder6.ogg b/audio/se/Thunder6.ogg new file mode 100644 index 0000000..4aafb49 Binary files /dev/null and b/audio/se/Thunder6.ogg differ diff --git a/audio/se/Thunder7.m4a b/audio/se/Thunder7.m4a new file mode 100644 index 0000000..0bfed87 Binary files /dev/null and b/audio/se/Thunder7.m4a differ diff --git a/audio/se/Thunder7.ogg b/audio/se/Thunder7.ogg new file mode 100644 index 0000000..034e02c Binary files /dev/null and b/audio/se/Thunder7.ogg differ diff --git a/audio/se/Thunder8.m4a b/audio/se/Thunder8.m4a new file mode 100644 index 0000000..5fe0e7a Binary files /dev/null and b/audio/se/Thunder8.m4a differ diff --git a/audio/se/Thunder8.ogg b/audio/se/Thunder8.ogg new file mode 100644 index 0000000..9d01f06 Binary files /dev/null and b/audio/se/Thunder8.ogg differ diff --git a/audio/se/Thunder9.m4a b/audio/se/Thunder9.m4a new file mode 100644 index 0000000..2cb99a0 Binary files /dev/null and b/audio/se/Thunder9.m4a differ diff --git a/audio/se/Thunder9.ogg b/audio/se/Thunder9.ogg new file mode 100644 index 0000000..c0fb53c Binary files /dev/null and b/audio/se/Thunder9.ogg differ diff --git a/audio/se/Transceiver.m4a b/audio/se/Transceiver.m4a new file mode 100644 index 0000000..f54d11a Binary files /dev/null and b/audio/se/Transceiver.m4a differ diff --git a/audio/se/Transceiver.ogg b/audio/se/Transceiver.ogg new file mode 100644 index 0000000..5cb1f02 Binary files /dev/null and b/audio/se/Transceiver.ogg differ diff --git a/audio/se/Twine.m4a b/audio/se/Twine.m4a new file mode 100644 index 0000000..b4a9d0b Binary files /dev/null and b/audio/se/Twine.m4a differ diff --git a/audio/se/Twine.ogg b/audio/se/Twine.ogg new file mode 100644 index 0000000..ab27663 Binary files /dev/null and b/audio/se/Twine.ogg differ diff --git a/audio/se/Up1.m4a b/audio/se/Up1.m4a new file mode 100644 index 0000000..01a7e73 Binary files /dev/null and b/audio/se/Up1.m4a differ diff --git a/audio/se/Up1.ogg b/audio/se/Up1.ogg new file mode 100644 index 0000000..b755127 Binary files /dev/null and b/audio/se/Up1.ogg differ diff --git a/audio/se/Up2.m4a b/audio/se/Up2.m4a new file mode 100644 index 0000000..6049be0 Binary files /dev/null and b/audio/se/Up2.m4a differ diff --git a/audio/se/Up2.ogg b/audio/se/Up2.ogg new file mode 100644 index 0000000..4dc7ff5 Binary files /dev/null and b/audio/se/Up2.ogg differ diff --git a/audio/se/Up3.m4a b/audio/se/Up3.m4a new file mode 100644 index 0000000..bf873d7 Binary files /dev/null and b/audio/se/Up3.m4a differ diff --git a/audio/se/Up3.ogg b/audio/se/Up3.ogg new file mode 100644 index 0000000..e54dee0 Binary files /dev/null and b/audio/se/Up3.ogg differ diff --git a/audio/se/Up4.m4a b/audio/se/Up4.m4a new file mode 100644 index 0000000..8bb208b Binary files /dev/null and b/audio/se/Up4.m4a differ diff --git a/audio/se/Up4.ogg b/audio/se/Up4.ogg new file mode 100644 index 0000000..6c82f04 Binary files /dev/null and b/audio/se/Up4.ogg differ diff --git a/audio/se/Water1.m4a b/audio/se/Water1.m4a new file mode 100644 index 0000000..507ba11 Binary files /dev/null and b/audio/se/Water1.m4a differ diff --git a/audio/se/Water1.ogg b/audio/se/Water1.ogg new file mode 100644 index 0000000..53be92a Binary files /dev/null and b/audio/se/Water1.ogg differ diff --git a/audio/se/Water2.m4a b/audio/se/Water2.m4a new file mode 100644 index 0000000..b4d3e2d Binary files /dev/null and b/audio/se/Water2.m4a differ diff --git a/audio/se/Water2.ogg b/audio/se/Water2.ogg new file mode 100644 index 0000000..a713a90 Binary files /dev/null and b/audio/se/Water2.ogg differ diff --git a/audio/se/Water3.m4a b/audio/se/Water3.m4a new file mode 100644 index 0000000..758fab5 Binary files /dev/null and b/audio/se/Water3.m4a differ diff --git a/audio/se/Water3.ogg b/audio/se/Water3.ogg new file mode 100644 index 0000000..0634f45 Binary files /dev/null and b/audio/se/Water3.ogg differ diff --git a/audio/se/Water4.m4a b/audio/se/Water4.m4a new file mode 100644 index 0000000..fac8ef9 Binary files /dev/null and b/audio/se/Water4.m4a differ diff --git a/audio/se/Water4.ogg b/audio/se/Water4.ogg new file mode 100644 index 0000000..c80eaec Binary files /dev/null and b/audio/se/Water4.ogg differ diff --git a/audio/se/Water5.m4a b/audio/se/Water5.m4a new file mode 100644 index 0000000..d96a493 Binary files /dev/null and b/audio/se/Water5.m4a differ diff --git a/audio/se/Water5.ogg b/audio/se/Water5.ogg new file mode 100644 index 0000000..7e772ca Binary files /dev/null and b/audio/se/Water5.ogg differ diff --git a/audio/se/Wind1.m4a b/audio/se/Wind1.m4a new file mode 100644 index 0000000..ecd0843 Binary files /dev/null and b/audio/se/Wind1.m4a differ diff --git a/audio/se/Wind1.ogg b/audio/se/Wind1.ogg new file mode 100644 index 0000000..b8950cc Binary files /dev/null and b/audio/se/Wind1.ogg differ diff --git a/audio/se/Wind2.m4a b/audio/se/Wind2.m4a new file mode 100644 index 0000000..df8f058 Binary files /dev/null and b/audio/se/Wind2.m4a differ diff --git a/audio/se/Wind2.ogg b/audio/se/Wind2.ogg new file mode 100644 index 0000000..3ba6498 Binary files /dev/null and b/audio/se/Wind2.ogg differ diff --git a/audio/se/Wind3.m4a b/audio/se/Wind3.m4a new file mode 100644 index 0000000..840c68c Binary files /dev/null and b/audio/se/Wind3.m4a differ diff --git a/audio/se/Wind3.ogg b/audio/se/Wind3.ogg new file mode 100644 index 0000000..c5d0d4a Binary files /dev/null and b/audio/se/Wind3.ogg differ diff --git a/audio/se/Wind4.m4a b/audio/se/Wind4.m4a new file mode 100644 index 0000000..bd72918 Binary files /dev/null and b/audio/se/Wind4.m4a differ diff --git a/audio/se/Wind4.ogg b/audio/se/Wind4.ogg new file mode 100644 index 0000000..c24ea2c Binary files /dev/null and b/audio/se/Wind4.ogg differ diff --git a/audio/se/Wind5.m4a b/audio/se/Wind5.m4a new file mode 100644 index 0000000..b4c4205 Binary files /dev/null and b/audio/se/Wind5.m4a differ diff --git a/audio/se/Wind5.ogg b/audio/se/Wind5.ogg new file mode 100644 index 0000000..0b7b043 Binary files /dev/null and b/audio/se/Wind5.ogg differ diff --git a/audio/se/Wind6.m4a b/audio/se/Wind6.m4a new file mode 100644 index 0000000..4498eee Binary files /dev/null and b/audio/se/Wind6.m4a differ diff --git a/audio/se/Wind6.ogg b/audio/se/Wind6.ogg new file mode 100644 index 0000000..6f89e0a Binary files /dev/null and b/audio/se/Wind6.ogg differ diff --git a/audio/se/Wind7.m4a b/audio/se/Wind7.m4a new file mode 100644 index 0000000..a95c660 Binary files /dev/null and b/audio/se/Wind7.m4a differ diff --git a/audio/se/Wind7.ogg b/audio/se/Wind7.ogg new file mode 100644 index 0000000..4b85aec Binary files /dev/null and b/audio/se/Wind7.ogg differ diff --git a/audio/se/Wolf.m4a b/audio/se/Wolf.m4a new file mode 100644 index 0000000..0601938 Binary files /dev/null and b/audio/se/Wolf.m4a differ diff --git a/audio/se/Wolf.ogg b/audio/se/Wolf.ogg new file mode 100644 index 0000000..180c00b Binary files /dev/null and b/audio/se/Wolf.ogg differ diff --git a/data/Actors.json b/data/Actors.json new file mode 100644 index 0000000..04ab3fe --- /dev/null +++ b/data/Actors.json @@ -0,0 +1,18 @@ +[ +null, +{"id":1,"battlerName":"Actor1_1","characterIndex":0,"characterName":"Actor1","classId":1,"equips":[1,1,2,3,0],"faceIndex":0,"faceName":"Actor1","traits":[],"initialLevel":1,"maxLevel":99,"name":"霍尔德","nickname":"","note":"","profile":""}, +{"id":2,"battlerName":"Actor1_8","characterIndex":7,"characterName":"Actor1","classId":2,"equips":[2,1,2,3,0],"faceIndex":7,"faceName":"Actor1","traits":[],"initialLevel":1,"maxLevel":99,"name":"泰雷兹","nickname":"","note":"","profile":""}, +{"id":3,"battlerName":"Actor3_8","characterIndex":7,"characterName":"Actor3","classId":3,"equips":[3,0,2,3,4],"faceIndex":7,"faceName":"Actor3","traits":[],"initialLevel":1,"maxLevel":99,"name":"玛莎","nickname":"","note":"","profile":""}, +{"id":4,"battlerName":"Actor2_7","characterIndex":6,"characterName":"Actor2","classId":4,"equips":[4,0,2,3,4],"faceIndex":6,"faceName":"Actor2","traits":[],"initialLevel":1,"maxLevel":99,"name":"卢修斯","nickname":"","note":"","profile":""}, +{"id":5,"battlerName":"","characterIndex":0,"characterName":"Nature","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"Monster","traits":[],"initialLevel":1,"maxLevel":99,"name":"5号","nickname":"","note":"","profile":""}, +{"id":6,"battlerName":"","characterIndex":1,"characterName":"Monster","classId":1,"equips":[0,0,0,0,0],"faceIndex":1,"faceName":"Monster","traits":[],"initialLevel":1,"maxLevel":99,"name":"6号","nickname":"","note":"","profile":""}, +{"id":7,"battlerName":"","characterIndex":2,"characterName":"Monster","classId":1,"equips":[0,0,0,0,0],"faceIndex":2,"faceName":"Monster","traits":[],"initialLevel":1,"maxLevel":99,"name":"7号","nickname":"","note":"","profile":""}, +{"id":8,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"8号","nickname":"","note":"","profile":""}, +{"id":9,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""}, +{"id":10,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""}, +{"id":11,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""}, +{"id":12,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""}, +{"id":13,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""}, +{"id":14,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""}, +{"id":15,"battlerName":"","characterIndex":0,"characterName":"","classId":1,"equips":[0,0,0,0,0],"faceIndex":0,"faceName":"","traits":[],"initialLevel":1,"maxLevel":99,"name":"","nickname":"","note":"","profile":""} +] \ No newline at end of file diff --git a/data/Animations.json b/data/Animations.json new file mode 100644 index 0000000..74d303e --- /dev/null +++ b/data/Animations.json @@ -0,0 +1,174 @@ +[ +null, +{"id":1,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,24,100,0,0,255,1]],[[1,0,24,100,0,0,255,1]],[[2,0,24,100,0,0,255,1],[0,-40,-24,100,0,0,255,1]],[[2,0,24,110,0,0,180,1],[1,-40,-24,100,0,0,255,1]],[[2,0,24,115,0,0,100,1],[2,-40,-24,100,0,0,255,1]],[[2,-40,-24,110,0,0,180,1],[0,32,8,100,0,0,255,1]],[[2,-40,-24,115,0,0,100,1],[1,32,8,100,0,0,255,1]],[[2,32,8,100,0,0,255,1]],[[2,32,8,110,0,0,180,1]],[[2,32,8,115,0,0,100,1]]],"name":"格斗/物理","position":1,"timings":[{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":0,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":95}},{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":2,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":5,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}}]}, +{"id":2,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"Attack2","frames":[[[0,0,-8,100,0,0,255,1]],[[1,0,-8,100,0,0,255,1]],[[2,0,-8,100,0,0,255,1],[100,0,-8,150,0,0,255,1]],[[2,0,-8,110,0,0,180,1],[101,0,-8,150,0,0,255,1]],[[2,0,-8,115,0,0,100,1],[102,0,-8,150,0,0,255,1]],[[103,0,-8,160,0,0,255,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[107,0,-8,150,0,0,255,1]]],"name":"格斗/炎","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Fire1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,119,102,221],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,136,51,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":3,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"Attack3","frames":[[[0,0,-8,100,0,0,255,1]],[[1,0,-8,100,0,0,255,1]],[[2,0,-8,100,0,0,255,1],[101,0,-8,80,0,0,255,1],[102,0,-8,130,0,0,255,1]],[[2,0,-8,110,0,0,180,1],[100,0,-8,140,0,0,255,1],[103,0,-8,160,0,0,255,1]],[[2,0,-8,115,0,0,100,1],[100,0,-8,130,0,0,255,1],[104,0,-8,160,0,0,255,1],[105,0,0,150,0,0,255,1],[108,0,-8,150,0,0,255,1]],[[101,0,-8,130,0,0,255,1],[104,0,-8,170,0,0,255,1],[108,0,-8,170,0,0,255,1],[106,0,0,110,0,0,255,1]],[[100,0,-8,120,0,0,255,1],[104,0,-8,175,0,0,180,1],[109,0,-8,140,0,0,255,1],[106,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,255,1],[104,0,-8,180,0,0,100,1],[109,0,-8,150,0,0,200,1],[107,0,0,120,0,0,255,1]],[[100,0,-8,120,0,0,255,1],[109,0,-8,160,0,0,100,1],[106,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,180,1],[107,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,100,1]]],"name":"格斗/冰","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Ice4","pan":0,"pitch":75,"volume":100}},{"flashColor":[119,187,255,221],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}},{"flashColor":[187,221,221,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":4,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"Attack4","frames":[[[0,0,-8,100,0,0,255,1]],[[1,0,-8,100,0,0,255,1]],[[2,0,-8,100,0,0,255,1],[100,0,-8,150,0,0,255,1]],[[2,0,-8,110,0,0,180,1],[101,0,-8,150,0,0,255,1]],[[2,0,-8,115,0,0,100,1],[102,0,-8,150,0,0,255,1]],[[103,0,-8,150,0,0,255,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[-1,0,-8,150,0,0,255,1],[106,0,-8,155,20,0,150,1]]],"name":"格斗/电","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder8","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,255,102,221],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,119,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":5,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"Attack5","frames":[[[0,16,32,100,0,0,255,1]],[[1,16,32,100,0,0,255,1]],[[2,16,32,100,0,0,255,1],[100,-40,8,130,0,0,255,1]],[[2,16,32,110,0,0,255,1],[101,-40,8,150,0,0,255,1]],[[2,16,32,120,0,0,150,1],[102,-40,8,170,0,0,255,1]],[[103,-40,8,170,0,0,255,1],[100,24,-32,130,0,1,255,1]],[[104,-40,8,170,0,0,255,1],[101,24,-32,150,20,1,255,1]],[[105,-40,8,170,0,0,255,1],[102,24,-32,170,20,1,255,1],[0,-48,-48,100,0,0,255,1]],[[103,24,-32,170,20,1,255,1],[1,-48,-48,100,0,0,255,1]],[[104,24,-32,170,20,1,255,1],[2,-48,-48,100,0,0,255,1],[100,-16,56,130,45,0,255,1]],[[105,24,-32,170,20,1,255,1],[2,-48,-48,110,0,0,255,1],[101,-16,56,150,45,0,255,1]],[[2,-48,-48,120,0,0,150,1],[102,-16,56,170,45,0,255,1]],[[103,-16,56,170,45,0,255,1],[0,-40,40,100,0,0,255,1],[0,24,-32,100,0,0,255,1]],[[104,-16,56,170,45,0,255,1],[1,-40,40,100,0,0,255,1],[1,24,-32,100,0,0,255,1]],[[105,-16,56,170,45,0,255,1],[2,-40,40,100,0,0,255,1],[2,24,-32,100,0,0,255,1],[100,-40,-40,130,0,0,255,1],[100,40,40,130,90,0,255,1]],[[2,-40,40,110,0,0,255,1],[2,24,-32,110,0,0,255,1],[101,-40,-40,150,0,0,255,1],[101,40,40,150,90,0,255,1]],[[2,-40,40,120,0,0,150,1],[2,24,-32,120,0,0,150,1],[102,-40,-40,170,0,0,255,1],[102,40,40,170,90,0,255,1]],[[103,-40,-40,170,0,0,255,1],[103,40,40,170,90,0,255,1],[100,0,0,130,0,0,255,1],[1,0,0,100,0,0,255,1]],[[104,-40,-40,170,0,0,255,1],[104,40,40,170,90,0,255,1],[101,0,0,150,0,1,255,1],[2,0,0,100,0,0,255,1]],[[105,-40,-40,170,0,0,255,1],[105,40,40,170,90,0,255,1],[102,0,0,170,0,1,255,1],[2,0,0,110,0,0,255,1]],[[103,0,0,170,0,1,255,1]],[[104,0,0,180,0,1,255,1]],[[105,0,0,185,0,1,255,1]]],"name":"格斗/必杀技1","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,221,119],"flashDuration":5,"flashScope":1,"frame":0,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":2,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,221,119],"flashDuration":5,"flashScope":1,"frame":3,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":5,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,221,204],"flashDuration":3,"flashScope":2,"frame":7,"se":{"name":"Blow5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":9,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,221,119],"flashDuration":5,"flashScope":1,"frame":12,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,187],"flashDuration":5,"flashScope":1,"frame":14,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,170],"flashDuration":3,"flashScope":2,"frame":17,"se":{"name":"Blow5","pan":0,"pitch":100,"volume":100}}]}, +{"id":6,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":140,"animation2Name":"Spear2","frames":[[[-1,0,0,80,0,0,255,1],[103,0,0,130,0,0,255,1]],[[0,0,0,80,0,0,255,1],[104,0,0,120,0,0,255,1],[103,-40,-48,130,0,0,255,1]],[[1,0,0,80,0,0,255,1],[104,-40,-48,120,0,0,255,1],[0,-40,-48,80,0,0,255,1],[103,72,48,130,0,0,255,1]],[[2,0,0,80,0,0,255,1],[1,-40,-48,80,0,0,255,1],[104,72,48,120,0,0,255,1],[0,72,48,80,0,0,255,1],[103,-48,56,130,0,0,255,1]],[[2,0,0,90,0,0,255,1],[2,-40,-48,80,0,0,255,1],[1,72,48,80,0,0,255,1],[104,-48,56,120,0,0,255,1],[0,-48,56,80,0,0,255,1],[103,64,-56,130,0,0,255,1]],[[2,0,0,100,0,0,150,1],[2,-40,-48,90,0,0,255,1],[2,72,48,80,0,0,255,1],[1,-48,56,80,0,0,255,1],[104,64,-56,120,0,0,255,1],[0,64,-56,80,0,0,255,1],[103,16,80,130,0,0,255,1]],[[2,-40,-48,100,0,0,150,1],[2,72,48,90,0,0,255,1],[2,-48,56,80,0,0,255,1],[1,64,-56,80,0,0,255,1],[104,16,80,120,0,0,255,1],[0,16,80,80,0,0,255,1],[103,8,-80,130,0,0,255,1]],[[2,72,48,100,0,0,150,1],[2,-48,56,90,0,0,255,1],[2,64,-56,80,0,0,255,1],[1,16,80,80,0,0,255,1],[104,8,-80,120,0,0,255,1],[0,8,-80,80,0,0,255,1],[103,-64,-24,130,0,0,255,1]],[[2,-48,56,100,0,0,150,1],[2,64,-56,90,0,0,255,1],[2,16,80,80,0,0,255,1],[1,8,-80,80,0,0,255,1],[104,-64,-24,120,0,0,255,1],[0,-64,-24,80,0,0,255,1],[103,0,-8,130,0,0,255,1]],[[2,64,-56,100,0,0,150,1],[2,16,80,90,0,0,255,1],[2,8,-80,80,0,0,255,1],[1,-64,-24,80,0,0,255,1],[104,0,-8,120,0,0,255,1],[0,0,-8,80,0,0,255,1],[103,72,8,130,0,0,255,1]],[[2,16,80,100,0,0,150,1],[2,8,-80,90,0,0,255,1],[2,-64,-24,80,0,0,255,1],[1,0,-8,80,0,0,255,1],[104,72,8,120,0,0,255,1],[0,72,8,80,0,0,255,1],[103,-56,72,130,0,0,255,1]],[[2,8,-80,100,0,0,150,1],[2,-64,-24,90,0,0,255,1],[2,0,-8,80,0,0,255,1],[1,72,8,80,0,0,255,1],[104,-56,72,120,0,0,255,1],[0,-56,72,80,0,0,255,1],[103,56,-64,130,0,0,255,1]],[[2,-64,-24,100,0,0,150,1],[2,0,-8,90,0,0,255,1],[2,72,8,80,0,0,255,1],[1,-56,72,80,0,0,255,1],[104,56,-64,120,0,0,255,1],[0,56,-64,80,0,0,255,1]],[[2,0,-8,100,0,0,150,1],[2,72,8,90,0,0,255,1],[2,-56,72,80,0,0,255,1],[1,56,-64,80,0,0,255,1]],[[2,72,8,100,0,0,150,1],[2,-56,72,90,0,0,255,1],[2,56,-64,80,0,0,255,1],[103,-64,-56,130,0,0,255,1]],[[2,-56,72,100,0,0,150,1],[2,56,-64,90,0,0,255,1],[104,-64,-56,120,0,0,255,1],[0,-64,-56,80,0,0,255,1],[103,0,0,130,0,0,255,1]],[[2,56,-64,100,0,0,150,1],[1,-64,-56,80,0,0,255,1],[104,0,0,120,0,0,255,1],[0,0,0,80,0,0,255,1],[103,64,48,130,0,0,255,1]],[[2,-64,-56,80,0,0,255,1],[1,0,0,80,0,0,255,1],[104,64,48,120,0,0,255,1],[0,64,48,80,0,0,255,1],[103,64,-56,130,0,0,255,1]],[[2,-64,-56,90,0,0,255,1],[2,0,0,80,0,0,255,1],[1,64,48,80,0,0,255,1],[104,64,-56,120,0,0,255,1],[0,64,-56,80,0,0,255,1],[103,0,0,130,0,0,255,1]],[[2,-64,-56,100,0,0,150,1],[2,0,0,90,0,0,255,1],[2,64,48,80,0,0,255,1],[1,64,-56,80,0,0,255,1],[104,0,0,120,0,0,255,1],[0,0,0,80,0,0,255,1],[103,-56,56,130,0,0,255,1]],[[2,0,0,100,0,0,150,1],[2,64,48,90,0,0,255,1],[2,64,-56,80,0,0,255,1],[1,0,0,80,0,0,255,1],[104,-56,56,120,0,0,255,1],[0,-56,56,80,0,0,255,1],[103,-72,-16,130,0,0,255,1]],[[2,64,48,100,0,0,150,1],[2,64,-56,90,0,0,255,1],[2,0,0,80,0,0,255,1],[1,-56,56,80,0,0,255,1],[104,-72,-16,120,0,0,255,1],[0,-72,-16,80,0,0,255,1],[103,80,16,130,0,0,255,1]],[[2,64,-56,100,0,0,150,1],[2,0,0,90,0,0,255,1],[2,-56,56,80,0,0,255,1],[1,-72,-16,80,0,0,255,1],[104,80,16,120,0,0,255,1],[0,80,16,80,0,0,255,1],[103,0,0,130,0,0,255,1]],[[2,0,0,100,0,0,150,1],[2,-56,56,90,0,0,255,1],[2,-72,-16,80,0,0,255,1],[1,80,16,80,0,0,255,1],[104,0,0,120,0,0,255,1],[0,0,0,80,0,0,255,1],[103,-40,-72,130,0,0,255,1],[103,32,64,130,0,0,255,1]],[[2,-56,56,100,0,0,150,1],[2,-72,-16,90,0,0,255,1],[2,80,16,80,0,0,255,1],[1,0,0,80,0,0,255,1],[104,-40,-72,120,0,0,255,1],[0,-40,-72,80,0,0,255,1],[104,32,64,120,0,0,255,1],[0,32,64,80,0,0,255,1]],[[2,-72,-16,100,0,0,150,1],[2,80,16,90,0,0,255,1],[2,0,0,80,0,0,255,1],[1,-40,-72,80,0,0,255,1],[1,32,64,80,0,0,255,1]],[[2,80,16,100,0,0,150,1],[2,0,0,90,0,0,255,1],[2,-40,-72,80,0,0,255,1],[2,32,64,80,0,0,255,1]],[[2,0,0,100,0,0,150,1],[2,-40,-72,90,0,0,255,1],[2,32,64,90,0,0,255,1]],[[2,-40,-72,100,0,0,150,1],[2,32,64,100,0,0,150,1]]],"name":"格斗/必杀技2","position":1,"timings":[{"flashColor":[255,255,255,204],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,221,119],"flashDuration":5,"flashScope":1,"frame":0,"se":{"name":"Blow1","pan":0,"pitch":90,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":2,"se":{"name":"Blow1","pan":0,"pitch":120,"volume":90}},{"flashColor":[255,255,221,119],"flashDuration":5,"flashScope":1,"frame":3,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":4,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":5,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,221,204],"flashDuration":3,"flashScope":2,"frame":7,"se":{"name":"Blow5","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":9,"se":{"name":"Blow1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,221,119],"flashDuration":5,"flashScope":1,"frame":12,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,187],"flashDuration":5,"flashScope":1,"frame":14,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,170],"flashDuration":3,"flashScope":2,"frame":15,"se":{"name":"Blow5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":5,"flashScope":1,"frame":17,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":5,"flashScope":1,"frame":19,"se":{"name":"Blow1","pan":0,"pitch":110,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":5,"flashScope":1,"frame":21,"se":{"name":"Blow1","pan":0,"pitch":110,"volume":100}},{"flashColor":[255,255,255,170],"flashDuration":3,"flashScope":2,"frame":23,"se":{"name":"Blow5","pan":0,"pitch":95,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":5,"flashScope":1,"frame":25,"se":{"name":"Blow1","pan":0,"pitch":110,"volume":100}}]}, +{"id":7,"animation1Hue":0,"animation1Name":"Sword1","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-48,120,0,0,255,1]],[[1,16,-48,120,0,0,255,1]],[[2,0,-32,120,0,0,255,1]],[[3,0,-32,120,0,0,255,1]],[[4,0,-32,120,0,0,255,1]],[[5,0,-32,120,0,0,255,1]]],"name":"斩击/物理","position":1,"timings":[{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash1","pan":0,"pitch":100,"volume":100}}]}, +{"id":8,"animation1Hue":0,"animation1Name":"Sword2","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-48,120,0,0,255,1]],[[1,16,-48,120,0,0,255,1],[6,16,-48,130,0,0,255,1]],[[2,0,-32,120,0,0,255,1],[7,0,-32,130,0,0,255,1]],[[3,0,-32,120,0,0,255,1],[8,0,-32,130,0,0,255,1]],[[4,0,-32,120,0,0,255,1],[9,0,-32,130,0,0,255,1]],[[5,0,-32,120,0,0,255,1],[10,0,-32,130,0,0,255,1]],[[11,0,-32,130,0,0,255,1]],[[12,0,-32,130,0,0,255,1]],[[13,0,-32,130,0,0,255,1]]],"name":"斩击/炎","position":1,"timings":[{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,136,51,153],"flashDuration":5,"flashScope":2,"frame":1,"se":{"name":"Fire1","pan":0,"pitch":120,"volume":100}}]}, +{"id":9,"animation1Hue":0,"animation1Name":"Sword3","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-48,120,0,0,255,1]],[[1,16,-48,120,0,0,255,1],[6,16,-48,130,0,0,255,1]],[[2,0,-32,120,0,0,255,1],[7,0,-32,130,0,0,255,1]],[[3,0,-32,120,0,0,255,1],[8,0,-32,130,0,0,255,1]],[[4,0,-32,120,0,0,255,1],[9,0,-32,130,0,0,255,1]],[[5,0,-32,120,0,0,255,1],[10,0,-32,130,0,0,255,1]],[[11,0,-32,130,0,0,255,1]],[[12,0,-32,130,0,0,255,1]]],"name":"斩击/冰","position":1,"timings":[{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash1","pan":0,"pitch":100,"volume":100}},{"flashColor":[187,221,221,153],"flashDuration":5,"flashScope":2,"frame":1,"se":{"name":"Ice4","pan":0,"pitch":100,"volume":100}}]}, +{"id":10,"animation1Hue":0,"animation1Name":"Sword4","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-48,120,0,0,255,1]],[[1,16,-48,120,0,0,255,1],[6,16,-48,130,0,0,255,1]],[[2,0,-32,120,0,0,255,1],[7,0,-32,130,0,0,255,1]],[[3,0,-32,120,0,0,255,1],[8,0,-32,130,0,0,255,1]],[[4,0,-32,120,0,0,255,1],[9,0,-32,130,0,0,255,1]],[[5,0,-32,120,0,0,255,1],[10,0,-32,130,0,0,255,1]],[[11,0,-32,130,0,0,255,1]],[[12,0,-32,130,0,0,255,1]],[[13,0,-32,130,0,0,255,1]]],"name":"斩击/电","position":1,"timings":[{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,119,153],"flashDuration":5,"flashScope":2,"frame":1,"se":{"name":"Thunder8","pan":0,"pitch":100,"volume":100}}]}, +{"id":11,"animation1Hue":0,"animation1Name":"Sword6","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-8,160,0,0,255,1]],[[1,0,-8,160,0,0,255,1]],[[2,0,-8,160,0,0,255,1]],[[3,0,-8,160,0,0,255,1]],[[4,0,-8,160,0,0,255,1]],[[5,0,-8,160,0,0,255,1]],[[6,0,-8,160,0,0,255,1]],[[7,0,-8,160,0,0,255,1]],[[8,0,-8,160,0,0,255,1]],[[9,0,-8,160,0,0,255,1]],[[10,0,-8,160,0,0,255,1]],[[11,0,-8,160,0,0,255,1]],[[12,0,-8,160,0,0,255,1]],[[13,0,-8,160,0,0,255,1]],[[13,0,-8,160,0,0,255,1],[14,0,-8,160,0,0,100,1]],[[13,0,-8,160,0,0,255,1],[14,0,-8,160,0,0,200,1]],[[13,0,-8,160,0,0,255,1],[14,0,-8,160,0,0,220,1],[15,0,-8,170,0,0,255,1]],[[13,0,-8,160,0,0,255,1],[14,0,-8,160,0,0,255,1],[15,0,-8,180,0,0,255,1]],[[13,0,-8,160,0,0,255,1],[14,0,-8,160,0,0,220,1],[15,0,-8,190,0,0,255,1]],[[13,0,-8,160,0,0,200,1],[15,0,-8,195,0,0,200,1],[14,0,-8,160,0,0,255,1]],[[13,0,-8,160,0,0,100,1],[14,0,-8,160,0,0,220,1],[15,0,-8,198,0,0,150,1]],[[13,0,-8,160,0,0,50,1],[15,0,-8,200,0,0,100,1],[14,0,-8,160,0,0,255,1]],[[14,0,-8,160,0,0,150,1]],[[14,0,-8,160,0,0,100,1]],[[14,0,-8,160,0,0,50,1]]],"name":"斩击/必杀技1","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Sword3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,102,0,221],"flashDuration":5,"flashScope":1,"frame":1,"se":null},{"flashColor":[255,255,170,170],"flashDuration":2,"flashScope":2,"frame":1,"se":{"name":"Slash2","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,170,204],"flashDuration":5,"flashScope":1,"frame":7,"se":null},{"flashColor":[255,255,170,170],"flashDuration":3,"flashScope":2,"frame":7,"se":{"name":"Slash3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":13,"se":{"name":"Ice7","pan":0,"pitch":90,"volume":90}}]}, +{"id":12,"animation1Hue":0,"animation1Name":"Sword5","animation2Hue":0,"animation2Name":"","frames":[[[3,0,0,200,0,0,255,1]],[[4,0,0,200,0,0,255,1]],[[5,0,0,200,0,0,255,1],[0,0,0,200,0,0,255,1]],[[6,0,0,200,0,0,255,1],[1,0,0,200,0,0,255,1]],[[7,0,0,200,0,0,255,1],[2,0,0,200,0,0,255,1]],[[8,0,0,200,0,0,255,1],[2,0,0,220,0,0,255,1]],[[9,0,0,200,0,0,255,1],[2,0,0,230,0,0,255,1]],[[10,0,0,200,0,0,255,1],[2,0,0,235,0,0,200,1]],[[11,0,0,200,0,0,255,1]],[[12,0,0,200,0,0,255,1]],[[13,0,0,200,0,0,255,1]],[[14,0,0,200,0,0,255,1]],[[15,0,0,200,0,0,255,1]],[[16,0,0,200,0,0,255,1]],[[17,0,0,200,0,0,255,1]],[[18,0,0,200,0,0,255,1]],[[19,0,0,200,0,0,255,1]],[[20,0,0,200,0,0,255,1]],[[21,0,0,200,0,0,255,1]],[[22,0,0,200,0,0,255,1]],[[23,0,0,200,0,0,255,1]]],"name":"斩击/必杀技2","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Sword3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,85,68,170],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,85,68,170],"flashDuration":3,"flashScope":1,"frame":5,"se":{"name":"Slash8","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,85,68,170],"flashDuration":3,"flashScope":1,"frame":10,"se":{"name":"Slash8","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,170,170,170],"flashDuration":5,"flashScope":2,"frame":14,"se":null},{"flashColor":[255,85,68,204],"flashDuration":5,"flashScope":1,"frame":14,"se":{"name":"Slash3","pan":0,"pitch":100,"volume":100}}]}, +{"id":13,"animation1Hue":0,"animation1Name":"Spear1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,200,0,0,255,1]],[[2,0,0,200,0,0,255,1]],[[3,0,0,200,0,0,255,1]],[[4,0,0,200,0,0,255,1],[5,0,0,120,0,0,255,1]],[[6,0,0,160,0,0,255,1]],[[7,0,0,170,0,0,255,1]],[[-1,0,0,200,0,0,255,1],[8,0,0,180,355,0,200,1]],[[8,0,0,185,354,0,100,1]]],"name":"突刺/物理","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,204],"flashDuration":3,"flashScope":1,"frame":3,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}}]}, +{"id":14,"animation1Hue":0,"animation1Name":"Spear1","animation2Hue":0,"animation2Name":"Attack2","frames":[[[-1,0,-8,100,0,0,255,1],[0,0,-8,200,0,0,255,1]],[[2,0,-8,200,0,0,255,1]],[[3,0,-8,200,0,0,255,1]],[[4,0,-8,200,0,0,255,1],[5,0,-8,120,0,0,255,1]],[[6,0,-8,160,0,0,255,1],[100,0,-8,150,0,0,255,1]],[[7,0,-8,170,0,0,255,1],[101,0,-8,150,0,0,255,1]],[[102,0,-8,150,0,0,255,1],[8,0,-8,180,355,0,255,1]],[[103,0,-8,160,0,0,255,1],[8,0,-8,185,354,0,150,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[107,0,-8,150,0,0,255,1]]],"name":"突刺/炎","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,119,102,221],"flashDuration":3,"flashScope":1,"frame":3,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,136,51,153],"flashDuration":5,"flashScope":2,"frame":4,"se":{"name":"Fire1","pan":0,"pitch":100,"volume":100}}]}, +{"id":15,"animation1Hue":0,"animation1Name":"Spear1","animation2Hue":0,"animation2Name":"Attack3","frames":[[[0,0,-8,200,0,0,255,1]],[[2,0,-8,200,0,0,255,1]],[[3,0,-8,200,0,0,255,1]],[[5,0,-8,120,0,0,255,1],[4,0,-8,200,0,0,255,1]],[[2,0,-8,100,0,0,255,1],[101,0,-8,80,0,0,255,1],[102,0,-8,130,0,0,255,1],[6,0,-8,160,0,0,255,1]],[[2,0,-8,110,0,0,180,1],[100,0,-8,140,0,0,255,1],[103,0,-8,160,0,0,255,1],[7,0,-8,170,0,0,255,1]],[[2,0,-8,115,0,0,100,1],[100,0,-8,130,0,0,255,1],[104,0,-8,160,0,0,255,1],[108,0,-8,150,0,0,255,1],[105,0,0,150,0,0,255,1],[8,0,-8,180,355,0,255,1]],[[101,0,-8,130,0,0,255,1],[104,0,-8,170,0,0,255,1],[108,0,-8,170,0,0,255,1],[106,0,0,110,0,0,255,1],[8,0,-8,185,354,0,150,1]],[[100,0,-8,120,0,0,255,1],[104,0,-8,175,0,0,180,1],[109,0,-8,140,0,0,255,1],[106,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,255,1],[104,0,-8,180,0,0,100,1],[109,0,-8,150,0,0,200,1],[107,0,0,120,0,0,255,1]],[[100,0,-8,120,0,0,255,1],[109,0,-8,160,0,0,100,1],[106,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,180,1],[107,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,100,1]]],"name":"突刺/冰","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder1","pan":0,"pitch":100,"volume":80}},{"flashColor":[136,221,221,221],"flashDuration":3,"flashScope":1,"frame":3,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}},{"flashColor":[0,255,255,153],"flashDuration":5,"flashScope":2,"frame":4,"se":{"name":"Ice4","pan":0,"pitch":75,"volume":100}}]}, +{"id":16,"animation1Hue":0,"animation1Name":"Spear1","animation2Hue":0,"animation2Name":"Attack4","frames":[[[0,0,-8,200,0,0,255,1]],[[2,0,-8,200,0,0,255,1]],[[-1,0,-8,100,0,0,255,1],[3,0,-8,200,0,0,255,1]],[[5,0,-8,120,0,0,255,1],[4,0,-8,200,0,0,255,1]],[[6,0,-8,160,0,0,255,1],[100,0,-8,150,0,0,255,1]],[[7,0,-8,170,0,0,255,1],[101,0,-8,150,0,0,255,1]],[[8,0,-8,180,355,0,255,1],[102,0,-8,150,0,0,255,1]],[[8,0,-8,185,354,0,150,1],[103,0,-8,150,0,0,255,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[-1,0,-8,150,0,0,255,1],[106,0,-8,155,20,0,150,1]]],"name":"突刺/电","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,102,221],"flashDuration":3,"flashScope":1,"frame":3,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,85,153],"flashDuration":5,"flashScope":2,"frame":4,"se":{"name":"Thunder8","pan":0,"pitch":80,"volume":100}}]}, +{"id":17,"animation1Hue":0,"animation1Name":"Spear2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,230,0,0,255,1]],[[1,0,0,200,0,0,255,1]],[[2,0,0,200,0,0,255,1]],[[3,0,0,200,0,0,255,1]],[[4,0,0,200,0,0,255,1],[5,0,0,100,0,0,255,1]],[[6,0,0,150,0,0,255,1]],[[1,-40,-48,200,0,0,200,1],[7,0,0,150,0,0,255,1]],[[8,0,0,160,0,0,255,1],[3,-40,-48,200,0,0,255,1]],[[9,0,0,170,0,0,255,1],[4,-40,-48,200,0,0,255,1],[5,-40,-48,100,0,1,255,1]],[[10,0,0,170,0,0,255,1],[6,-40,-48,150,0,0,255,1],[1,40,48,200,0,0,200,1]],[[7,-40,-48,150,0,0,255,1],[3,40,48,200,0,0,255,1]],[[9,0,0,170,0,0,255,1],[8,-40,-48,160,0,0,255,1],[4,40,48,200,0,0,255,1],[5,40,48,100,0,1,255,1]],[[9,-40,-48,170,0,0,255,1],[6,40,48,150,0,0,255,1]],[[10,-40,-48,170,0,0,255,1],[7,40,48,150,0,0,255,1]],[[8,40,48,160,0,0,255,1]],[[9,40,48,170,0,0,255,1]],[[10,40,48,170,0,0,255,1]]],"name":"突刺/必杀技1","position":1,"timings":[{"flashColor":[255,255,255,238],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Thunder1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":4,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,170],"flashDuration":3,"flashScope":2,"frame":8,"se":null},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":8,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":11,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}}]}, +{"id":18,"animation1Hue":160,"animation1Name":"Spear1","animation2Hue":210,"animation2Name":"Spear2","frames":[[[2,-32,48,200,0,0,255,1]],[[3,-32,48,150,0,0,255,1]],[[4,-32,48,170,0,0,255,1],[2,56,-32,200,0,0,255,1],[5,-32,48,100,0,0,255,1]],[[6,-32,48,120,0,0,255,1],[3,56,-32,150,0,0,255,1]],[[7,-32,48,120,0,0,255,1],[4,56,-32,170,0,0,255,1],[5,56,-32,100,0,0,255,1]],[[109,-32,48,130,0,0,255,1],[8,-32,48,120,0,0,255,1],[6,56,-32,120,0,0,255,1],[2,-48,-48,200,0,0,255,1]],[[110,-32,48,130,0,0,255,1],[7,56,-32,120,0,0,255,1],[3,-48,-48,150,0,0,255,1]],[[109,56,-32,130,0,0,255,1],[8,56,-32,120,0,0,255,1],[4,-48,-48,170,0,0,255,1],[5,-48,-48,100,0,0,255,1]],[[110,56,-32,130,0,0,255,1],[6,-48,-48,120,0,0,255,1],[2,40,40,200,0,0,255,1]],[[7,-48,-48,120,0,0,255,1],[3,40,40,150,0,0,255,1]],[[109,-48,-48,130,0,0,255,1],[8,-48,-48,120,0,0,255,1],[4,40,40,170,0,0,255,1],[5,40,40,100,0,0,255,1]],[[110,-48,-48,130,0,0,255,1],[6,40,40,120,0,0,255,1],[102,-48,24,200,0,0,255,1]],[[7,40,40,120,0,0,255,1],[103,-48,24,150,0,0,255,1]],[[109,40,40,130,0,0,255,1],[8,40,40,120,0,0,255,1],[104,-48,24,170,0,0,255,1],[105,-48,24,100,0,0,255,1]],[[110,40,40,130,0,0,255,1],[106,-48,24,120,0,0,255,1],[102,48,0,200,0,0,255,1]],[[107,-48,24,120,0,0,255,1],[103,48,0,150,0,0,255,1]],[[108,-48,24,130,0,0,255,1],[104,48,0,170,0,0,255,1],[105,48,0,100,0,0,255,1]],[[109,-48,24,130,0,0,255,1],[106,48,0,120,0,0,255,1]],[[110,-48,24,130,0,0,255,1],[107,48,0,120,0,0,255,1]],[[-1,56,0,120,0,0,255,1],[108,48,0,130,0,0,255,1]],[[109,48,0,130,0,0,255,1]],[[110,48,0,130,0,0,255,1]]],"name":"突刺/必杀技2","position":1,"timings":[{"flashColor":[187,221,255,238],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Wind8","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":2,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":4,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[187,221,255,187],"flashDuration":2,"flashScope":2,"frame":6,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":7,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[187,221,255,170],"flashDuration":2,"flashScope":2,"frame":9,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":10,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":13,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":16,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}}]}, +{"id":19,"animation1Hue":0,"animation1Name":"Blow1","animation2Hue":0,"animation2Name":"","frames":[[[0,32,-24,120,0,0,255,1]],[[1,24,-16,120,0,0,255,1]],[[2,24,-16,120,0,0,255,1]],[[3,24,-16,120,0,0,255,1]],[[4,24,-16,120,0,0,255,1]],[[5,24,-16,120,0,0,255,1]]],"name":"打击/物理","position":1,"timings":[{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash4","pan":0,"pitch":90,"volume":100}}]}, +{"id":20,"animation1Hue":340,"animation1Name":"Blow1","animation2Hue":0,"animation2Name":"Attack2","frames":[[[0,32,-24,120,0,0,255,1]],[[1,24,-16,120,0,0,255,1]],[[100,0,-8,150,0,0,255,1],[2,24,-16,120,0,0,255,1]],[[101,0,-8,150,0,0,255,1],[3,24,-16,120,0,0,255,1]],[[102,0,-8,150,0,0,255,1],[4,24,-16,120,0,0,255,1]],[[103,0,-8,160,0,0,255,1],[5,24,-16,120,0,0,255,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[107,0,-8,150,0,0,255,1]]],"name":"打击/炎","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Fire1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,119,102,221],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash4","pan":0,"pitch":90,"volume":100}},{"flashColor":[255,136,51,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":21,"animation1Hue":130,"animation1Name":"Blow1","animation2Hue":0,"animation2Name":"Attack3","frames":[[[0,32,-24,120,0,0,255,1]],[[1,24,-16,120,0,0,255,1]],[[102,0,-8,130,0,0,255,1],[2,24,-16,120,0,0,255,1],[101,0,-8,80,0,0,255,1]],[[103,0,-8,160,0,0,255,1],[100,0,-8,140,0,0,255,1],[3,24,-16,120,0,0,255,1]],[[4,24,-16,120,0,0,255,1],[100,0,-8,130,0,0,255,1],[104,0,-8,160,0,0,255,1],[108,0,-8,150,0,0,255,1],[105,0,-8,150,0,0,255,1]],[[101,0,-8,130,0,0,255,1],[104,0,-8,170,0,0,255,1],[108,0,-8,170,0,0,255,1],[106,0,0,110,0,0,255,1],[5,24,-16,120,0,0,255,1]],[[100,0,-8,120,0,0,255,1],[104,0,-8,175,0,0,180,1],[109,0,-8,140,0,0,255,1],[106,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,255,1],[104,0,-8,180,0,0,100,1],[109,0,-8,150,0,0,200,1],[107,0,0,120,0,0,255,1]],[[100,0,-8,120,0,0,255,1],[109,0,-8,160,0,0,100,1],[106,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,180,1],[107,0,0,120,0,0,255,1]],[[101,0,-8,130,0,0,100,1]]],"name":"打击/冰","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Ice4","pan":0,"pitch":75,"volume":100}},{"flashColor":[119,187,255,221],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash4","pan":0,"pitch":90,"volume":100}},{"flashColor":[187,221,221,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":22,"animation1Hue":10,"animation1Name":"Blow1","animation2Hue":0,"animation2Name":"Attack4","frames":[[[0,32,-24,120,0,0,255,1]],[[1,24,-16,120,0,0,255,1]],[[100,0,-8,150,0,0,255,1],[2,24,-16,120,0,0,255,1]],[[101,0,-8,150,0,0,255,1],[3,24,-16,120,0,0,255,1]],[[102,0,-8,150,0,0,255,1],[4,24,-16,120,0,0,255,1]],[[103,0,-8,150,0,0,255,1],[5,24,-16,120,0,0,255,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[-1,0,-8,150,0,0,255,1],[106,0,-8,155,20,0,150,1]]],"name":"打击/电","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Thunder8","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,255,102,221],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash4","pan":0,"pitch":90,"volume":100}},{"flashColor":[255,255,119,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":23,"animation1Hue":0,"animation1Name":"Blow1","animation2Hue":0,"animation2Name":"Blow2","frames":[[[0,32,-24,120,20,0,255,1]],[[1,24,-16,120,20,0,255,1],[124,0,0,100,0,0,255,1]],[[2,24,-16,120,20,0,255,1],[125,0,0,100,0,0,255,1]],[[3,24,-16,120,20,0,255,1],[126,0,0,100,0,0,255,1]],[[4,24,-16,120,20,0,255,1],[127,0,0,100,0,0,255,1]],[[5,24,-16,120,20,0,255,1],[0,-56,-32,130,0,1,255,1],[128,0,0,100,0,0,255,1]],[[1,-48,-24,130,0,1,255,1],[124,0,0,100,0,1,255,1]],[[2,-48,-24,130,0,1,255,1],[125,0,0,100,0,1,255,1]],[[3,-48,-24,130,0,1,255,1],[126,0,0,100,0,1,255,1]],[[4,-48,-24,130,0,1,255,1],[127,0,0,100,0,1,255,1]],[[5,-48,-24,130,0,1,255,1],[0,56,-8,150,330,0,255,1],[128,0,0,100,0,1,255,1]],[[1,56,-8,150,330,0,255,1],[124,0,0,120,0,0,255,1]],[[2,56,-8,150,330,0,255,1],[125,0,0,120,0,0,255,1]],[[3,56,-8,150,330,0,255,1],[126,0,0,120,0,0,255,1]],[[4,56,-8,150,330,0,255,1],[127,0,0,120,0,0,255,1]],[[5,56,-8,150,330,0,255,1],[128,0,0,120,0,0,255,1]],[],[]],"name":"打击/必杀技1","position":1,"timings":[{"flashColor":[255,255,204,187],"flashDuration":3,"flashScope":2,"frame":0,"se":null},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash4","pan":0,"pitch":90,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":6,"se":{"name":"Slash5","pan":0,"pitch":90,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":11,"se":{"name":"Slash4","pan":0,"pitch":100,"volume":100}}]}, +{"id":24,"animation1Hue":0,"animation1Name":"Blow1","animation2Hue":0,"animation2Name":"Blow2","frames":[[[118,-32,8,130,0,1,255,1]],[[119,-32,8,130,0,1,255,1],[124,0,8,100,0,0,255,1]],[[120,-32,8,130,0,1,255,1],[125,0,8,100,0,0,255,1]],[[121,-32,8,130,0,1,255,1],[126,0,8,100,0,0,255,1]],[[122,-32,8,130,0,1,255,1],[0,32,-16,130,0,0,255,1],[127,0,8,100,0,0,255,1]],[[123,-32,8,130,0,1,255,1],[1,32,-16,130,0,0,255,1],[128,0,8,100,0,0,255,1],[124,-16,-8,120,0,0,255,1]],[[2,32,-16,130,0,0,255,1],[125,-16,-8,130,0,0,255,1]],[[3,32,-16,130,0,0,255,1],[106,-24,-16,130,0,0,255,1],[126,-16,-8,130,0,0,255,1]],[[4,32,-16,130,0,0,255,1],[107,-24,-16,130,0,0,255,1],[127,-16,-8,130,0,0,255,1]],[[5,32,-16,130,0,0,255,1],[108,-24,-16,130,0,0,255,1],[128,-16,-8,130,0,0,255,1],[124,8,0,130,0,0,255,1]],[[109,-24,-16,130,0,0,255,1],[112,8,8,150,0,0,255,1],[125,8,0,130,0,0,255,1]],[[110,-24,-16,130,0,0,255,1],[113,8,8,150,0,0,255,1],[126,8,0,130,0,0,255,1]],[[111,-24,-16,130,0,0,255,1],[114,8,8,150,0,0,255,1],[127,8,0,130,0,0,255,1],[124,-24,-8,130,0,0,255,1]],[[115,8,8,150,0,0,255,1],[128,8,0,130,0,0,255,1],[125,-24,-8,130,0,0,255,1]],[[116,8,8,150,0,0,255,1],[100,0,-80,150,0,0,255,1],[126,-24,-8,130,0,0,255,1]],[[117,8,8,150,0,0,255,1],[101,0,-56,150,0,0,255,1],[102,0,-40,150,0,0,255,1],[127,-24,-8,130,0,0,255,1],[124,0,0,150,0,0,255,1]],[[103,0,-32,150,0,0,255,1],[128,-24,-8,130,0,0,255,1],[125,0,0,150,0,0,255,1]],[[104,0,-24,150,0,0,255,1],[126,0,0,150,0,0,255,1]],[[105,0,-24,150,0,0,200,1],[127,0,0,150,0,0,255,1]],[[128,0,0,150,0,0,255,1]]],"name":"打击/必杀技2","position":1,"timings":[{"flashColor":[255,255,204,187],"flashDuration":3,"flashScope":2,"frame":0,"se":null},{"flashColor":[255,170,119,204],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash7","pan":0,"pitch":110,"volume":100}},{"flashColor":[255,255,255,204],"flashDuration":3,"flashScope":1,"frame":5,"se":{"name":"Slash4","pan":0,"pitch":90,"volume":100}},{"flashColor":[255,170,119,204],"flashDuration":3,"flashScope":1,"frame":8,"se":{"name":"Slash5","pan":0,"pitch":90,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":12,"se":{"name":"Slash7","pan":0,"pitch":110,"volume":100}},{"flashColor":[255,255,204,153],"flashDuration":3,"flashScope":2,"frame":15,"se":null},{"flashColor":[255,255,187,221],"flashDuration":2,"flashScope":1,"frame":15,"se":{"name":"Slash9","pan":0,"pitch":110,"volume":100}},{"flashColor":[255,255,187,221],"flashDuration":2,"flashScope":1,"frame":17,"se":null}]}, +{"id":25,"animation1Hue":0,"animation1Name":"Special2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-64,200,0,0,255,1]],[[1,0,-64,200,0,0,255,1]],[[2,0,-64,200,0,0,255,1]],[[3,0,-64,200,0,0,255,1]],[[4,0,-64,250,0,0,255,1]],[[5,0,-64,300,0,0,255,1]],[[5,0,-64,450,0,0,255,1]],[[6,0,-64,350,0,0,255,1]],[[7,0,-64,350,0,0,255,1]],[[8,8,-64,350,0,0,255,1]],[[9,0,-56,350,0,0,255,1],[5,0,-64,350,0,0,255,1]],[[6,0,-64,400,0,0,255,1]],[[7,0,-64,450,0,0,255,1]],[[8,0,-64,450,0,0,255,1]],[[9,0,-64,450,0,0,255,1]],[[10,0,-64,400,0,0,255,1]],[[11,0,-64,400,0,0,255,1]],[[12,0,-64,350,0,0,255,1]],[[13,0,-64,330,0,0,255,1]],[[14,0,-64,300,0,0,255,1]]],"name":"吐息/炎","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Breath","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,102,0,204],"flashDuration":10,"flashScope":2,"frame":5,"se":null}]}, +{"id":26,"animation1Hue":150,"animation1Name":"Special2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-64,200,0,0,255,1]],[[1,0,-64,200,0,0,255,1]],[[2,0,-64,200,0,0,255,1]],[[3,0,-64,200,0,0,255,1]],[[4,0,-64,250,0,0,255,1]],[[5,0,-64,300,0,0,255,1]],[[5,0,-64,450,0,0,255,1]],[[6,0,-64,350,0,0,255,1]],[[7,0,-64,350,0,0,255,1]],[[8,8,-64,350,0,0,255,1]],[[9,0,-56,350,0,0,255,1],[5,0,-64,350,0,0,255,1]],[[6,0,-64,400,0,0,255,1]],[[7,0,-64,450,0,0,255,1]],[[8,0,-64,450,0,0,255,1]],[[9,0,-64,450,0,0,255,1]],[[10,0,-64,400,0,0,255,1]],[[11,0,-64,400,0,0,255,1]],[[12,0,-64,350,0,0,255,1]],[[13,0,-64,330,0,0,255,1]],[[14,0,-64,300,0,0,255,1]]],"name":"吐息/冰","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Breath","pan":0,"pitch":100,"volume":90}},{"flashColor":[0,221,238,204],"flashDuration":10,"flashScope":2,"frame":5,"se":null}]}, +{"id":27,"animation1Hue":20,"animation1Name":"Special2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-64,200,0,0,255,1]],[[1,0,-64,200,0,0,255,1]],[[2,0,-64,200,0,0,255,1]],[[3,0,-64,200,0,0,255,1]],[[4,0,-64,250,0,0,255,1]],[[5,0,-64,300,0,0,255,1]],[[5,0,-64,450,0,0,255,1]],[[6,0,-64,350,0,0,255,1]],[[7,0,-64,350,0,0,255,1]],[[8,8,-64,350,0,0,255,1]],[[9,0,-56,350,0,0,255,1],[5,0,-64,350,0,0,255,1]],[[6,0,-64,400,0,0,255,1]],[[7,0,-64,450,0,0,255,1]],[[8,0,-64,450,0,0,255,1]],[[9,0,-64,450,0,0,255,1]],[[10,0,-64,400,0,0,255,1]],[[11,0,-64,400,0,0,255,1]],[[12,0,-64,350,0,0,255,1]],[[13,0,-64,330,0,0,255,1]],[[14,0,-64,300,0,0,255,1]]],"name":"吐息/电","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Breath","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,0,204],"flashDuration":10,"flashScope":2,"frame":5,"se":null}]}, +{"id":28,"animation1Hue":270,"animation1Name":"Special2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-64,200,0,0,255,1]],[[1,0,-64,200,0,0,255,1]],[[2,0,-64,200,0,0,255,1]],[[3,0,-64,200,0,0,255,1]],[[4,0,-64,250,0,0,255,1]],[[5,0,-64,300,0,0,255,1]],[[5,0,-64,450,0,0,255,1]],[[6,0,-64,350,0,0,255,1]],[[7,0,-64,350,0,0,255,1]],[[8,8,-64,350,0,0,255,1]],[[9,0,-56,350,0,0,255,1],[5,0,-64,350,0,0,255,1]],[[6,0,-64,400,0,0,255,1]],[[7,0,-64,450,0,0,255,1]],[[8,0,-64,450,0,0,255,1]],[[9,0,-64,450,0,0,255,1]],[[10,0,-64,400,0,0,255,1]],[[11,0,-64,400,0,0,255,1]],[[12,0,-64,350,0,0,255,1]],[[13,0,-64,330,0,0,255,1]],[[14,0,-64,300,0,0,255,1]]],"name":"吐息/异常状态","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":1,"se":{"name":"Breath","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,68,255,204],"flashDuration":10,"flashScope":2,"frame":5,"se":null}]}, +{"id":29,"animation1Hue":0,"animation1Name":"Special5","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-120,100,0,0,255,1],[0,-192,-64,100,0,0,255,1],[0,192,-64,100,0,0,255,1]],[[1,0,-120,100,0,0,255,1],[1,-192,-64,100,0,0,255,1],[1,192,-64,100,0,0,255,1]],[[2,0,-112,130,0,0,255,1],[2,-184,-56,130,0,0,255,1],[2,192,-56,130,0,0,255,1]],[[3,0,-112,130,0,0,255,1],[3,-184,-56,130,0,0,255,1],[3,192,-56,130,0,0,255,1]],[[4,0,-112,130,0,0,255,1],[4,-184,-56,130,0,0,255,1],[4,192,-56,130,0,0,255,1]],[[5,0,-112,130,0,0,255,1],[5,-184,-56,130,0,0,255,1],[5,192,-56,130,0,0,255,1],[0,-112,-112,100,0,0,255,1],[0,112,-112,100,0,0,255,1]],[[6,0,-112,130,0,0,255,1],[6,-184,-56,130,0,0,255,1],[6,192,-56,130,0,0,255,1],[1,-112,-112,100,0,0,255,1],[1,112,-112,100,0,0,255,1]],[[7,0,-112,130,0,0,255,1],[7,-184,-56,130,0,0,255,1],[7,192,-56,130,0,0,255,1],[2,-112,-104,130,0,0,255,1],[2,112,-104,130,0,0,255,1]],[[8,0,-112,130,0,0,255,1],[8,-184,-56,130,0,0,255,1],[8,192,-56,130,0,0,255,1],[3,-112,-104,130,0,0,255,1],[3,112,-104,130,0,0,255,1]],[[9,0,-112,140,0,0,200,1],[9,-184,-56,140,0,0,200,1],[9,192,-56,140,0,0,200,1],[4,-112,-104,130,0,0,255,1],[4,112,-104,130,0,0,255,1]],[[10,0,-112,142,0,0,255,1],[10,-184,-56,142,0,0,255,1],[10,192,-56,142,0,0,255,1],[5,-112,-104,130,0,0,255,1],[5,112,-104,130,0,0,255,1]],[[11,-184,-56,142,0,0,255,1],[11,192,-56,142,0,0,255,1],[11,0,-112,142,0,0,255,1],[6,-112,-104,130,0,0,255,1],[6,112,-104,130,0,0,255,1]],[[12,-184,-56,142,0,0,255,1],[12,192,-56,142,0,0,255,1],[12,0,-112,142,0,0,255,1],[7,-112,-104,130,0,0,255,1],[7,112,-104,130,0,0,255,1],[8,0,-16,130,0,0,100,1]],[[13,-184,-56,142,0,0,255,1],[13,192,-56,142,0,0,255,1],[13,0,-112,142,0,0,255,1],[8,-112,-104,130,0,0,255,1],[8,112,-104,130,0,0,255,1],[9,0,-16,130,0,0,150,1]],[[9,-112,-104,130,0,0,255,1],[9,112,-104,130,0,0,255,1],[10,0,-16,130,0,0,255,1]],[[10,-112,-104,130,0,0,255,1],[10,112,-104,130,0,0,255,1],[11,0,-16,130,0,0,255,1]],[[11,-112,-104,130,0,0,255,1],[11,112,-104,130,0,0,255,1],[12,0,-16,130,0,0,255,1]],[[12,-112,-104,130,0,0,255,1],[12,112,-104,130,0,0,255,1],[13,0,-16,130,0,0,255,1]],[[13,-112,-104,130,0,0,255,1],[13,112,-104,130,0,0,255,1]],[]],"name":"花粉","position":3,"timings":[{"flashColor":[238,136,204,187],"flashDuration":25,"flashScope":2,"frame":0,"se":{"name":"Saint8","pan":0,"pitch":125,"volume":90}},{"flashColor":[255,85,238,204],"flashDuration":2,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,85,238,204],"flashDuration":2,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,85,238,187],"flashDuration":2,"flashScope":1,"frame":7,"se":null},{"flashColor":[255,85,238,170],"flashDuration":2,"flashScope":1,"frame":9,"se":null},{"flashColor":[255,85,238,153],"flashDuration":2,"flashScope":1,"frame":11,"se":null}]}, +{"id":30,"animation1Hue":0,"animation1Name":"Special6","animation2Hue":0,"animation2Name":"","frames":[[[5,-88,-104,150,0,0,150,1]],[[4,-88,-104,150,0,0,200,1]],[[3,-88,-104,150,0,0,255,1],[5,184,-48,150,0,0,150,1]],[[5,-88,-104,150,0,0,255,1],[5,-160,-32,150,0,0,150,1],[4,184,-48,150,0,0,200,1]],[[4,-88,-104,150,0,0,255,1],[4,-160,-32,150,0,0,200,1],[3,184,-48,150,0,0,255,1]],[[3,-88,-104,150,0,0,255,1],[3,-160,-32,150,0,0,255,1],[5,184,-48,150,0,0,255,1]],[[5,-88,-104,150,0,0,255,1],[5,-160,-32,150,0,0,255,1],[4,184,-48,150,0,0,255,1],[5,72,-88,150,0,0,150,1]],[[4,-88,-104,150,0,0,255,1],[4,-160,-32,150,0,0,255,1],[3,184,-48,150,0,0,255,1],[4,72,-88,150,0,0,200,1]],[[3,-88,-104,150,0,0,255,1],[3,-160,-32,150,0,0,255,1],[5,184,-48,150,0,0,255,1],[3,72,-88,150,0,0,255,1]],[[2,-88,-104,150,0,0,255,1],[5,-160,-32,150,0,0,255,1],[4,184,-48,150,0,0,255,1],[5,72,-88,150,0,0,255,1]],[[1,-88,-104,150,0,0,255,1],[4,-160,-32,150,0,0,255,1],[3,184,-48,150,0,0,255,1],[4,72,-88,150,0,0,255,1]],[[0,-88,-104,150,0,0,255,1],[3,-160,-32,150,0,0,255,1],[2,184,-48,150,0,0,255,1],[3,72,-88,150,0,0,255,1]],[[0,-88,-104,130,0,0,150,1],[2,-160,-32,150,0,0,255,1],[1,184,-48,150,0,0,255,1],[5,72,-88,150,0,0,255,1]],[[1,-160,-32,150,0,0,255,1],[0,184,-48,150,0,0,255,1],[4,72,-88,150,0,0,255,1]],[[0,-160,-32,150,0,0,255,1],[0,184,-48,130,0,0,150,1],[3,72,-88,150,0,0,255,1]],[[0,-160,-32,130,0,0,150,1],[2,72,-88,150,0,0,255,1]],[[1,72,-88,150,0,0,255,1]],[[0,72,-88,150,0,0,255,1]],[[0,72,-88,130,0,0,150,1]]],"name":"超音波","position":3,"timings":[{"flashColor":[255,255,119,119],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Sound3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,221,170,170],"flashDuration":4,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,221,170,170],"flashDuration":4,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,221,170,170],"flashDuration":4,"flashScope":1,"frame":8,"se":null},{"flashColor":[255,221,170,170],"flashDuration":5,"flashScope":1,"frame":11,"se":null}]}, +{"id":31,"animation1Hue":0,"animation1Name":"Special7","animation2Hue":0,"animation2Name":"","frames":[[[0,-152,-24,400,0,0,50,1],[1,176,-24,400,0,0,50,1]],[[0,-136,-24,400,0,0,100,1],[1,160,-24,400,0,0,100,1]],[[0,-120,-24,400,0,0,125,1],[1,144,-24,400,0,0,125,1]],[[0,-104,-24,400,0,0,125,1],[1,128,-24,400,0,0,125,1]],[[0,-88,-24,400,0,0,125,1],[1,112,-24,400,0,0,125,1]],[[0,-72,-24,400,0,0,125,1],[1,96,-24,400,0,0,125,1]],[[0,-56,-24,400,0,0,125,1],[1,80,-24,400,0,0,125,1]],[[0,-40,-24,400,0,0,125,1],[1,64,-24,400,0,0,125,1]],[[0,-24,-24,400,0,0,125,1],[1,48,-24,400,0,0,125,1]],[[0,-8,-24,400,0,0,125,1],[1,32,-24,400,0,0,125,1]],[[0,8,-24,400,0,0,125,1],[1,16,-24,400,0,0,125,1]],[[0,24,-24,400,0,0,125,1],[1,0,-24,400,0,0,125,1]],[[0,40,-24,400,0,0,125,1],[1,-16,-24,400,0,0,125,1]],[[0,48,-24,400,0,0,100,1],[1,-32,-24,400,0,0,100,1]],[[0,48,-24,400,0,0,50,1],[1,-48,-24,400,0,0,50,1]]],"name":"雾","position":3,"timings":[{"flashColor":[136,153,170,204],"flashDuration":15,"flashScope":1,"frame":0,"se":{"name":"Fog1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,170],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Sand","pan":0,"pitch":110,"volume":90}}]}, +{"id":32,"animation1Hue":0,"animation1Name":"Special4","animation2Hue":0,"animation2Name":"","frames":[[[3,-112,0,200,0,0,100,1],[3,-72,-56,200,0,0,100,1],[0,-184,-16,60,0,0,100,1]],[[4,-112,0,200,0,0,150,1],[4,-56,-56,200,0,0,150,1],[0,-168,-32,60,0,0,150,1]],[[5,-112,0,200,0,0,200,1],[3,120,0,200,0,0,100,1],[5,-40,-56,200,0,0,200,1],[0,-152,-40,60,0,0,200,1]],[[6,-112,0,200,0,0,255,1],[4,120,0,200,0,0,150,1],[6,-24,-56,200,0,0,255,1],[0,-128,-40,60,0,0,255,1],[1,-56,-112,100,0,0,50,1]],[[7,-112,0,200,0,0,255,1],[5,120,0,200,0,0,200,1],[7,-8,-56,200,0,0,255,1],[0,-104,-32,60,0,0,255,1],[1,-32,-104,100,0,0,100,1]],[[8,-112,0,200,0,0,200,1],[6,120,0,200,0,0,255,1],[8,8,-56,200,0,0,200,1],[0,-80,-16,60,0,0,255,1],[1,-16,-96,100,0,0,150,1]],[[9,-112,0,200,0,0,150,1],[7,120,0,200,0,0,255,1],[9,24,-56,200,0,0,150,1],[0,-64,-8,60,0,0,255,1],[1,8,-96,100,0,0,150,1]],[[10,-112,0,200,0,0,100,1],[8,120,0,200,0,0,200,1],[10,40,-56,200,0,0,100,1],[0,-48,-8,60,0,0,255,1],[1,32,-104,100,0,0,100,1],[2,-208,-96,70,0,0,100,1],[2,104,16,60,0,0,100,1]],[[9,120,0,200,0,0,150,1],[0,-32,-16,60,0,0,255,1],[1,56,-112,100,0,0,100,1],[2,-192,-88,70,0,0,150,1],[2,136,0,70,0,0,150,1]],[[3,-112,0,200,0,0,100,1],[3,-72,-56,200,0,0,100,1],[10,120,0,200,0,0,100,1],[0,-8,-24,60,0,0,255,1],[2,-176,-56,70,0,0,200,1],[2,160,-16,70,0,0,200,1],[1,80,-120,100,0,0,100,1]],[[4,-112,0,200,0,0,150,1],[4,-56,-56,200,0,0,150,1],[0,8,-32,60,0,0,200,1],[2,-152,-16,70,0,0,255,1],[2,176,-40,70,0,0,255,1],[1,104,-128,100,0,0,100,1]],[[5,-112,0,200,0,0,200,1],[3,120,0,200,0,0,100,1],[5,-40,-56,200,0,0,200,1],[0,24,-40,60,0,0,150,1],[2,-136,0,70,0,0,255,1],[2,200,-64,70,0,0,255,1],[1,128,-128,100,0,0,50,1]],[[6,-112,0,200,0,0,255,1],[4,120,0,200,0,0,150,1],[6,-24,-56,200,0,0,255,1],[0,40,-32,60,0,0,100,1],[2,-120,8,70,0,0,255,1],[2,224,-72,70,0,0,200,1],[0,-248,-96,80,0,0,50,1]],[[7,-112,0,200,0,0,255,1],[5,120,0,200,0,0,200,1],[7,-8,-56,200,0,0,255,1],[2,-104,0,70,0,0,255,1],[2,240,-72,70,0,0,150,1],[0,-216,-104,80,0,0,100,1]],[[8,-112,0,200,0,0,200,1],[6,120,0,200,0,0,255,1],[8,8,-56,200,0,0,200,1],[2,-80,-8,70,0,0,255,1],[2,264,-64,70,0,0,100,1],[0,-184,-112,80,0,0,150,1]],[[9,-112,0,200,0,0,150,1],[7,120,0,200,0,0,255,1],[9,24,-56,200,0,0,150,1],[2,-56,-16,70,0,0,200,1],[0,-160,-112,80,0,0,200,1]],[[10,-112,0,200,0,0,100,1],[8,120,0,200,0,0,200,1],[10,40,-56,200,0,0,100,1],[2,-32,-24,70,0,0,150,1],[0,-136,-104,80,0,0,150,1]],[[9,120,0,200,0,0,150,1],[2,-16,-24,70,0,0,100,1],[0,-120,-96,80,0,0,100,1]],[[10,120,0,200,0,0,100,1],[0,-104,-88,80,0,0,50,1]],[]],"name":"歌","position":3,"timings":[{"flashColor":[221,221,255,136],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Ice5","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,170],"flashDuration":3,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,170,255,170],"flashDuration":3,"flashScope":1,"frame":5,"se":null},{"flashColor":[187,255,153,136],"flashDuration":8,"flashScope":1,"frame":8,"se":{"name":"Ice5","pan":0,"pitch":70,"volume":90}},{"flashColor":[255,204,238,136],"flashDuration":10,"flashScope":2,"frame":9,"se":null}]}, +{"id":33,"animation1Hue":0,"animation1Name":"Attack6","animation2Hue":40,"animation2Name":"Heal2","frames":[[[104,0,0,100,0,0,255,1],[8,0,0,100,0,0,100,1]],[[105,0,0,200,0,0,255,1],[8,0,0,400,0,0,50,1],[111,0,0,100,0,0,255,1]],[[106,0,0,300,0,0,255,1],[112,0,0,200,0,0,255,1],[9,0,0,400,0,0,100,1]],[[113,0,0,500,0,0,255,1],[8,0,0,400,0,0,100,1]],[[113,0,0,800,0,0,200,1],[115,0,0,500,0,0,255,1],[9,0,0,400,0,0,100,1]],[[113,-8,0,500,0,0,150,1],[116,0,0,500,0,0,255,1],[8,0,0,400,0,0,100,1]],[[113,-8,0,500,0,0,150,1],[116,0,0,500,0,0,255,1],[8,0,0,400,0,0,100,1]],[[117,0,0,500,0,0,255,1],[117,0,0,500,90,0,255,1],[9,0,0,400,0,0,100,1],[113,0,0,800,0,0,255,1]],[[117,0,0,520,0,0,50,1],[8,0,0,400,0,0,50,1],[113,0,0,700,0,0,255,1],[115,0,0,600,90,0,150,1]],[[115,0,0,500,0,0,150,1],[113,0,0,600,0,0,255,1]],[[113,0,0,500,0,0,255,1],[117,0,0,200,0,0,255,1]],[[111,0,0,400,0,0,255,1],[117,0,0,200,0,0,100,1]],[[111,0,0,300,0,0,100,1]],[],[]],"name":"闪光","position":3,"timings":[{"flashColor":[255,255,187,119],"flashDuration":5,"flashScope":2,"frame":0,"se":null},{"flashColor":[255,255,255,187],"flashDuration":2,"flashScope":1,"frame":0,"se":{"name":"Saint7","pan":0,"pitch":140,"volume":100}},{"flashColor":[255,255,170,136],"flashDuration":2,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,255,255,187],"flashDuration":2,"flashScope":1,"frame":4,"se":null},{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":2,"frame":5,"se":null},{"flashColor":[255,255,255,255],"flashDuration":9,"flashScope":2,"frame":6,"se":null},{"flashColor":[255,255,170,136],"flashDuration":9,"flashScope":1,"frame":6,"se":null}]}, +{"id":34,"animation1Hue":0,"animation1Name":"Attack6","animation2Hue":40,"animation2Name":"Heal2","frames":[[[6,0,0,150,0,0,255,1]],[[7,0,0,150,0,0,255,1],[116,0,0,150,0,0,255,1]],[[7,0,0,300,0,0,255,1],[6,0,0,100,0,0,255,1],[117,0,0,200,0,0,255,1]],[[7,0,0,150,0,0,255,1],[7,0,0,600,0,0,150,1],[117,0,0,210,0,0,255,1]],[[7,0,0,300,0,0,255,1],[6,0,0,100,0,0,255,1],[117,0,0,220,0,0,255,1]],[[7,0,0,150,0,0,255,1],[7,0,0,600,0,0,150,1],[117,0,0,230,0,0,255,1]],[[7,0,0,300,0,0,255,1],[6,0,0,100,0,0,255,1],[117,0,0,240,0,0,255,1]],[[7,0,0,150,0,0,255,1],[7,0,0,600,0,0,150,1],[117,0,0,250,0,0,255,1]],[[7,0,0,300,0,0,255,1],[6,0,0,100,0,0,255,1],[117,0,0,260,0,0,255,1]],[[7,0,0,150,0,0,255,1],[7,0,0,600,0,0,150,1],[117,0,0,270,0,0,200,1]],[[7,0,0,300,0,0,255,1],[117,0,0,280,0,0,150,1]],[[7,0,0,600,0,0,150,1],[117,0,0,280,0,0,100,1]]],"name":"咆哮","position":3,"timings":[{"flashColor":[238,255,238,136],"flashDuration":5,"flashScope":2,"frame":0,"se":null},{"flashColor":[170,255,255,153],"flashDuration":2,"flashScope":1,"frame":0,"se":{"name":"Monster1","pan":0,"pitch":100,"volume":100}},{"flashColor":[170,255,255,136],"flashDuration":2,"flashScope":1,"frame":2,"se":null},{"flashColor":[170,255,255,136],"flashDuration":2,"flashScope":1,"frame":4,"se":null},{"flashColor":[170,255,255,136],"flashDuration":2,"flashScope":1,"frame":6,"se":null},{"flashColor":[170,255,255,136],"flashDuration":2,"flashScope":1,"frame":8,"se":null}]}, +{"id":35,"animation1Hue":0,"animation1Name":"Blow3","animation2Hue":0,"animation2Name":"Blow2","frames":[[[0,0,-64,150,0,0,255,1]],[[1,0,-64,150,0,0,255,1]],[[2,0,-64,150,0,0,255,1],[124,0,-32,120,0,0,255,1]],[[3,0,-64,150,0,0,255,1],[125,0,-32,120,0,0,255,1]],[[4,0,-64,150,0,0,255,1],[126,0,-32,120,0,0,255,1]],[[5,0,-64,150,0,0,255,1],[127,0,-32,120,0,0,255,1]],[[128,0,-32,120,0,0,255,1]]],"name":"扫堂腿","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind7","pan":0,"pitch":50,"volume":90}},{"flashColor":[255,136,102,255],"flashDuration":3,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,255,255,119],"flashDuration":2,"flashScope":2,"frame":2,"se":{"name":"Blow4","pan":0,"pitch":100,"volume":100}}]}, +{"id":36,"animation1Hue":0,"animation1Name":"Attack6","animation2Hue":200,"animation2Name":"Heal5","frames":[[[9,0,0,200,0,0,150,1]],[[8,0,0,200,0,0,100,1],[7,0,0,150,0,0,150,1]],[[9,0,0,200,0,0,150,1],[6,0,0,130,0,0,200,1],[0,0,0,120,0,0,255,1]],[[8,0,0,200,0,0,100,1],[1,0,0,150,0,0,255,1],[112,0,0,50,0,0,255,1]],[[2,0,0,150,0,0,255,1],[1,0,0,150,0,0,150,1],[112,0,0,120,0,0,150,1],[9,0,0,200,0,0,50,1]],[[3,0,0,150,0,0,255,1],[4,0,0,130,0,1,200,1],[112,0,0,120,0,0,100,1]],[[3,0,0,160,0,0,150,1],[4,0,0,160,0,1,150,1]],[[3,0,0,165,0,0,100,1],[5,0,0,160,0,1,150,1]],[],[]],"name":"冲撞","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder2","pan":0,"pitch":80,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":2,"se":{"name":"Thunder8","pan":0,"pitch":110,"volume":90}},{"flashColor":[255,119,102,221],"flashDuration":5,"flashScope":1,"frame":2,"se":{"name":"Blow5","pan":0,"pitch":50,"volume":100}},{"flashColor":[255,238,170,136],"flashDuration":2,"flashScope":2,"frame":3,"se":null}]}, +{"id":37,"animation1Hue":0,"animation1Name":"Heal1","animation2Hue":0,"animation2Name":"","frames":[[[1,0,-120,150,0,0,255,1]],[[1,0,-144,200,0,0,255,1]],[[2,0,-144,200,0,0,255,1],[4,0,-80,100,0,0,255,1]],[[0,0,-24,300,0,0,100,1],[2,0,-144,200,0,0,255,1],[4,0,-144,200,0,0,255,1]],[[3,0,-144,200,0,0,255,1],[5,0,-144,200,0,0,255,1],[0,0,-24,230,0,0,180,1]],[[3,0,-144,195,0,0,200,1],[6,0,-144,200,0,0,255,1],[0,0,-24,150,0,0,255,1]],[[3,0,-144,200,0,0,255,1],[11,0,-120,150,0,0,255,1],[5,0,-144,200,0,0,255,1],[0,0,-24,140,0,0,255,1]],[[3,0,-144,195,0,0,200,1],[12,0,-120,150,0,0,255,1],[6,0,-144,200,0,0,255,1],[0,0,-24,130,0,0,200,1]],[[3,0,-144,200,0,0,255,1],[13,0,-120,150,0,0,255,1],[5,0,-144,200,0,0,255,1],[0,0,-24,120,0,0,150,1]],[[14,0,-120,150,0,0,255,1],[3,0,-144,195,0,0,200,1],[5,0,-144,200,0,0,255,1],[18,8,-112,150,0,0,255,1]],[[15,0,-120,150,0,0,255,1],[17,8,-112,150,0,0,255,1],[4,0,-144,200,0,0,255,1],[19,8,-112,150,0,0,255,1]],[[16,0,-120,150,0,0,255,1],[4,0,-144,200,0,0,150,1],[20,8,-112,150,0,0,255,1]],[[17,0,-120,150,0,0,200,1],[21,8,-112,150,0,0,255,1]],[[7,0,-152,200,0,0,255,1],[17,0,-120,150,0,0,100,1],[22,8,-112,150,0,0,255,1]],[[8,0,-152,200,0,0,255,1],[23,8,-112,150,0,0,255,1]],[[9,0,-152,200,0,0,255,1],[24,8,-112,150,0,0,255,1]],[[10,0,-152,200,0,0,255,1],[25,8,-112,150,0,0,255,1]],[[26,8,-112,150,0,0,255,1]],[[27,8,-112,150,0,0,180,1]],[[28,8,-112,150,0,0,255,1]]],"name":"回复1","position":2,"timings":[{"flashColor":[221,238,255,204],"flashDuration":8,"flashScope":0,"frame":0,"se":{"name":"Saint2","pan":0,"pitch":150,"volume":90}},{"flashColor":[170,204,255,221],"flashDuration":8,"flashScope":1,"frame":0,"se":{"name":"Heal3","pan":0,"pitch":100,"volume":100}},{"flashColor":[221,238,255,204],"flashDuration":8,"flashScope":1,"frame":7,"se":null},{"flashColor":[238,255,255,204],"flashDuration":8,"flashScope":2,"frame":7,"se":null}]}, +{"id":38,"animation1Hue":0,"animation1Name":"Heal2","animation2Hue":80,"animation2Name":"Heal6","frames":[[[11,0,0,100,0,0,255,1]],[[11,0,0,150,0,0,255,1]],[[11,0,0,180,0,0,255,1],[0,0,0,50,0,0,255,1]],[[12,0,0,150,0,0,255,1],[1,0,0,60,0,0,255,1],[8,0,0,210,0,0,255,1]],[[12,0,0,160,0,0,255,1],[2,0,0,80,0,0,255,1],[8,0,0,197,0,0,255,1]],[[13,0,0,160,0,0,255,1],[3,0,0,80,0,0,255,1],[9,0,0,197,0,0,255,1]],[[13,0,0,163,0,0,255,1],[0,0,0,80,0,0,255,1],[9,0,0,190,0,0,255,1]],[[13,0,0,160,0,0,255,1],[1,0,0,80,0,0,255,1],[10,0,0,190,0,0,255,1]],[[13,0,0,163,0,0,255,1],[2,0,0,80,0,0,255,1],[10,0,0,180,0,0,255,1]],[[13,0,0,100,0,0,255,1],[14,0,0,150,0,0,255,1]],[[12,0,0,100,0,0,255,1],[15,0,0,180,0,0,255,1]],[[11,0,0,100,0,0,255,1],[16,0,0,200,0,0,255,1],[4,96,-64,50,0,0,255,1],[4,-96,72,50,0,0,255,1],[114,0,0,150,0,0,255,1]],[[11,0,0,50,0,0,255,1],[17,0,0,200,0,0,255,1],[4,-96,-56,50,0,0,255,1],[4,96,56,50,0,0,255,1],[5,96,-64,60,0,0,255,1],[5,-96,72,60,0,0,255,1],[115,0,0,150,0,0,255,1]],[[17,0,0,205,0,0,255,1],[4,8,-88,50,0,0,255,1],[4,8,80,50,0,0,255,1],[5,96,56,80,0,0,255,1],[5,-96,-56,80,0,0,255,1],[6,96,-64,60,0,0,255,1],[6,-96,72,60,0,0,255,1],[116,0,0,150,0,0,255,1]],[[17,0,0,210,0,0,255,1],[5,8,-88,100,0,0,255,1],[5,8,80,100,0,0,255,1],[6,-96,-56,80,0,0,255,1],[6,96,56,80,0,0,255,1],[7,96,-64,60,0,0,255,1],[7,-96,72,60,0,0,255,1],[117,0,0,150,0,0,255,1]],[[17,0,0,213,0,0,100,1],[6,8,-88,100,0,0,255,1],[6,8,80,100,0,0,255,1],[7,96,56,80,0,0,255,1],[7,-96,-56,80,0,0,255,1],[118,0,0,150,0,0,255,1]],[[7,8,-88,100,0,0,255,1],[7,8,80,100,0,0,255,1],[119,0,0,150,0,0,255,1]]],"name":"回复2","position":1,"timings":[{"flashColor":[170,204,255,221],"flashDuration":8,"flashScope":1,"frame":0,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Ice8","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,136],"flashDuration":10,"flashScope":2,"frame":9,"se":{"name":"Saint7","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,255,255,204],"flashDuration":10,"flashScope":1,"frame":9,"se":null}]}, +{"id":39,"animation1Hue":0,"animation1Name":"Heal4","animation2Hue":230,"animation2Name":"Heal2","frames":[[[0,0,0,100,0,0,200,1]],[[1,0,0,100,0,0,200,1],[111,0,0,100,0,0,255,1]],[[2,0,0,100,0,0,200,1],[112,0,0,100,0,0,255,1]],[[3,0,0,100,0,0,200,1],[112,0,0,110,0,0,255,1]],[[4,0,0,100,0,0,200,1],[104,-72,-48,100,0,0,255,1],[112,0,0,100,0,0,255,1]],[[5,0,0,102,0,0,200,1],[106,72,48,100,0,0,255,1],[117,0,0,190,0,0,100,1],[104,-72,-48,50,0,0,255,1],[112,0,0,100,0,0,255,1]],[[6,0,0,104,0,0,200,1],[107,-40,32,70,0,0,255,1],[111,0,0,100,0,0,255,1],[117,0,0,180,0,0,150,1],[106,72,48,60,0,0,255,1]],[[7,0,0,106,0,0,200,1],[112,0,0,100,0,0,255,1],[106,56,-48,100,0,0,255,1],[107,-40,32,40,0,0,255,1],[117,0,0,170,0,0,200,1]],[[8,0,0,108,0,0,200,1],[113,0,0,150,0,0,200,1],[106,56,-48,60,0,0,255,1],[106,-8,88,100,0,0,255,1],[117,0,0,160,0,0,255,1]],[[9,0,0,110,0,0,200,1],[113,0,0,200,0,0,150,1],[106,-8,88,60,0,0,255,1],[106,104,8,60,0,0,255,1],[106,-88,-64,60,0,0,255,1],[116,0,0,170,0,0,255,1]],[[10,0,0,114,0,0,200,1],[113,0,0,250,0,0,100,1],[115,0,0,170,0,0,200,1],[106,-24,-72,60,0,0,255,1],[106,104,8,30,0,0,255,1],[106,-88,-64,30,0,0,255,1]],[[11,0,0,116,0,0,200,1],[113,0,0,260,0,0,60,1],[106,32,-112,60,0,0,255,1],[106,-24,-72,30,0,0,255,1],[114,0,0,170,0,0,150,1]],[[12,0,0,118,0,0,200,1],[113,0,0,270,0,0,30,1],[106,48,96,60,0,0,255,1],[106,32,-112,30,0,0,255,1]],[[13,0,0,120,0,0,200,1],[-1,-200,144,110,0,0,255,1],[106,48,96,40,0,0,255,1]],[[14,0,0,122,0,0,200,1]],[[15,0,0,124,0,0,200,1]],[[16,0,0,126,0,0,200,1]],[[17,0,0,128,0,0,200,1]],[[18,0,0,130,0,0,200,1]],[[19,0,0,132,0,0,200,1]],[[20,0,0,134,0,0,200,1]],[[21,0,0,136,0,0,200,1]],[],[],[]],"name":"回复3","position":1,"timings":[{"flashColor":[187,238,255,136],"flashDuration":2,"flashScope":1,"frame":0,"se":null},{"flashColor":[187,238,255,204],"flashDuration":8,"flashScope":2,"frame":0,"se":{"name":"Saint7","pan":0,"pitch":100,"volume":100}},{"flashColor":[187,238,255,153],"flashDuration":2,"flashScope":1,"frame":2,"se":null},{"flashColor":[187,238,255,136],"flashDuration":2,"flashScope":1,"frame":4,"se":null},{"flashColor":[187,238,255,136],"flashDuration":15,"flashScope":1,"frame":9,"se":null}]}, +{"id":40,"animation1Hue":250,"animation1Name":"Heal1","animation2Hue":0,"animation2Name":"Heal6","frames":[[[4,0,-96,150,0,0,255,1]],[[5,0,-96,150,0,0,255,1],[1,0,-96,150,0,0,100,1]],[[4,0,-96,150,0,0,255,1],[2,0,-96,150,0,0,100,1],[100,0,0,130,0,0,255,1]],[[5,0,-96,150,0,0,255,1],[1,0,-96,150,0,0,100,1],[101,0,0,150,0,0,255,1]],[[4,0,-96,150,0,0,255,1],[5,0,-104,160,0,0,100,1],[2,0,-96,150,0,0,150,1],[102,0,0,150,0,0,255,1]],[[6,0,-104,160,0,0,255,1],[3,0,-96,150,0,0,150,1],[103,0,0,150,0,0,255,1]],[[5,0,-104,160,0,0,255,1],[2,0,-96,150,0,0,150,1],[104,0,0,150,0,0,255,1]],[[6,0,-104,160,0,0,255,1],[3,0,-96,150,0,0,150,1],[105,0,0,150,0,0,255,1],[120,0,-112,100,180,0,255,1]],[[5,0,-104,160,0,0,255,1],[2,0,-96,150,0,0,150,1],[106,0,0,150,0,0,255,1],[121,0,-120,100,180,0,255,1]],[[6,0,-104,160,0,0,255,1],[3,0,-96,150,0,0,150,1],[107,0,0,150,0,0,255,1],[122,0,-120,100,180,0,255,1]],[[5,0,-104,160,0,0,255,1],[2,0,-96,150,0,0,150,1],[108,0,0,150,0,0,255,1],[123,0,-120,100,180,0,255,1]],[[4,0,-96,150,0,0,255,1],[4,0,-104,160,0,0,100,1],[1,0,-96,150,0,0,150,1],[109,0,0,150,0,0,255,1],[124,0,-120,100,180,0,255,1]],[[4,0,-88,140,0,0,150,1],[1,0,-96,150,0,0,100,1],[125,0,-120,100,180,0,255,1]],[[126,0,-120,100,180,0,255,1]],[[127,0,-120,100,180,0,255,1]],[[128,0,-120,100,180,0,255,1]],[[129,0,-120,100,180,0,255,1]]],"name":"治疗1","position":2,"timings":[{"flashColor":[238,255,187,102],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Raise3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":2,"se":{"name":"Ice8","pan":0,"pitch":100,"volume":90}},{"flashColor":[204,255,85,170],"flashDuration":8,"flashScope":1,"frame":2,"se":null}]}, +{"id":41,"animation1Hue":0,"animation1Name":"Heal5","animation2Hue":0,"animation2Name":"Heal6","frames":[[[12,0,0,50,0,0,255,1]],[[0,0,0,20,0,0,255,1],[12,0,0,80,0,0,200,1]],[[12,0,0,100,0,0,200,1],[1,0,0,120,0,0,255,1]],[[12,0,0,120,0,0,200,1],[2,0,0,120,0,0,255,1]],[[12,0,0,125,0,0,170,1],[3,0,0,120,0,0,255,1],[110,0,0,140,0,0,255,1]],[[12,0,0,130,0,0,150,1],[4,0,0,120,0,0,255,1],[111,0,0,180,0,0,255,1]],[[12,0,0,125,0,0,170,1],[5,0,0,120,0,0,255,1],[112,0,0,200,0,0,255,1]],[[12,0,0,120,0,0,200,1],[6,0,0,120,0,0,255,1],[113,0,0,200,0,0,255,1]],[[12,0,0,125,0,0,170,1],[7,0,0,120,0,0,255,1],[114,0,0,200,0,0,255,1]],[[12,0,0,130,0,0,150,1],[8,0,0,120,0,0,255,1],[115,0,0,200,0,0,255,1]],[[12,0,0,125,0,0,170,1],[9,0,0,120,0,0,255,1],[116,0,0,200,0,0,255,1]],[[12,0,0,110,0,0,200,1],[10,0,0,120,0,0,255,1],[117,0,0,200,0,0,255,1]],[[12,0,0,80,0,0,180,1],[11,0,0,120,0,0,255,1],[118,0,0,200,0,0,255,1]],[[12,0,0,60,0,0,180,1],[119,0,0,200,0,0,255,1]],[[12,0,0,50,0,0,150,1]],[[12,0,0,50,0,0,100,1]],[[12,0,0,50,0,0,50,1]]],"name":"治疗2","position":1,"timings":[{"flashColor":[204,238,255,102],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Ice8","pan":0,"pitch":100,"volume":100}},{"flashColor":[85,187,221,170],"flashDuration":10,"flashScope":1,"frame":1,"se":null}]}, +{"id":42,"animation1Hue":0,"animation1Name":"Heal3","animation2Hue":0,"animation2Name":"","frames":[[[0,0,128,150,0,0,255,1]],[[1,0,128,150,0,0,255,1]],[[2,0,128,150,0,0,255,1]],[[3,0,128,150,0,0,255,1]],[[4,0,128,150,0,0,255,1]],[[5,0,128,150,0,0,255,1],[25,0,208,100,0,0,255,1],[11,0,80,100,0,0,255,1],[18,0,208,300,0,0,255,1]],[[6,0,128,150,0,0,255,1],[26,0,208,100,0,0,255,1],[11,0,104,130,0,0,255,1],[18,0,208,250,0,0,255,1]],[[7,0,128,150,0,0,255,1],[27,0,208,100,0,0,255,1],[12,0,104,130,0,0,255,1],[18,0,208,230,0,0,255,1]],[[8,0,128,150,0,0,255,1],[28,0,208,100,0,0,255,1],[13,0,112,140,0,0,255,1],[18,0,208,210,0,0,255,1]],[[9,0,128,150,0,0,255,1],[29,0,208,100,0,0,255,1],[14,0,112,140,0,0,255,1],[15,8,136,150,0,0,255,1],[18,0,208,190,0,0,255,1]],[[10,0,128,150,0,0,255,1],[29,0,208,110,0,0,255,1],[14,0,112,140,0,0,150,1],[16,8,144,150,0,0,255,1],[18,0,208,170,0,0,255,1]],[[10,0,128,150,0,0,180,1],[29,0,208,100,0,0,255,1],[14,0,112,140,0,0,80,1],[17,8,152,150,0,0,255,1],[18,0,208,160,0,0,255,1]],[[29,0,208,110,0,0,255,1],[15,8,160,150,0,0,255,1],[18,0,208,150,0,0,255,1]],[[19,0,144,150,0,0,255,1],[16,8,168,150,0,0,255,1],[18,0,208,140,0,0,200,1]],[[20,0,128,180,0,0,255,1],[17,8,176,150,0,0,255,1],[18,0,208,130,0,0,150,1]],[[21,0,128,180,0,0,255,1],[15,8,184,150,0,0,200,1],[18,0,208,120,0,0,100,1]],[[22,0,128,180,0,0,255,1]],[[23,0,120,190,0,0,255,1]],[[24,0,120,200,0,0,255,1]],[[24,0,112,210,0,0,100,1]]],"name":"复活","position":0,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Saint7","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":9,"se":{"name":"Flash3","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,255,221,238],"flashDuration":8,"flashScope":1,"frame":13,"se":null}]}, +{"id":43,"animation1Hue":0,"animation1Name":"Special8","animation2Hue":170,"animation2Name":"Heal1","frames":[[[0,0,-16,150,0,0,150,1]],[[1,0,-16,150,0,0,200,1]],[[2,0,-16,150,0,0,255,1]],[[3,0,-16,150,0,0,255,1]],[[4,0,-16,150,0,0,255,1]],[[5,0,-16,150,0,0,255,1]],[[6,0,-16,150,0,0,255,1]],[[7,0,-16,150,0,0,255,1]],[[8,0,-16,150,0,0,255,1]],[[9,0,-16,150,0,0,255,1]],[[10,0,-16,150,0,0,255,1]],[[11,0,-16,150,0,0,255,1],[11,0,-16,160,0,0,150,1]],[[10,0,-16,150,0,0,255,1],[11,0,-16,210,0,0,150,1]],[[12,0,-16,150,0,0,255,1],[12,0,-16,220,0,0,150,1],[14,40,-24,150,0,0,255,1]],[[13,0,-16,150,0,0,255,1],[13,0,-16,230,0,0,150,1],[14,40,-104,150,0,0,255,1],[15,0,-80,130,0,0,200,1]],[[13,0,-16,150,0,0,255,1],[13,0,-16,235,0,0,100,1],[14,-64,-48,150,0,0,255,1],[15,0,-128,130,0,0,200,1],[14,40,-168,150,0,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,-64,-112,150,0,0,255,1],[14,0,-24,150,0,0,255,1],[15,0,-168,130,0,0,150,1]],[[13,0,-16,150,0,0,255,1],[14,-64,-168,150,0,0,255,1],[14,0,-96,150,0,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,0,-160,150,0,0,255,1],[14,-48,-32,100,0,0,255,1],[14,-64,-192,130,0,0,150,1]],[[13,0,-16,150,0,0,255,1],[14,-48,-64,100,0,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,-48,-80,100,0,0,255,1],[14,56,-32,100,0,0,255,1]],[[13,0,-16,150,0,0,200,1],[14,-48,-120,80,0,0,150,1],[14,56,-64,100,0,0,255,1]],[[13,0,-16,150,0,0,150,1],[14,56,-80,100,0,0,255,1]],[[13,0,-16,150,0,0,100,1],[14,56,-104,80,0,0,150,1]]],"name":"强化1","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,170,221,255],"flashDuration":5,"flashScope":1,"frame":10,"se":{"name":"Up1","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,136,153,153],"flashDuration":3,"flashScope":2,"frame":11,"se":null}]}, +{"id":44,"animation1Hue":0,"animation1Name":"Special1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,150,0,0,150,1]],[[1,0,0,150,0,0,200,1]],[[2,0,0,150,0,0,255,1]],[[3,0,0,150,0,0,255,1]],[[4,0,0,150,0,0,255,1]],[[5,0,0,150,0,0,255,1]],[[6,0,0,150,0,0,255,1]],[[7,0,0,150,0,0,255,1]],[[8,0,0,150,0,0,255,1]],[[9,0,0,150,0,0,255,1]],[[10,0,0,150,0,0,255,1]],[[11,0,0,150,0,0,255,1],[11,0,0,160,0,0,150,1]],[[10,0,0,150,0,0,255,1],[11,0,0,210,0,0,150,1]],[[12,0,0,150,0,0,255,1],[12,0,0,220,0,0,150,1],[14,40,56,150,0,0,255,1]],[[13,0,0,150,0,0,255,1],[13,0,0,230,0,0,150,1],[14,40,0,150,0,0,255,1],[15,0,72,200,0,0,200,1]],[[13,0,0,150,0,0,255,1],[13,0,0,235,0,0,100,1],[14,-64,80,150,0,0,255,1],[15,0,24,200,0,0,200,1],[14,40,-48,150,0,0,255,1]],[[13,0,0,150,0,0,255,1],[14,-64,24,150,0,0,255,1],[14,0,88,150,0,0,255,1],[15,0,-48,200,0,0,200,1]],[[13,0,0,150,0,0,255,1],[14,-64,-24,150,0,0,255,1],[14,0,0,150,0,0,255,1]],[[13,0,0,150,0,0,255,1],[14,0,-64,150,0,0,255,1],[14,-48,72,100,0,0,255,1],[14,-64,-56,130,0,0,150,1]],[[13,0,0,150,0,0,255,1],[14,-48,40,100,0,0,255,1]],[[13,0,0,150,0,0,255,1],[14,-48,24,100,0,0,255,1],[14,56,88,100,0,0,255,1]],[[13,0,0,150,0,0,200,1],[14,-48,0,80,0,0,150,1],[14,56,40,100,0,0,255,1]],[[13,0,0,150,0,0,150,1],[14,56,24,100,0,0,255,1]],[[13,0,0,150,0,0,100,1],[14,56,0,80,0,0,150,1]]],"name":"强化2","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,170,221,255],"flashDuration":5,"flashScope":1,"frame":10,"se":{"name":"Up1","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,136,153,153],"flashDuration":3,"flashScope":2,"frame":11,"se":null}]}, +{"id":45,"animation1Hue":220,"animation1Name":"Special8","animation2Hue":50,"animation2Name":"Heal1","frames":[[[0,0,-16,150,0,0,150,1]],[[1,0,-16,150,0,0,200,1]],[[2,0,-16,150,0,0,255,1]],[[3,0,-16,150,0,0,255,1]],[[4,0,-16,150,0,0,255,1]],[[5,0,-16,150,0,0,255,1]],[[6,0,-16,150,0,0,255,1]],[[7,0,-16,150,0,0,255,1]],[[8,0,-16,150,0,0,255,1]],[[9,0,-16,150,0,0,255,1]],[[10,0,-16,150,0,0,255,1]],[[11,0,-16,150,0,0,255,1],[11,0,-16,160,0,0,150,1]],[[10,0,-16,150,0,0,255,1],[11,0,-16,210,0,0,150,1]],[[12,0,-16,150,0,0,255,1],[12,0,-16,220,0,0,150,1],[14,40,-208,150,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[13,0,-16,230,0,0,150,1],[15,0,-160,130,180,0,200,1],[14,40,-136,150,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[13,0,-16,235,0,0,100,1],[15,0,-104,130,180,0,200,1],[14,-64,-192,120,180,0,255,1],[14,40,-64,150,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[15,0,-64,130,180,0,200,1],[14,-64,-136,120,180,0,255,1],[14,0,-192,150,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,0,-128,150,180,0,255,1],[14,-64,-64,120,180,0,255,1],[14,64,-192,120,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,0,-56,150,180,0,255,1],[14,-64,-48,120,180,0,150,1],[14,64,-120,120,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,64,-56,120,180,0,255,1],[14,-56,-184,120,180,0,255,1]],[[13,0,-16,150,0,0,255,1],[14,64,-40,120,180,0,150,1],[14,-56,-120,120,180,0,255,1],[14,40,-184,120,180,0,255,1]],[[13,0,-16,150,0,0,200,1],[14,-56,-72,120,180,0,255,1],[14,40,-128,120,180,0,255,1]],[[13,0,-16,150,0,0,150,1],[14,-56,-64,120,180,0,150,1],[14,40,-88,120,180,0,255,1]],[[13,0,-16,150,0,0,100,1],[14,40,-80,120,180,0,150,1]]],"name":"弱化1","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":80,"volume":100}},{"flashColor":[153,238,221,238],"flashDuration":5,"flashScope":1,"frame":10,"se":{"name":"Down1","pan":0,"pitch":100,"volume":100}},{"flashColor":[0,221,255,153],"flashDuration":3,"flashScope":2,"frame":11,"se":null}]}, +{"id":46,"animation1Hue":220,"animation1Name":"Special1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,150,0,0,150,1]],[[1,0,0,150,0,0,200,1]],[[2,0,0,150,0,0,255,1]],[[3,0,0,150,0,0,255,1]],[[4,0,0,150,0,0,255,1]],[[5,0,0,150,0,0,255,1]],[[6,0,0,150,0,0,255,1]],[[7,0,0,150,0,0,255,1]],[[8,0,0,150,0,0,255,1]],[[9,0,0,150,0,0,255,1]],[[10,0,0,150,0,0,255,1]],[[11,0,0,150,0,0,255,1],[11,0,0,160,0,0,150,1]],[[10,0,0,150,0,0,255,1],[11,0,0,210,0,0,150,1]],[[12,0,0,150,0,0,255,1],[12,0,0,220,0,0,150,1],[14,40,-96,150,180,0,255,1]],[[13,0,0,150,0,0,255,1],[13,0,0,230,0,0,150,1],[15,0,-80,200,180,0,200,1],[14,40,-16,150,180,0,255,1]],[[13,0,0,150,0,0,255,1],[13,0,0,235,0,0,100,1],[15,0,24,200,180,0,200,1],[14,-64,-88,120,180,0,255,1],[14,40,32,150,180,0,255,1]],[[13,0,0,150,0,0,255,1],[15,0,72,200,180,0,200,1],[14,-64,-24,120,180,0,255,1],[14,0,-104,150,180,0,255,1]],[[13,0,0,150,0,0,255,1],[14,0,-24,150,180,0,255,1],[14,-64,56,120,180,0,255,1],[14,64,-80,120,180,0,255,1]],[[13,0,0,150,0,0,255,1],[14,0,48,150,180,0,255,1],[14,-64,80,120,180,0,150,1],[14,64,-8,120,180,0,255,1]],[[13,0,0,150,0,0,255,1],[14,64,32,120,180,0,255,1],[14,-56,-104,120,180,0,255,1]],[[13,0,0,150,0,0,255,1],[14,64,56,120,180,0,150,1],[14,-56,-32,120,180,0,255,1],[14,32,-96,120,180,0,255,1]],[[13,0,0,150,0,0,200,1],[14,-56,24,120,180,0,255,1],[14,32,-40,120,180,0,255,1]],[[13,0,0,150,0,0,150,1],[14,-56,40,120,180,0,150,1],[14,32,8,120,180,0,255,1]],[[13,0,0,150,0,0,100,1],[14,32,24,120,180,0,150,1]]],"name":"弱化2","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":80,"volume":100}},{"flashColor":[153,238,221,238],"flashDuration":5,"flashScope":1,"frame":10,"se":{"name":"Down1","pan":0,"pitch":100,"volume":100}},{"flashColor":[0,221,255,153],"flashDuration":3,"flashScope":2,"frame":11,"se":null}]}, +{"id":47,"animation1Hue":70,"animation1Name":"Special8","animation2Hue":230,"animation2Name":"State6","frames":[[[0,0,-16,330,0,0,150,1],[0,0,-208,330,0,1,150,1]],[[1,0,-16,270,0,0,200,1],[1,0,-208,270,0,1,200,1]],[[2,0,-16,240,0,0,255,1],[2,0,-208,240,0,1,255,1]],[[3,0,-16,230,0,0,255,1],[3,0,-208,230,0,1,255,1]],[[4,0,-16,225,0,0,255,1],[4,0,-208,225,0,1,255,1],[4,0,-192,130,0,0,100,1],[4,0,-24,130,0,1,100,1]],[[5,0,-16,220,0,0,255,1],[5,0,-208,220,0,1,255,1],[5,0,-176,130,0,0,150,1],[5,0,-40,130,0,1,150,1],[112,0,-72,150,0,0,150,1],[112,0,-160,150,0,0,150,1]],[[6,0,-16,215,0,0,255,1],[6,0,-208,215,0,1,255,1],[6,0,-168,130,0,0,200,1],[6,0,-56,130,0,1,200,1]],[[7,0,-16,210,0,0,255,1],[7,0,-208,210,0,1,255,1],[7,0,-160,130,0,0,255,1],[7,0,-64,130,0,1,255,1],[111,0,-72,150,0,0,150,1],[111,0,-160,150,0,0,150,1]],[[8,0,-16,205,0,0,255,1],[8,0,-208,205,0,1,255,1],[8,0,-152,130,0,0,255,1],[8,0,-72,130,0,1,255,1],[112,0,-72,150,0,0,150,1],[112,0,-160,150,0,0,150,1]],[[9,0,-16,200,0,0,255,1],[9,0,-208,200,0,1,255,1],[9,0,-144,130,0,0,255,1],[9,0,-80,130,0,1,255,1],[111,0,-72,150,0,0,255,1],[111,0,-160,150,0,0,255,1]],[[10,0,-16,200,0,0,255,1],[10,0,-80,130,0,0,255,1],[10,0,-144,130,0,0,255,1],[10,0,-208,200,0,0,255,1],[112,0,-72,150,0,0,255,1],[112,0,-160,150,0,0,255,1]],[[11,0,-16,210,0,0,150,1],[11,0,-16,200,0,0,255,1],[11,0,-208,200,0,0,255,1],[11,0,-208,210,0,0,150,1],[11,0,-80,130,0,0,255,1],[11,0,-144,130,0,0,255,1],[11,0,-80,140,0,0,150,1],[11,0,-144,140,0,0,150,1],[113,0,-72,150,0,0,255,1],[113,0,-160,150,0,0,255,1]],[[11,0,-16,260,0,0,150,1],[10,0,-16,200,0,0,255,1],[10,0,-208,200,0,0,255,1],[11,0,-208,260,0,0,150,1],[10,0,-80,130,0,0,255,1],[10,0,-144,130,0,0,255,1],[11,0,-80,180,0,0,150,1],[11,0,-144,180,0,0,150,1],[112,0,-72,150,0,0,255,1],[112,0,-160,150,0,0,255,1]],[[12,0,-16,280,0,0,150,1],[12,0,-16,200,0,0,255,1],[12,0,-208,200,0,0,255,1],[12,0,-208,280,0,0,150,1],[12,0,-80,130,0,0,255,1],[12,0,-144,130,0,0,255,1],[12,0,-80,210,0,0,150,1],[12,0,-144,210,0,0,150,1],[111,0,-72,150,0,0,255,1],[111,0,-160,150,0,0,255,1]],[[13,0,-16,290,0,0,150,1],[13,0,-16,200,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-208,290,0,0,150,1],[13,0,-80,130,0,0,255,1],[13,0,-144,130,0,0,255,1],[13,0,-80,220,0,0,150,1],[13,0,-144,220,0,0,150,1],[112,0,-72,150,0,0,255,1],[112,0,-160,150,0,0,255,1]],[[13,0,-16,295,0,0,100,1],[13,0,-16,200,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-208,295,0,0,100,1],[13,0,-80,130,0,0,255,1],[13,0,-144,130,0,0,255,1],[13,0,-80,225,0,0,100,1],[13,0,-144,225,0,0,100,1],[113,0,-72,150,0,0,255,1],[113,0,-160,150,0,0,255,1]],[[13,0,-16,200,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-80,130,0,0,255,1],[13,0,-144,130,0,0,255,1],[111,0,-72,150,0,0,255,1],[111,0,-160,150,0,0,255,1]],[[13,0,-16,200,0,0,255,1],[13,0,-80,130,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-144,130,0,0,255,1],[113,0,-72,150,0,0,255,1],[113,0,-160,150,0,0,255,1]],[[13,0,-16,200,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-144,130,0,0,255,1],[13,0,-80,130,0,0,255,1],[112,0,-72,150,0,0,255,1],[112,0,-160,150,0,0,255,1]],[[13,0,-16,200,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-144,130,0,0,255,1],[13,0,-80,130,0,0,255,1],[111,0,-72,150,0,0,255,1],[111,0,-160,150,0,0,255,1]],[[13,0,-16,200,0,0,255,1],[13,0,-208,200,0,0,255,1],[13,0,-144,130,0,0,255,1],[13,0,-80,130,0,0,255,1],[112,0,-72,150,0,0,255,1],[112,0,-160,150,0,0,255,1]],[[13,0,-16,200,0,0,200,1],[13,0,-208,200,0,0,200,1],[13,0,-80,130,0,0,200,1],[13,0,-144,130,0,0,200,1],[113,0,-72,150,0,0,150,1],[113,0,-160,150,0,0,150,1]],[[13,0,-16,200,0,0,150,1],[13,0,-208,200,0,0,150,1],[13,0,-80,130,0,0,150,1],[13,0,-144,130,0,0,150,1],[112,0,-72,150,0,0,100,1],[112,0,-160,150,0,0,100,1]],[[13,0,-16,200,0,0,100,1],[13,0,-208,200,0,0,100,1],[13,0,-80,130,0,0,100,1],[13,0,-144,130,0,0,100,1],[113,0,-72,150,0,0,50,1],[113,0,-160,150,0,0,50,1]]],"name":"束缚咒1","position":2,"timings":[{"flashColor":[255,255,204,204],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Darkness4","pan":0,"pitch":85,"volume":100}},{"flashColor":[255,255,187,204],"flashDuration":5,"flashScope":1,"frame":1,"se":{"name":"Fire5","pan":0,"pitch":80,"volume":90}},{"flashColor":[255,255,187,204],"flashDuration":2,"flashScope":2,"frame":7,"se":null},{"flashColor":[255,255,187,204],"flashDuration":3,"flashScope":1,"frame":9,"se":null},{"flashColor":[255,255,187,170],"flashDuration":3,"flashScope":1,"frame":12,"se":null},{"flashColor":[255,255,170,153],"flashDuration":2,"flashScope":2,"frame":12,"se":null},{"flashColor":[255,255,187,204],"flashDuration":3,"flashScope":1,"frame":15,"se":null},{"flashColor":[255,255,187,170],"flashDuration":3,"flashScope":1,"frame":18,"se":null},{"flashColor":[255,255,187,204],"flashDuration":3,"flashScope":1,"frame":21,"se":null}]}, +{"id":48,"animation1Hue":0,"animation1Name":"Special9","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-152,180,0,0,255,1]],[[1,0,-152,180,0,0,255,1]],[[2,0,-152,180,0,0,255,1]],[[3,0,-152,180,0,0,255,1]],[[4,0,-152,180,0,0,255,1]],[[5,0,-152,180,0,0,255,1],[10,40,-152,180,340,0,255,1],[10,-64,-152,180,10,0,255,1]],[[6,0,-152,180,0,0,255,1],[11,40,-152,180,340,0,255,1],[11,-64,-152,180,10,0,255,1]],[[7,0,-152,180,0,0,255,1],[12,40,-152,180,340,0,255,1],[12,-64,-152,180,10,0,255,1],[10,80,-152,180,350,0,255,1],[10,-96,-152,180,15,0,255,1]],[[8,0,-152,180,0,0,255,1],[13,40,-152,180,340,0,255,1],[13,-64,-152,180,10,0,255,1],[11,80,-152,180,350,0,255,1],[11,-96,-152,180,15,0,255,1]],[[9,0,-152,180,0,0,255,1],[15,40,-152,180,340,0,255,1],[15,-64,-152,180,10,0,255,1],[12,80,-152,180,350,0,255,1],[12,-96,-152,180,15,0,255,1],[10,-88,-128,180,175,0,255,1],[10,80,-128,180,190,0,255,1]],[[8,0,-152,180,0,0,255,1],[14,40,-152,180,340,0,255,1],[14,-64,-152,180,10,0,255,1],[13,80,-152,180,350,0,255,1],[13,-96,-152,180,15,0,255,1],[11,-88,-128,180,175,0,255,1],[11,80,-128,180,190,0,255,1]],[[9,0,-152,180,0,0,255,1],[15,40,-152,180,340,0,255,1],[15,-64,-152,180,10,0,255,1],[15,80,-152,180,350,0,255,1],[15,-96,-152,180,15,0,255,1],[12,-88,-128,180,175,0,255,1],[12,80,-128,180,190,0,255,1]],[[8,0,-152,180,0,0,255,1],[14,40,-152,180,340,0,255,1],[14,-64,-152,180,10,0,255,1],[14,80,-152,180,350,0,255,1],[14,-96,-152,180,15,0,255,1],[13,-88,-128,180,175,0,255,1],[13,80,-128,180,190,0,255,1]],[[9,0,-152,180,0,0,255,1],[15,40,-152,180,340,0,255,1],[15,-64,-152,180,10,0,255,1],[15,80,-152,180,350,0,255,1],[15,-96,-152,180,15,0,255,1],[15,-88,-128,180,175,0,255,1],[15,80,-128,180,190,0,255,1]],[[8,0,-152,180,0,0,255,1],[14,40,-152,180,340,0,255,1],[14,-64,-152,180,10,0,255,1],[14,80,-152,180,350,0,255,1],[14,-96,-152,180,15,0,255,1],[14,-88,-128,180,175,0,255,1],[14,80,-128,180,190,0,255,1]],[[9,0,-152,180,0,0,255,1],[15,40,-152,180,340,0,255,1],[15,-64,-152,180,10,0,255,1],[15,80,-152,180,350,0,255,1],[15,-96,-152,180,15,0,255,1],[15,-88,-128,180,175,0,255,1],[15,80,-128,180,190,0,255,1]],[[8,0,-152,180,0,0,255,1],[14,40,-152,180,340,0,255,1],[14,-64,-152,180,10,0,255,1],[14,80,-152,180,350,0,255,1],[14,-96,-152,180,15,0,255,1],[14,-88,-128,180,175,0,255,1],[14,80,-128,180,190,0,255,1]],[[8,0,-152,180,0,0,150,1],[14,40,-152,180,340,0,150,1],[14,-64,-152,180,10,0,150,1],[14,80,-152,180,350,0,150,1],[14,-96,-152,180,15,0,150,1],[14,-88,-128,180,175,0,150,1],[14,80,-128,180,190,0,150,1]],[[8,0,-152,180,0,0,100,1],[14,40,-152,180,340,0,100,1],[14,-64,-152,180,10,0,100,1],[14,80,-152,180,350,0,100,1],[14,-96,-152,180,15,0,100,1],[14,-88,-128,180,175,0,100,1],[14,80,-128,180,190,0,100,1]]],"name":"束缚咒2","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind5","pan":0,"pitch":85,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":2,"se":{"name":"Darkness6","pan":0,"pitch":50,"volume":100}},{"flashColor":[255,204,136,187],"flashDuration":5,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,255,170,170],"flashDuration":5,"flashScope":2,"frame":5,"se":{"name":"Darkness6","pan":0,"pitch":50,"volume":100}},{"flashColor":[255,238,136,136],"flashDuration":2,"flashScope":1,"frame":8,"se":null},{"flashColor":[255,238,136,136],"flashDuration":2,"flashScope":1,"frame":10,"se":null},{"flashColor":[255,238,136,136],"flashDuration":2,"flashScope":1,"frame":12,"se":null},{"flashColor":[255,238,136,136],"flashDuration":2,"flashScope":1,"frame":14,"se":null}]}, +{"id":49,"animation1Hue":0,"animation1Name":"Special3","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,200,0,0,150,1]],[[0,0,0,180,0,0,200,1],[20,0,0,200,60,0,100,1]],[[1,0,0,180,0,0,180,1],[20,0,0,200,40,0,180,1]],[[20,0,0,200,20,0,180,1],[2,0,0,160,0,0,255,1]],[[4,0,0,150,0,0,255,1],[20,0,0,180,0,0,180,1]],[[6,0,0,150,0,0,255,1],[21,0,0,160,340,0,180,1]],[[7,0,0,150,0,0,255,1],[22,0,0,130,320,0,180,1],[8,0,0,100,0,0,255,1]],[[9,0,0,130,0,0,255,1],[23,0,0,100,300,0,180,1]],[[10,0,0,150,0,0,255,1]],[[11,0,0,170,0,0,255,1]],[[12,0,0,170,0,0,255,1]],[[13,0,0,170,0,0,255,1]],[[14,0,0,170,0,0,255,1]],[[15,0,0,170,0,0,255,1]],[[16,0,0,170,0,0,255,1]],[[17,0,0,170,0,0,200,1]],[[18,0,0,170,0,0,150,1]],[[19,0,0,170,0,0,100,1]]],"name":"吸收","position":1,"timings":[{"flashColor":[255,102,68,153],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Absorb2","pan":0,"pitch":65,"volume":100}},{"flashColor":[255,0,0,204],"flashDuration":10,"flashScope":1,"frame":6,"se":null}]}, +{"id":50,"animation1Hue":0,"animation1Name":"State1","animation2Hue":0,"animation2Name":"","frames":[[[0,56,32,130,0,0,255,1]],[[1,56,32,130,0,0,255,1]],[[2,56,32,130,0,0,255,1]],[[3,56,32,130,0,0,255,1],[0,-56,-8,130,0,0,255,1]],[[4,56,32,130,0,0,255,1],[1,-56,-8,130,0,0,255,1]],[[5,56,32,130,0,0,255,1],[2,-56,-8,130,0,0,255,1],[0,32,-88,130,0,0,255,1]],[[6,56,32,130,0,0,255,1],[3,-56,-8,130,0,0,255,1],[1,32,-88,130,0,0,255,1]],[[7,56,32,130,0,0,255,1],[4,-56,-8,130,0,0,255,1],[2,32,-88,130,0,0,255,1]],[[8,56,32,130,0,0,255,1],[5,-56,-8,130,0,0,255,1],[3,32,-88,130,0,0,255,1],[0,0,0,150,0,0,255,1]],[[9,56,32,130,0,0,255,1],[6,-56,-8,130,0,0,255,1],[4,32,-88,130,0,0,255,1],[1,0,0,150,0,0,255,1]],[[10,56,32,130,0,0,255,1],[7,-56,-8,130,0,0,255,1],[5,32,-88,130,0,0,255,1],[2,0,0,150,0,0,255,1]],[[11,56,32,130,0,0,255,1],[8,-56,-8,130,0,0,255,1],[6,32,-88,130,0,0,255,1],[3,0,0,150,0,0,255,1]],[[12,56,32,130,0,0,255,1],[9,-56,-8,130,0,0,255,1],[7,32,-88,130,0,0,255,1],[4,0,0,150,0,0,255,1]],[[13,56,32,130,0,0,255,1],[10,-56,-8,130,0,0,255,1],[8,32,-88,130,0,0,255,1],[5,0,0,150,0,0,255,1]],[[11,-56,-8,130,0,0,255,1],[9,32,-88,130,0,0,255,1],[6,0,0,150,0,0,255,1]],[[12,-56,-8,130,0,0,255,1],[10,32,-88,130,0,0,255,1],[7,0,0,150,0,0,255,1]],[[13,-56,-8,130,0,0,255,1],[11,32,-88,130,0,0,255,1],[8,0,0,150,0,0,255,1]],[[12,32,-88,130,0,0,255,1],[9,0,0,150,0,0,255,1]],[[13,32,-88,130,0,0,255,1],[10,0,0,150,0,0,255,1]],[[11,0,0,150,0,0,255,1]],[[12,0,0,150,0,0,255,1]],[[13,0,0,150,0,0,255,1]]],"name":"毒","position":1,"timings":[{"flashColor":[68,238,170,153],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Poison","pan":0,"pitch":100,"volume":100}},{"flashColor":[102,255,153,204],"flashDuration":3,"flashScope":1,"frame":1,"se":null},{"flashColor":[102,255,153,187],"flashDuration":3,"flashScope":1,"frame":3,"se":null},{"flashColor":[102,255,153,187],"flashDuration":8,"flashScope":1,"frame":5,"se":null}]}, +{"id":51,"animation1Hue":0,"animation1Name":"State2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-64,50,0,0,150,0]],[[0,0,-64,120,0,0,255,0]],[[1,0,-64,120,0,0,255,0],[9,-32,-40,130,0,0,255,1]],[[2,0,-64,130,0,0,255,0],[10,-32,-40,130,0,0,255,1],[9,40,-72,130,0,0,255,1]],[[3,0,-64,140,0,0,255,0],[11,-32,-40,130,0,0,255,1],[10,56,-80,130,0,0,255,1]],[[5,0,-64,150,0,0,255,0],[12,-32,-40,130,0,0,255,1],[11,56,-80,130,0,0,255,1],[9,56,24,130,0,0,255,1],[9,-72,-64,130,0,0,255,1]],[[6,0,-64,150,0,0,255,0],[13,-32,-40,130,0,0,255,1],[12,56,-80,130,0,0,255,1],[10,56,24,130,0,0,255,1],[10,-72,-64,130,0,0,255,1]],[[7,0,-64,150,0,0,255,0],[14,-32,-40,130,0,0,255,1],[13,56,-80,130,0,0,255,1],[11,56,24,130,0,0,255,1],[11,-72,-64,130,0,0,255,1],[9,-48,16,130,0,0,255,1],[9,-24,-136,130,0,0,255,1]],[[8,0,-64,150,0,0,255,0],[14,64,-80,130,0,0,255,1],[12,56,24,130,0,0,255,1],[12,-72,-64,130,0,0,255,1],[10,-48,16,130,0,0,255,1],[10,-24,-136,130,0,0,255,1],[9,64,-120,130,0,0,255,1]],[[5,0,-64,150,0,0,255,0],[13,56,24,130,0,0,255,1],[13,-72,-64,130,0,0,255,1],[11,-48,16,130,0,0,255,1],[9,0,-16,130,0,0,255,1],[11,-24,-136,130,0,0,255,1],[10,64,-120,130,0,0,255,1]],[[6,0,-64,150,0,0,255,0],[14,56,24,130,0,0,255,1],[14,-72,-64,130,0,0,255,1],[12,-48,16,130,0,0,255,1],[10,0,-16,130,0,0,255,1],[12,-24,-136,130,0,0,255,1],[11,64,-120,130,0,0,255,1]],[[7,0,-64,150,0,0,255,0],[13,-48,16,130,0,0,255,1],[11,0,-16,130,0,0,255,1],[13,-24,-136,130,0,0,255,1],[12,64,-120,130,0,0,255,1]],[[8,0,-64,150,0,0,255,0],[14,-48,16,130,0,0,255,1],[12,0,-16,130,0,0,255,1],[14,-24,-136,130,0,0,255,1],[13,64,-120,130,0,0,255,1]],[[5,0,-64,160,0,0,255,0],[13,0,-16,130,0,0,255,1],[14,64,-120,130,0,0,255,1]],[[6,0,-64,170,0,0,200,0],[14,0,-16,130,0,0,255,1]],[[7,0,-64,180,0,0,150,0]],[[8,0,-64,185,0,0,100,0]]],"name":"黑暗","position":1,"timings":[{"flashColor":[119,119,170,255],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Blind","pan":0,"pitch":100,"volume":100}},{"flashColor":[102,85,153,187],"flashDuration":2,"flashScope":1,"frame":4,"se":null},{"flashColor":[119,136,170,170],"flashDuration":2,"flashScope":1,"frame":7,"se":null},{"flashColor":[119,153,187,187],"flashDuration":3,"flashScope":1,"frame":9,"se":null}]}, +{"id":52,"animation1Hue":0,"animation1Name":"State3","animation2Hue":0,"animation2Name":"","frames":[[[6,-48,-32,100,0,0,255,1]],[[7,-48,-32,100,0,0,255,1]],[[9,-48,-32,100,0,0,255,1]],[[8,-48,-32,100,0,0,255,1]],[[-1,88,-64,100,0,1,255,1],[-1,-40,-128,100,0,0,255,1],[9,-48,-32,100,0,0,255,1]],[[-1,88,-64,100,0,1,255,1],[-1,-40,-128,100,0,0,255,1],[8,-48,-32,100,0,0,255,1]],[[0,-48,-32,100,0,0,255,1]],[[1,-48,-32,100,0,0,255,1]],[[2,-48,-32,100,0,0,255,1]],[[3,-48,-32,100,0,0,255,1]],[[3,-48,-32,100,0,0,255,1]],[[4,-48,-32,100,0,0,255,1]],[[4,-48,-32,100,0,0,255,1]],[[5,-48,-32,100,0,0,255,1]],[[5,-48,-32,100,0,0,255,1]],[[-1,88,-64,100,0,1,255,1],[5,-48,-32,100,0,0,255,1]],[[-1,88,-64,100,0,1,255,1],[5,-48,-32,100,0,0,255,1]],[[5,-48,-32,100,0,0,150,1]],[[5,-48,-32,100,0,0,100,1]]],"name":"沉默","position":0,"timings":[{"flashColor":[255,255,187,136],"flashDuration":2,"flashScope":1,"frame":0,"se":{"name":"Monster3","pan":0,"pitch":150,"volume":90}},{"flashColor":[255,255,204,153],"flashDuration":2,"flashScope":2,"frame":0,"se":null},{"flashColor":[255,255,187,136],"flashDuration":2,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,255,187,136],"flashDuration":2,"flashScope":1,"frame":4,"se":null},{"flashColor":[255,204,153,187],"flashDuration":10,"flashScope":0,"frame":7,"se":{"name":"Jump1","pan":0,"pitch":100,"volume":100}}]}, +{"id":53,"animation1Hue":0,"animation1Name":"State4","animation2Hue":0,"animation2Name":"","frames":[[[7,0,24,200,0,0,100,1]],[[5,0,24,150,0,0,150,1]],[[5,0,24,150,0,0,200,1],[9,0,32,120,0,0,255,1]],[[6,0,24,150,0,0,200,1],[9,0,32,140,0,0,255,1]],[[7,0,24,150,0,0,200,1],[9,0,32,150,0,0,255,1]],[[8,0,24,150,0,0,255,1],[9,0,32,160,0,0,255,1]],[[9,0,32,170,0,0,200,1],[8,0,24,100,0,0,255,1]],[[0,0,-8,100,0,0,255,1],[9,0,32,180,0,0,150,1]],[[1,0,-8,110,0,0,255,1],[9,0,32,190,0,0,100,1]],[[2,0,-8,110,0,0,255,1],[9,0,32,195,0,0,50,1]],[[3,0,-8,120,0,0,255,1]],[[4,0,-8,120,0,0,255,1]],[[0,0,-8,120,0,0,255,1]],[[1,0,-8,120,0,0,255,1]],[[2,0,-8,120,0,0,200,1]],[[3,0,-8,120,0,0,150,1]],[[4,0,-8,120,0,0,100,1]]],"name":"混乱","position":0,"timings":[{"flashColor":[255,255,136,170],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Confuse","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,153,153],"flashDuration":3,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,221,119,136],"flashDuration":5,"flashScope":1,"frame":8,"se":null}]}, +{"id":54,"animation1Hue":0,"animation1Name":"State5","animation2Hue":0,"animation2Name":"","frames":[[[1,0,-8,200,0,0,150,1]],[[2,0,-8,200,350,0,200,1]],[[3,0,-8,200,340,0,255,1]],[[4,0,-8,200,330,0,255,1]],[[5,0,-8,200,320,0,255,1]],[[6,0,-8,200,310,0,255,1]],[[7,0,-8,200,300,0,255,1]],[[7,0,-8,150,290,0,255,1]],[[0,-24,-40,60,0,0,255,1],[8,-64,32,30,0,0,200,1]],[[0,-32,-56,100,0,0,255,1],[8,-64,32,60,0,0,255,1]],[[0,-32,-64,120,0,0,255,1],[8,-64,32,70,0,0,200,1],[8,56,-48,30,0,0,200,1]],[[0,-24,-72,120,0,0,255,1],[8,-64,32,80,0,0,150,1],[8,56,-48,60,0,0,255,1]],[[0,-16,-80,120,0,0,200,1],[0,16,-8,60,0,0,255,1],[8,-64,32,90,0,0,100,1],[8,56,-48,70,0,0,200,1]],[[0,32,-24,100,0,0,255,1],[0,-16,-88,120,0,0,150,1],[8,56,-48,80,0,0,150,1],[8,32,56,30,0,0,200,1]],[[0,40,-48,120,0,0,255,1],[0,-24,-96,120,0,0,100,1],[8,56,-48,90,0,0,100,1],[8,32,56,60,0,0,255,1]],[[0,48,-64,120,0,0,200,1],[8,32,56,70,0,0,200,1],[8,-24,-48,30,0,0,200,1]],[[0,48,-72,120,0,0,150,1],[0,-32,-8,60,0,0,255,1],[8,32,56,80,0,0,150,1],[8,-24,-48,60,0,0,255,1]],[[0,40,-80,120,0,0,100,1],[0,-48,-32,100,0,0,255,1],[8,32,56,90,0,0,100,1],[8,-24,-48,70,0,0,200,1]],[[0,-56,-40,120,0,0,255,1],[8,-24,-48,80,0,0,150,1]],[[0,-48,-48,120,0,0,255,1],[8,-24,-48,90,0,0,100,1]],[[0,-40,-56,120,0,0,200,1]],[[0,-40,-64,120,0,0,150,1]],[[0,-48,-72,120,0,0,100,1]]],"name":"睡眠","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Saint1","pan":0,"pitch":100,"volume":90}},{"flashColor":[153,170,187,221],"flashDuration":7,"flashScope":1,"frame":1,"se":null},{"flashColor":[68,119,153,238],"flashDuration":8,"flashScope":1,"frame":8,"se":{"name":"Sleep","pan":0,"pitch":100,"volume":100}}]}, +{"id":55,"animation1Hue":0,"animation1Name":"State6","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-56,200,0,0,150,1]],[[2,0,-56,200,0,0,200,1],[0,0,0,200,0,0,150,1]],[[4,0,-56,200,0,0,255,1],[2,0,0,200,0,0,200,1],[0,0,56,200,0,0,150,1]],[[6,0,-56,200,0,0,255,1],[4,0,0,200,0,0,255,1],[2,0,56,200,0,0,200,1],[11,0,8,160,0,0,200,1]],[[7,0,-56,200,0,0,255,1],[6,0,0,200,0,0,255,1],[4,0,56,200,0,0,255,1],[8,0,40,150,0,0,50,1],[13,0,0,160,0,0,255,1]],[[7,0,-56,210,0,0,255,1],[7,0,0,210,0,0,255,1],[6,0,56,200,0,0,255,1],[8,0,40,200,0,0,100,1],[12,0,0,150,0,0,255,1]],[[7,0,-56,200,0,0,255,1],[7,0,0,200,0,0,255,1],[7,0,56,200,0,0,255,1],[9,0,40,200,0,0,120,1],[13,0,0,150,0,0,255,1]],[[7,0,-56,210,0,0,255,1],[7,0,0,210,0,0,255,1],[7,0,56,210,0,0,255,1],[10,0,40,200,0,0,120,1],[12,0,0,150,0,0,255,1]],[[7,0,-56,200,0,0,255,1],[7,0,0,200,0,0,255,1],[7,0,56,200,0,0,255,1],[9,0,40,200,0,0,120,1],[13,0,0,150,0,0,255,1]],[[7,0,-56,210,0,0,255,1],[7,0,0,210,0,0,255,1],[7,0,56,210,0,0,255,1],[10,0,40,200,0,0,120,1],[12,0,0,150,0,0,255,1]],[[7,0,-56,200,0,0,255,1],[7,0,0,200,0,0,255,1],[7,0,56,200,0,0,255,1],[9,0,40,200,0,0,120,1],[13,0,0,150,0,0,255,1]],[[7,0,-56,210,0,0,200,1],[7,0,0,210,0,0,200,1],[7,0,56,210,0,0,200,1],[10,0,40,200,0,0,80,1],[12,0,0,150,0,0,255,1]],[[7,0,-56,200,0,0,150,1],[7,0,0,200,0,0,150,1],[7,0,56,200,0,0,150,1],[9,0,40,200,0,0,50,1],[13,0,0,150,0,0,255,1]],[[7,0,-56,210,0,0,100,1],[7,0,0,210,0,0,100,1],[7,0,56,210,0,0,100,1]]],"name":"麻痹","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Push","pan":0,"pitch":100,"volume":100}},{"flashColor":[204,238,255,204],"flashDuration":7,"flashScope":1,"frame":4,"se":{"name":"Paralyze3","pan":0,"pitch":125,"volume":90}}]}, +{"id":56,"animation1Hue":0,"animation1Name":"Death1","animation2Hue":0,"animation2Name":"Heal2","frames":[[[5,0,-56,100,0,0,100,0]],[[6,0,-64,100,0,0,150,0]],[[5,0,-72,100,0,0,200,0]],[[6,0,-72,100,0,0,255,0]],[[5,0,-72,100,0,0,255,0]],[[6,0,-72,100,0,0,255,0],[0,0,-32,200,0,0,255,1]],[[5,0,-72,100,0,0,255,0],[104,-16,-88,70,0,0,255,1],[1,0,-32,200,0,0,255,1]],[[6,0,-72,100,0,0,255,0],[23,-16,-88,110,0,0,255,1],[105,-16,-88,100,0,0,255,1],[2,0,-32,200,0,0,255,1]],[[5,0,-72,100,0,0,255,0],[23,-16,-88,100,0,0,255,1],[107,-16,-88,100,0,0,255,1],[3,0,-32,200,0,0,200,1]],[[6,0,-72,100,0,0,255,0],[22,-16,-88,120,0,0,255,1],[4,0,-32,200,0,0,150,1],[11,0,0,150,0,0,255,1]],[[5,0,-72,100,0,0,255,0],[22,-16,-88,100,0,0,200,1],[12,0,0,150,0,0,255,1]],[[5,0,-72,100,0,0,255,0],[22,-16,-88,60,0,0,200,1],[13,0,0,150,0,0,255,1]],[[7,0,-72,100,0,0,255,0],[14,0,0,170,0,0,255,1]],[[8,0,-72,100,0,0,255,0],[15,0,0,180,0,0,255,1]],[[9,0,-72,100,0,0,255,0],[16,0,0,180,0,0,255,1]],[[10,0,-72,100,0,0,255,0],[17,0,0,180,0,0,255,1]],[[10,0,-72,100,0,0,255,0],[18,0,0,180,0,0,255,1]],[[10,0,-72,100,0,0,255,0],[19,0,0,180,0,0,255,1]],[[10,0,-72,100,0,0,200,0],[20,0,0,180,0,0,255,1]],[[10,0,-72,100,0,0,150,0],[21,0,0,180,0,0,255,1]],[[21,0,0,180,0,0,150,1],[10,0,-72,100,0,0,100,0]]],"name":"即死","position":1,"timings":[{"flashColor":[153,0,68,238],"flashDuration":5,"flashScope":1,"frame":0,"se":{"name":"Darkness5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,0,136,255],"flashDuration":5,"flashScope":1,"frame":6,"se":{"name":"Thunder1","pan":0,"pitch":125,"volume":90}},{"flashColor":[255,102,119,204],"flashDuration":3,"flashScope":2,"frame":6,"se":null}]}, +{"id":57,"animation1Hue":0,"animation1Name":"Fire1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-80,130,0,0,255,1]],[[1,0,-64,100,0,0,255,1]],[[1,0,-88,140,0,0,255,1]],[[2,0,-88,150,0,0,255,1]],[[3,0,-88,150,0,0,255,1]],[[4,0,-88,150,0,0,255,1]],[[5,0,-80,140,0,0,255,1]],[[5,0,-80,140,0,0,150,1]]],"name":"炎/单体1","position":2,"timings":[{"flashColor":[255,102,34,221],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Fire4","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,102,34,204],"flashDuration":5,"flashScope":1,"frame":2,"se":null}]}, +{"id":58,"animation1Hue":0,"animation1Name":"Fire1","animation2Hue":0,"animation2Name":"","frames":[[[-1,0,16,150,0,0,255,1],[1,0,-64,100,0,0,255,1]],[[6,0,-144,150,0,0,255,1]],[[7,0,-144,150,0,0,255,1]],[[8,0,-152,160,0,0,255,1]],[[9,0,-152,160,0,0,255,1]],[[7,0,-152,160,0,0,255,1]],[[8,0,-152,160,0,0,255,1]],[[9,0,-152,160,0,0,255,1]],[[7,0,-152,160,0,0,180,1]],[[8,0,-152,160,0,0,100,1]],[[9,0,-152,160,0,0,70,1]]],"name":"炎/单体2","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Fire6","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,119,34,255],"flashDuration":10,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,170,0,170],"flashDuration":6,"flashScope":2,"frame":2,"se":null}]}, +{"id":59,"animation1Hue":0,"animation1Name":"Fire1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-16,170,0,0,255,1]],[[1,0,-16,170,0,0,255,1]],[[2,0,-16,170,0,0,255,1],[0,-200,-32,170,0,0,255,1],[7,0,-72,160,0,0,200,1]],[[3,0,-16,170,0,0,255,1],[1,-200,-32,170,0,0,255,1],[8,0,-72,160,0,0,150,1]],[[4,0,-16,170,0,0,255,1],[2,-200,-32,170,0,0,255,1],[7,-200,-72,160,0,0,200,1]],[[3,-200,-32,170,0,0,255,1],[5,0,-16,170,0,0,255,1],[0,192,-32,170,0,0,255,1],[0,-88,8,100,0,0,255,1],[8,-200,-72,160,0,0,150,1]],[[5,0,-16,170,0,0,180,1],[4,-200,-32,170,0,0,255,1],[1,192,-32,170,0,0,255,1],[1,-88,-8,130,0,0,255,1]],[[5,-200,-32,170,0,0,255,1],[2,192,-32,170,0,0,255,1],[2,-88,-8,120,0,0,255,1],[0,80,8,100,0,0,255,1],[7,192,-72,160,0,0,200,1]],[[5,-200,-32,170,0,0,150,1],[3,192,-32,170,0,0,255,1],[3,-88,-8,120,0,0,255,1],[1,80,-8,120,0,0,255,1],[8,192,-72,160,0,0,150,1]],[[4,192,-32,170,0,0,255,1],[4,-88,-8,120,0,0,255,1],[-1,64,0,120,0,0,255,1],[2,80,-8,120,0,0,255,1]],[[5,192,-32,170,0,0,255,1],[5,-88,-8,120,0,0,255,1],[3,80,-8,120,0,0,200,1]],[[5,192,-32,170,0,0,150,1],[5,-88,-8,120,0,0,150,1],[4,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,100,1]]],"name":"炎/全体1","position":3,"timings":[{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Fire7","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,102,0,187],"flashDuration":5,"flashScope":1,"frame":0,"se":null},{"flashColor":[255,153,0,204],"flashDuration":3,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":5,"se":null},{"flashColor":[255,119,0,187],"flashDuration":3,"flashScope":1,"frame":6,"se":null}]}, +{"id":60,"animation1Hue":0,"animation1Name":"Fire1","animation2Hue":0,"animation2Name":"","frames":[[[1,0,0,130,0,0,255,1]],[[6,0,-64,150,0,0,255,1]],[[7,0,-72,160,0,0,255,1],[1,-88,0,130,0,0,255,1],[1,88,0,130,0,0,255,1]],[[8,0,-88,180,0,0,255,1],[6,-88,-64,150,0,0,255,1],[6,88,-64,150,0,0,255,1]],[[9,0,-96,185,0,0,255,1],[7,-88,-72,160,0,0,255,1],[7,88,-72,160,0,0,255,1]],[[7,0,-96,190,0,0,255,1],[8,-88,-72,160,0,0,255,1],[8,88,-72,160,0,0,255,1]],[[8,0,-104,195,0,0,255,1],[9,-96,-72,160,0,0,255,1],[6,-96,-56,145,0,0,255,1],[6,96,-56,145,0,0,255,1],[9,88,-72,160,0,0,255,1]],[[9,0,-104,200,0,0,255,1],[7,-104,-72,160,0,0,255,1],[7,-112,-64,150,0,0,255,1],[7,96,-72,160,0,0,255,1],[7,104,-64,150,0,0,255,1]],[[8,104,-72,160,0,0,255,1],[7,0,-104,200,0,0,255,1],[8,-112,-72,160,0,0,255,1],[8,-136,-64,150,0,0,255,1],[8,136,-64,150,0,0,255,1]],[[9,112,-72,160,0,0,255,1],[8,0,-104,200,0,0,255,1],[9,-112,-72,160,0,0,255,1],[7,-152,-64,150,0,0,255,1],[7,152,-64,150,0,0,255,1]],[[9,0,-104,200,0,0,255,1],[7,-112,-72,160,0,0,255,1],[8,-168,-64,150,0,0,255,1],[7,112,-72,160,0,0,255,1],[8,168,-64,150,0,0,255,1]],[[8,112,-72,160,0,0,255,1],[8,-112,-72,160,0,0,255,1],[9,-192,-64,150,0,0,255,1],[7,0,-104,200,0,0,255,1],[9,192,-64,150,0,0,255,1]],[[9,112,-72,160,0,0,255,1],[7,-200,-64,150,0,0,255,1],[9,-112,-72,160,0,0,255,1],[8,0,-104,200,0,0,255,1],[7,200,-64,150,0,0,255,1]],[[9,0,-104,200,0,0,255,1],[8,-208,-64,150,0,0,255,1],[7,-112,-72,160,0,0,255,1],[7,112,-72,160,0,0,255,1],[8,208,-64,150,0,0,255,1]],[[7,0,-104,200,0,0,200,1],[9,-208,-64,150,0,0,200,1],[8,-112,-72,160,0,0,200,1],[8,112,-72,160,0,0,200,1],[9,208,-64,150,0,0,200,1]],[[8,0,-104,200,0,0,100,1],[7,-208,-64,150,0,0,100,1],[9,-112,-72,160,0,0,100,1],[9,112,-72,160,0,0,100,1],[7,208,-64,150,0,0,100,1]]],"name":"炎/全体2","position":3,"timings":[{"flashColor":[255,153,0,187],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Fire8","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,153,0,221],"flashDuration":3,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,136,0,170],"flashDuration":3,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,102,0,170],"flashDuration":3,"flashScope":1,"frame":9,"se":null},{"flashColor":[255,153,0,170],"flashDuration":3,"flashScope":1,"frame":12,"se":null}]}, +{"id":61,"animation1Hue":60,"animation1Name":"Ice1","animation2Hue":0,"animation2Name":"Attack3","frames":[[[-1,0,-88,130,0,0,255,1],[5,-8,-72,80,0,0,150,1]],[[-1,0,-88,130,0,0,255,1],[5,-8,-72,80,0,0,255,1]],[[0,0,-88,130,0,0,255,1],[5,-8,-80,90,0,0,255,1]],[[6,-8,-88,110,0,0,255,1],[1,0,-96,150,0,0,255,1]],[[7,-8,-88,110,0,0,255,1],[2,0,-96,150,0,0,255,1]],[[8,-8,-88,110,0,0,255,0],[3,0,-96,150,0,0,230,1],[105,0,-96,150,0,0,255,1]],[[8,-8,-88,110,0,0,255,0],[4,0,-96,150,0,0,230,1],[106,0,-96,110,0,0,255,1]],[[8,-8,-88,110,0,0,255,0],[4,0,-96,152,0,0,200,1],[107,0,-96,115,0,0,255,1]],[[8,-8,-88,110,0,0,255,0],[4,0,-96,154,0,0,180,1],[106,0,-96,120,0,0,255,1]],[[8,-8,-88,110,0,0,255,0],[4,0,-96,154,0,0,150,1],[107,0,-96,120,0,0,200,1]],[[4,0,-96,154,0,0,100,1],[8,-8,-88,110,0,0,180,0]],[[4,0,-96,154,0,0,70,1],[8,-8,-88,110,0,0,100,0]]],"name":"冰/单体1","position":2,"timings":[{"flashColor":[187,238,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Ice4","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder1","pan":0,"pitch":150,"volume":90}},{"flashColor":[187,238,255,187],"flashDuration":5,"flashScope":1,"frame":3,"se":null}]}, +{"id":62,"animation1Hue":0,"animation1Name":"Ice2","animation2Hue":0,"animation2Name":"","frames":[[[10,0,0,170,0,0,150,1]],[[11,0,0,160,0,0,200,1],[4,0,0,210,0,0,100,1]],[[12,0,0,150,0,0,255,1],[4,0,0,200,0,0,100,1]],[[13,0,0,150,0,0,255,1],[5,0,0,200,0,0,150,1]],[[14,0,0,150,0,0,255,1],[6,0,0,200,0,0,200,1]],[[15,0,0,150,0,0,255,1],[7,0,0,180,0,0,255,1]],[[10,0,0,150,0,0,255,1],[8,0,0,170,0,0,255,1]],[[11,0,0,150,0,0,255,1],[9,0,0,170,0,0,255,1]],[[12,0,0,150,0,0,255,1],[9,0,0,170,0,0,100,1]],[[2,0,0,100,0,0,255,1]],[[1,0,0,180,0,0,255,1]],[[0,0,0,200,0,0,255,1],[3,0,0,200,30,0,255,1]],[[0,0,0,180,0,0,255,1],[3,0,0,250,30,0,255,1]],[[2,0,0,170,0,0,255,1],[3,0,0,260,30,0,150,1]],[[1,0,0,170,0,0,255,1],[3,0,0,270,30,0,100,1]],[[2,0,0,170,0,0,255,1],[3,0,0,270,30,0,50,1]],[[1,0,0,170,0,0,255,1]],[[2,0,0,165,0,0,200,1]],[[2,0,0,165,0,0,150,1]],[[2,0,0,165,0,0,100,1]]],"name":"冰/单体2","position":1,"timings":[{"flashColor":[204,238,255,119],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Ice8","pan":0,"pitch":100,"volume":100}},{"flashColor":[153,221,255,153],"flashDuration":5,"flashScope":1,"frame":1,"se":null},{"flashColor":[136,221,255,119],"flashDuration":5,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":9,"se":{"name":"Thunder3","pan":0,"pitch":115,"volume":90}},{"flashColor":[153,221,255,204],"flashDuration":5,"flashScope":1,"frame":9,"se":{"name":"Ice4","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,187],"flashDuration":2,"flashScope":2,"frame":11,"se":null}]}, +{"id":63,"animation1Hue":0,"animation1Name":"Ice3","animation2Hue":0,"animation2Name":"","frames":[[[0,-128,-64,170,0,0,100,1],[1,0,-64,170,0,0,100,1],[2,136,-64,170,0,0,100,1]],[[1,-144,-64,170,0,0,150,1],[2,0,-64,170,0,0,150,1],[3,136,-64,170,0,0,150,1]],[[2,-144,-64,170,0,0,200,1],[3,0,-64,170,0,0,200,1],[0,136,-64,170,0,0,200,1]],[[3,-144,-64,170,0,0,255,1],[0,0,-64,170,0,0,255,1],[1,136,-64,170,0,0,255,1]],[[0,-144,-64,170,0,0,255,1],[1,0,-64,170,0,0,255,1],[2,136,-64,170,0,0,255,1]],[[1,-144,-64,170,0,0,255,1],[2,0,-64,170,0,0,255,1],[3,136,-64,170,0,0,255,1]],[[2,-144,-64,170,0,0,255,1],[3,0,-64,170,0,0,255,1],[0,136,-64,170,0,0,255,1]],[[3,-144,-64,170,0,0,255,1],[0,0,-64,170,0,0,255,1],[1,136,-64,170,0,0,255,1]],[[0,-144,-64,170,0,0,255,1],[1,0,-64,170,0,0,255,1],[2,136,-64,170,0,0,255,1]],[[1,-144,-64,170,0,0,255,1],[2,0,-64,170,0,0,255,1],[3,136,-64,170,0,0,255,1]],[[2,-144,-64,170,0,0,255,1],[3,0,-64,170,0,0,255,1],[0,136,-64,170,0,0,255,1]],[[3,-144,-64,170,0,0,255,1],[0,0,-64,170,0,0,255,1],[1,136,-64,170,0,0,255,1]],[[0,-144,-64,170,0,0,200,1],[1,0,-64,170,0,0,255,1],[2,136,-64,170,0,0,200,1]],[[1,-144,-64,170,0,0,170,1],[2,0,-64,170,0,0,200,1],[3,136,-64,170,0,0,170,1]],[[2,-144,-64,170,0,0,100,1],[3,0,-64,170,0,0,120,1],[0,136,-64,170,0,0,100,1]],[[3,-144,-64,170,0,0,50,1],[0,0,-64,170,0,0,80,1],[1,136,-64,170,0,0,50,1]]],"name":"冰/全体1","position":3,"timings":[{"flashColor":[255,255,255,136],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Wind8","pan":0,"pitch":100,"volume":100}},{"flashColor":[221,255,255,102],"flashDuration":8,"flashScope":1,"frame":2,"se":null},{"flashColor":[221,255,255,102],"flashDuration":8,"flashScope":1,"frame":7,"se":null}]}, +{"id":64,"animation1Hue":0,"animation1Name":"Ice4","animation2Hue":0,"animation2Name":"","frames":[[[5,-8,-24,100,0,0,255,1]],[[6,-8,-40,130,0,0,255,0],[0,-8,-32,150,0,0,255,1],[8,-8,-40,130,0,0,255,0]],[[7,-8,-48,130,0,0,255,0],[5,-224,-24,100,0,0,255,1],[1,-8,-40,150,0,0,255,1],[9,-8,-48,150,0,0,255,0]],[[7,-8,-48,130,0,0,255,0],[6,-224,-40,130,0,0,255,0],[2,-8,-48,150,0,0,255,1],[10,-8,-48,150,0,0,255,0],[0,-224,-40,150,0,0,255,1],[8,-224,-40,130,0,0,255,0]],[[7,-8,-48,130,0,0,255,0],[7,-224,-48,130,0,0,255,0],[3,-8,-48,150,0,0,255,1],[11,-8,-48,150,0,0,255,0],[9,-224,-48,150,0,0,255,0],[1,-224,-48,150,0,0,255,1]],[[5,224,-24,100,0,0,255,1],[7,-8,-48,130,0,0,255,0],[7,-224,-48,130,0,0,255,0],[4,-8,-48,150,0,0,180,1],[12,-8,-48,150,0,0,150,0],[10,-224,-48,150,0,0,255,0],[2,-224,-48,150,0,0,255,1],[-1,0,-64,20,0,0,0,0]],[[6,224,-40,130,0,0,255,0],[7,-8,-48,130,0,0,255,0],[7,-224,-48,130,0,0,255,0],[8,224,-40,130,0,0,255,0],[0,224,-48,150,0,0,255,1],[11,-224,-48,150,0,0,255,0],[3,-224,-48,150,0,0,255,1]],[[7,224,-48,130,0,0,255,0],[7,-8,-48,130,0,0,180,0],[7,-224,-48,130,0,0,255,0],[9,224,-48,150,0,0,255,0],[12,-224,-48,150,0,0,150,0],[4,-224,-48,150,0,0,180,1],[1,224,-48,150,0,0,255,1]],[[7,-8,-48,130,0,0,100,0],[7,-224,-48,130,0,0,255,0],[7,224,-48,130,0,0,255,0],[10,224,-48,150,0,0,255,0],[2,224,-48,150,0,0,255,1]],[[7,-224,-48,130,0,0,255,0],[7,224,-48,130,0,0,255,0],[11,224,-48,150,0,0,255,0],[3,224,-48,150,0,0,255,1]],[[7,-224,-48,130,0,0,180,0],[7,224,-48,130,0,0,255,0],[12,224,-48,150,0,0,150,0],[4,224,-48,150,0,0,180,1]],[[7,-224,-48,130,0,0,100,0],[7,224,-48,130,0,0,255,0]],[[7,224,-48,130,0,0,255,0]],[[7,224,-48,130,0,0,180,0]],[[7,224,-48,130,0,0,100,0]]],"name":"冰/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder9","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,153],"flashDuration":16,"flashScope":2,"frame":1,"se":{"name":"Ice6","pan":0,"pitch":145,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":8,"flashScope":1,"frame":1,"se":null}]}, +{"id":65,"animation1Hue":0,"animation1Name":"Thunder1","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-136,250,0,0,255,1]],[],[[3,16,-144,160,0,0,255,1]],[[1,16,-88,160,0,0,255,1],[4,16,-144,160,0,0,255,1]],[[2,16,-88,160,0,0,255,1],[5,16,-144,160,0,0,255,1]],[[2,16,-96,160,0,0,255,1],[4,16,-144,160,0,0,180,1]],[[4,16,-144,160,0,0,100,1]]],"name":"电/单体1","position":2,"timings":[{"flashColor":[255,255,170,221],"flashDuration":2,"flashScope":2,"frame":1,"se":{"name":"Thunder5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,0,221],"flashDuration":4,"flashScope":1,"frame":2,"se":null}]}, +{"id":66,"animation1Hue":0,"animation1Name":"Thunder2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,200,0,0,255,1]],[[1,0,0,150,0,0,255,1],[1,0,0,200,90,0,255,1]],[[2,0,0,200,0,0,255,1],[2,0,0,100,45,1,255,1]],[[-1,0,0,150,90,0,255,1],[3,0,0,130,0,0,255,1]],[[4,0,0,130,0,0,255,1]],[[5,0,0,130,0,0,255,1]],[[3,0,0,160,0,0,255,1]],[[4,0,0,160,0,0,255,1]],[[5,0,0,160,0,1,255,1]],[[3,0,0,170,0,0,150,1]],[[4,0,0,180,0,0,100,1]],[[3,0,0,190,0,0,60,1]],[],[],[]],"name":"电/单体2","position":1,"timings":[{"flashColor":[255,255,187,153],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Thunder10","pan":0,"pitch":85,"volume":100}},{"flashColor":[255,255,51,170],"flashDuration":3,"flashScope":1,"frame":3,"se":{"name":"Thunder8","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,51,187],"flashDuration":3,"flashScope":1,"frame":7,"se":null}]}, +{"id":67,"animation1Hue":0,"animation1Name":"Thunder1","animation2Hue":0,"animation2Name":"","frames":[[[0,-16,-72,250,180,0,255,1],[0,-16,-72,250,180,0,255,1]],[],[[3,8,-56,180,0,0,255,1]],[[9,8,-56,180,0,0,255,1],[6,16,-56,180,0,0,255,1],[0,-192,-64,250,0,1,255,1],[0,-192,-64,250,0,1,255,1]],[[10,8,-56,180,0,0,255,1],[7,16,-56,180,0,0,255,1],[3,-168,-56,180,0,0,255,1]],[[11,8,-56,180,0,0,255,1],[8,16,-56,180,0,0,150,1],[9,-168,-56,180,0,0,255,1],[0,192,-64,250,0,0,255,1],[0,192,-64,250,0,0,255,1],[6,-160,-56,180,0,0,255,1]],[[9,8,-56,180,0,0,255,1],[-1,0,48,150,0,0,150,1],[3,184,-56,180,0,0,255,1],[10,-168,-56,180,0,0,255,1],[7,-160,-56,180,0,0,255,1]],[[10,8,-56,180,0,0,255,1],[9,176,-56,180,0,0,255,1],[11,-168,-56,180,0,0,255,1],[8,-160,-56,180,0,0,150,1],[6,184,-56,180,0,0,255,1]],[[11,8,-56,180,0,0,255,1],[9,-168,-56,180,0,0,255,1],[10,176,-56,180,0,0,255,1],[7,184,-56,180,0,0,255,1]],[[9,8,-56,180,0,0,100,1],[10,-168,-56,180,0,0,255,1],[11,184,-56,180,0,0,255,1],[8,192,-56,180,0,0,150,1]],[[11,-168,-56,180,0,0,255,1],[9,184,-56,180,0,0,255,1]],[[9,-168,-56,180,0,0,100,1],[10,184,-56,180,0,0,255,1]],[[11,184,-56,180,0,0,255,1]],[[9,184,-56,180,0,0,100,1]],[]],"name":"电/全体1","position":3,"timings":[{"flashColor":[255,255,170,221],"flashDuration":2,"flashScope":2,"frame":1,"se":{"name":"Thunder6","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,136,255],"flashDuration":4,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,255,136,255],"flashDuration":4,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,255,170,221],"flashDuration":2,"flashScope":2,"frame":5,"se":null}]}, +{"id":68,"animation1Hue":0,"animation1Name":"Thunder3","animation2Hue":0,"animation2Name":"Thunder1","frames":[[[0,208,112,100,0,0,255,1]],[[1,0,-88,210,0,0,255,1]],[[2,0,-88,210,0,0,255,1]],[[3,0,-88,210,0,0,255,1],[103,192,-72,150,0,0,255,1]],[[4,0,-88,210,0,0,255,1],[0,0,-104,250,0,0,255,1],[104,192,-72,150,0,0,255,1],[107,192,-40,150,0,0,255,1]],[[1,0,-88,210,0,0,255,1],[105,192,-72,150,0,0,255,1],[108,192,-40,150,0,0,200,1]],[[2,0,-88,210,0,0,255,1],[103,-168,-72,150,0,0,255,1],[105,192,-72,150,0,0,100,1]],[[3,0,-88,210,0,0,255,1],[104,-168,-72,150,0,0,255,1],[103,128,-56,100,0,0,255,1],[107,-176,-40,150,0,0,255,1]],[[4,0,-88,210,0,0,255,1],[105,-168,-72,150,0,0,255,1],[104,128,-56,100,0,0,255,1],[108,-176,-40,150,0,0,200,1]],[[1,0,-88,210,0,0,255,1],[105,-168,-72,150,0,0,100,1],[105,128,-56,100,0,0,255,1],[103,-120,-56,100,0,0,255,1]],[[2,0,-88,210,0,0,255,1],[105,128,-56,100,0,0,100,1],[104,-120,-56,100,0,0,255,1]],[[0,0,-56,250,180,1,255,1],[3,0,-88,210,0,0,255,1],[105,-120,-56,100,0,0,255,1]],[[1,0,-88,210,0,0,255,1],[105,-120,-56,100,0,0,100,1]],[[1,0,-88,210,0,0,150,1]]],"name":"电/全体2","position":3,"timings":[{"flashColor":[255,255,255,238],"flashDuration":3,"flashScope":2,"frame":0,"se":{"name":"Thunder10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,255,204,170],"flashDuration":1,"flashScope":1,"frame":1,"se":{"name":"Thunder9","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,170,170],"flashDuration":3,"flashScope":2,"frame":4,"se":null},{"flashColor":[255,255,221,170],"flashDuration":3,"flashScope":1,"frame":9,"se":null},{"flashColor":[255,255,170,170],"flashDuration":3,"flashScope":2,"frame":9,"se":null}]}, +{"id":69,"animation1Hue":0,"animation1Name":"Water1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,60,0,0,150,1]],[[0,0,0,80,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[7,0,0,150,0,0,255,1]],[[2,0,0,100,0,0,255,1],[8,0,0,150,0,0,255,1]],[[2,0,0,105,0,0,255,1],[9,0,0,150,0,0,255,1]],[[1,0,0,105,0,0,255,1],[10,0,0,150,0,0,255,1]],[[3,0,0,200,0,0,255,1],[0,0,0,150,0,0,100,1],[11,0,0,170,0,0,255,1]],[[12,0,0,180,0,0,255,1],[3,0,0,210,0,0,255,1]],[[13,0,0,180,0,0,255,1],[4,0,0,100,0,0,255,1]],[[14,0,0,180,0,0,255,1],[5,0,0,130,0,0,255,1]],[[14,0,0,185,0,0,180,1],[6,0,0,133,0,0,255,1]],[[14,0,0,188,0,0,100,1],[4,0,0,136,0,0,255,1]],[[5,0,0,138,0,0,180,1]],[[6,0,0,140,0,0,100,1]]],"name":"水/单体","position":1,"timings":[{"flashColor":[0,204,255,153],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Dive","pan":0,"pitch":135,"volume":90}},{"flashColor":[119,204,255,170],"flashDuration":7,"flashScope":1,"frame":7,"se":{"name":"Water1","pan":0,"pitch":100,"volume":100}}]}, +{"id":70,"animation1Hue":0,"animation1Name":"Water2","animation2Hue":0,"animation2Name":"","frames":[[[3,-240,-64,200,0,0,100,0],[3,0,-64,200,0,0,100,0],[3,240,-64,200,0,0,100,0]],[[0,-240,-64,200,0,0,150,0],[0,240,-64,200,0,0,150,0],[0,0,-64,200,0,0,150,0]],[[1,-240,-64,200,0,0,200,0],[1,240,-64,200,0,0,200,0],[1,0,-64,200,0,0,200,0]],[[2,-240,-64,200,0,0,200,0],[2,240,-64,200,0,0,200,0],[2,0,-64,200,0,0,200,0]],[[3,-240,-64,200,0,0,200,0],[3,240,-64,200,0,0,200,0],[3,0,-64,200,0,0,200,0]],[[0,-240,-64,200,0,0,200,0],[0,240,-64,200,0,0,200,0],[0,0,-64,200,0,0,200,0]],[[1,-240,-64,200,0,0,200,0],[1,240,-64,200,0,0,200,0],[1,0,-64,200,0,0,200,0]],[[2,-240,-64,200,0,0,200,0],[2,240,-64,200,0,0,200,0],[2,0,-64,200,0,0,200,0]],[[3,-240,-64,200,0,0,200,0],[3,240,-64,200,0,0,200,0],[3,0,-64,200,0,0,200,0]],[[0,-240,-64,200,0,0,200,0],[0,240,-64,200,0,0,200,0],[0,0,-64,200,0,0,200,0]],[[1,-240,-64,200,0,0,200,0],[1,240,-64,200,0,0,200,0],[1,0,-64,200,0,0,200,0]],[[2,-240,-64,200,0,0,200,0],[2,240,-64,200,0,0,200,0],[2,0,-64,200,0,0,200,0]],[[3,-240,-64,200,0,0,200,0],[3,240,-64,200,0,0,200,0],[3,0,-64,200,0,0,200,0]],[[0,-240,-64,200,0,0,180,0],[0,240,-64,200,0,0,180,0],[0,0,-64,200,0,0,180,0]],[[1,-240,-64,200,0,0,120,0],[1,240,-64,200,0,0,120,0],[1,0,-64,200,0,0,120,0]]],"name":"水/全体","position":3,"timings":[{"flashColor":[221,238,238,170],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Water1","pan":0,"pitch":50,"volume":100}},{"flashColor":[187,255,255,255],"flashDuration":5,"flashScope":1,"frame":2,"se":null},{"flashColor":[187,255,255,255],"flashDuration":5,"flashScope":1,"frame":6,"se":null},{"flashColor":[187,255,255,255],"flashDuration":5,"flashScope":1,"frame":9,"se":null}]}, +{"id":71,"animation1Hue":0,"animation1Name":"Earth1","animation2Hue":0,"animation2Name":"","frames":[[[0,8,64,250,0,0,255,0]],[[0,0,-96,200,0,0,255,0]],[[0,0,-72,160,0,0,255,0],[1,0,-72,160,0,0,100,1]],[[1,0,-48,140,0,0,255,0]],[[1,0,-16,120,0,0,255,0]],[[2,0,16,160,0,0,255,0]],[[3,0,16,150,0,0,255,0]],[[4,0,16,160,0,0,255,0]],[[5,0,16,165,0,0,255,0]],[[6,0,16,168,0,0,180,0]],[[6,0,16,170,0,0,100,0]],[]],"name":"地/单体","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder2","pan":0,"pitch":50,"volume":90}},{"flashColor":[255,153,0,255],"flashDuration":5,"flashScope":1,"frame":5,"se":{"name":"Earth5","pan":0,"pitch":50,"volume":100}},{"flashColor":[204,153,34,187],"flashDuration":3,"flashScope":2,"frame":6,"se":null}]}, +{"id":72,"animation1Hue":0,"animation1Name":"Earth2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-96,200,0,0,255,0]],[[0,-152,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,1],[7,-136,-16,150,0,0,255,0],[7,200,32,80,0,0,255,0]],[[0,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[7,-136,-96,150,0,0,255,0],[7,200,-40,80,0,0,255,0],[7,272,-32,150,0,0,255,0]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,168,-96,200,0,0,255,1],[1,-152,-96,200,0,0,255,1],[1,0,-96,200,0,0,255,0],[7,-136,-104,150,0,0,255,0],[7,200,-56,80,0,0,255,0],[1,0,-96,200,0,0,255,1],[2,-8,-48,150,0,0,255,0],[7,272,-48,150,0,0,255,0]],[[1,-152,-96,200,0,0,255,0],[1,168,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[7,-136,-112,150,0,0,180,0],[7,200,-64,80,0,0,255,0],[3,-8,-48,150,0,0,255,0],[7,272,-56,150,0,0,255,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0],[-1,0,-64,20,0,0,0,0]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[7,200,-72,80,0,0,255,0],[1,168,-96,200,0,0,255,1],[1,0,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,1],[1,0,-96,200,0,0,255,1],[4,-8,-48,150,0,0,255,0],[4,-8,-48,150,0,0,200,1],[2,-216,-32,130,0,0,255,0],[7,112,48,150,0,0,255,0],[7,272,-64,150,0,0,150,0],[2,-216,-32,130,0,0,200,1]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[5,-8,-48,150,0,0,255,0],[3,-216,-32,130,0,0,255,0],[7,112,-16,150,0,0,255,0],[7,-272,0,150,0,0,255,0]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,1],[1,168,-96,200,0,0,255,1],[1,0,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,1],[6,-8,-48,150,0,0,255,0],[4,-216,-32,130,0,0,255,0],[4,-216,-32,130,0,0,100,1],[2,200,-32,130,0,0,255,0],[2,200,-32,130,0,0,100,1],[7,112,-32,150,0,0,255,0],[7,-168,0,80,0,0,255,0],[7,-272,-64,150,0,0,255,0],[6,-8,-48,150,0,0,100,1]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[6,-8,-48,150,0,0,255,0],[5,-216,-32,130,0,0,255,0],[3,200,-32,130,0,0,255,0],[7,112,-40,150,0,0,255,0],[7,-168,-40,80,0,0,255,0],[7,-272,-72,150,0,0,255,0],[7,272,24,100,0,0,255,0]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,1],[1,168,-96,200,0,0,255,1],[1,0,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,1],[6,-8,-48,150,0,0,255,0],[6,-216,-32,130,0,0,255,0],[6,-216,-32,130,0,0,100,1],[6,-8,-48,150,0,0,100,1],[4,200,-32,130,0,0,255,0],[4,200,-32,130,0,0,100,1],[7,112,-48,150,0,0,150,0],[7,-168,-56,80,0,0,255,0],[7,-272,-80,150,0,0,150,0],[7,272,0,100,0,0,255,0]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[6,-8,-48,150,0,0,180,0],[6,-216,-32,130,0,0,255,0],[5,200,-32,130,0,0,255,0],[7,-168,-64,80,0,0,255,0],[7,272,-8,100,0,0,255,0]],[[1,-152,-96,200,0,0,255,0],[1,168,-96,200,0,0,255,0],[1,168,-96,200,0,0,200,1],[1,-152,-96,200,0,0,200,1],[1,0,-96,200,0,0,255,0],[1,0,-96,200,0,0,200,1],[6,-8,-48,150,0,0,100,0],[6,-216,-32,130,0,0,255,0],[6,200,-32,130,0,0,255,0],[7,-168,-72,80,0,0,255,0],[7,272,-16,100,0,0,150,0]],[[1,-152,-96,200,0,0,255,0],[1,168,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[6,-216,-32,130,0,0,180,0],[6,200,-32,130,0,0,255,0],[7,-168,-80,80,0,0,150,0]],[[1,-152,-96,200,0,0,255,0],[1,168,-96,200,0,0,255,0],[1,168,-96,200,0,0,150,1],[1,-152,-96,200,0,0,150,1],[1,0,-96,200,0,0,255,0],[1,0,-96,200,0,0,150,1],[6,-216,-32,130,0,0,100,0],[6,200,-32,130,0,0,255,0]],[[1,168,-96,200,0,0,255,0],[1,-152,-96,200,0,0,255,0],[1,0,-96,200,0,0,255,0],[6,200,-32,130,0,0,180,0]],[[6,200,-32,130,0,0,100,0],[1,168,-96,200,0,0,150,0],[1,-152,-96,200,0,0,150,0],[1,0,-96,200,0,0,150,0]]],"name":"地/全体","position":3,"timings":[{"flashColor":[221,102,0,170],"flashDuration":3,"flashScope":2,"frame":0,"se":{"name":"Earth4","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,204,68,119],"flashDuration":1,"flashScope":1,"frame":1,"se":{"name":"Earth1","pan":0,"pitch":100,"volume":100}},{"flashColor":[204,136,34,221],"flashDuration":5,"flashScope":2,"frame":3,"se":{"name":"Earth5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,170,51,102],"flashDuration":2,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,170,34,119],"flashDuration":2,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,170,136,119],"flashDuration":2,"flashScope":1,"frame":7,"se":null},{"flashColor":[255,170,136,85],"flashDuration":5,"flashScope":1,"frame":10,"se":null}]}, +{"id":73,"animation1Hue":0,"animation1Name":"Wind1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,250,0,0,255,1]],[[1,0,0,250,0,0,255,1]],[[2,-8,0,230,0,0,255,1],[1,0,0,250,0,0,130,1]],[[3,-8,0,200,0,0,255,1],[8,0,8,150,0,0,255,1]],[[4,-8,0,250,0,0,255,1],[9,0,8,250,0,0,255,1]],[[5,-8,0,250,0,0,255,1],[10,0,8,260,0,0,255,1]],[[6,-8,0,250,0,0,255,1],[11,0,8,260,0,0,255,1]],[[7,-8,0,250,0,0,255,1],[12,0,8,260,0,0,255,1]],[[13,0,8,260,0,0,255,1]],[[13,0,8,270,0,0,200,1]],[[13,0,8,280,0,0,150,1]]],"name":"风/单体","position":1,"timings":[{"flashColor":[204,221,102,187],"flashDuration":3,"flashScope":0,"frame":0,"se":{"name":"Wind5","pan":0,"pitch":100,"volume":100}},{"flashColor":[204,221,119,204],"flashDuration":3,"flashScope":1,"frame":2,"se":null},{"flashColor":[204,221,102,170],"flashDuration":3,"flashScope":2,"frame":3,"se":null}]}, +{"id":74,"animation1Hue":0,"animation1Name":"Wind2","animation2Hue":0,"animation2Name":"","frames":[[[0,-184,-48,200,0,0,100,0]],[[1,-160,-48,200,0,0,150,0],[6,24,-184,400,0,0,50,0]],[[2,-136,-48,200,0,0,200,0],[7,24,-184,400,0,0,100,0]],[[3,-112,-48,200,0,0,200,0],[8,24,-184,400,0,0,130,0]],[[-1,-144,-56,200,0,0,100,0],[4,-80,-48,200,0,0,200,0],[9,24,-184,400,0,0,150,0]],[[0,-48,-48,200,0,0,200,0],[5,24,-184,400,0,0,150,0]],[[1,-16,-48,200,0,0,200,0],[6,24,-184,400,0,0,150,0]],[[2,16,-48,200,0,0,200,0],[7,24,-184,400,0,0,150,0]],[[3,32,-48,200,0,0,200,0],[8,24,-184,400,0,0,150,0]],[[4,32,-48,200,0,0,200,0],[9,24,-184,400,0,0,150,0]],[[0,16,-48,200,0,0,200,0],[5,24,-184,400,0,0,150,0]],[[1,0,-48,200,0,0,200,0],[6,24,-184,400,0,0,150,0]],[[2,-40,-48,200,0,0,200,0],[7,24,-184,400,0,0,150,0]],[[3,-64,-48,200,0,0,200,0],[8,24,-184,400,0,0,150,0]],[[4,-56,-48,200,0,0,200,0],[9,24,-184,400,0,0,150,0]],[[0,-32,-48,200,0,0,200,0],[5,24,-184,400,0,0,150,0]],[[1,-32,-48,200,0,0,200,0],[6,24,-184,400,0,0,150,0]],[[2,-8,-48,200,0,0,200,0],[7,24,-184,400,0,0,150,0]],[[3,24,-48,200,0,0,200,0],[8,24,-184,400,0,0,150,0]],[[4,56,-48,200,0,0,200,0],[9,24,-184,400,0,0,150,0]],[[0,96,-48,200,0,0,200,0],[5,24,-184,400,0,0,150,0]],[[4,136,-48,200,0,0,200,0],[6,24,-184,400,0,0,150,0]],[[0,176,-48,200,0,0,200,0],[7,24,-184,400,0,0,120,0]],[[1,224,-48,200,0,0,150,0],[8,24,-184,400,0,0,100,0]],[[2,272,-48,200,0,0,100,0],[9,24,-184,400,0,0,70,0]]],"name":"风/全体","position":3,"timings":[{"flashColor":[255,221,187,153],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Wind5","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Wind8","pan":0,"pitch":70,"volume":100}},{"flashColor":[255,255,187,153],"flashDuration":1,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,255,204,153],"flashDuration":3,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":10,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":15,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":17,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":20,"se":null}]}, +{"id":75,"animation1Hue":0,"animation1Name":"Light1","animation2Hue":0,"animation2Name":"","frames":[[[1,0,0,200,0,0,255,1],[0,0,0,250,0,0,50,1],[0,0,0,100,0,0,255,1]],[[2,0,0,200,0,0,255,1],[0,0,0,260,0,0,150,1],[0,0,0,120,0,0,150,1]],[[3,0,0,200,0,0,255,1],[0,0,0,270,0,0,255,1]],[[4,0,0,200,0,0,255,1],[0,0,0,275,0,0,200,1]],[[5,0,0,200,0,0,255,1],[0,0,0,280,0,0,150,1]],[[6,0,0,200,0,0,255,1],[0,0,0,285,0,0,100,1]],[[7,0,0,200,0,0,255,1]],[[8,0,0,200,0,0,255,1]],[[9,0,0,200,0,0,255,1]],[[10,0,0,200,0,0,255,1]],[[11,0,0,200,0,0,255,1]],[[12,0,0,200,0,0,255,1]],[[13,0,0,200,0,0,255,1]],[[14,0,0,200,0,0,255,1]],[[14,0,0,200,0,0,150,1]]],"name":"圣/单体","position":1,"timings":[{"flashColor":[255,255,221,85],"flashDuration":3,"flashScope":2,"frame":0,"se":{"name":"Ice7","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,221,170],"flashDuration":5,"flashScope":2,"frame":6,"se":{"name":"Saint7","pan":0,"pitch":115,"volume":100}},{"flashColor":[255,255,170,187],"flashDuration":3,"flashScope":1,"frame":6,"se":null}]}, +{"id":76,"animation1Hue":0,"animation1Name":"Light2","animation2Hue":0,"animation2Name":"","frames":[[[18,0,-88,270,0,0,255,1],[0,0,56,300,0,0,100,1],[23,0,56,100,0,0,150,1]],[[18,0,-80,270,0,0,255,1],[19,0,-72,260,0,0,150,1],[23,0,56,130,0,0,180,1],[0,0,56,260,0,0,150,1]],[[19,0,-80,270,0,0,255,1],[23,0,56,150,0,0,255,1],[0,0,56,200,0,0,200,1]],[[19,0,-72,270,0,0,200,1],[23,0,56,160,0,0,180,1],[24,0,56,100,0,0,255,1],[0,0,56,180,0,0,200,1]],[[19,0,-72,270,0,0,255,1],[24,0,56,150,0,0,255,1],[0,0,56,150,0,0,200,1]],[[19,0,-72,270,0,0,200,1],[24,0,56,200,0,0,255,1],[0,0,56,100,0,0,100,1]],[[19,0,-72,270,0,0,255,1],[1,0,-56,200,0,0,255,1],[24,0,56,180,0,0,200,1]],[[19,0,-72,270,0,0,150,1],[18,0,-72,270,0,0,255,1],[13,0,-48,200,0,0,255,1],[-1,0,72,20,0,0,0,0],[2,0,-56,200,0,0,255,1]],[[18,0,-72,250,0,0,200,1],[3,0,-48,200,0,0,255,1],[14,0,-56,200,0,0,255,1],[24,-168,64,180,0,0,200,1],[1,176,-48,200,0,1,255,1],[1,-176,-48,200,0,0,255,1],[24,168,64,180,0,0,200,1]],[[4,0,-40,200,0,0,255,1],[15,0,-32,200,0,0,255,1],[20,0,64,200,0,0,255,1],[5,0,-48,200,0,0,255,1],[2,-176,-48,200,0,0,255,1],[13,-176,-48,200,0,0,255,1],[13,176,-40,200,0,0,255,1],[2,168,-40,200,0,1,255,1]],[[22,0,64,200,0,0,255,1],[16,0,-24,200,0,0,255,1],[15,0,-16,150,0,0,255,1],[8,0,-88,200,0,0,255,1],[3,-176,-48,200,0,0,255,1],[14,-176,-48,200,0,0,255,1],[14,176,-40,200,0,0,255,1],[3,176,-40,200,0,1,255,1]],[[6,0,-40,200,0,0,255,1],[17,0,-24,200,0,0,255,1],[22,0,64,220,0,0,160,1],[9,0,-88,200,0,0,255,1],[18,0,-24,200,0,0,255,1],[4,-176,-48,200,0,0,255,1],[8,-176,-104,200,0,0,255,1],[15,-176,-16,150,0,0,255,1],[15,176,-16,150,0,0,255,1],[8,176,-104,200,0,0,255,1],[4,176,-48,200,0,0,255,1],[20,-176,56,200,0,0,255,1],[20,176,56,200,0,0,255,1]],[[7,0,-40,200,0,0,255,1],[10,0,-88,200,0,0,255,1],[18,-176,-40,200,0,0,255,1],[9,-176,-104,200,0,0,255,1],[18,176,-32,200,0,0,255,1],[9,176,-104,200,0,0,255,1],[22,-176,56,200,0,0,255,1],[22,176,56,200,0,0,255,1],[4,-128,8,100,0,0,255,1],[4,128,8,100,0,0,255,1]],[[11,0,-88,200,0,0,255,1],[10,-176,-104,200,0,0,255,1],[10,176,-104,200,0,0,255,1],[22,-176,56,220,0,0,160,1],[22,176,56,220,0,0,160,1],[18,-128,-40,200,0,0,255,1],[5,-128,8,100,0,0,255,1],[13,-128,8,100,0,0,255,1],[18,128,-40,200,0,0,255,1],[13,128,8,100,0,0,255,1],[5,128,8,100,0,0,255,1]],[[12,0,-88,200,0,0,255,1],[11,-176,-104,200,0,0,255,1],[11,176,-104,200,0,0,255,1],[6,-128,8,100,0,0,255,1],[18,-128,-136,200,0,0,150,1],[6,128,8,100,0,0,255,1],[18,128,-136,200,0,0,150,1],[13,224,8,100,0,0,255,1],[4,-224,8,100,0,0,255,1],[18,224,-136,200,0,0,150,1],[4,224,8,100,0,0,255,1],[13,-224,8,100,0,0,255,1]],[[12,0,-88,210,0,0,150,1],[12,-176,-104,200,0,0,255,1],[12,176,-104,200,0,0,255,1],[7,-128,8,100,0,0,255,1],[7,128,8,100,0,0,255,1],[18,224,-40,200,0,0,255,1],[18,-224,-40,200,0,0,255,1],[5,-224,8,100,0,0,255,1],[5,224,8,100,0,0,255,1]],[[12,-176,-104,210,0,0,150,1],[12,176,-104,210,0,0,150,1],[6,-224,8,100,0,0,255,1],[18,-224,-136,200,0,0,150,1],[6,224,8,100,0,0,255,1],[18,224,-136,200,0,0,150,1]],[[7,-224,8,100,0,0,255,1],[7,224,8,100,0,0,255,1]]],"name":"圣/全体","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Saint7","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":8,"se":{"name":"Explosion5","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,255,204,204],"flashDuration":5,"flashScope":1,"frame":8,"se":{"name":"Saint4","pan":0,"pitch":120,"volume":90}},{"flashColor":[255,255,187,153],"flashDuration":5,"flashScope":2,"frame":9,"se":null}]}, +{"id":77,"animation1Hue":0,"animation1Name":"Darkness1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,100,0,0,200,0]],[[1,0,0,130,0,0,255,0]],[[2,0,0,150,0,0,255,0],[2,0,0,200,0,0,150,0],[4,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0],[5,0,0,200,0,1,255,1],[2,0,0,210,0,0,100,0]],[[0,0,0,150,0,0,255,0],[6,0,0,200,0,1,255,1]],[[1,0,0,150,0,0,255,0],[7,0,0,200,0,1,255,1]],[[2,0,0,150,0,0,255,0],[8,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0]],[[0,0,0,150,0,0,255,0]],[[1,0,0,150,0,0,255,0]],[[2,0,0,150,0,0,255,0],[4,0,0,200,90,1,255,1]],[[3,0,0,150,0,0,255,0],[5,0,0,200,90,1,255,1]],[[0,0,0,150,0,0,255,0],[6,0,0,200,90,1,255,1]],[[1,0,0,150,0,0,200,0],[7,0,0,200,90,1,255,1]],[[2,0,0,150,0,0,150,0],[8,0,0,200,90,1,255,1]],[[3,0,0,150,0,0,100,0]]],"name":"暗/单体","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Darkness3","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,102,221,153],"flashDuration":15,"flashScope":1,"frame":2,"se":null},{"flashColor":[238,102,221,170],"flashDuration":5,"flashScope":2,"frame":2,"se":null},{"flashColor":[255,102,221,153],"flashDuration":5,"flashScope":2,"frame":10,"se":null}]}, +{"id":78,"animation1Hue":0,"animation1Name":"Darkness2","animation2Hue":0,"animation2Name":"","frames":[[[5,0,0,200,0,0,180,1],[9,0,0,200,0,0,180,1]],[[6,0,0,230,0,0,200,1],[10,0,0,230,0,0,200,1]],[[7,0,0,260,0,0,230,1],[11,0,0,260,0,0,230,1],[-1,0,0,20,0,0,0,0],[13,0,0,100,0,0,255,1]],[[8,0,0,280,0,0,255,1],[12,0,0,280,0,0,255,1],[-1,0,0,20,0,0,0,0],[14,0,0,160,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[-1,0,0,20,0,0,0,0],[15,0,0,200,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[-1,0,0,20,0,0,0,0],[16,0,0,220,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[16,0,0,240,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[16,0,0,260,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[13,0,0,280,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[14,0,0,290,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[15,0,0,300,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[16,0,0,310,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[16,0,0,320,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[16,0,0,330,0,0,200,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[16,0,0,335,0,0,150,1],[17,0,0,400,0,0,255,1],[21,-200,-72,70,0,0,255,1],[21,200,48,70,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[22,-200,-72,100,0,0,255,1],[22,200,48,100,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[23,-200,-72,100,0,0,255,1],[23,200,48,100,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[20,0,0,400,0,0,255,1],[24,-200,-72,100,0,0,255,1],[24,200,48,100,0,0,255,1],[21,144,-128,50,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[17,0,0,400,0,0,255,1],[25,-200,-72,100,0,0,255,1],[25,200,48,100,0,0,255,1],[22,144,-128,80,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[23,144,-128,80,0,0,255,1],[21,-176,48,50,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[24,144,-128,80,0,0,255,1],[22,-176,48,80,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[20,0,0,400,0,0,255,1],[25,144,-128,80,0,0,255,1],[23,-176,48,80,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[17,0,0,400,0,0,255,1],[24,-176,48,80,0,0,255,1],[21,-88,-152,70,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[25,-176,48,80,0,0,255,1],[22,-88,-152,100,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[23,-88,-152,100,0,0,255,1],[21,208,-8,50,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[20,0,0,400,0,0,255,1],[24,-88,-152,100,0,0,255,1],[22,208,-8,80,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[17,0,0,400,0,0,255,1],[25,-88,-152,100,0,0,255,1],[23,208,-8,80,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[24,208,-8,80,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[25,208,-8,80,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,200,1],[4,0,0,180,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,150,1],[4,0,0,100,0,0,255,1]]],"name":"暗/全体","position":3,"timings":[{"flashColor":[0,0,0,255],"flashDuration":10,"flashScope":1,"frame":0,"se":{"name":"Teleport","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,136,255,170],"flashDuration":5,"flashScope":2,"frame":9,"se":null},{"flashColor":[255,119,238,204],"flashDuration":3,"flashScope":1,"frame":14,"se":null},{"flashColor":[255,136,255,170],"flashDuration":5,"flashScope":2,"frame":14,"se":null},{"flashColor":[255,119,238,170],"flashDuration":3,"flashScope":1,"frame":17,"se":null},{"flashColor":[255,119,238,170],"flashDuration":3,"flashScope":1,"frame":20,"se":null},{"flashColor":[255,119,238,170],"flashDuration":3,"flashScope":1,"frame":23,"se":null},{"flashColor":[255,119,238,170],"flashDuration":8,"flashScope":1,"frame":26,"se":null}]}, +{"id":79,"animation1Hue":0,"animation1Name":"Fire2","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,150,0,0,255,0]],[[1,0,0,150,0,0,255,0]],[[2,0,0,230,0,0,255,0]],[[3,0,0,230,0,0,255,0]],[[4,0,0,230,0,0,255,0]],[[5,0,0,230,0,0,255,0]],[[6,0,0,235,0,0,255,0]],[[7,0,0,240,0,0,255,0]],[[8,0,0,240,0,0,255,0]],[[9,0,0,240,0,0,255,0]],[[10,0,0,240,0,0,255,0]],[[10,0,0,245,0,0,200,0]]],"name":"无属性/单体","position":1,"timings":[{"flashColor":[255,255,119,170],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Explosion2","pan":0,"pitch":105,"volume":100}},{"flashColor":[255,255,102,170],"flashDuration":5,"flashScope":1,"frame":1,"se":null}]}, +{"id":80,"animation1Hue":0,"animation1Name":"Fire3","animation2Hue":0,"animation2Name":"Fire2","frames":[[[0,0,0,300,0,0,255,1]],[[1,0,0,300,0,0,255,1]],[[2,0,0,350,0,0,255,1]],[[3,0,0,350,0,0,255,1]],[[4,0,0,330,0,0,255,1]],[[5,0,0,270,0,0,255,1]],[[6,0,0,270,0,0,255,1]],[[7,0,0,270,0,0,255,1]],[[8,0,0,270,0,0,255,1]],[[9,0,0,270,0,0,255,1]],[[10,0,0,270,0,0,255,1]],[[11,0,0,270,0,0,255,1]],[[12,0,0,300,0,0,255,1]],[[13,0,0,300,0,0,255,1],[24,0,0,300,0,0,255,1],[100,-200,8,200,0,0,255,1],[100,208,-32,200,0,0,255,1]],[[14,0,0,300,0,0,255,1],[25,0,0,300,0,0,255,1],[101,-200,8,200,0,0,255,1],[101,208,-32,200,0,0,255,1]],[[15,0,0,300,0,0,255,1],[26,0,0,300,0,0,255,1],[102,-200,8,200,0,0,255,1],[102,208,-32,200,0,0,255,1]],[[16,0,0,300,0,0,255,1],[27,0,0,300,0,0,255,1],[103,-200,8,200,0,0,255,1],[103,208,-32,200,0,0,255,1]],[[17,0,0,300,0,0,255,1],[28,0,0,300,0,0,255,1],[104,-200,8,200,0,0,255,1],[104,208,-32,200,0,0,255,1],[100,8,48,200,0,0,255,1]],[[18,0,0,300,0,0,255,1],[29,0,0,300,0,0,255,1],[105,-200,8,200,0,0,255,1],[105,208,-32,200,0,0,255,1],[101,8,48,200,0,0,255,1]],[[19,0,0,300,0,0,255,1],[106,-200,8,200,0,0,200,1],[106,208,-32,200,0,0,200,1],[102,8,48,200,0,0,255,1]],[[20,0,0,300,0,0,255,1],[107,-200,8,200,0,0,150,1],[107,208,-32,200,0,0,150,1],[103,8,48,200,0,0,255,1]],[[22,0,0,300,0,0,200,1],[108,-200,8,200,0,0,100,1],[108,208,-32,200,0,0,100,1],[104,8,48,200,0,0,255,1]],[[23,0,0,300,0,0,150,1],[105,8,48,200,0,0,255,1]],[[23,0,0,310,0,0,100,1],[106,8,48,200,0,0,200,1]],[[23,0,0,315,0,0,50,1],[107,8,48,200,0,0,150,1]],[[108,8,48,200,0,0,100,1]]],"name":"无属性/全体","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Sand","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,187,187],"flashDuration":5,"flashScope":1,"frame":1,"se":{"name":"Ice8","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,238,221,136],"flashDuration":6,"flashScope":2,"frame":2,"se":null},{"flashColor":[255,221,170,187],"flashDuration":2,"flashScope":1,"frame":10,"se":{"name":"Explosion5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,221,221],"flashDuration":3,"flashScope":2,"frame":11,"se":null},{"flashColor":[255,221,170,187],"flashDuration":3,"flashScope":1,"frame":13,"se":null},{"flashColor":[255,221,170,187],"flashDuration":10,"flashScope":1,"frame":16,"se":null}]}, +{"id":81,"animation1Hue":0,"animation1Name":"Special10","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-96,120,0,0,255,1]],[[1,0,-96,120,0,0,255,1]],[[2,0,-96,120,0,0,255,1]],[[3,0,-96,120,0,0,255,1]],[[4,0,-96,120,0,0,255,1]],[[5,0,-96,120,0,0,255,1]],[[6,0,-96,120,0,0,255,1]],[[7,0,-96,120,0,0,255,1]],[[8,0,-96,120,0,0,255,1]],[[9,0,-96,120,0,0,255,1]],[[10,0,-96,120,0,0,255,1]],[[11,0,-96,120,0,0,255,1]],[[12,0,-96,120,0,0,255,1]],[[13,0,-96,120,0,0,255,1]],[[14,0,-96,120,0,0,255,1]],[[15,0,-96,120,0,0,255,1]]],"name":"施放技能","position":2,"timings":[{"flashColor":[255,255,170,255],"flashDuration":5,"flashScope":1,"frame":0,"se":{"name":"Barrier","pan":0,"pitch":140,"volume":80}},{"flashColor":[255,255,170,255],"flashDuration":5,"flashScope":1,"frame":8,"se":null},{"flashColor":[255,255,170,170],"flashDuration":3,"flashScope":2,"frame":8,"se":null}]}, +{"id":82,"animation1Hue":0,"animation1Name":"Attack7","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-32,120,0,0,255,1]],[[1,16,-32,120,0,0,255,1]],[[2,16,-32,120,0,0,255,1]],[[3,16,-32,120,0,0,255,1]],[[4,16,-32,120,0,0,255,1]],[[5,16,-32,120,0,0,255,1]],[[6,16,-32,120,0,0,255,1]]],"name":"爪击2/物理","position":1,"timings":[{"flashColor":[255,255,255,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash6","pan":0,"pitch":100,"volume":80}}]}, +{"id":83,"animation1Hue":0,"animation1Name":"Attack8","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-32,120,0,0,255,1]],[[1,16,-32,120,0,0,255,1]],[[2,16,-32,120,0,0,255,1]],[[3,16,-32,120,0,0,255,1]],[[4,16,-32,120,0,0,255,1]],[[5,16,-32,120,0,0,255,1]],[[6,16,-32,120,0,0,255,1]],[[7,16,-32,120,0,0,255,1]],[[8,16,-32,120,0,0,255,1]],[[9,16,-32,120,0,0,255,1]],[[10,16,-32,120,0,0,255,1]]],"name":"爪击2/炎","position":1,"timings":[{"flashColor":[255,119,102,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash6","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,136,51,153],"flashDuration":5,"flashScope":2,"frame":1,"se":{"name":"Fire1","pan":0,"pitch":120,"volume":100}}]}, +{"id":84,"animation1Hue":0,"animation1Name":"Attack9","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-32,120,0,0,255,1]],[[1,16,-32,120,0,0,255,1]],[[2,16,-32,120,0,0,255,1]],[[3,16,-32,120,0,0,255,1]],[[4,16,-32,120,0,0,255,1]],[[5,16,-32,120,0,0,255,1]],[[6,16,-32,120,0,0,255,1]],[[7,16,-32,120,0,0,255,1]],[[8,16,-32,120,0,0,255,1]],[[9,16,-32,120,0,0,255,1]],[[10,16,-32,120,0,0,255,1]]],"name":"爪击2/冰","position":1,"timings":[{"flashColor":[119,187,255,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash6","pan":0,"pitch":100,"volume":80}},{"flashColor":[187,221,221,153],"flashDuration":5,"flashScope":2,"frame":1,"se":{"name":"Ice4","pan":0,"pitch":100,"volume":100}}]}, +{"id":85,"animation1Hue":0,"animation1Name":"Attack10","animation2Hue":0,"animation2Name":"","frames":[[[0,16,-32,120,0,0,255,1]],[[1,16,-32,120,0,0,255,1]],[[2,16,-32,120,0,0,255,1]],[[3,16,-32,120,0,0,255,1]],[[4,16,-32,120,0,0,255,1]],[[5,16,-32,120,0,0,255,1]],[[6,16,-32,120,0,0,255,1]],[[7,16,-32,120,0,0,255,1]],[[8,16,-32,120,0,0,255,1]],[[9,16,-32,120,0,0,255,1]],[[10,16,-32,120,0,0,255,1]]],"name":"爪击2/电","position":1,"timings":[{"flashColor":[255,255,102,187],"flashDuration":3,"flashScope":1,"frame":0,"se":{"name":"Slash6","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,119,153],"flashDuration":5,"flashScope":2,"frame":1,"se":{"name":"Thunder8","pan":0,"pitch":100,"volume":100}}]}, +{"id":86,"animation1Hue":0,"animation1Name":"Attack11","animation2Hue":0,"animation2Name":"Attack12","frames":[[[0,0,-64,280,0,0,255,1]],[[1,0,-64,280,0,0,255,1]],[[2,0,-64,280,0,0,255,1]],[[3,0,-64,280,0,0,255,1]],[[4,0,-64,280,0,0,255,1]],[[5,0,-64,280,0,0,255,1]],[[6,0,-64,280,0,0,255,1]],[[7,0,-64,280,0,0,255,1]],[[8,0,-64,280,0,0,255,1]],[[9,0,-64,280,0,0,255,1]],[[10,0,-64,280,0,0,255,1]],[[11,0,-64,280,0,0,255,1]],[[12,0,-64,280,0,0,255,1]],[[13,0,-64,280,0,0,255,1]],[[14,0,-64,280,0,0,255,1]],[[15,0,-64,280,0,0,255,1]],[[16,0,-64,280,0,0,255,1]],[[17,0,-64,280,0,0,255,1],[100,0,-72,280,250,1,255,1]],[[18,0,-64,280,0,0,255,1],[101,0,-72,280,250,1,255,1]],[[19,0,-64,280,0,0,255,1],[102,0,-72,280,250,1,255,1]],[[20,0,-64,280,0,0,255,1],[103,0,-72,280,250,1,255,1]],[[21,0,-64,280,0,0,255,1],[104,0,-72,280,250,1,255,1]],[[22,0,-64,280,0,0,255,1],[103,0,-72,280,250,1,255,1]],[[104,0,-72,280,250,1,255,1]],[[103,0,-72,280,250,1,255,1]],[[104,0,-72,280,250,1,255,1]],[[105,0,-72,280,250,1,255,1]],[[106,0,-72,280,250,1,255,1]],[[107,0,-72,280,250,1,255,1]],[[108,0,-72,280,250,1,255,1]],[[109,0,-72,280,250,1,255,1]],[[110,0,-72,280,250,1,255,1]],[[111,0,-72,280,250,1,255,1]]],"name":"爪击/必杀技3","position":3,"timings":[{"flashColor":[255,119,153,187],"flashDuration":3,"flashScope":2,"frame":1,"se":{"name":"Attack3","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,119,153,187],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash6","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,119,153,187],"flashDuration":3,"flashScope":1,"frame":4,"se":{"name":"Slash8","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,119,153,187],"flashDuration":3,"flashScope":1,"frame":7,"se":{"name":"Slash6","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,119,153,187],"flashDuration":3,"flashScope":1,"frame":10,"se":{"name":"Slash9","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,119,153,187],"flashDuration":15,"flashScope":1,"frame":18,"se":{"name":"Slash11","pan":0,"pitch":90,"volume":90}},{"flashColor":[255,119,153,187],"flashDuration":5,"flashScope":2,"frame":18,"se":{"name":"Monster2","pan":0,"pitch":115,"volume":90}}]}, +{"id":87,"animation1Hue":0,"animation1Name":"Sword7","animation2Hue":0,"animation2Name":"Sword8","frames":[[[100,0,-56,230,0,0,255,0]],[[101,0,-56,230,0,0,255,0],[117,184,-56,240,0,0,100,0],[117,-176,-56,240,0,1,100,0]],[[102,0,-56,230,0,0,255,0],[117,184,-56,235,0,0,150,0],[117,-176,-56,235,0,1,150,0]],[[103,0,-56,230,0,0,255,0],[117,184,-56,230,0,0,255,0],[117,-176,-56,230,0,1,255,0]],[[104,0,-56,230,0,0,255,0],[118,184,-56,230,0,0,255,0],[118,-176,-56,230,0,1,255,0]],[[105,0,-56,230,0,0,255,0],[119,184,-56,230,0,0,255,0],[119,-176,-56,230,0,1,255,0]],[[106,0,-56,230,0,0,255,0],[120,184,-56,230,0,0,255,0],[120,-176,-56,230,0,1,255,0]],[[107,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[108,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[109,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[110,0,-56,230,0,0,255,0],[120,184,-56,230,0,0,255,0],[120,-176,-56,230,0,1,255,0]],[[111,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[112,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[113,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[114,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[115,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0],[0,0,-56,285,0,0,255,1]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[1,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,20,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[2,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,50,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[3,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,80,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[4,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,100,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[5,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,120,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[6,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,160,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[7,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,200,0]],[[122,-176,-56,230,0,1,150,0],[116,0,-56,230,0,0,150,0],[122,184,-56,230,0,0,150,0],[8,0,-56,285,0,0,255,1]],[[122,-176,-56,230,0,1,100,0],[116,0,-56,230,0,0,100,0],[122,184,-56,230,0,0,100,0],[9,0,-56,285,0,0,255,1]],[[122,-176,-56,230,0,1,50,0],[116,0,-56,230,0,0,50,0],[122,184,-56,230,0,0,50,0],[10,0,-56,285,0,0,255,1]],[[11,0,-56,285,0,0,255,1]],[[12,0,-56,285,0,0,255,1]],[[13,0,-56,285,0,0,255,1]],[[14,0,-56,285,0,0,255,1]],[[15,0,-56,285,0,0,255,1]]],"name":"斩击/必杀技3","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Fog2","pan":0,"pitch":70,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":15,"se":{"name":"Slash3","pan":0,"pitch":105,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":15,"se":{"name":"Attack3","pan":0,"pitch":80,"volume":90}},{"flashColor":[187,221,255,255],"flashDuration":5,"flashScope":1,"frame":16,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":6,"flashScope":2,"frame":23,"se":null}]}, +{"id":88,"animation1Hue":0,"animation1Name":"Sword9","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-64,250,330,0,255,1]],[[1,0,-64,250,330,0,255,1],[12,0,-64,100,0,0,150,0]],[[2,0,-64,250,330,0,255,1],[12,0,-64,140,0,0,200,0]],[[3,0,-64,250,330,0,255,1],[12,0,-64,150,0,0,255,0]],[[4,0,-64,250,330,0,255,1],[12,0,-64,155,0,0,255,0]],[[5,0,-64,250,330,0,255,1],[12,0,-64,160,0,0,150,0]],[[12,0,-64,163,0,0,100,0]],[[0,0,-32,290,40,1,255,1],[12,0,-64,165,0,0,50,0]],[[1,0,-32,290,40,1,255,1],[13,0,-64,100,0,0,150,0]],[[2,0,-32,290,40,1,255,1],[13,0,-64,140,0,0,200,0]],[[3,0,-32,290,40,1,255,1],[13,0,-64,150,0,0,255,0]],[[4,0,-32,290,40,1,255,1],[13,0,-64,155,0,0,255,0]],[[5,0,-32,290,40,1,255,1],[13,0,-64,160,0,0,150,0]],[[13,0,-64,163,0,0,100,0]],[[0,0,-80,290,290,0,255,1],[13,0,-64,165,0,0,50,0]],[[1,0,-80,290,290,0,255,1],[14,0,-64,100,0,0,150,0]],[[2,0,-80,290,290,0,255,1],[14,0,-64,140,0,0,200,0]],[[3,0,-80,290,290,0,255,1],[14,0,-64,150,0,0,255,0]],[[4,0,-80,290,290,0,255,1],[14,0,-64,155,0,0,255,0]],[[5,0,-80,290,290,0,255,1],[14,0,-64,160,0,0,150,0]],[[14,0,-64,163,0,0,100,0]],[[6,0,-72,290,80,0,255,1],[14,0,-64,165,0,0,50,0]],[[7,0,-72,290,80,0,255,1],[16,0,-64,150,0,0,255,0],[15,0,-64,100,0,0,150,0]],[[8,0,-72,290,80,0,255,1],[17,0,-64,180,0,0,255,0],[15,0,-64,140,0,0,200,0]],[[9,0,-72,290,80,0,255,1],[18,0,-64,250,0,0,255,0],[15,0,-64,150,0,0,255,0]],[[10,0,-72,290,80,0,255,1],[15,0,-64,155,0,0,255,0],[19,0,-64,255,0,0,255,0],[-1,0,0,20,0,0,0,0],[-1,0,0,20,0,0,0,0]],[[11,0,-72,290,80,0,255,1],[15,0,-64,160,0,0,150,0],[20,0,-64,260,0,0,255,0]],[[15,0,-64,163,0,0,100,0],[21,0,-64,260,0,0,255,0]],[[15,0,-64,165,0,0,50,0],[22,0,-64,260,0,0,255,0]],[[23,0,-64,260,0,0,255,0]],[[24,0,-64,260,0,0,255,0]],[[25,0,-64,260,0,0,200,0]],[[26,0,-64,260,0,0,150,0]],[[27,0,-64,260,0,0,100,0]]],"name":"斩击/必杀技4","position":3,"timings":[{"flashColor":[187,187,255,187],"flashDuration":2,"flashScope":2,"frame":1,"se":null},{"flashColor":[238,170,255,170],"flashDuration":2,"flashScope":1,"frame":1,"se":{"name":"Slash2","pan":0,"pitch":100,"volume":100}},{"flashColor":[187,187,255,187],"flashDuration":2,"flashScope":2,"frame":8,"se":null},{"flashColor":[238,170,255,170],"flashDuration":2,"flashScope":1,"frame":8,"se":{"name":"Slash2","pan":0,"pitch":120,"volume":100}},{"flashColor":[238,170,255,170],"flashDuration":2,"flashScope":1,"frame":15,"se":{"name":"Slash2","pan":0,"pitch":100,"volume":100}},{"flashColor":[187,187,255,187],"flashDuration":2,"flashScope":2,"frame":15,"se":null},{"flashColor":[187,187,255,187],"flashDuration":5,"flashScope":2,"frame":22,"se":{"name":"Wind8","pan":0,"pitch":150,"volume":70}},{"flashColor":[238,170,255,170],"flashDuration":5,"flashScope":1,"frame":22,"se":{"name":"Slash9","pan":0,"pitch":100,"volume":100}}]}, +{"id":89,"animation1Hue":0,"animation1Name":"Sword10","animation2Hue":0,"animation2Name":"","frames":[[[0,-128,-24,230,0,0,255,1]],[[1,-128,-24,230,0,0,255,1]],[[2,-128,-24,230,0,0,255,1]],[[3,-128,-24,230,0,0,255,1]],[[4,-128,-24,230,0,0,255,1]],[[5,-128,-24,230,0,0,255,1]],[[6,-128,-24,230,0,0,255,1]],[[7,-128,-24,230,0,0,255,1]],[[8,-128,-24,230,0,0,255,1]],[[9,-128,-24,230,0,0,255,1]],[[10,-128,-24,230,0,0,255,1],[0,128,-112,230,0,1,255,1]],[[11,-128,-24,230,0,0,255,1],[1,128,-112,230,0,1,255,1]],[[12,-128,-24,230,0,0,255,1],[2,128,-112,230,0,1,255,1]],[[13,-128,-24,230,0,0,255,1],[3,128,-112,230,0,1,255,1]],[[14,-128,-24,230,0,0,255,1],[4,128,-112,230,0,1,255,1]],[[15,-128,-24,230,0,0,255,1],[5,128,-112,230,0,1,255,1]],[[16,-128,-24,230,0,0,255,1],[6,128,-112,230,0,1,255,1]],[[17,-128,-24,230,0,0,255,1],[7,128,-112,230,0,1,255,1]],[[18,-128,-24,230,0,0,255,1],[8,128,-112,230,0,1,255,1]],[[9,128,-112,230,0,1,255,1]],[[10,128,-112,230,0,1,255,1]],[[11,128,-112,230,0,1,255,1]],[[12,128,-112,230,0,1,255,1]],[[13,128,-112,230,0,1,255,1]],[[14,128,-112,230,0,1,255,1]],[[15,128,-112,230,0,1,255,1]],[[16,128,-112,230,0,1,255,1]],[[17,128,-112,230,0,1,255,1]],[[18,128,-112,230,0,1,255,1]]],"name":"斩击/必杀技5","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder3","pan":0,"pitch":90,"volume":90}},{"flashColor":[187,238,255,170],"flashDuration":2,"flashScope":2,"frame":1,"se":{"name":"Slash1","pan":0,"pitch":110,"volume":100}},{"flashColor":[170,238,255,221],"flashDuration":5,"flashScope":1,"frame":1,"se":null},{"flashColor":[170,238,255,221],"flashDuration":5,"flashScope":1,"frame":5,"se":null},{"flashColor":[187,238,255,170],"flashDuration":2,"flashScope":2,"frame":5,"se":{"name":"Slash1","pan":0,"pitch":110,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":10,"se":{"name":"Thunder3","pan":0,"pitch":90,"volume":90}},{"flashColor":[170,238,255,221],"flashDuration":5,"flashScope":1,"frame":11,"se":null},{"flashColor":[187,238,255,170],"flashDuration":2,"flashScope":2,"frame":11,"se":{"name":"Slash2","pan":0,"pitch":110,"volume":100}},{"flashColor":[170,238,255,221],"flashDuration":5,"flashScope":1,"frame":15,"se":null},{"flashColor":[187,238,255,170],"flashDuration":2,"flashScope":2,"frame":15,"se":{"name":"Slash3","pan":0,"pitch":100,"volume":100}}]}, +{"id":90,"animation1Hue":340,"animation1Name":"Spear2","animation2Hue":0,"animation2Name":"Spear3","frames":[[[2,-80,-104,200,0,0,255,1]],[[-1,0,-56,190,0,0,255,1],[3,-80,-104,150,0,0,255,1]],[[-1,0,-56,190,0,0,255,1],[4,-80,-104,100,0,0,255,1],[5,-80,-104,100,0,0,255,1]],[[2,72,-96,200,0,0,255,1],[100,0,-104,120,0,0,255,1],[6,-88,-104,120,0,0,255,1]],[[3,80,-96,150,0,0,255,1],[101,0,-104,120,0,0,255,1],[7,-88,-104,120,0,0,255,1]],[[102,0,-104,120,0,0,255,1],[8,-88,-104,130,0,0,255,1],[5,80,-104,100,0,0,255,1],[4,80,-104,100,0,0,255,1]],[[102,0,-104,120,0,0,255,1],[9,-88,-104,130,0,0,255,1],[6,80,-104,120,0,0,255,1],[2,0,32,200,0,0,255,1],[100,40,-40,120,60,1,255,1]],[[102,0,-104,120,0,0,255,1],[10,-88,-104,130,0,0,255,1],[7,80,-104,120,0,0,255,1],[3,0,32,150,0,0,255,1],[101,40,-40,120,60,1,255,1]],[[102,0,-104,120,0,0,255,1],[8,80,-104,130,0,0,255,1],[4,0,32,100,0,0,255,1],[5,0,32,100,0,0,255,1],[102,40,-40,120,60,1,255,1]],[[102,0,-104,120,0,0,255,1],[2,0,-144,200,0,0,255,1],[9,80,-104,130,0,0,255,1],[6,0,32,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[101,-40,-32,120,120,0,255,1]],[[3,0,-144,150,0,0,255,1],[10,80,-104,130,0,0,255,1],[7,0,32,120,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1]],[[102,0,-104,120,0,0,255,1],[5,0,-144,100,0,0,255,1],[4,0,-144,100,0,0,255,1],[8,0,32,130,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1]],[[6,0,-144,120,0,0,255,1],[2,80,-8,200,0,0,255,1],[9,0,32,130,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[100,40,-72,120,120,1,255,1]],[[7,0,-144,120,0,0,255,1],[3,80,-8,150,0,0,255,1],[10,0,32,130,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[101,40,-72,120,120,1,255,1],[103,0,-56,110,0,0,50,1]],[[102,0,-104,120,0,0,255,1],[8,0,-144,130,0,0,255,1],[4,80,-8,100,0,0,255,1],[5,80,-8,100,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[104,0,-56,150,0,0,150,1]],[[102,0,-104,120,0,0,255,1],[9,0,-144,130,0,0,255,1],[6,80,-8,120,0,0,255,1],[2,-80,-16,200,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[100,0,-12,120,0,1,255,1],[105,0,-56,170,0,0,200,1]],[[10,0,-144,130,0,0,255,1],[7,80,-8,120,0,0,255,1],[3,-80,-8,150,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[101,0,-12,120,0,1,255,1],[106,0,-56,180,0,0,255,1]],[[8,80,-8,130,0,0,255,1],[102,0,-104,120,0,0,255,1],[4,-80,-8,100,0,0,255,1],[5,-80,-8,100,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[102,0,-12,120,0,1,255,1],[107,0,-56,190,0,0,255,1]],[[9,80,-8,130,0,0,255,1],[6,-80,-8,120,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[102,0,-12,120,0,1,255,1],[100,-40,-80,120,60,0,255,1],[108,0,-56,190,0,0,255,1]],[[10,80,-8,130,0,0,255,1],[7,-80,-8,120,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[102,0,-12,120,0,1,255,1],[101,-40,-80,120,60,0,255,1],[109,0,-56,190,0,0,255,1]],[[8,-80,-8,130,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[102,0,-12,120,0,1,255,1],[102,-40,-80,120,60,0,255,1],[110,0,-56,190,0,0,255,1]],[[9,-80,-8,130,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[102,0,-12,120,0,1,255,1],[102,-40,-80,120,60,0,255,1],[111,0,-56,190,0,0,255,1]],[[10,-80,-8,130,0,0,255,1],[102,0,-104,120,0,0,255,1],[102,40,-40,120,60,1,255,1],[102,-40,-32,120,120,0,255,1],[102,40,-72,120,120,1,255,1],[102,0,-12,120,0,1,255,1],[102,-40,-80,120,60,0,255,1],[112,0,-56,190,0,0,255,1]],[[102,0,-104,120,0,0,150,1],[102,40,-40,120,60,1,150,1],[102,-40,-32,120,120,0,150,1],[102,40,-72,120,120,1,150,1],[102,0,-12,120,0,1,150,1],[102,-40,-80,120,60,0,150,1],[117,0,-56,190,0,0,200,0],[113,0,-56,190,0,0,255,1]],[[102,0,-104,120,0,0,50,1],[102,40,-40,120,60,1,50,1],[102,-40,-32,120,120,0,50,1],[102,40,-72,120,120,1,50,1],[102,0,-12,120,0,1,50,1],[102,-40,-80,120,60,0,50,1],[117,0,-56,210,0,0,200,0],[114,0,-56,190,0,0,255,1]],[[117,0,-56,230,0,0,200,0],[116,0,-56,190,0,0,255,1]],[[115,0,-56,190,0,0,255,1],[117,0,-56,240,0,0,200,0]],[[114,0,-56,190,0,0,255,1],[117,0,-56,245,0,0,150,0]],[[113,0,-56,190,0,0,255,1],[117,0,-56,248,0,0,100,0]],[[113,0,-56,190,0,0,200,1],[117,0,-56,250,0,0,50,0]],[[113,0,-56,190,0,0,100,1]],[[113,0,-56,190,0,0,50,1]]],"name":"突刺/必杀技3","position":3,"timings":[{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":0,"se":{"name":"Slash10","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,221,238],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":3,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":6,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":8,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":9,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":11,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":12,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":14,"se":null},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":15,"se":{"name":"Down2","pan":0,"pitch":120,"volume":80}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":0,"frame":15,"se":{"name":"Slash10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,187,119,221],"flashDuration":3,"flashScope":1,"frame":17,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":22,"se":{"name":"Flash2","pan":0,"pitch":85,"volume":80}},{"flashColor":[255,255,187,136],"flashDuration":5,"flashScope":2,"frame":25,"se":null}]}, +{"id":91,"animation1Hue":0,"animation1Name":"Gun1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,150,0,0,255,1]],[[1,0,0,150,0,0,255,1]],[[2,0,0,150,0,0,255,1]],[[8,0,0,150,0,0,255,0],[3,0,0,150,0,0,255,1]],[[9,0,0,150,0,0,255,0],[4,0,0,150,0,0,255,1]],[[10,0,0,150,0,0,255,0],[5,0,0,150,0,0,255,1]],[[11,0,0,150,0,0,255,0],[6,0,0,150,0,0,255,1]],[[12,0,0,150,0,0,255,0],[7,0,0,150,0,0,255,1]],[[13,0,0,150,0,0,255,0]],[[14,0,0,150,0,0,255,0]],[[15,0,0,150,0,0,255,0]],[[16,0,0,150,0,0,255,0]],[[16,0,0,150,0,0,150,0]],[[16,0,0,150,0,0,100,0]],[[16,0,0,150,0,0,50,0]]],"name":"铳击/单发","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Gun1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,221,187],"flashDuration":3,"flashScope":1,"frame":2,"se":null}]}, +{"id":92,"animation1Hue":0,"animation1Name":"Gun1","animation2Hue":0,"animation2Name":"","frames":[[[0,16,48,120,0,0,255,1]],[[1,16,48,120,0,0,255,1]],[[2,16,48,120,0,0,255,1],[0,-24,8,120,0,1,255,1]],[[1,-24,8,120,0,1,255,1],[8,16,48,120,0,0,255,0],[3,16,48,120,0,0,255,1]],[[2,-24,8,120,0,1,255,1],[9,16,48,120,0,0,255,0],[4,16,48,120,0,0,255,1],[0,24,-16,120,0,1,255,1]],[[10,16,48,120,0,0,255,0],[5,16,48,120,0,0,255,1],[8,-24,8,120,0,1,255,0],[3,-24,8,120,0,1,255,1],[1,24,-16,120,0,1,255,1]],[[2,24,-16,120,0,1,255,1],[11,16,48,120,0,0,255,0],[9,-24,8,120,0,1,255,0],[6,16,48,120,0,0,255,1],[4,-24,8,120,0,1,255,1],[0,-32,-40,120,0,0,255,1]],[[12,16,48,120,0,0,255,0],[7,16,48,120,0,0,255,1],[8,24,-16,120,0,1,255,0],[10,-24,8,120,0,1,255,0],[5,-24,8,120,0,1,255,1],[3,24,-16,120,0,1,255,1],[1,-32,-40,120,0,0,255,1]],[[11,-24,8,120,0,1,255,0],[9,24,-16,120,0,1,255,0],[2,-32,-40,120,0,0,255,1],[13,16,48,120,0,0,255,0],[6,-24,8,120,0,1,255,1],[4,24,-16,120,0,1,255,1],[0,16,-64,120,0,0,255,1]],[[14,16,48,120,0,0,255,0],[12,-24,8,120,0,1,255,0],[8,-32,-40,120,0,0,255,0],[7,-24,8,120,0,1,255,1],[10,24,-16,120,0,1,255,0],[5,24,-16,120,0,1,255,1],[3,-32,-40,120,0,0,255,1],[1,16,-64,120,0,0,255,1]],[[15,16,48,120,0,0,255,0],[9,-32,-40,120,0,0,255,0],[11,24,-16,120,0,1,255,0],[2,16,-64,120,0,1,255,1],[13,-24,8,120,0,1,255,0],[6,24,-16,120,0,1,255,1],[4,-32,-40,120,0,0,255,1]],[[16,16,48,120,0,0,255,0],[14,-24,8,120,0,1,255,0],[7,24,-16,120,0,1,255,1],[12,24,-16,120,0,1,255,0],[8,16,-64,120,0,1,255,0],[10,-32,-40,120,0,0,255,0],[5,-32,-40,120,0,0,255,1],[3,16,-64,120,0,1,255,1],[-1,0,0,20,0,0,0,0]],[[16,16,48,120,0,0,255,0],[11,-32,-40,120,0,0,255,0],[13,24,-16,120,0,1,255,0],[9,16,-64,120,0,1,255,0],[6,-32,-40,120,0,0,255,1],[15,-24,8,120,0,1,255,0],[4,16,-64,120,0,1,255,1]],[[16,16,48,120,0,0,255,0],[12,-32,-40,120,0,0,255,0],[14,24,-16,120,0,1,255,0],[10,16,-64,120,0,1,255,0],[7,-32,-40,120,0,0,255,1],[16,-24,8,120,0,1,255,0],[5,16,-64,120,0,1,255,1]],[[16,16,48,120,0,0,255,0],[16,-24,8,120,0,1,255,0],[15,24,-16,120,0,1,255,0],[13,-32,-40,120,0,0,255,0],[11,16,-64,120,0,1,255,0],[6,16,-64,120,0,1,255,1]],[[16,16,48,120,0,0,255,0],[16,-24,8,120,0,1,255,0],[16,24,-16,120,0,1,255,0],[12,16,-64,120,0,1,255,0],[7,16,-64,120,0,1,255,1],[14,-32,-40,120,0,0,255,0]],[[16,16,48,120,0,0,255,0],[16,-24,8,120,0,1,255,0],[16,24,-16,120,0,1,255,0],[13,16,-64,120,0,1,255,0],[15,-32,-40,120,0,0,255,0]],[[16,16,48,120,0,0,255,0],[16,-24,8,120,0,1,255,0],[16,24,-16,120,0,1,255,0],[16,-32,-40,120,0,0,255,0],[14,16,-64,120,0,1,255,0]],[[16,16,48,120,0,0,255,0],[16,-24,8,120,0,1,255,0],[16,24,-16,120,0,1,255,0],[16,-32,-40,120,0,0,255,0],[15,16,-64,120,0,1,255,0]],[[16,16,48,120,0,0,255,0],[16,-24,8,120,0,1,255,0],[16,24,-16,120,0,1,255,0],[16,-32,-40,120,0,0,255,0],[16,16,-64,120,0,1,255,0]],[[16,16,48,120,0,0,150,0],[16,-24,8,120,0,1,150,0],[16,24,-16,120,0,1,150,0],[16,-32,-40,120,0,0,150,0],[16,16,-64,120,0,1,150,0]],[[16,16,48,120,0,0,100,0],[16,-24,8,120,0,1,100,0],[16,24,-16,120,0,1,100,0],[16,-32,-40,120,0,0,100,0],[16,16,-64,120,0,1,100,0]],[[16,16,48,120,0,0,50,0],[16,-24,8,120,0,1,50,0],[16,24,-16,120,0,1,50,0],[16,-32,-40,120,0,0,50,0],[16,16,-64,120,0,1,50,0]]],"name":"铳击/连发","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Gun2","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,221,136],"flashDuration":1,"flashScope":1,"frame":2,"se":null},{"flashColor":[255,255,221,136],"flashDuration":1,"flashScope":1,"frame":4,"se":null},{"flashColor":[255,255,221,136],"flashDuration":1,"flashScope":1,"frame":6,"se":null},{"flashColor":[255,255,221,136],"flashDuration":1,"flashScope":1,"frame":8,"se":null},{"flashColor":[255,255,221,136],"flashDuration":3,"flashScope":1,"frame":10,"se":null}]}, +{"id":93,"animation1Hue":0,"animation1Name":"Gun2","animation2Hue":0,"animation2Name":"","frames":[[[0,160,-112,90,0,0,125,1],[0,-160,-16,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-133,-24,90,0,0,255,1],[0,133,-104,90,0,0,255,1]],[[0,-106,-32,90,0,0,255,1],[0,106,-96,90,0,0,255,1]],[[0,-80,-40,90,0,0,255,1],[0,80,-88,90,0,0,255,1]],[[0,-53,-48,90,0,0,255,1],[0,53,-80,90,0,0,255,1]],[[0,-26,-56,90,0,0,255,1],[0,26,-72,90,0,0,255,1]],[[0,0,-64,90,0,0,255,1],[0,0,-64,90,0,0,255,1],[1,0,-64,90,0,0,255,0],[1,0,-64,110,0,0,200,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,150,0,0,150,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,160,0,0,140,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,165,0,0,120,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,168,0,0,100,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,170,0,0,50,1]],[[1,0,-64,90,0,0,255,0]],[[1,0,-64,90,0,0,255,0],[3,0,-64,200,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[4,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[5,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[6,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[7,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[8,0,-64,285,0,0,255,1],[2,216,-16,250,45,0,255,1],[2,-208,-176,250,120,1,255,1]],[[1,0,-64,90,0,0,255,0],[9,0,-64,285,0,0,255,1],[2,192,-104,200,340,0,255,1],[2,-200,-64,200,340,0,255,1]],[[1,0,-64,90,0,0,255,0],[10,0,-64,285,0,0,255,1],[2,160,-144,120,300,0,255,1],[2,-168,-8,120,50,1,255,1]],[[1,0,-64,90,0,0,255,0],[11,0,-64,285,0,0,255,1],[2,104,-128,80,60,0,255,1],[2,-120,8,80,130,0,255,1]],[[1,0,-64,90,0,0,255,0],[12,0,-64,285,0,0,255,1],[2,64,-112,50,45,0,255,1],[2,-72,-16,50,160,1,255,1]],[[1,0,-64,90,0,0,150,0],[12,0,-64,285,0,0,100,1],[13,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,100,0],[14,0,-64,300,0,0,255,1]],[[13,0,-64,285,0,0,255,0],[15,0,-64,300,0,0,255,1]],[[16,0,-64,285,0,0,255,1],[13,-144,-72,200,0,1,255,1]],[[17,0,-64,290,0,0,255,1],[14,-144,-72,250,0,1,255,1]],[[18,0,-64,300,0,0,255,1],[15,-144,-72,250,0,1,255,1],[13,152,-32,200,0,0,255,1]],[[19,0,-64,300,0,0,255,1],[16,-144,-72,250,0,1,255,1],[14,152,-32,250,0,1,255,1]],[[20,0,-64,300,0,0,255,1],[17,-144,-72,250,0,1,255,1],[15,152,-32,250,0,1,255,1]],[[21,0,-64,300,0,0,255,1],[18,-144,-72,250,0,1,255,1],[16,152,-32,250,0,1,255,1]],[[22,0,-64,300,0,0,255,1],[19,-144,-72,250,0,1,255,1],[17,152,-32,250,0,1,255,1]],[[23,0,-64,300,0,0,255,1],[20,-144,-72,250,0,1,255,1],[18,152,-32,250,0,1,255,1]],[[24,0,-64,300,0,0,255,1],[21,-144,-72,250,0,1,255,1],[19,152,-32,250,0,1,255,1]],[[22,-144,-72,255,0,1,255,1],[20,152,-32,250,0,1,255,1]],[[23,-144,-72,255,0,1,255,1],[21,152,-32,250,0,1,255,1]],[[24,-144,-72,255,0,1,255,1],[22,152,-32,255,0,1,255,1]],[[23,152,-32,255,0,1,255,1]],[[24,152,-32,255,0,1,255,1]]],"name":"铳击/必杀技","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Phone","pan":0,"pitch":150,"volume":55}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":10,"se":{"name":"Skill1","pan":0,"pitch":95,"volume":80}},{"flashColor":[255,238,153,102],"flashDuration":8,"flashScope":2,"frame":15,"se":{"name":"Skill2","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":22,"se":{"name":"Ice7","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,221,187],"flashDuration":8,"flashScope":2,"frame":23,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":26,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":85}},{"flashColor":[255,255,187,238],"flashDuration":5,"flashScope":1,"frame":32,"se":null},{"flashColor":[255,255,204,221],"flashDuration":10,"flashScope":2,"frame":32,"se":{"name":"Explosion4","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,187,238],"flashDuration":3,"flashScope":1,"frame":37,"se":null},{"flashColor":[255,255,187,238],"flashDuration":3,"flashScope":1,"frame":40,"se":null}]}, +{"id":94,"animation1Hue":0,"animation1Name":"Special11","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-40,120,0,0,255,1]],[[1,0,-40,120,0,0,255,1]],[[2,0,-40,120,0,0,255,1]],[[3,0,-40,120,0,0,255,1]],[[4,0,-40,120,0,0,255,1]],[[5,0,-40,120,0,0,255,1]],[[6,0,-40,120,0,0,255,1]],[[7,0,-40,120,0,0,255,1]],[[8,0,-40,120,0,0,255,1]],[[9,0,-40,120,0,0,255,1]],[[10,0,-40,120,0,0,255,1]],[[11,0,-40,120,0,0,255,1]],[[12,0,-40,120,0,0,255,1]],[[13,0,-40,120,0,0,255,1],[23,0,-40,120,0,0,50,0]],[[23,0,-40,120,0,0,100,0],[14,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,150,0],[15,0,-40,120,0,0,255,1],[-1,0,0,20,0,0,0,0]],[[23,0,-40,120,0,0,200,0],[16,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[17,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[18,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[19,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[20,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[21,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[22,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,255,0],[22,0,-40,120,0,0,255,1]],[[23,0,-40,120,0,0,200,0],[22,0,-40,120,0,0,200,1]],[[23,0,-40,120,0,0,150,0],[22,0,-40,120,0,0,150,1]],[[23,0,-40,120,0,0,100,0],[22,0,-40,120,0,0,100,1]],[[23,0,-40,120,0,0,50,0],[22,0,-40,120,0,0,50,1]]],"name":"强化3","position":1,"timings":[{"flashColor":[204,238,255,204],"flashDuration":20,"flashScope":1,"frame":0,"se":{"name":"Barrier","pan":0,"pitch":100,"volume":80}},{"flashColor":[238,255,255,136],"flashDuration":5,"flashScope":2,"frame":0,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":9,"se":{"name":"Ice6","pan":0,"pitch":130,"volume":80}}]}, +{"id":95,"animation1Hue":0,"animation1Name":"Special12","animation2Hue":0,"animation2Name":"","frames":[[[-1,0,-112,160,0,0,255,1],[0,0,-112,160,0,0,255,1]],[[1,0,-112,160,0,0,255,1]],[[2,0,-112,160,0,0,255,1]],[[3,0,-112,160,0,0,255,1]],[[4,0,-112,160,0,0,255,1]],[[5,0,-112,160,0,0,255,1]],[[6,0,-112,160,0,0,255,1]],[[7,0,-112,160,0,0,255,1]],[[8,0,-112,160,0,0,255,1]],[[9,0,-112,160,0,0,255,1]],[[10,0,-112,160,0,0,255,1]],[[11,0,-112,160,0,0,255,1]],[[12,0,-112,160,0,0,255,1]],[[13,0,-112,160,0,0,255,1]],[[14,0,-112,160,0,0,255,1]],[[15,0,-112,160,0,0,255,1]],[[16,0,-112,160,0,0,255,1]],[[17,0,-112,160,0,0,255,1]],[[18,0,-112,160,0,0,255,1]],[[19,0,-112,160,0,0,255,1]],[[20,0,-112,160,0,0,255,1]],[[21,0,-112,160,0,0,255,1]]],"name":"强化4","position":2,"timings":[{"flashColor":[255,238,136,136],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Push","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,238,136,204],"flashDuration":15,"flashScope":0,"frame":6,"se":{"name":"Raise1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,238,136,204],"flashDuration":10,"flashScope":1,"frame":9,"se":null}]}, +{"id":96,"animation1Hue":0,"animation1Name":"Special13","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-8,100,0,0,150,1]],[[1,0,-8,100,0,0,200,1]],[[2,0,-8,100,0,0,255,1]],[[5,0,-8,100,0,0,100,0],[3,0,-8,100,0,0,255,1]],[[5,0,-8,100,0,0,150,0],[4,0,-8,100,0,0,255,1]],[[5,0,-8,100,0,0,200,0],[4,0,-8,100,0,0,255,1]],[[5,0,-8,100,0,0,255,0],[4,0,-8,100,0,0,255,1]],[[5,0,-8,100,0,0,255,0],[4,0,-8,100,0,0,200,1]],[[5,0,-8,100,0,0,255,0],[4,0,-8,100,0,0,150,1]],[[5,0,-8,100,0,0,255,0],[4,0,-8,100,0,0,100,1]],[[5,0,-8,100,0,0,255,0],[4,0,-8,100,0,0,50,1]],[[5,0,-8,100,0,0,255,0]],[[5,0,-8,100,0,0,255,0]],[[5,0,-8,100,0,0,255,0]],[[6,0,-8,165,0,0,255,0],[16,0,-8,165,0,0,255,1]],[[7,0,-8,165,0,0,255,0],[17,0,-8,165,0,0,255,1]],[[8,0,-8,165,0,0,255,0],[18,0,-8,165,0,0,255,1]],[[9,0,-8,165,0,0,255,0],[19,0,-8,165,0,0,255,1]],[[10,0,-8,165,0,0,255,0],[20,0,-8,165,0,0,255,1]],[[11,0,-8,165,0,0,255,0],[21,0,-8,165,0,0,255,1]],[[12,0,-8,165,0,0,255,0],[22,0,-8,165,0,0,255,1]],[[13,0,-8,165,0,0,200,0],[23,0,-8,165,0,0,255,1]],[[14,0,-8,165,0,0,150,0],[24,0,-8,165,0,0,255,1]],[[15,0,-8,165,0,0,100,0],[25,0,-8,165,0,0,255,1]]],"name":"弱化3","position":1,"timings":[{"flashColor":[255,51,221,204],"flashDuration":15,"flashScope":0,"frame":0,"se":{"name":"Blind","pan":0,"pitch":120,"volume":80}},{"flashColor":[255,68,221,187],"flashDuration":5,"flashScope":2,"frame":14,"se":{"name":"Crash","pan":0,"pitch":120,"volume":80}},{"flashColor":[255,51,221,204],"flashDuration":15,"flashScope":1,"frame":14,"se":null}]}, +{"id":97,"animation1Hue":0,"animation1Name":"Special14","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-112,130,0,0,100,0]],[[2,0,-112,130,0,0,150,0]],[[3,0,-112,130,0,0,255,0]],[[2,0,-112,130,0,0,255,0]],[[1,0,-112,130,0,0,255,0]],[[4,0,-112,130,0,0,255,0]],[[5,0,-112,130,0,0,255,0]],[[6,0,-112,130,0,0,255,0]],[[7,0,-112,130,0,0,255,0]],[[8,0,-112,130,0,0,255,0]],[[9,0,-112,130,0,0,255,0]],[[10,0,-112,130,0,0,255,0]],[[11,0,-112,130,0,0,255,0]],[[12,0,-112,130,0,0,255,0]],[[13,0,-112,130,0,0,255,0]],[[14,0,-112,130,0,0,255,0]],[[15,0,-112,130,0,0,255,0]],[[16,0,-112,130,0,0,255,0]],[[17,0,-112,130,0,0,255,0]],[[18,0,-112,130,0,0,255,0]],[[19,0,-112,130,0,0,255,0]],[[20,0,-112,130,0,0,255,0]],[[21,0,-112,130,0,0,255,0]],[[22,0,-112,130,0,0,255,0]],[[23,0,-112,130,0,0,255,0]],[[24,0,-112,130,0,0,255,0]],[[20,0,-112,130,0,0,200,0]],[[21,0,-112,130,0,0,100,0]],[[22,0,-112,130,0,0,50,0]]],"name":"弱化4","position":2,"timings":[{"flashColor":[0,0,0,204],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Stare","pan":0,"pitch":110,"volume":70}},{"flashColor":[0,0,0,204],"flashDuration":18,"flashScope":1,"frame":6,"se":{"name":"Fog2","pan":0,"pitch":100,"volume":80}}]}, +{"id":98,"animation1Hue":330,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Fire4","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,0,-64,160,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,0,-64,160,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[125,0,48,350,0,0,50,1],[100,0,-64,160,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[125,0,48,350,0,0,100,1],[100,0,-64,160,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[125,0,48,350,0,0,150,1],[100,0,-64,160,0,0,150,0]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,150,0]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,150,0]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,140,0]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,130,0]],[[16,0,-48,220,0,0,50,1],[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,120,0]],[[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,100,0]],[[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,80,0],[101,0,-48,150,0,0,255,0]],[[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,60,0],[102,0,-80,200,0,0,255,0]],[[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,40,0],[103,0,-88,220,0,0,255,0]],[[125,0,48,350,0,0,180,1],[100,0,-64,160,0,0,20,0],[104,0,-88,225,0,0,255,0],[114,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[105,0,-88,230,0,0,255,0],[115,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[106,0,-88,230,0,0,255,0],[116,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[107,0,-88,230,0,0,255,0],[117,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[114,152,-56,160,0,0,255,0],[108,0,-88,230,0,0,255,0],[118,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[115,152,-56,160,0,0,255,0],[109,0,-88,230,0,0,255,0],[119,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[116,152,-56,160,0,0,255,0],[110,0,-88,230,0,0,255,0],[120,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[117,152,-56,160,0,0,255,0],[111,0,-88,230,0,0,255,0],[121,-152,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[118,152,-56,160,0,0,255,0],[112,0,-88,230,0,0,255,0],[122,-152,-56,160,0,0,255,0],[114,-208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[119,152,-56,160,0,0,255,0],[113,0,-88,230,0,0,255,0],[123,-152,-56,160,0,0,255,0],[115,-208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[120,152,-56,160,0,0,255,0],[107,0,-88,230,0,0,255,0],[124,-152,-56,160,0,0,255,0],[116,-208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[121,152,-56,160,0,0,255,0],[108,0,-88,230,0,0,255,0],[117,-208,-56,160,0,0,255,0],[114,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[122,152,-56,160,0,0,255,0],[109,0,-88,230,0,0,255,0],[118,-208,-56,160,0,0,255,0],[115,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[123,152,-56,160,0,0,255,0],[110,0,-88,230,0,0,255,0],[119,-208,-56,160,0,0,255,0],[116,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[111,0,-88,230,0,0,255,0],[124,152,-56,160,0,0,255,0],[120,-208,-56,160,0,0,255,0],[117,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[112,0,-88,230,0,0,255,0],[121,-208,-56,160,0,0,255,0],[118,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[113,0,-88,230,0,0,255,0],[122,-208,-56,160,0,0,255,0],[119,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[107,0,-88,230,0,0,255,0],[123,-208,-56,160,0,0,255,0],[120,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[124,-208,-56,160,0,0,255,0],[108,0,-88,230,0,0,255,0],[121,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[109,0,-88,230,0,0,255,0],[122,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[110,0,-88,230,0,0,255,0],[123,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[111,0,-88,230,0,0,255,0],[124,208,-56,160,0,0,255,0]],[[125,0,48,350,0,0,180,1],[112,0,-88,230,0,0,200,0]],[[125,0,48,350,0,0,180,1],[113,0,-88,230,0,0,150,0]],[[125,0,48,350,0,0,100,1],[107,0,-88,230,0,0,100,0]],[[125,0,48,350,0,0,50,1],[108,0,-88,230,0,0,50,0]]],"name":"炎/全体3","position":3,"timings":[{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,85,0,153],"flashDuration":5,"flashScope":2,"frame":9,"se":{"name":"Fire2","pan":0,"pitch":110,"volume":80}},{"flashColor":[255,187,51,204],"flashDuration":5,"flashScope":2,"frame":22,"se":{"name":"Explosion7","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,221,51,255],"flashDuration":5,"flashScope":1,"frame":23,"se":null},{"flashColor":[255,221,51,255],"flashDuration":5,"flashScope":1,"frame":29,"se":null},{"flashColor":[255,221,51,255],"flashDuration":10,"flashScope":1,"frame":32,"se":null}]}, +{"id":99,"animation1Hue":150,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Ice5","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,0,-72,160,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,0,-72,160,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[100,0,-72,160,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[100,0,-72,160,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[100,0,-72,160,0,0,150,0],[123,-192,-64,150,0,0,50,1],[123,176,-64,150,270,1,50,1]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[100,0,-72,160,0,0,150,0],[123,-192,-64,150,0,0,100,1],[123,176,-64,150,270,1,100,1]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[100,0,-72,160,0,0,150,0],[123,-192,-64,150,0,0,150,1],[123,176,-64,150,270,1,150,1]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[100,0,-72,160,0,0,140,0],[123,-192,-64,150,0,0,200,1],[123,176,-64,150,270,1,200,1]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[100,0,-72,160,0,0,130,0],[123,176,-64,150,270,1,200,1],[123,-192,-64,150,0,0,200,1]],[[16,0,-48,220,0,0,50,1],[100,0,-72,160,0,0,120,0],[123,-192,-64,150,0,0,200,1],[123,176,-64,150,270,1,200,1]],[[100,0,-72,160,0,0,100,0],[123,-192,-64,150,0,0,200,1],[123,176,-64,150,270,1,200,1]],[[100,0,-72,160,0,0,80,0],[123,-192,-64,150,0,0,200,1],[123,176,-64,150,270,1,200,1]],[[100,0,-72,160,0,0,60,0],[123,-192,-64,150,0,0,150,1],[123,176,-64,150,270,1,150,1],[101,-128,8,224,0,0,255,0],[101,128,8,224,0,0,255,0]],[[100,0,-72,160,0,0,40,0],[123,-192,-64,150,0,0,100,1],[123,176,-64,150,270,1,100,1],[102,-128,8,225,0,0,255,0],[102,128,8,225,0,0,255,0]],[[100,0,-72,160,0,0,20,0],[123,-192,-64,150,0,0,50,1],[123,176,-64,150,270,1,50,1],[103,-128,8,225,0,0,255,0],[103,128,8,225,0,0,255,0]],[[104,-128,8,225,0,0,255,0],[104,128,8,225,0,0,255,0]],[[105,-128,8,225,0,0,255,0],[105,128,8,225,0,0,255,0]],[[106,-128,8,225,0,0,255,0],[106,128,8,225,0,0,255,0]],[[107,-128,8,225,0,0,255,0],[107,128,8,225,0,0,255,0]],[[108,-128,8,225,0,0,255,0],[108,128,8,225,0,0,255,0]],[[109,-128,8,225,0,0,255,0],[109,128,8,225,0,0,255,0]],[[110,-128,8,225,0,0,255,0],[110,128,8,225,0,0,255,0]],[[111,-128,8,225,0,0,255,0],[111,128,8,225,0,0,255,0]],[[112,-128,8,225,0,0,255,0],[112,128,8,225,0,0,255,0]],[[113,-128,8,225,0,0,255,0],[113,128,8,225,0,0,255,0]],[[114,-128,8,225,0,0,255,0],[114,128,8,225,0,0,255,0]],[[115,-128,8,225,0,0,255,0],[115,128,8,225,0,0,255,0]],[[116,-128,8,225,0,0,255,0],[116,128,8,225,0,0,255,0]],[[117,-128,8,225,0,0,255,0],[117,128,8,225,0,0,255,0]],[[118,-128,8,225,0,0,255,0],[118,128,8,225,0,0,255,0]],[[119,-128,8,225,0,0,255,0],[119,128,8,225,0,0,255,0]],[[120,-128,8,225,0,0,255,0],[120,128,8,225,0,0,255,0]],[[120,-128,8,225,0,0,255,0],[120,128,8,225,0,0,255,0]],[[121,-128,8,225,0,0,255,0],[121,128,8,225,0,0,255,0]],[[122,-128,8,225,0,0,255,0],[122,128,8,225,0,0,255,0]],[[122,-128,8,225,0,0,150,0],[122,128,8,225,0,0,150,0]]],"name":"冰/全体3","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[136,221,255,153],"flashDuration":5,"flashScope":2,"frame":9,"se":{"name":"Ice7","pan":0,"pitch":100,"volume":70}},{"flashColor":[153,221,255,255],"flashDuration":5,"flashScope":1,"frame":23,"se":{"name":"Sand","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,187,51,204],"flashDuration":5,"flashScope":0,"frame":23,"se":{"name":"Ice11","pan":0,"pitch":100,"volume":90}},{"flashColor":[136,221,255,204],"flashDuration":5,"flashScope":2,"frame":26,"se":null},{"flashColor":[153,221,255,255],"flashDuration":5,"flashScope":1,"frame":29,"se":null},{"flashColor":[136,221,255,170],"flashDuration":5,"flashScope":2,"frame":32,"se":null},{"flashColor":[153,221,255,255],"flashDuration":10,"flashScope":1,"frame":32,"se":null}]}, +{"id":100,"animation1Hue":230,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Thunder4","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,0,-64,160,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,0,-64,160,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[100,0,-64,160,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[100,0,-64,160,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[100,0,-64,160,0,0,150,0],[120,0,-144,120,0,0,255,1]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[100,0,-64,160,0,0,150,0],[116,0,-144,140,0,0,255,1]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[100,0,-64,160,0,0,150,0],[117,0,-144,150,0,0,255,1]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[100,0,-64,160,0,0,140,0],[118,0,-144,200,0,0,255,1]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[100,0,-64,160,0,0,130,0],[119,0,-144,220,0,0,255,1]],[[16,0,-48,220,0,0,50,1],[100,0,-64,160,0,0,120,0],[116,0,-144,220,45,0,255,1]],[[100,0,-64,160,0,0,100,0],[120,0,-144,220,45,0,255,1]],[[100,0,-64,160,0,0,80,0],[101,0,8,225,0,0,255,1],[116,-176,-120,170,0,0,255,1]],[[100,0,-64,160,0,0,60,0],[102,0,8,225,0,0,255,1],[117,-176,-120,180,0,0,255,1]],[[100,0,-64,160,0,0,40,0],[103,0,8,225,0,0,255,1],[118,-176,-120,180,0,0,255,1],[116,184,-16,170,270,0,255,1]],[[100,0,-64,160,0,0,20,0],[104,0,8,225,0,0,255,1],[106,-152,8,225,0,0,255,1],[119,-176,-120,180,0,0,255,1],[117,184,-16,190,270,0,255,1]],[[105,0,8,225,0,0,255,1],[107,-152,8,225,0,0,255,1],[120,-176,-120,180,0,0,255,1],[118,184,-16,190,270,0,255,1]],[[108,-152,8,225,0,0,255,1],[111,-64,8,225,0,1,255,1],[119,184,-16,190,270,0,255,1]],[[109,-152,8,225,0,0,255,1],[112,-64,8,225,0,1,255,1],[120,184,-16,190,270,0,255,1],[116,96,-136,170,0,0,255,1]],[[110,-152,8,225,0,0,255,1],[113,-64,8,225,0,1,255,1],[111,64,8,225,0,0,255,1],[117,96,-136,170,0,0,255,1]],[[114,-64,8,225,0,1,255,1],[112,64,8,225,0,0,255,1],[118,96,-136,170,0,0,255,1],[116,-200,-24,170,110,0,255,1]],[[115,-64,8,225,0,1,255,1],[113,64,8,225,0,0,255,1],[101,-104,8,225,0,1,255,1],[119,96,-136,170,0,0,255,1],[116,-200,-24,190,110,0,255,1]],[[114,64,8,225,0,0,255,1],[102,-104,8,225,0,1,255,1],[120,96,-136,170,0,0,255,1],[118,-200,-24,190,110,0,255,1]],[[115,64,8,225,0,0,255,1],[103,-104,8,225,0,1,255,1],[106,160,8,225,0,1,255,1],[119,-200,-24,190,110,0,255,1]],[[104,-104,8,225,0,1,255,1],[107,160,8,225,0,1,255,1],[120,-200,-24,190,110,0,255,1],[116,0,16,170,125,0,255,1]],[[105,-104,8,225,0,1,255,1],[108,160,8,225,0,1,255,1],[106,-136,8,225,0,0,255,1],[117,0,16,180,125,0,255,1]],[[109,160,8,225,0,1,255,1],[107,-136,8,225,0,0,255,1],[118,0,16,180,125,0,255,1],[116,-168,-136,170,0,0,255,1]],[[110,160,8,225,0,1,255,1],[108,-136,8,225,0,0,255,1],[111,-136,8,225,0,1,255,1],[119,0,16,180,125,0,255,1],[117,-168,-136,180,0,0,255,1]],[[109,-136,8,225,0,0,255,1],[112,-136,8,225,0,1,255,1],[106,168,8,225,0,0,255,1],[120,0,16,180,125,0,255,1],[118,-168,-136,180,0,0,255,1],[116,136,-152,170,90,0,255,1]],[[110,-136,8,225,0,0,255,1],[113,-136,8,225,0,1,255,1],[107,168,8,225,0,0,255,1],[101,0,8,225,0,0,255,1],[119,-168,-136,180,0,0,255,1],[117,136,-152,170,90,0,255,1]],[[114,-136,8,225,0,1,255,1],[108,168,8,225,0,0,255,1],[102,0,8,225,0,0,255,1],[120,-168,-136,180,0,0,255,1],[118,136,-152,170,90,0,255,1]],[[115,-136,8,225,0,1,255,1],[109,168,8,225,0,0,255,1],[103,0,8,225,0,0,255,1],[119,136,-152,170,90,0,255,1]],[[110,168,8,225,0,0,255,1],[104,0,8,225,0,0,255,1],[120,136,-152,170,90,0,255,1]],[[105,0,8,225,0,0,255,1]]],"name":"电/全体3","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[221,102,255,153],"flashDuration":5,"flashScope":2,"frame":9,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":10,"se":{"name":"Monster2","pan":0,"pitch":100,"volume":75}},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":2,"frame":21,"se":{"name":"Thunder9","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":1,"frame":22,"se":null},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":1,"frame":27,"se":null},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":1,"frame":29,"se":null},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":2,"frame":29,"se":null},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":2,"frame":33,"se":null},{"flashColor":[255,221,255,221],"flashDuration":5,"flashScope":1,"frame":34,"se":null}]}, +{"id":101,"animation1Hue":180,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Water3","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,0,-64,160,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,0,-64,160,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[100,0,-64,160,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[100,0,-64,160,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[100,0,-64,160,0,0,150,0]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[100,0,-64,160,0,0,150,0]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[100,0,-64,160,0,0,150,0]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[100,0,-64,160,0,0,140,0]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[100,0,-64,160,0,0,130,0]],[[16,0,-48,220,0,0,50,1],[100,0,-64,160,0,0,120,0]],[[-1,0,-48,220,0,0,120,1],[100,0,-64,160,0,0,100,0]],[[100,0,-64,160,0,0,80,0]],[[100,0,-64,160,0,0,60,0],[101,0,64,285,0,0,255,0]],[[100,0,-64,160,0,0,40,0],[102,0,64,285,0,0,255,0]],[[100,0,-64,160,0,0,20,0],[103,0,64,285,0,0,255,0]],[[104,0,64,285,0,0,255,0]],[[105,0,64,285,0,0,255,0]],[[106,0,64,285,0,0,255,0]],[[107,0,64,285,0,0,255,0]],[[108,0,64,285,0,0,255,0]],[[109,0,64,285,0,0,255,0]],[[110,0,64,285,0,0,255,0]],[[111,0,64,285,0,0,255,0]],[[112,0,64,285,0,0,255,0]],[[113,0,64,285,0,0,255,0]],[[114,0,64,285,0,0,255,0]],[[115,0,64,285,0,0,255,0]],[[116,0,64,285,0,0,255,0]],[[117,0,64,285,0,0,255,0]],[[118,0,64,285,0,0,255,0]],[[109,0,64,285,0,0,255,0]],[[111,0,64,285,0,0,255,0]],[[113,0,64,285,0,0,255,0]],[[115,0,64,285,0,0,255,0]],[[117,0,64,285,0,0,255,0]],[[109,0,64,285,0,0,255,0]],[[111,0,64,285,0,0,255,0]],[[113,0,64,285,0,0,255,0]],[[115,0,64,285,0,0,255,0]],[[116,0,64,285,0,0,200,0]],[[117,0,64,285,0,0,150,0]],[[118,0,64,285,0,0,80,0]]],"name":"水/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[68,170,255,153],"flashDuration":5,"flashScope":2,"frame":9,"se":{"name":"Darkness8","pan":0,"pitch":100,"volume":75}},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":2,"frame":23,"se":{"name":"Water1","pan":0,"pitch":50,"volume":90}},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":1,"frame":24,"se":{"name":"Water2","pan":0,"pitch":65,"volume":90}},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":1,"frame":29,"se":null},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":1,"frame":34,"se":null},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":1,"frame":39,"se":null},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":1,"frame":44,"se":null}]}, +{"id":102,"animation1Hue":350,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Earth3","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,16,-56,200,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,16,-56,200,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[100,16,-56,200,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[100,16,-56,200,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[100,16,-56,200,0,0,150,0]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[100,16,-56,200,0,0,150,0]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[100,16,-56,200,0,0,150,0]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[100,16,-56,200,0,0,140,0]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[100,16,-56,200,0,0,130,0]],[[16,0,-48,220,0,0,50,1],[100,16,-56,200,0,0,120,0]],[[-1,0,-48,220,0,0,120,1],[100,16,-56,200,0,0,100,0]],[[100,16,-56,200,0,0,80,0]],[[100,16,-56,200,0,0,60,0]],[[100,16,-56,200,0,0,40,0]],[[100,16,-56,200,0,0,20,0],[101,0,-168,270,0,0,255,0]],[[101,0,-48,270,0,0,255,0]],[[102,0,8,270,0,0,255,0]],[[103,0,8,270,0,0,255,0]],[[104,0,8,270,0,0,255,0],[121,-128,-32,185,0,0,255,0]],[[105,0,8,270,0,0,255,0],[122,-128,-32,185,0,0,255,0]],[[106,0,8,270,0,0,255,0],[123,-128,-32,185,0,0,255,0],[121,184,-32,185,0,0,255,0]],[[107,0,8,270,0,0,255,0],[124,-128,-32,185,0,0,255,0],[122,184,-32,185,0,0,255,0]],[[108,0,8,270,0,0,255,0],[125,-128,-32,185,0,0,255,0],[123,184,-32,185,0,0,255,0]],[[109,0,8,270,0,0,255,0],[126,-128,-32,185,0,0,255,0],[124,184,-32,185,0,0,255,0]],[[110,0,8,270,0,0,255,0],[127,-128,-32,185,0,0,255,0],[125,184,-32,185,0,0,255,0]],[[111,0,8,270,0,0,255,0],[128,-128,-32,185,0,0,255,0],[126,184,-32,185,0,0,255,0]],[[112,0,8,270,0,0,255,0],[129,-128,-32,185,0,0,255,0],[127,184,-32,185,0,0,255,0]],[[113,0,8,270,0,0,255,0],[128,184,-32,185,0,0,255,0]],[[114,0,8,270,0,0,255,0],[129,184,-32,185,0,0,255,0]],[[115,0,8,270,0,0,255,0]],[[116,0,8,270,0,0,255,0]],[[117,0,8,270,0,0,255,0]],[[118,0,8,270,0,0,255,0]],[[119,0,8,270,0,0,255,0]],[[120,0,8,270,0,0,255,0]],[[101,0,8,270,0,0,255,0]],[[101,0,8,270,0,0,200,0]],[[101,0,8,270,0,0,150,0]],[[101,0,8,270,0,0,100,0]]],"name":"地/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[238,136,0,153],"flashDuration":5,"flashScope":2,"frame":9,"se":{"name":"Earth4","pan":0,"pitch":125,"volume":75}},{"flashColor":[238,187,0,187],"flashDuration":5,"flashScope":2,"frame":27,"se":{"name":"Earth7","pan":0,"pitch":100,"volume":90}},{"flashColor":[238,187,0,187],"flashDuration":5,"flashScope":1,"frame":27,"se":{"name":"Explosion7","pan":0,"pitch":90,"volume":90}},{"flashColor":[238,187,0,204],"flashDuration":5,"flashScope":1,"frame":33,"se":null},{"flashColor":[238,187,0,204],"flashDuration":5,"flashScope":1,"frame":37,"se":null}]}, +{"id":103,"animation1Hue":60,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Wind3","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,-8,-64,170,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,-8,-64,170,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[100,-8,-64,170,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[100,-8,-64,170,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[100,-8,-64,170,0,0,150,0]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[100,-8,-64,170,0,0,150,0]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[100,-8,-64,170,0,0,150,0]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[100,-8,-64,170,0,0,140,0]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[100,-8,-64,170,0,0,130,0]],[[16,0,-48,220,0,0,50,1],[100,-8,-64,170,0,0,120,0]],[[-1,0,-48,220,0,0,120,1],[100,-8,-64,170,0,0,100,0]],[[100,-8,-64,170,0,0,80,0],[101,0,64,285,0,0,255,0]],[[100,-8,-64,170,0,0,60,0],[102,0,64,285,0,0,255,0],[123,-48,-56,200,0,0,255,1]],[[100,-8,-64,170,0,0,40,0],[103,0,64,285,0,0,255,0],[124,-48,-56,200,0,0,255,1],[123,192,0,200,340,1,255,1]],[[100,-8,-64,170,0,0,20,0],[104,0,64,285,0,0,255,0],[125,-48,-56,200,0,0,255,1],[124,192,0,200,340,1,255,1]],[[105,0,64,285,0,0,255,0],[126,-48,-56,200,0,0,255,1],[125,192,0,200,340,1,255,1]],[[106,0,64,285,0,0,255,0],[127,-48,-56,200,0,0,255,1],[126,192,0,200,340,1,255,1],[123,88,-88,150,180,1,255,1]],[[107,0,64,285,0,0,255,0],[127,192,0,200,340,1,255,1],[124,56,-144,150,180,1,255,1]],[[108,0,64,285,0,0,255,0],[123,192,-64,200,45,0,255,1],[125,56,-144,150,180,1,255,1],[123,-160,-32,200,125,1,255,1]],[[109,0,64,285,0,0,255,0],[124,192,-64,200,45,0,255,1],[126,56,-144,150,180,1,255,1],[124,-160,-32,200,125,1,255,1]],[[110,0,64,285,0,0,255,0],[125,192,-64,200,45,0,255,1],[127,56,-144,150,180,1,255,1],[125,-160,-32,200,125,1,255,1]],[[111,0,64,285,0,0,255,0],[126,-160,-32,200,125,1,255,1],[126,192,-64,200,45,0,255,1]],[[112,0,64,285,0,0,255,0],[127,-160,-32,200,125,1,255,1],[127,192,-64,200,45,0,255,1]],[[113,0,64,285,0,0,255,0]],[[114,0,64,285,0,0,255,0],[123,-16,-88,230,90,0,255,1]],[[115,0,64,285,0,0,255,0],[124,-16,-88,230,90,0,255,1],[123,176,-24,160,0,1,255,1]],[[116,0,64,285,0,0,255,0],[125,-16,-88,230,90,0,255,1],[124,176,-24,160,0,1,255,1],[123,-192,16,160,315,0,255,1]],[[117,0,64,285,0,0,255,0],[126,-16,-88,230,90,0,255,1],[125,176,-24,160,0,1,255,1],[124,-192,16,160,315,0,255,1]],[[118,0,64,285,0,0,255,0],[127,-16,-88,230,90,0,255,1],[126,176,-24,160,0,1,255,1],[125,-192,16,160,315,0,255,1]],[[119,0,64,285,0,0,255,0],[127,176,-24,160,0,1,255,1],[126,-192,16,160,315,0,255,1]],[[120,0,64,285,0,0,255,0],[127,-192,16,160,315,0,255,1]],[[121,0,64,285,0,0,255,0]],[[122,0,64,285,0,0,255,0]]],"name":"风/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[136,221,0,170],"flashDuration":5,"flashScope":2,"frame":9,"se":{"name":"Wind2","pan":0,"pitch":125,"volume":75}},{"flashColor":[187,221,170,187],"flashDuration":5,"flashScope":2,"frame":23,"se":{"name":"Magic7","pan":0,"pitch":100,"volume":90}},{"flashColor":[187,221,170,187],"flashDuration":5,"flashScope":1,"frame":23,"se":null},{"flashColor":[187,221,170,187],"flashDuration":5,"flashScope":2,"frame":29,"se":null},{"flashColor":[187,221,170,204],"flashDuration":5,"flashScope":1,"frame":29,"se":null},{"flashColor":[187,221,170,153],"flashDuration":5,"flashScope":2,"frame":35,"se":null},{"flashColor":[187,221,170,221],"flashDuration":5,"flashScope":1,"frame":35,"se":null}]}, +{"id":104,"animation1Hue":360,"animation1Name":"Special16","animation2Hue":0,"animation2Name":"Light3","frames":[[[0,0,-48,220,0,0,255,1]],[[1,0,-48,220,0,0,255,1]],[[2,0,-48,220,0,0,255,1]],[[3,0,-48,220,0,0,255,1]],[[4,0,-48,220,0,0,255,1],[17,0,-48,260,0,0,150,1]],[[5,0,-48,220,0,0,255,1],[18,0,-48,230,0,0,255,1]],[[6,0,-48,220,0,0,255,1],[19,0,-48,230,0,0,255,1]],[[20,0,-48,230,0,0,255,1],[7,0,-48,220,0,0,255,1]],[[8,0,-48,220,0,0,255,1],[22,0,-56,280,0,0,255,1]],[[9,0,-48,220,0,0,255,1],[23,0,-56,280,0,0,255,1]],[[10,0,-48,220,0,0,255,1],[24,0,-56,280,0,0,255,1]],[[11,0,-48,220,0,0,255,1],[25,0,-56,300,0,0,255,1],[100,0,-48,220,0,0,50,0]],[[12,0,-48,220,0,0,255,1],[20,0,-56,200,0,0,200,1],[22,0,-56,250,0,0,255,1],[26,0,-56,300,0,0,255,1],[100,0,-48,220,0,0,100,0]],[[13,0,-48,220,0,0,255,1],[26,0,-56,310,0,0,200,1],[-1,0,48,350,0,0,50,1],[100,0,-48,220,0,0,150,0]],[[14,0,-48,220,0,0,255,1],[26,0,-56,320,0,0,180,1],[-1,0,48,350,0,0,100,1],[100,0,-48,220,0,0,150,0]],[[15,0,-48,220,0,0,255,1],[26,0,-56,325,0,0,150,1],[-1,0,48,350,0,0,150,1],[100,0,-48,220,0,0,150,0]],[[16,0,-48,220,0,0,255,1],[26,0,-56,330,0,0,120,1],[-1,0,48,350,0,0,180,1],[100,0,-48,220,0,0,150,0]],[[26,0,-56,335,0,0,100,1],[16,0,-48,220,0,0,200,1],[-1,0,48,350,0,0,180,1],[100,0,-48,220,0,0,150,0]],[[16,0,-48,220,0,0,150,1],[26,0,-56,335,0,0,70,1],[100,0,-48,220,0,0,140,0],[101,0,-56,150,0,0,100,1]],[[16,0,-48,220,0,0,100,1],[26,0,-56,335,0,0,40,1],[100,0,-48,220,0,0,130,0],[102,0,-56,150,0,0,100,1]],[[16,0,-48,220,0,0,50,1],[100,0,-48,220,0,0,120,0],[103,0,-56,150,0,0,100,1]],[[100,0,-48,220,0,0,100,0],[104,0,-56,150,0,0,120,1]],[[100,0,-48,220,0,0,80,0],[105,0,-56,150,0,0,150,1]],[[100,0,-48,220,0,0,60,0],[106,0,-56,170,0,0,180,1]],[[100,0,-48,220,0,0,40,0],[107,0,-56,185,0,0,200,1]],[[100,0,-48,220,0,0,20,0],[108,0,-56,190,0,0,220,1]],[[109,0,-56,192,0,0,240,1]],[[110,0,-56,194,0,0,255,1],[118,0,64,285,0,0,255,1]],[[111,0,-56,196,0,0,255,1],[119,0,64,285,0,0,255,1]],[[112,0,-56,200,0,0,255,1],[120,0,64,285,0,0,255,1]],[[113,0,-56,200,0,0,255,1],[121,0,64,285,0,0,255,1]],[[114,0,-56,200,0,0,255,1],[122,0,64,285,0,0,255,1]],[[115,0,-56,200,0,0,255,1],[123,0,64,285,0,0,255,1]],[[116,0,-56,200,0,0,255,1],[124,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[125,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[126,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[123,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[124,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[125,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[126,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[123,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[124,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[125,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[126,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[123,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,255,1],[122,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,200,1],[121,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,150,1],[120,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,100,1],[119,0,64,285,0,0,255,1]],[[117,0,-56,200,0,0,50,1],[118,0,64,285,0,0,255,1]]],"name":"圣/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,187,153],"flashDuration":10,"flashScope":2,"frame":9,"se":{"name":"Saint6","pan":0,"pitch":110,"volume":75}},{"flashColor":[187,221,170,187],"flashDuration":5,"flashScope":0,"frame":19,"se":{"name":"Saint7","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,204,187],"flashDuration":10,"flashScope":2,"frame":22,"se":null},{"flashColor":[255,255,204,187],"flashDuration":3,"flashScope":0,"frame":27,"se":{"name":"Ice6","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,204,187],"flashDuration":3,"flashScope":1,"frame":30,"se":null},{"flashColor":[255,255,204,187],"flashDuration":3,"flashScope":1,"frame":33,"se":null},{"flashColor":[255,255,204,187],"flashDuration":3,"flashScope":1,"frame":36,"se":null},{"flashColor":[255,255,204,187],"flashDuration":10,"flashScope":1,"frame":39,"se":null}]}, +{"id":105,"animation1Hue":0,"animation1Name":"Special17","animation2Hue":0,"animation2Name":"Darkness3","frames":[[[0,0,-48,220,0,0,255,0]],[[1,0,-48,220,0,0,255,0]],[[2,0,-48,220,0,0,255,0]],[[3,0,-48,220,0,0,255,0]],[[4,0,-48,220,0,0,255,0],[17,0,-48,260,0,0,150,0]],[[5,0,-48,220,0,0,255,0],[18,0,-48,230,0,0,255,0]],[[6,0,-48,220,0,0,255,0],[19,0,-48,230,0,0,255,0]],[[20,0,-48,230,0,0,255,0],[7,0,-48,220,0,0,255,0]],[[8,0,-48,220,0,0,255,0],[22,0,-56,280,0,0,255,0]],[[9,0,-48,220,0,0,255,0],[23,0,-56,280,0,0,255,0]],[[10,0,-48,220,0,0,255,0],[24,0,-56,280,0,0,255,0]],[[11,0,-48,220,0,0,255,0],[25,0,-56,300,0,0,255,0],[100,-16,-56,210,0,0,50,0]],[[12,0,-48,220,0,0,255,0],[20,0,-56,200,0,0,200,0],[22,0,-56,250,0,0,255,0],[26,0,-56,300,0,0,255,0],[100,-16,-56,210,0,0,100,0]],[[13,0,-48,220,0,0,255,0],[26,0,-56,310,0,0,200,0],[125,0,48,350,0,0,50,0],[100,-16,-56,210,0,0,150,0]],[[14,0,-48,220,0,0,255,0],[26,0,-56,320,0,0,180,0],[125,0,48,350,0,0,100,0],[100,-16,-56,210,0,0,150,0]],[[15,0,-48,220,0,0,255,0],[26,0,-56,325,0,0,150,0],[125,0,48,350,0,0,150,0],[100,-16,-56,210,0,0,150,0]],[[16,0,-48,220,0,0,255,0],[26,0,-56,330,0,0,120,0],[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,150,0]],[[26,0,-56,335,0,0,100,0],[16,0,-48,220,0,0,200,0],[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,150,0]],[[16,0,-48,220,0,0,150,0],[26,0,-56,335,0,0,70,0],[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,140,0]],[[16,0,-48,220,0,0,100,0],[26,0,-56,335,0,0,40,0],[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,130,0],[101,0,-88,100,0,0,255,0]],[[16,0,-48,220,0,0,50,0],[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,120,0],[101,0,-104,140,0,0,255,0]],[[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,100,0],[101,0,-112,160,0,0,255,0]],[[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,80,0],[101,0,-110,160,0,0,255,0]],[[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,60,0],[101,0,-107,160,0,0,255,0]],[[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,40,0],[101,0,-104,160,0,0,255,0]],[[125,0,48,350,0,0,180,0],[100,-16,-56,210,0,0,20,0],[102,0,-96,200,0,0,255,0]],[[103,0,-88,250,0,0,255,0]],[[104,0,-80,300,0,0,255,0]],[[105,0,-72,320,0,0,255,0]],[[106,0,-64,330,0,0,255,0]],[[107,0,-64,340,0,0,255,0]],[[108,0,-64,350,0,0,255,0]],[[109,0,-64,350,0,0,255,0]],[[111,0,-64,350,0,0,255,0]],[[112,0,-64,350,0,0,255,0]],[[113,0,-64,350,0,0,255,0]],[[114,0,-64,350,0,0,255,0]],[[115,0,-64,350,0,0,255,0]],[[116,0,-64,350,0,0,255,0]],[[117,0,-64,350,0,0,255,0]],[[118,0,-64,350,0,0,255,0]],[[119,0,-64,350,0,0,255,0]],[[120,0,-64,350,0,0,255,0]],[[121,0,-64,350,0,0,255,0]],[[122,0,-64,350,0,0,255,0]],[[123,0,-64,350,0,0,255,0]],[[124,0,-64,350,0,0,255,0]],[[110,0,-64,350,0,0,255,0]],[[111,0,-64,350,0,0,255,0]],[[112,0,-64,350,0,0,255,0]],[[113,0,-64,350,0,0,255,0]],[[114,0,-64,350,0,0,255,0]],[[115,0,-64,350,0,0,255,0]],[[116,0,-64,350,0,0,255,0]],[[117,0,-64,350,0,0,255,0]],[[118,0,-64,350,0,0,255,0]],[[119,0,-64,350,0,0,255,0]],[[120,0,-64,350,0,0,255,0]],[[121,0,-64,350,0,0,200,0]],[[122,0,-64,350,0,0,150,0]],[[123,0,-64,350,0,0,100,0]],[[124,0,-64,350,0,0,50,0]]],"name":"暗/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind2","pan":0,"pitch":70,"volume":65}},{"flashColor":[255,34,0,136],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic1","pan":0,"pitch":100,"volume":80}},{"flashColor":[153,51,102,153],"flashDuration":10,"flashScope":2,"frame":9,"se":{"name":"Magic6","pan":0,"pitch":90,"volume":75}},{"flashColor":[187,221,170,187],"flashDuration":5,"flashScope":0,"frame":25,"se":{"name":"Darkness8","pan":0,"pitch":100,"volume":90}},{"flashColor":[170,51,136,187],"flashDuration":10,"flashScope":1,"frame":34,"se":null},{"flashColor":[51,0,34,187],"flashDuration":15,"flashScope":2,"frame":34,"se":{"name":"Thunder4","pan":0,"pitch":70,"volume":90}},{"flashColor":[170,51,136,187],"flashDuration":10,"flashScope":1,"frame":46,"se":null},{"flashColor":[51,0,34,187],"flashDuration":10,"flashScope":2,"frame":46,"se":null}]}, +{"id":106,"animation1Hue":0,"animation1Name":"Meteor","animation2Hue":0,"animation2Name":"Gun2","frames":[[[0,160,-128,150,0,0,100,0]],[[0,160,-128,130,0,0,150,0]],[[0,160,-128,120,0,0,180,0]],[[0,160,-128,110,0,0,200,0]],[[0,160,-128,105,0,0,200,0],[2,-160,0,150,0,0,100,0]],[[0,160,-128,100,0,0,200,0],[2,-160,0,130,0,0,150,0]],[[0,160,-128,100,0,0,150,0],[2,-160,0,120,0,0,180,0]],[[0,160,-128,100,0,0,100,0],[2,-160,0,110,0,0,200,0]],[[0,160,-128,100,0,0,50,0],[2,-160,0,105,0,0,200,0],[0,-160,-128,150,0,0,100,0]],[[0,160,-128,100,0,0,20,0],[2,-160,0,100,0,0,200,0],[0,-160,-128,130,0,0,150,0]],[[2,-160,0,100,0,0,150,0],[0,-160,-128,120,0,0,180,0]],[[2,-160,0,100,0,0,100,0],[0,-160,-128,110,0,0,200,0]],[[2,-160,0,100,0,0,50,0],[0,-160,-128,105,0,0,200,0],[2,160,0,150,0,0,100,0]],[[2,-160,0,100,0,0,20,0],[0,-160,-128,100,0,0,200,0],[2,160,0,130,0,0,150,0]],[[0,-160,-128,100,0,0,150,0],[2,160,0,120,0,0,180,0]],[[0,-160,-128,100,0,0,100,0],[2,160,0,110,0,0,200,0]],[[0,-160,-128,100,0,0,50,0],[2,160,0,105,0,0,200,0],[1,0,-64,200,0,0,100,0]],[[0,-160,-128,100,0,0,20,0],[2,160,0,100,0,0,200,0],[1,0,-64,180,0,0,150,0]],[[2,160,0,100,0,0,150,0],[1,0,-64,170,0,0,180,0]],[[2,160,0,100,0,0,100,0],[1,0,-64,160,0,0,200,0]],[[2,160,0,100,0,0,50,0],[1,0,-64,155,0,0,200,0]],[[2,160,0,100,0,0,20,0],[1,0,-64,152,0,0,200,0]],[[1,0,-64,150,0,0,200,0]],[[1,0,-64,150,0,0,200,0]],[[1,0,-64,150,0,0,255,0],[103,0,-64,200,0,0,255,1],[1,0,-64,150,0,0,150,1]],[[1,0,-64,150,0,0,255,0],[1,0,-64,180,0,0,200,1],[104,0,-64,285,0,0,255,1]],[[1,0,-64,190,0,0,150,1],[105,0,-64,285,0,0,255,1]],[[1,0,-64,195,0,0,100,0],[106,0,-64,285,0,0,255,1]],[[1,0,-64,200,0,0,60,0],[107,0,-64,285,0,0,255,1]],[[1,0,-64,203,0,0,30,0],[108,0,-64,285,0,0,255,1]],[[109,0,-64,285,0,0,255,1]],[[110,0,-64,285,0,0,255,1]],[[111,0,-64,285,0,0,255,1]],[[112,0,-64,285,0,0,255,1]],[[112,0,-64,280,0,0,150,1],[3,104,-56,160,0,0,255,0]],[[112,0,-64,275,0,0,50,1],[4,104,-56,160,0,0,255,0]],[[5,104,-56,160,0,0,255,0],[3,-112,-64,160,0,0,255,0],[15,80,56,200,0,0,255,1]],[[6,104,-56,160,0,0,255,0],[4,-112,-64,160,0,0,255,0],[16,80,56,200,0,0,255,1]],[[7,104,-56,160,0,0,255,0],[5,-112,-64,160,0,0,255,0],[3,160,-56,180,0,0,255,0],[17,80,56,200,0,0,255,1],[15,-136,48,200,0,0,255,1]],[[8,104,-56,160,0,0,255,0],[6,-112,-64,160,0,0,255,0],[4,160,-56,180,0,0,255,0],[3,-224,-56,180,0,0,255,0],[18,80,56,200,0,0,255,1],[16,-136,48,200,0,0,255,1]],[[9,104,-56,160,0,0,255,0],[7,-112,-64,160,0,0,255,0],[5,160,-56,180,0,0,255,0],[4,-224,-56,180,0,0,255,0],[19,80,56,200,0,0,255,1],[17,-136,48,200,0,0,255,1],[15,128,64,220,0,0,255,1]],[[10,104,-56,160,0,0,255,0],[8,-112,-64,160,0,0,255,0],[6,160,-56,180,0,0,255,0],[5,-224,-56,180,0,0,255,0],[20,80,56,200,0,0,255,1],[18,-136,48,200,0,0,255,1],[15,-256,64,220,0,0,255,1],[16,128,64,220,0,0,255,1]],[[11,104,-56,160,0,0,255,0],[9,-112,-64,160,0,0,255,0],[7,160,-56,180,0,0,255,0],[6,-224,-56,180,0,0,255,0],[21,80,56,200,0,0,255,1],[19,-136,48,200,0,0,255,1],[16,-256,64,220,0,0,255,1],[17,128,64,220,0,0,255,1]],[[12,104,-56,160,0,0,255,0],[10,-112,-64,160,0,0,255,0],[8,160,-56,180,0,0,255,0],[7,-224,-56,180,0,0,255,0],[20,-136,48,200,0,0,255,1],[17,-256,64,220,0,0,255,1],[18,128,64,220,0,0,255,1]],[[13,104,-56,160,0,0,255,0],[11,-112,-64,160,0,0,255,0],[9,160,-56,180,0,0,255,0],[8,-224,-56,180,0,0,255,0],[3,-8,-72,200,0,0,255,0],[21,-136,48,200,0,0,255,1],[18,-256,64,220,0,0,255,1],[19,128,64,220,0,0,255,1]],[[14,104,-56,160,0,0,255,0],[12,-112,-64,160,0,0,255,0],[10,160,-56,180,0,0,255,0],[9,-224,-56,180,0,0,255,0],[4,-8,-72,200,0,0,255,0],[19,-256,64,220,0,0,255,1],[20,128,64,220,0,0,255,1]],[[13,-112,-64,160,0,0,255,0],[11,160,-56,180,0,0,255,0],[10,-224,-56,180,0,0,255,0],[5,-8,-72,200,0,0,255,0],[20,-256,64,220,0,0,255,1],[21,128,64,220,0,0,255,1],[15,-48,64,240,0,0,255,1]],[[14,-112,-64,160,0,0,255,0],[12,160,-56,180,0,0,255,0],[11,-224,-56,180,0,0,255,0],[6,-8,-72,200,0,0,255,0],[3,-168,-56,160,0,0,255,0],[21,-256,64,220,0,0,255,1],[16,-48,64,240,0,0,255,1]],[[13,160,-56,180,0,0,255,0],[12,-224,-56,180,0,0,255,0],[3,72,-56,160,0,0,255,0],[7,-8,-72,200,0,0,255,0],[4,-168,-56,160,0,0,255,0],[17,-48,64,240,0,0,255,1]],[[14,160,-56,180,0,0,255,0],[13,-224,-56,180,0,0,255,0],[4,72,-56,160,0,0,255,0],[8,-8,-72,200,0,0,255,0],[5,-168,-56,160,0,0,255,0],[18,-48,64,240,0,0,255,1],[15,-200,56,200,0,0,255,1]],[[14,-224,-56,180,0,0,255,0],[9,-8,-72,200,0,0,255,0],[5,72,-56,160,0,0,255,0],[6,-168,-56,160,0,0,255,0],[3,208,-56,180,0,0,255,0],[19,-48,64,240,0,0,255,1],[16,-200,56,200,0,0,255,1],[15,48,56,200,0,0,255,1]],[[10,-8,-72,200,0,0,255,0],[6,72,-56,160,0,0,255,0],[7,-168,-56,160,0,0,255,0],[4,208,-56,180,0,0,255,0],[20,-48,64,240,0,0,255,1],[17,-200,56,200,0,0,255,1],[16,48,56,200,0,0,255,1]],[[11,-8,-72,200,0,0,255,0],[8,-168,-56,160,0,0,255,0],[7,72,-56,160,0,0,255,0],[5,208,-56,180,0,0,255,0],[3,-128,-72,200,0,0,255,0],[21,-48,64,240,0,0,255,1],[18,-200,56,200,0,0,255,1],[17,48,56,200,0,0,255,1],[15,176,64,220,0,0,255,1]],[[12,-8,-72,200,0,0,255,0],[9,-168,-56,160,0,0,255,0],[6,208,-56,180,0,0,255,0],[8,72,-56,160,0,0,255,0],[4,-128,-72,200,0,0,255,0],[3,-272,-56,160,0,0,255,0],[19,-200,56,200,0,0,255,1],[18,48,56,200,0,0,255,1],[16,176,64,220,0,0,255,1]],[[13,-8,-72,200,0,0,255,0],[10,-168,-56,160,0,0,255,0],[7,208,-56,180,0,0,255,0],[9,72,-56,160,0,0,255,0],[5,-128,-72,200,0,0,255,0],[4,-272,-56,160,0,0,255,0],[20,-200,56,200,0,0,255,1],[19,48,56,200,0,0,255,1],[17,176,64,220,0,0,255,1],[15,-168,64,240,0,0,255,1]],[[14,-8,-72,200,0,0,255,0],[11,-168,-56,160,0,0,255,0],[8,208,-56,180,0,0,255,0],[10,72,-56,160,0,0,255,0],[6,-128,-72,200,0,0,255,0],[5,-272,-56,160,0,0,255,0],[21,-200,56,200,0,0,255,1],[20,48,56,200,0,0,255,1],[18,176,64,220,0,0,255,1],[16,-168,64,240,0,0,255,1]],[[12,-168,-56,160,0,0,255,0],[9,208,-56,180,0,0,255,0],[11,72,-56,160,0,0,255,0],[7,-128,-72,200,0,0,255,0],[6,-272,-56,160,0,0,255,0],[21,48,56,200,0,0,255,1],[19,176,64,220,0,0,255,1],[17,-168,64,240,0,0,255,1]],[[13,-168,-56,160,0,0,255,0],[10,208,-56,180,0,0,255,0],[12,72,-56,160,0,0,255,0],[8,-128,-72,200,0,0,255,0],[7,-272,-56,160,0,0,255,0],[20,176,64,220,0,0,255,1],[18,-168,64,240,0,0,255,1]],[[14,-168,-56,160,0,0,255,0],[11,208,-56,180,0,0,255,0],[9,-128,-72,200,0,0,255,0],[13,72,-56,160,0,0,255,0],[8,-272,-56,160,0,0,255,0],[21,176,64,220,0,0,255,1],[19,-168,64,240,0,0,255,1]],[[12,208,-56,180,0,0,255,0],[10,-128,-72,200,0,0,255,0],[14,72,-56,160,0,0,255,0],[9,-272,-56,160,0,0,255,0],[20,-168,64,240,0,0,255,1]],[[13,208,-56,180,0,0,255,0],[11,-128,-72,200,0,0,255,0],[10,-272,-56,160,0,0,255,0],[21,-168,64,240,0,0,255,1]],[[14,208,-56,180,0,0,255,0],[12,-128,-72,200,0,0,255,0],[11,-272,-56,160,0,0,255,0]],[[13,-128,-72,200,0,0,255,0],[12,-272,-56,160,0,0,255,0]],[[14,-128,-72,200,0,0,255,0],[13,-272,-56,160,0,0,255,0]],[[14,-272,-56,160,0,0,255,0]]],"name":"无属性/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder7","pan":0,"pitch":80,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":23,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,221,187],"flashDuration":8,"flashScope":2,"frame":24,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":34,"se":{"name":"Explosion3","pan":0,"pitch":90,"volume":90}},{"flashColor":[255,221,102,204],"flashDuration":3,"flashScope":2,"frame":36,"se":null},{"flashColor":[255,187,102,204],"flashDuration":5,"flashScope":1,"frame":37,"se":{"name":"Fire9","pan":0,"pitch":130,"volume":95}},{"flashColor":[255,102,68,221],"flashDuration":5,"flashScope":1,"frame":40,"se":{"name":"Fire9","pan":0,"pitch":130,"volume":95}},{"flashColor":[255,221,102,204],"flashDuration":3,"flashScope":2,"frame":41,"se":null},{"flashColor":[255,204,0,221],"flashDuration":5,"flashScope":1,"frame":46,"se":{"name":"Fire9","pan":0,"pitch":130,"volume":95}},{"flashColor":[255,204,102,170],"flashDuration":3,"flashScope":2,"frame":50,"se":null},{"flashColor":[255,153,51,238],"flashDuration":5,"flashScope":1,"frame":50,"se":{"name":"Fire9","pan":0,"pitch":130,"volume":95}},{"flashColor":[255,221,51,204],"flashDuration":3,"flashScope":1,"frame":52,"se":{"name":"Fire9","pan":0,"pitch":130,"volume":95}},{"flashColor":[255,170,85,153],"flashDuration":3,"flashScope":2,"frame":54,"se":null},{"flashColor":[255,153,119,221],"flashDuration":5,"flashScope":1,"frame":55,"se":{"name":"Fire9","pan":0,"pitch":130,"volume":95}}]}, +{"id":107,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-88,130,0,0,255,1]],[[1,0,-88,130,0,0,255,1]],[[2,0,-88,130,0,0,255,1]],[[3,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,50,1]],[[4,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,100,1]],[[5,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,200,1]],[[6,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[7,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[5,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[6,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[7,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[8,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[9,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[10,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[11,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[12,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[13,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[14,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[15,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[16,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[17,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[19,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[20,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[21,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[22,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[23,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[19,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[20,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[21,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[22,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[23,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,200,1],[24,0,-88,130,0,0,200,1]],[[19,0,-88,130,0,0,150,1],[25,0,-88,130,0,0,150,1]],[[20,0,-88,130,0,0,100,1],[26,0,-88,130,0,0,100,1]],[[21,0,-88,130,0,0,50,1],[27,0,-88,130,0,0,50,1]]],"name":"泛用/光柱1","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic2","pan":0,"pitch":150,"volume":70}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":7,"se":{"name":"Saint7","pan":0,"pitch":110,"volume":80}}]}, +{"id":108,"animation1Hue":0,"animation1Name":"Light5","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-88,130,0,0,255,1]],[[1,0,-88,130,0,0,255,1]],[[2,0,-88,130,0,0,255,1]],[[3,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,50,1]],[[4,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,100,1]],[[5,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,200,1]],[[6,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[7,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[5,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[6,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[7,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[8,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[9,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[10,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[11,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[12,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[13,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[14,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[15,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[16,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[17,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[19,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[20,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[21,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[22,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[23,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[19,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[20,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[21,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[22,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[23,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,200,1],[24,0,-88,130,0,0,200,1]],[[19,0,-88,130,0,0,150,1],[25,0,-88,130,0,0,150,1]],[[20,0,-88,130,0,0,100,1],[26,0,-88,130,0,0,100,1]],[[21,0,-88,130,0,0,50,1],[27,0,-88,130,0,0,50,1]]],"name":"泛用/光柱2","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic2","pan":0,"pitch":150,"volume":70}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":7,"se":{"name":"Saint7","pan":0,"pitch":110,"volume":80}}]}, +{"id":109,"animation1Hue":0,"animation1Name":"Light6","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,250,0,0,255,1]],[[1,0,0,250,0,0,255,1]],[[2,0,0,250,0,0,255,1]],[[3,0,0,250,0,0,255,1]],[[4,0,0,250,0,0,255,1]],[[5,0,0,250,0,0,255,1]],[[6,0,0,250,0,0,255,1]],[[7,0,0,250,0,0,255,1]],[[8,0,0,250,0,0,255,1]],[[9,0,0,250,0,0,255,1]],[[10,0,0,250,0,0,255,1]],[[11,0,0,250,0,0,255,1]],[[12,0,0,250,0,0,255,1]],[[13,0,0,250,0,0,255,1]],[[14,0,0,250,0,0,255,1]],[[15,0,0,250,0,0,255,1]],[[16,0,0,250,0,0,255,1]],[[17,0,0,250,0,0,255,1]],[[18,0,0,250,0,0,255,1]],[[19,0,0,250,0,0,255,1]],[[20,0,0,250,0,0,255,1]],[[21,0,0,250,0,0,255,1]],[[22,0,0,250,0,0,255,1]],[[23,0,0,250,0,0,255,1]],[[24,0,0,250,0,0,255,1]],[[25,0,0,250,0,0,255,1]],[[26,0,0,250,0,0,255,1]],[[27,0,0,250,0,0,255,1]],[[28,0,0,250,0,0,255,1]],[[29,0,0,250,0,0,255,1]]],"name":"泛用/光球","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Saint4","pan":0,"pitch":95,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":11,"se":{"name":"Ice1","pan":0,"pitch":70,"volume":80}}]}, +{"id":110,"animation1Hue":0,"animation1Name":"Light7","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,120,0,0,255,1]],[[0,0,0,200,0,0,255,1]],[[1,0,0,200,0,0,255,1]],[[2,0,0,200,0,0,255,1]],[[3,0,0,200,0,0,255,1]],[[4,0,0,200,0,0,255,1]],[[5,0,0,200,0,0,255,1]],[[6,0,0,200,0,0,255,1]],[[7,0,0,200,0,0,255,1]],[[8,0,0,200,0,0,255,1]],[[9,0,0,200,0,0,255,1]],[[10,0,0,200,0,0,255,1]],[[11,0,0,200,0,0,255,1]],[[12,0,0,200,0,0,255,1]],[[13,0,0,200,0,0,255,1]],[[14,0,0,200,0,0,255,1]],[[15,0,0,200,0,0,255,1]],[[16,0,0,200,0,0,255,1]],[[17,0,0,200,0,0,255,1]],[[18,0,0,200,0,0,255,1]],[[19,0,0,200,0,0,255,1]],[[20,0,0,200,0,0,255,1]],[[21,0,0,200,0,0,255,1]],[[22,0,0,200,0,0,255,1]],[[23,0,0,200,0,0,255,1]],[[24,0,0,200,0,0,255,1]],[[25,0,0,200,0,0,255,1]],[[26,0,0,200,0,0,255,1]],[[27,0,0,200,0,0,200,1]],[[28,0,0,200,0,0,180,1]],[[29,0,0,200,0,0,150,1]]],"name":"泛用/放射线","position":1,"timings":[{"flashColor":[255,255,204,204],"flashDuration":10,"flashScope":2,"frame":0,"se":{"name":"Ice7","pan":0,"pitch":125,"volume":80}}]}, +{"id":111,"animation1Hue":0,"animation1Name":"测试2","animation2Hue":0,"animation2Name":"timg2","frames":[[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]],[[0,0,0,100,0,0,255,1]]],"name":"蝙蝠","position":1,"timings":[]}, +{"id":112,"animation1Hue":0,"animation1Name":"timg2","animation2Hue":0,"animation2Name":"Attack2","frames":[[[1,144,80,100,0,0,255,1]],[[1,104,64,100,0,0,255,1]],[[1,56,24,100,0,0,255,1]],[[1,16,0,100,0,0,255,1]],[[100,0,0,100,0,0,255,1]],[[101,0,0,100,0,0,255,1]],[[102,0,0,100,0,0,255,1]],[[103,0,0,100,0,0,255,1]],[[104,0,0,100,0,0,255,1]],[[105,0,0,100,0,0,255,1]],[[106,0,8,100,0,0,255,1]],[[107,0,8,100,0,0,255,1]]],"name":"板砖","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":4,"se":{"name":"Bite","pan":0,"pitch":135,"volume":80}}]}, +{"id":113,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"魔法8","frames":[[[0,0,-88,130,0,0,255,1]],[[1,0,-88,130,0,0,255,1]],[[2,0,-88,130,0,0,255,1]],[[3,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,50,1]],[[4,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,100,1]],[[5,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,200,1]],[[6,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[7,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[5,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[6,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[7,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[8,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[9,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[10,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[11,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[12,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[13,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[14,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[15,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[16,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[17,0,-88,130,0,0,255,1],[29,0,-88,130,0,0,255,1]],[[18,0,-88,130,0,0,255,1],[24,0,-88,130,0,0,255,1]],[[19,0,-88,130,0,0,255,1],[25,0,-88,130,0,0,255,1]],[[20,0,-88,130,0,0,255,1],[26,0,-88,130,0,0,255,1]],[[21,0,-88,130,0,0,255,1],[27,0,-88,130,0,0,255,1]],[[22,0,-88,130,0,0,255,1],[28,0,-88,130,0,0,255,1]],[[104,0,-96,100,0,0,255,1]],[[104,0,-97,108,0,0,255,1]],[[104,0,-98,116,0,0,255,1]],[[104,0,-99,124,0,0,255,1]],[[104,0,-101,132,0,0,255,1]],[[104,0,-102,140,0,0,255,1]],[[104,1,-103,148,0,0,255,1]],[[104,1,-105,156,0,0,255,1]],[[104,1,-106,165,0,0,255,1]],[[104,1,-107,173,0,0,255,1]],[[104,1,-109,181,0,0,255,1]],[[104,2,-110,189,0,0,255,1]],[[104,2,-111,197,0,0,255,1]],[[104,2,-112,205,0,0,255,1]],[[104,2,-114,213,0,0,255,1]],[[104,2,-115,222,0,0,255,1]],[[104,2,-116,230,0,0,255,1]],[[104,3,-118,238,0,0,255,1]],[[104,3,-119,246,0,0,255,1]],[[104,3,-120,254,0,0,255,1]],[[104,3,-122,262,0,0,255,1]],[[104,3,-123,270,0,0,255,1]],[[104,4,-124,279,0,0,255,1]],[[104,4,-125,287,0,0,255,1]],[[104,4,-127,295,0,0,255,1]],[[104,4,-128,303,0,0,255,1]],[[104,4,-129,311,0,0,255,1]],[[104,5,-131,319,0,0,255,1]],[[104,5,-132,327,0,0,255,1]],[[104,5,-133,336,0,0,255,1]],[[104,5,-135,344,0,0,255,1]],[[104,5,-136,352,0,0,255,1]],[[104,5,-137,360,0,0,255,1]],[[104,6,-138,368,0,0,255,1]],[[104,6,-140,376,0,0,255,1]],[[104,6,-141,384,0,0,255,1]],[[104,6,-142,393,0,0,255,1]],[[104,6,-144,401,0,0,255,1]],[[104,7,-145,409,0,0,255,1]],[[104,7,-146,417,0,0,255,1]],[[104,7,-148,425,0,0,255,1]],[[104,7,-149,433,0,0,255,1]],[[104,7,-150,441,0,0,255,1]],[[104,8,-152,450,0,0,255,1]],[[104,8,-153,458,0,0,255,1]],[[104,8,-154,466,0,0,255,1]],[[104,8,-155,474,0,0,255,1]],[[104,8,-157,482,0,0,255,1]],[[104,8,-158,490,0,0,255,1]],[[104,9,-159,498,0,0,255,1]],[[104,9,-161,506,0,0,255,1]],[[104,9,-162,515,0,0,255,1]],[[104,9,-163,523,0,0,255,1]],[[104,9,-165,531,0,0,255,1]],[[104,10,-166,539,0,0,255,1]],[[104,10,-167,547,0,0,255,1]],[[104,10,-168,555,0,0,255,1]],[[104,10,-170,563,0,0,255,1]],[[104,10,-171,572,0,0,255,1]],[[104,10,-172,580,0,0,255,1]],[[104,11,-174,588,0,0,255,1]],[[104,11,-175,596,0,0,255,1]],[[104,11,-176,604,0,0,255,1]],[[104,11,-178,612,0,0,255,1]],[[104,11,-179,620,0,0,255,1]],[[104,12,-180,629,0,0,255,1]],[[104,12,-181,637,0,0,255,1]],[[104,12,-183,645,0,0,255,1]],[[104,12,-184,653,0,0,255,1]],[[104,12,-185,661,0,0,255,1]],[[104,13,-187,669,0,0,255,1]],[[104,13,-188,677,0,0,255,1]],[[104,13,-189,686,0,0,255,1]],[[104,13,-191,694,0,0,255,1]],[[104,13,-192,702,0,0,255,1]],[[104,13,-193,710,0,0,255,1]],[[104,14,-194,718,0,0,255,1]],[[104,14,-196,726,0,0,255,1]],[[104,14,-197,734,0,0,255,1]],[[104,14,-198,743,0,0,255,1]],[[104,14,-200,751,0,0,255,1]],[[104,15,-201,759,0,0,255,1]],[[104,15,-202,767,0,0,255,1]],[[104,15,-204,775,0,0,255,1]],[[104,15,-205,783,0,0,255,1]],[[104,15,-206,791,0,0,255,1]],[[104,16,-208,800,0,0,255,1]]],"name":"究极1","position":2,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic6","pan":0,"pitch":100,"volume":70}},{"flashColor":[255,255,255,255],"flashDuration":10,"flashScope":2,"frame":26,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":26,"se":{"name":"Thunder11","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":10,"flashScope":2,"frame":39,"se":null},{"flashColor":[255,255,255,255],"flashDuration":10,"flashScope":2,"frame":59,"se":null},{"flashColor":[255,255,255,255],"flashDuration":10,"flashScope":2,"frame":79,"se":null},{"flashColor":[255,255,255,255],"flashDuration":10,"flashScope":2,"frame":89,"se":null},{"flashColor":[255,255,255,255],"flashDuration":10,"flashScope":2,"frame":99,"se":null}]}, +{"id":114,"animation1Hue":0,"animation1Name":"Spear3","animation2Hue":0,"animation2Name":"","frames":[[[3,0,0,100,0,0,255,1]],[[4,0,0,100,0,0,255,1]],[[5,0,0,100,0,0,255,1]],[[6,0,0,100,0,0,255,1]],[[7,0,0,100,0,0,255,1]],[[8,0,0,100,0,0,255,1]],[[9,0,0,100,0,0,255,1]],[[10,0,0,100,0,0,255,1]],[[11,0,0,100,0,0,255,1]],[[12,0,0,100,0,0,255,1]],[[13,0,0,100,0,0,255,1]],[[14,0,0,100,0,0,255,1]],[[15,0,0,100,0,0,255,1]],[[16,0,0,100,0,0,255,1]],[[17,0,0,100,0,0,255,1]],[[18,0,0,100,0,0,255,1]]],"name":"魔法","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic6","pan":0,"pitch":100,"volume":80}}]}, +{"id":115,"animation1Hue":190,"animation1Name":"Special3","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,200,0,0,150,1]],[[0,0,0,180,0,0,200,1],[20,0,0,200,60,0,100,1]],[[1,0,0,180,0,0,180,1],[20,0,0,200,40,0,180,1]],[[20,0,0,200,20,0,180,1],[2,0,0,160,0,0,255,1]],[[4,0,0,150,0,0,255,1],[20,0,0,180,0,0,180,1]],[[6,0,0,150,0,0,255,1],[21,0,0,160,340,0,180,1]],[[7,0,0,150,0,0,255,1],[22,0,0,130,320,0,180,1],[8,0,0,100,0,0,255,1]],[[9,0,0,130,0,0,255,1],[23,0,0,100,300,0,180,1]],[[10,0,0,150,0,0,255,1]],[[11,0,0,170,0,0,255,1]],[[12,0,0,170,0,0,255,1]],[[13,0,0,170,0,0,255,1]],[[14,0,0,170,0,0,255,1]],[[15,0,0,170,0,0,255,1]],[[16,0,0,170,0,0,255,1]],[[17,0,0,170,0,0,200,1]],[[18,0,0,170,0,0,150,1]],[[19,0,0,170,0,0,100,1]]],"name":"摄魔","position":1,"timings":[{"flashColor":[255,102,68,153],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Absorb2","pan":0,"pitch":65,"volume":100}},{"flashColor":[255,0,0,204],"flashDuration":10,"flashScope":1,"frame":6,"se":null}]}, +{"id":116,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"Attack2","frames":[[[0,0,-8,100,0,0,255,1]],[[1,0,-8,100,0,0,255,1]],[[2,0,-8,100,0,0,255,1],[100,0,-8,150,0,0,255,1]],[[2,0,-8,110,0,0,180,1],[101,0,-8,150,0,0,255,1]],[[2,0,-8,115,0,0,100,1],[102,0,-8,150,0,0,255,1]],[[103,0,-8,160,0,0,255,1]],[[104,0,-8,150,0,0,255,1]],[[105,0,-8,150,0,0,255,1]],[[106,0,-8,150,0,0,255,1]],[[107,0,-8,150,0,0,255,1]]],"name":"格斗/炎","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Explosion4","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,119,102,221],"flashDuration":3,"flashScope":1,"frame":0,"se":null},{"flashColor":[255,136,51,153],"flashDuration":5,"flashScope":2,"frame":2,"se":null}]}, +{"id":117,"animation1Hue":50,"animation1Name":"Special5","animation2Hue":0,"animation2Name":"","frames":[[[0,-152,-24,400,0,0,50,1],[1,176,-24,400,0,0,50,1]],[[0,-136,-24,400,0,0,100,1],[1,160,-24,400,0,0,100,1]],[[0,-120,-24,400,0,0,125,1],[1,144,-24,400,0,0,125,1]],[[0,-104,-24,400,0,0,125,1],[1,128,-24,400,0,0,125,1]],[[0,-88,-24,400,0,0,125,1],[1,112,-24,400,0,0,125,1]],[[0,-72,-24,400,0,0,125,1],[1,96,-24,400,0,0,125,1]],[[0,-56,-24,400,0,0,125,1],[1,80,-24,400,0,0,125,1]],[[0,-40,-24,400,0,0,125,1],[1,64,-24,400,0,0,125,1]],[[0,-24,-24,400,0,0,125,1],[1,48,-24,400,0,0,125,1]],[[0,-8,-24,400,0,0,125,1],[1,32,-24,400,0,0,125,1]],[[0,8,-24,400,0,0,125,1],[1,16,-24,400,0,0,125,1]],[[0,24,-24,400,0,0,125,1],[1,0,-24,400,0,0,125,1]],[[0,40,-24,400,0,0,125,1],[1,-16,-24,400,0,0,125,1]],[[0,48,-24,400,0,0,100,1],[1,-32,-24,400,0,0,100,1]],[[0,48,-24,400,0,0,50,1],[1,-48,-24,400,0,0,50,1]]],"name":"雾","position":3,"timings":[{"flashColor":[136,153,170,204],"flashDuration":15,"flashScope":1,"frame":0,"se":{"name":"Fog1","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,170],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Sand","pan":0,"pitch":110,"volume":90}}]}, +{"id":118,"animation1Hue":60,"animation1Name":"Special5","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-120,100,0,0,255,1],[0,-192,-64,100,0,0,255,1],[0,192,-64,100,0,0,255,1]],[[1,0,-120,100,0,0,255,1],[1,-192,-64,100,0,0,255,1],[1,192,-64,100,0,0,255,1]],[[2,0,-112,130,0,0,255,1],[2,-184,-56,130,0,0,255,1],[2,192,-56,130,0,0,255,1]],[[3,0,-112,130,0,0,255,1],[3,-184,-56,130,0,0,255,1],[3,192,-56,130,0,0,255,1]],[[4,0,-112,130,0,0,255,1],[4,-184,-56,130,0,0,255,1],[4,192,-56,130,0,0,255,1]],[[5,0,-112,130,0,0,255,1],[5,-184,-56,130,0,0,255,1],[5,192,-56,130,0,0,255,1],[0,-112,-112,100,0,0,255,1],[0,112,-112,100,0,0,255,1]],[[6,0,-112,130,0,0,255,1],[6,-184,-56,130,0,0,255,1],[6,192,-56,130,0,0,255,1],[1,-112,-112,100,0,0,255,1],[1,112,-112,100,0,0,255,1]],[[7,0,-112,130,0,0,255,1],[7,-184,-56,130,0,0,255,1],[7,192,-56,130,0,0,255,1],[2,-112,-104,130,0,0,255,1],[2,112,-104,130,0,0,255,1]],[[8,0,-112,130,0,0,255,1],[8,-184,-56,130,0,0,255,1],[8,192,-56,130,0,0,255,1],[3,-112,-104,130,0,0,255,1],[3,112,-104,130,0,0,255,1]],[[9,0,-112,140,0,0,200,1],[9,-184,-56,140,0,0,200,1],[9,192,-56,140,0,0,200,1],[4,-112,-104,130,0,0,255,1],[4,112,-104,130,0,0,255,1]],[[10,0,-112,142,0,0,255,1],[10,-184,-56,142,0,0,255,1],[10,192,-56,142,0,0,255,1],[5,-112,-104,130,0,0,255,1],[5,112,-104,130,0,0,255,1]],[[11,-184,-56,142,0,0,255,1],[11,192,-56,142,0,0,255,1],[11,0,-112,142,0,0,255,1],[6,-112,-104,130,0,0,255,1],[6,112,-104,130,0,0,255,1]],[[12,-184,-56,142,0,0,255,1],[12,192,-56,142,0,0,255,1],[12,0,-112,142,0,0,255,1],[7,-112,-104,130,0,0,255,1],[7,112,-104,130,0,0,255,1],[8,0,-16,130,0,0,100,1]],[[13,-184,-56,142,0,0,255,1],[13,192,-56,142,0,0,255,1],[13,0,-112,142,0,0,255,1],[8,-112,-104,130,0,0,255,1],[8,112,-104,130,0,0,255,1],[9,0,-16,130,0,0,150,1]],[[9,-112,-104,130,0,0,255,1],[9,112,-104,130,0,0,255,1],[10,0,-16,130,0,0,255,1]],[[10,-112,-104,130,0,0,255,1],[10,112,-104,130,0,0,255,1],[11,0,-16,130,0,0,255,1]],[[11,-112,-104,130,0,0,255,1],[11,112,-104,130,0,0,255,1],[12,0,-16,130,0,0,255,1]],[[12,-112,-104,130,0,0,255,1],[12,112,-104,130,0,0,255,1],[13,0,-16,130,0,0,255,1]],[[13,-112,-104,130,0,0,255,1],[13,112,-104,130,0,0,255,1]],[]],"name":"花粉","position":3,"timings":[{"flashColor":[238,136,204,187],"flashDuration":25,"flashScope":2,"frame":0,"se":{"name":"Saint8","pan":0,"pitch":125,"volume":90}},{"flashColor":[255,85,238,204],"flashDuration":2,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,85,238,204],"flashDuration":2,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,85,238,187],"flashDuration":2,"flashScope":1,"frame":7,"se":null},{"flashColor":[255,85,238,170],"flashDuration":2,"flashScope":1,"frame":9,"se":null},{"flashColor":[255,85,238,153],"flashDuration":2,"flashScope":1,"frame":11,"se":null}]}, +{"id":119,"animation1Hue":0,"animation1Name":"Darkness1","animation2Hue":0,"animation2Name":"","frames":[[[1,0,0,130,0,0,255,0]],[[2,0,0,150,0,0,255,0],[2,0,0,200,0,0,150,0],[4,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0],[5,0,0,200,0,1,255,1],[2,0,0,210,0,0,100,0]],[[0,0,0,150,0,0,255,0],[6,0,0,200,0,1,255,1]],[[1,0,0,150,0,0,255,0],[7,0,0,200,0,1,255,1]],[[2,0,0,150,0,0,255,0],[8,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0]],[[0,0,0,150,0,0,255,0]],[[1,0,0,150,0,0,255,0]],[[2,0,0,150,0,0,255,0],[4,0,0,200,90,1,255,1]],[[1,0,0,130,0,0,255,0]],[[2,0,0,150,0,0,255,0],[2,0,0,200,0,0,150,0],[4,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0],[5,0,0,200,0,1,255,1],[2,0,0,210,0,0,100,0]],[[0,0,0,150,0,0,255,0],[6,0,0,200,0,1,255,1]],[[1,0,0,150,0,0,255,0],[7,0,0,200,0,1,255,1]],[[2,0,0,150,0,0,255,0],[8,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0]],[[0,0,0,150,0,0,255,0]],[[1,0,0,150,0,0,255,0]],[[2,0,0,150,0,0,255,0],[4,0,0,200,90,1,255,1]]],"name":"暗/单体","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Darkness3","pan":0,"pitch":100,"volume":100}},{"flashColor":[238,102,221,170],"flashDuration":5,"flashScope":2,"frame":2,"se":null},{"flashColor":[255,102,221,153],"flashDuration":5,"flashScope":2,"frame":10,"se":null},{"flashColor":[255,102,221,153],"flashDuration":5,"flashScope":2,"frame":18,"se":null}]}, +{"id":120,"animation1Hue":0,"animation1Name":"Special4","animation2Hue":0,"animation2Name":"","frames":[[[0,96,-72,100,0,0,255,1],[3,64,-64,200,0,0,255,1]],[[0,90,-73,100,0,0,255,1],[4,64,-64,200,0,0,255,1]],[[0,84,-75,100,0,0,255,1],[4,64,-64,200,0,0,255,1]],[[0,78,-77,100,0,0,255,1],[4,64,-64,200,0,0,255,1]],[[0,73,-78,100,0,0,255,1],[5,64,-64,200,0,0,255,1]],[[0,67,-80,100,0,0,255,1],[-1,-248,-96,100,0,0,255,1],[8,64,-64,200,0,0,255,1]],[[0,61,-82,100,0,0,255,1],[6,64,-64,200,0,0,255,1]],[[0,56,-84,100,0,0,255,1],[6,64,-64,200,0,0,255,1]],[[0,50,-85,100,0,0,255,1],[7,64,-64,200,0,0,255,1]],[[0,44,-87,100,0,0,255,1],[7,64,-64,200,0,0,255,1]],[[0,38,-89,100,0,0,255,1],[8,64,-64,200,0,0,255,1]],[[0,33,-90,100,0,0,255,1],[8,64,-64,200,0,0,255,1]],[[0,27,-92,100,0,0,255,1],[9,64,-64,200,0,0,255,1]],[[0,21,-94,100,0,0,255,1],[-1,64,-64,200,0,0,255,1],[8,64,-64,200,0,0,255,1]],[[0,16,-96,100,0,0,255,1],[10,64,-64,200,0,0,255,1]],[[0,20,-94,100,0,0,255,1],[9,64,-64,200,0,0,255,1]],[[0,25,-93,100,0,0,255,1],[9,64,-64,200,0,0,255,1]],[[0,30,-91,100,0,0,255,1],[-1,64,-64,200,0,0,255,1],[4,64,-64,200,0,0,255,1]],[[0,34,-90,100,0,0,255,1],[8,64,-64,200,0,0,255,1]],[[0,39,-88,100,0,0,255,1],[7,64,-64,200,0,0,255,1]],[[0,44,-87,100,0,0,255,1],[7,64,-64,200,0,0,255,1]],[[0,48,-86,100,0,0,255,1],[7,64,-64,200,0,0,255,1]],[[0,53,-84,100,0,0,255,1],[6,64,-64,200,0,0,255,1]],[[0,58,-83,100,0,0,255,1],[6,64,-64,200,0,0,255,1]],[[0,63,-81,100,0,0,255,1],[5,64,-64,200,0,0,255,1]],[[0,67,-80,100,0,0,255,1],[5,64,-64,200,0,0,255,1]],[[0,72,-79,100,0,0,255,1],[5,64,-64,200,0,0,255,1]],[[0,77,-77,100,0,0,255,1],[4,64,-64,200,0,0,255,1]],[[0,81,-76,100,0,0,255,1],[4,64,-64,200,0,0,255,1]],[[0,86,-74,100,0,0,255,1],[3,64,-64,200,0,0,255,1]],[[0,91,-73,100,0,0,255,1],[3,64,-64,200,0,0,255,1]],[[0,96,-72,100,0,0,255,1],[3,64,-64,200,0,0,255,1]]],"name":"","position":1,"timings":[]}, +{"id":121,"animation1Hue":0,"animation1Name":"魔法8","animation2Hue":0,"animation2Name":"","frames":[[[3,-8,-136,100,0,0,255,1],[3,-8,-104,120,0,0,255,1],[3,-8,-64,140,0,0,255,1],[3,-8,-24,160,0,0,255,1],[3,-8,24,140,0,0,255,1],[3,-8,64,120,0,0,255,1],[3,-8,104,100,0,0,255,1]],[[3,-8,-136,96,0,0,255,1],[3,-8,-104,115,0,0,255,1],[3,-8,-64,135,0,0,255,1],[3,-8,-24,154,0,0,255,1],[3,-8,24,135,0,0,255,1],[3,-8,64,115,0,0,255,1],[3,-8,104,96,0,0,255,1]],[[3,-8,-136,92,0,0,255,1],[3,-8,-104,111,0,0,255,1],[3,-8,-64,130,0,0,255,1],[3,-8,-24,148,0,0,255,1],[3,-8,24,130,0,0,255,1],[3,-8,64,111,0,0,255,1],[3,-8,104,92,0,0,255,1]],[[3,-8,-136,89,0,0,255,1],[3,-8,-104,107,0,0,255,1],[3,-8,-64,125,0,0,255,1],[3,-8,-24,142,0,0,255,1],[3,-8,24,125,0,0,255,1],[3,-8,64,107,0,0,255,1],[3,-8,104,89,0,0,255,1]],[[3,-8,-136,85,0,0,255,1],[3,-8,-104,102,0,0,255,1],[3,-8,-64,120,0,0,255,1],[3,-8,-24,137,0,0,255,1],[3,-8,24,120,0,0,255,1],[3,-8,64,102,0,0,255,1],[3,-8,104,85,0,0,255,1]],[[3,-8,-136,82,0,0,255,1],[3,-8,-104,98,0,0,255,1],[3,-8,-64,115,0,0,255,1],[3,-8,-24,131,0,0,255,1],[3,-8,24,115,0,0,255,1],[3,-8,64,98,0,0,255,1],[3,-8,104,82,0,0,255,1]],[[3,-8,-136,78,0,0,255,1],[3,-8,-104,94,0,0,255,1],[3,-8,-64,110,0,0,255,1],[3,-8,-24,125,0,0,255,1],[3,-8,24,110,0,0,255,1],[3,-8,64,94,0,0,255,1],[3,-8,104,78,0,0,255,1]],[[3,-8,-136,75,0,0,255,1],[3,-8,-104,90,0,0,255,1],[3,-8,-64,105,0,0,255,1],[3,-8,-24,120,0,0,255,1],[3,-8,24,105,0,0,255,1],[3,-8,64,90,0,0,255,1],[3,-8,104,75,0,0,255,1]],[[3,-8,-136,71,0,0,255,1],[3,-8,-104,85,0,0,255,1],[3,-8,-64,100,0,0,255,1],[3,-8,-24,114,0,0,255,1],[3,-8,24,100,0,0,255,1],[3,-8,64,85,0,0,255,1],[3,-8,104,71,0,0,255,1]],[[3,-8,-136,67,0,0,255,1],[3,-8,-104,81,0,0,255,1],[3,-8,-64,95,0,0,255,1],[3,-8,-24,108,0,0,255,1],[3,-8,24,95,0,0,255,1],[3,-8,64,81,0,0,255,1],[3,-8,104,67,0,0,255,1]],[[3,-8,-136,64,0,0,255,1],[3,-8,-104,77,0,0,255,1],[3,-8,-64,90,0,0,255,1],[3,-8,-24,102,0,0,255,1],[3,-8,24,90,0,0,255,1],[3,-8,64,77,0,0,255,1],[3,-8,104,64,0,0,255,1]],[[3,-8,-136,60,0,0,255,1],[3,-8,-104,72,0,0,255,1],[3,-8,-64,85,0,0,255,1],[3,-8,-24,97,0,0,255,1],[3,-8,24,85,0,0,255,1],[3,-8,64,72,0,0,255,1],[3,-8,104,60,0,0,255,1]],[[3,-8,-136,57,0,0,255,1],[3,-8,-104,68,0,0,255,1],[3,-8,-64,80,0,0,255,1],[3,-8,-24,91,0,0,255,1],[3,-8,24,80,0,0,255,1],[3,-8,64,68,0,0,255,1],[3,-8,104,57,0,0,255,1]],[[3,-8,-136,53,0,0,255,1],[3,-8,-104,64,0,0,255,1],[3,-8,-64,75,0,0,255,1],[3,-8,-24,85,0,0,255,1],[3,-8,24,75,0,0,255,1],[3,-8,64,64,0,0,255,1],[3,-8,104,53,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,60,0,0,255,1],[3,-8,-64,70,0,0,255,1],[3,-8,-24,80,0,0,255,1],[3,-8,24,70,0,0,255,1],[3,-8,64,60,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-208,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,58,0,0,255,1],[3,-8,-64,66,0,0,255,1],[3,-8,-24,74,0,0,255,1],[3,-8,24,66,0,0,255,1],[3,-8,64,58,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-169,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,56,0,0,255,1],[3,-8,-64,62,0,0,255,1],[3,-8,-24,68,0,0,255,1],[3,-8,24,62,0,0,255,1],[3,-8,64,56,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-131,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,54,0,0,255,1],[3,-8,-64,58,0,0,255,1],[3,-8,-24,62,0,0,255,1],[3,-8,24,58,0,0,255,1],[3,-8,64,54,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-92,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,52,0,0,255,1],[3,-8,-64,54,0,0,255,1],[3,-8,-24,56,0,0,255,1],[3,-8,24,54,0,0,255,1],[3,-8,64,52,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-54,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,50,0,0,255,1],[3,-8,-64,50,0,0,255,1],[3,-8,-24,50,0,0,255,1],[3,-8,24,50,0,0,255,1],[3,-8,64,50,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-16,100,0,0,255,1]],[[1,0,-16,100,0,0,255,1]],[[2,0,-16,100,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,48,300,0,0,255,1],[3,0,-72,200,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-80,300,0,0,229,1],[3,0,8,266,0,0,229,1],[3,0,-32,232,0,0,229,1]],[[4,0,-80,300,0,0,204,1],[3,0,3,262,0,0,204,1],[3,1,-28,236,0,0,204,1]],[[4,0,-80,300,0,0,178,1],[3,0,-2,258,0,0,178,1],[3,2,-23,240,0,0,178,1]],[[4,0,-80,300,0,0,153,1],[3,0,-7,253,0,0,153,1],[3,3,-19,245,0,0,153,1]],[[4,0,-80,300,0,0,127,1],[3,0,-12,249,0,0,127,1],[3,4,-14,249,0,0,127,1]],[[4,0,-80,300,0,0,102,1],[3,0,-17,245,0,0,102,1],[3,4,-10,253,0,0,102,1]],[[4,0,-80,300,0,0,76,1],[3,0,-22,240,0,0,76,1],[3,5,-5,258,0,0,76,1]],[[4,0,-80,300,0,0,51,1],[3,0,-27,236,0,0,51,1],[3,6,-1,262,0,0,51,1]],[[4,0,-80,300,0,0,25,1],[3,0,-32,232,0,0,25,1],[3,7,3,266,0,0,25,1]],[[4,0,-80,300,0,0,0,1],[3,0,-37,228,0,0,0,1],[3,8,8,271,0,0,0,1]]],"name":"究极","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic6","pan":0,"pitch":100,"volume":70}},{"flashColor":[255,255,255,255],"flashDuration":15,"flashScope":2,"frame":22,"se":{"name":"Fire9","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":32,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":42,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":52,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":62,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":72,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":82,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":92,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":102,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":112,"se":{"name":"Silence","pan":0,"pitch":100,"volume":80}}]}, +{"id":122,"animation1Hue":180,"animation1Name":"Special15","animation2Hue":0,"animation2Name":"Water3","frames":[[[-1,-64,-18,160,0,0,60,0],[101,0,136,435,0,0,255,0]],[[-1,-272,-34,160,0,0,40,0],[102,0,134,435,0,0,255,0]],[[-1,-120,-26,160,0,0,20,0],[103,0,134,435,0,0,255,0]],[[104,0,134,435,0,0,255,0]],[[105,0,134,435,0,0,255,0]],[[106,0,134,435,0,0,255,0]],[[107,0,134,435,0,0,255,0]],[[108,0,134,435,0,0,255,0]],[[109,0,134,435,0,0,255,0]],[[110,0,134,435,0,0,255,0]],[[111,0,134,435,0,0,255,0]],[[112,0,134,435,0,0,255,0]],[[113,0,134,435,0,0,255,0]],[[114,0,134,435,0,0,255,0]],[[115,0,134,435,0,0,255,0]],[[116,0,134,435,0,0,255,0]],[[117,0,134,435,0,0,255,0]],[[118,0,134,435,0,0,255,0]],[[109,0,134,435,0,0,255,0]],[[111,0,134,435,0,0,255,0]],[[113,0,134,435,0,0,255,0]],[[115,0,134,435,0,0,255,0]],[[117,0,134,435,0,0,255,0]],[[109,0,134,435,0,0,255,0]],[[111,0,134,435,0,0,255,0]],[[113,0,134,435,0,0,255,0]],[[115,0,134,435,0,0,255,0]],[[116,0,134,435,0,0,200,0]],[[117,0,134,435,0,0,150,0]],[[118,0,134,435,0,0,80,0]]],"name":"海啸","position":3,"timings":[{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":2,"frame":0,"se":{"name":"Water1","pan":0,"pitch":50,"volume":90}},{"flashColor":[170,204,255,204],"flashDuration":5,"flashScope":1,"frame":1,"se":{"name":"Water2","pan":0,"pitch":65,"volume":90}}]}, +{"id":123,"animation1Hue":330,"animation1Name":"Heal3","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-120,300,0,0,255,1]],[[1,0,-120,300,0,0,255,1]],[[2,0,-120,300,0,0,255,1]],[[3,0,-120,300,0,0,255,1]],[[4,0,-120,300,0,0,255,1]],[[5,0,-120,300,0,0,255,1]],[[6,0,-120,300,0,0,255,1]],[[7,0,-120,300,0,0,255,1]],[[8,0,-120,300,0,0,255,1]],[[9,0,-120,300,0,0,255,1]]],"name":"红月","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Darkness8","pan":0,"pitch":125,"volume":80}}]}, +{"id":124,"animation1Hue":180,"animation1Name":"Darkness1","animation2Hue":0,"animation2Name":"","frames":[[[6,4,0,400,0,0,255,1],[5,4,0,400,0,0,255,1],[4,4,0,400,0,0,255,1],[7,4,0,400,0,0,255,1],[8,4,0,400,0,0,255,1]],[[6,3,0,400,12,0,255,1],[5,3,0,400,12,0,255,1],[4,3,0,400,12,0,255,1],[7,3,0,400,12,0,255,1],[8,3,0,400,12,0,255,1]],[[6,2,0,400,24,0,255,1],[5,2,0,400,24,0,255,1],[4,2,0,400,24,0,255,1],[7,2,0,400,24,0,255,1],[8,2,0,400,24,0,255,1]],[[6,2,0,400,37,0,255,1],[5,2,0,400,37,0,255,1],[4,2,0,400,37,0,255,1],[7,2,0,400,37,0,255,1],[8,2,0,400,37,0,255,1]],[[6,1,0,400,49,0,255,1],[5,1,0,400,49,0,255,1],[4,1,0,400,49,0,255,1],[7,1,0,400,49,0,255,1],[8,1,0,400,49,0,255,1]],[[6,1,0,400,61,0,255,1],[5,1,0,400,61,0,255,1],[4,1,0,400,61,0,255,1],[7,1,0,400,61,0,255,1],[8,1,0,400,61,0,255,1]],[[6,0,0,400,74,0,255,1],[5,0,0,400,74,0,255,1],[4,0,0,400,74,0,255,1],[7,0,0,400,74,0,255,1],[8,0,0,400,74,0,255,1]],[[6,0,0,400,86,0,255,1],[5,0,0,400,86,0,255,1],[4,0,0,400,86,0,255,1],[7,0,0,400,86,0,255,1],[8,0,0,400,86,0,255,1]],[[6,0,0,400,98,0,255,1],[5,0,0,400,98,0,255,1],[4,0,0,400,98,0,255,1],[7,0,0,400,98,0,255,1],[8,0,0,400,98,0,255,1]],[[6,-1,0,400,111,0,255,1],[5,-1,0,400,111,0,255,1],[4,-1,0,400,111,0,255,1],[7,-1,0,400,111,0,255,1],[8,-1,0,400,111,0,255,1]],[[6,-1,0,400,123,0,255,1],[5,-1,0,400,123,0,255,1],[4,-1,0,400,123,0,255,1],[7,-1,0,400,123,0,255,1],[8,-1,0,400,123,0,255,1]],[[6,-2,0,400,135,0,255,1],[5,-2,0,400,135,0,255,1],[4,-2,0,400,135,0,255,1],[7,-2,0,400,135,0,255,1],[8,-2,0,400,135,0,255,1]],[[6,-2,0,400,148,0,255,1],[5,-2,0,400,148,0,255,1],[4,-2,0,400,148,0,255,1],[7,-2,0,400,148,0,255,1],[8,-2,0,400,148,0,255,1]],[[6,-3,0,400,160,0,255,1],[5,-3,0,400,160,0,255,1],[4,-3,0,400,160,0,255,1],[7,-3,0,400,160,0,255,1],[8,-3,0,400,160,0,255,1]],[[6,-4,0,400,173,0,255,1],[5,-4,0,400,173,0,255,1],[4,-4,0,400,173,0,255,1],[7,-4,0,400,173,0,255,1],[8,-4,0,400,173,0,255,1]],[[6,-3,0,400,185,0,255,1],[5,-3,0,400,185,0,255,1],[4,-3,0,400,185,0,255,1],[7,-3,0,400,185,0,255,1],[8,-3,0,400,185,0,255,1]],[[6,-2,0,400,197,0,255,1],[5,-2,0,400,197,0,255,1],[4,-2,0,400,197,0,255,1],[7,-2,0,400,197,0,255,1],[8,-2,0,400,197,0,255,1]],[[6,-2,0,400,210,0,255,1],[5,-2,0,400,210,0,255,1],[4,-2,0,400,210,0,255,1],[7,-2,0,400,210,0,255,1],[8,-2,0,400,210,0,255,1]],[[6,-1,0,400,222,0,255,1],[5,-1,0,400,222,0,255,1],[4,-1,0,400,222,0,255,1],[7,-1,0,400,222,0,255,1],[8,-1,0,400,222,0,255,1]],[[6,-1,0,400,235,0,255,1],[5,-1,0,400,235,0,255,1],[4,-1,0,400,235,0,255,1],[7,-1,0,400,235,0,255,1],[8,-1,0,400,235,0,255,1]],[[6,0,0,400,247,0,255,1],[5,0,0,400,247,0,255,1],[4,0,0,400,247,0,255,1],[7,0,0,400,247,0,255,1],[8,0,0,400,247,0,255,1]],[[6,0,0,400,260,0,255,1],[5,0,0,400,260,0,255,1],[4,0,0,400,260,0,255,1],[7,0,0,400,260,0,255,1],[8,0,0,400,260,0,255,1]],[[6,0,0,400,272,0,255,1],[5,0,0,400,272,0,255,1],[4,0,0,400,272,0,255,1],[7,0,0,400,272,0,255,1],[8,0,0,400,272,0,255,1]],[[6,0,0,400,285,0,255,1],[5,0,0,400,285,0,255,1],[4,0,0,400,285,0,255,1],[7,0,0,400,285,0,255,1],[8,0,0,400,285,0,255,1]],[[6,1,0,400,297,0,255,1],[5,1,0,400,297,0,255,1],[4,1,0,400,297,0,255,1],[7,1,0,400,297,0,255,1],[8,1,0,400,297,0,255,1]],[[6,1,0,400,310,0,255,1],[5,1,0,400,310,0,255,1],[4,1,0,400,310,0,255,1],[7,1,0,400,310,0,255,1],[8,1,0,400,310,0,255,1]],[[6,2,0,400,322,0,255,1],[5,2,0,400,322,0,255,1],[4,2,0,400,322,0,255,1],[7,2,0,400,322,0,255,1],[8,2,0,400,322,0,255,1]],[[6,2,0,400,335,0,255,1],[5,2,0,400,335,0,255,1],[4,2,0,400,335,0,255,1],[7,2,0,400,335,0,255,1],[8,2,0,400,335,0,255,1]],[[6,3,0,400,347,0,255,1],[5,3,0,400,347,0,255,1],[4,3,0,400,347,0,255,1],[7,3,0,400,347,0,255,1],[8,3,0,400,347,0,255,1]],[[6,4,0,400,360,0,255,1],[5,4,0,400,360,0,255,1],[4,4,0,400,360,0,255,1],[7,4,0,400,360,0,255,1],[8,4,0,400,360,0,255,1]]],"name":"Wind","position":1,"timings":[]}, +{"id":125,"animation1Hue":290,"animation1Name":"魔法8","animation2Hue":0,"animation2Name":"","frames":[[[4,0,-56,200,0,0,255,1],[3,0,-8,180,0,0,255,1]],[[4,0,-58,206,0,0,250,1],[3,0,-7,190,0,0,250,1]],[[4,0,-61,213,0,0,246,1],[3,0,-7,201,0,0,246,1]],[[4,0,-63,220,0,0,242,1],[3,0,-7,211,0,0,242,1]],[[4,0,-66,227,0,0,237,1],[3,0,-7,222,0,0,237,1]],[[4,0,-68,233,0,0,233,1],[3,0,-7,232,0,0,233,1]],[[4,0,-71,240,0,0,229,1],[3,0,-7,243,0,0,229,1]],[[4,0,-74,247,0,0,224,1],[3,0,-7,253,0,0,224,1]],[[4,0,-76,254,0,0,220,1],[3,0,-6,264,0,0,220,1]],[[4,0,-79,261,0,0,216,1],[3,0,-6,274,0,0,216,1]],[[4,0,-81,267,0,0,211,1],[3,0,-6,285,0,0,211,1]],[[4,0,-84,274,0,0,207,1],[3,0,-6,295,0,0,207,1]],[[4,0,-86,281,0,0,203,1],[3,0,-6,306,0,0,203,1]],[[4,0,-89,288,0,0,198,1],[3,0,-6,316,0,0,198,1]],[[4,0,-92,294,0,0,194,1],[3,0,-6,327,0,0,194,1]],[[4,0,-94,301,0,0,190,1],[3,0,-5,337,0,0,190,1]],[[4,0,-97,308,0,0,185,1],[3,0,-5,348,0,0,185,1]],[[4,0,-99,315,0,0,181,1],[3,0,-5,358,0,0,181,1]],[[4,0,-102,322,0,0,177,1],[3,0,-5,369,0,0,177,1]],[[4,0,-104,328,0,0,172,1],[3,0,-5,379,0,0,172,1]],[[4,0,-107,335,0,0,168,1],[3,0,-5,390,0,0,168,1]],[[4,0,-110,342,0,0,164,1],[3,0,-5,400,0,0,164,1]],[[4,0,-112,349,0,0,159,1],[3,0,-5,411,0,0,159,1]],[[4,0,-115,355,0,0,155,1],[3,0,-4,421,0,0,155,1]],[[4,0,-117,362,0,0,151,1],[3,0,-4,432,0,0,151,1]],[[4,0,-120,369,0,0,146,1],[3,0,-4,442,0,0,146,1]],[[4,0,-122,376,0,0,142,1],[3,0,-4,453,0,0,142,1]],[[4,0,-125,383,0,0,138,1],[3,0,-4,463,0,0,138,1]],[[4,0,-128,389,0,0,133,1],[3,0,-4,474,0,0,133,1]],[[4,0,-130,396,0,0,129,1],[3,0,-4,484,0,0,129,1]],[[4,0,-133,403,0,0,125,1],[3,0,-3,495,0,0,125,1]],[[4,0,-135,410,0,0,121,1],[3,0,-3,505,0,0,121,1]],[[4,0,-138,416,0,0,116,1],[3,0,-3,516,0,0,116,1]],[[4,0,-141,423,0,0,112,1],[3,0,-3,526,0,0,112,1]],[[4,0,-143,430,0,0,108,1],[3,0,-3,537,0,0,108,1]],[[4,0,-146,437,0,0,103,1],[3,0,-3,547,0,0,103,1]],[[4,0,-148,444,0,0,99,1],[3,0,-3,558,0,0,99,1]],[[4,0,-151,450,0,0,95,1],[3,0,-2,568,0,0,95,1]],[[4,0,-153,457,0,0,90,1],[3,0,-2,579,0,0,90,1]],[[4,0,-156,464,0,0,86,1],[3,0,-2,589,0,0,86,1]],[[4,0,-159,471,0,0,82,1],[3,0,-2,600,0,0,82,1]],[[4,0,-161,477,0,0,77,1],[3,0,-2,610,0,0,77,1]],[[4,0,-164,484,0,0,73,1],[3,0,-2,621,0,0,73,1]],[[4,0,-166,491,0,0,69,1],[3,0,-2,631,0,0,69,1]],[[4,0,-169,498,0,0,64,1],[3,0,-2,642,0,0,64,1]],[[4,0,-171,505,0,0,60,1],[3,0,-1,652,0,0,60,1]],[[4,0,-174,511,0,0,56,1],[3,0,-1,663,0,0,56,1]],[[4,0,-177,518,0,0,51,1],[3,0,-1,673,0,0,51,1]],[[4,0,-179,525,0,0,47,1],[3,0,-1,684,0,0,47,1]],[[4,0,-182,532,0,0,43,1],[3,0,-1,694,0,0,43,1]],[[4,0,-184,538,0,0,38,1],[3,0,-1,705,0,0,38,1]],[[4,0,-187,545,0,0,34,1],[3,0,-1,715,0,0,34,1]],[[4,0,-189,552,0,0,30,1],[3,0,0,726,0,0,30,1]],[[4,0,-192,559,0,0,25,1],[3,0,0,736,0,0,25,1]],[[4,0,-195,566,0,0,21,1],[3,0,0,747,0,0,21,1]],[[4,0,-197,572,0,0,17,1],[3,0,0,757,0,0,17,1]],[[4,0,-200,579,0,0,12,1],[3,0,0,768,0,0,12,1]],[[4,0,-202,586,0,0,8,1],[3,0,0,778,0,0,8,1]],[[4,0,-205,593,0,0,4,1],[3,0,0,789,0,0,4,1]],[[4,0,-208,600,0,0,0,1],[3,0,0,800,0,0,0,1]]],"name":"爆炸","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Wind11","pan":0,"pitch":70,"volume":80}}]}, +{"id":126,"animation1Hue":180,"animation1Name":"Darkness1","animation2Hue":0,"animation2Name":"","frames":[[[6,4,0,400,0,0,255,1],[5,4,0,400,0,0,255,1],[4,4,0,400,0,0,255,1],[7,4,0,400,0,0,255,1],[8,4,0,400,0,0,255,1]],[[6,3,0,385,12,0,255,1],[5,3,0,385,12,0,255,1],[4,3,0,385,12,0,255,1],[7,3,0,385,12,0,255,1],[8,3,0,385,12,0,255,1]],[[6,3,0,371,24,0,255,1],[5,3,0,371,24,0,255,1],[4,3,0,371,24,0,255,1],[7,3,0,371,24,0,255,1],[8,3,0,371,24,0,255,1]],[[6,2,0,357,37,0,255,1],[5,2,0,357,37,0,255,1],[4,2,0,357,37,0,255,1],[7,2,0,357,37,0,255,1],[8,2,0,357,37,0,255,1]],[[6,2,0,342,49,0,255,1],[5,2,0,342,49,0,255,1],[4,2,0,342,49,0,255,1],[7,2,0,342,49,0,255,1],[8,2,0,342,49,0,255,1]],[[6,1,0,328,61,0,255,1],[5,1,0,328,61,0,255,1],[4,1,0,328,61,0,255,1],[7,1,0,328,61,0,255,1],[8,1,0,328,61,0,255,1]],[[6,1,0,314,74,0,255,1],[5,1,0,314,74,0,255,1],[4,1,0,314,74,0,255,1],[7,1,0,314,74,0,255,1],[8,1,0,314,74,0,255,1]],[[6,1,0,300,86,0,255,1],[5,1,0,300,86,0,255,1],[4,1,0,300,86,0,255,1],[7,1,0,300,86,0,255,1],[8,1,0,300,86,0,255,1]],[[6,0,0,285,98,0,255,1],[5,0,0,285,98,0,255,1],[4,0,0,285,98,0,255,1],[7,0,0,285,98,0,255,1],[8,0,0,285,98,0,255,1]],[[6,0,0,271,111,0,255,1],[5,0,0,271,111,0,255,1],[4,0,0,271,111,0,255,1],[7,0,0,271,111,0,255,1],[8,0,0,271,111,0,255,1]],[[6,0,0,257,123,0,255,1],[5,0,0,257,123,0,255,1],[4,0,0,257,123,0,255,1],[7,0,0,257,123,0,255,1],[8,0,0,257,123,0,255,1]],[[6,0,0,242,135,0,255,1],[5,0,0,242,135,0,255,1],[4,0,0,242,135,0,255,1],[7,0,0,242,135,0,255,1],[8,0,0,242,135,0,255,1]],[[6,-1,0,228,148,0,255,1],[5,-1,0,228,148,0,255,1],[4,-1,0,228,148,0,255,1],[7,-1,0,228,148,0,255,1],[8,-1,0,228,148,0,255,1]],[[6,-1,0,214,160,0,255,1],[5,-1,0,214,160,0,255,1],[4,-1,0,214,160,0,255,1],[7,-1,0,214,160,0,255,1],[8,-1,0,214,160,0,255,1]],[[6,-2,0,200,173,0,255,1],[5,-2,0,200,173,0,255,1],[4,-2,0,200,173,0,255,1],[7,-2,0,200,173,0,255,1],[8,-2,0,200,173,0,255,1]],[[6,-1,0,188,185,0,255,1],[5,-1,0,188,185,0,255,1],[4,-1,0,188,185,0,255,1],[7,-1,0,188,185,0,255,1],[8,-1,0,188,185,0,255,1]],[[6,-1,0,176,197,0,255,1],[5,-1,0,176,197,0,255,1],[4,-1,0,176,197,0,255,1],[7,-1,0,176,197,0,255,1],[8,-1,0,176,197,0,255,1]],[[6,-1,0,164,210,0,255,1],[5,-1,0,164,210,0,255,1],[4,-1,0,164,210,0,255,1],[7,-1,0,164,210,0,255,1],[8,-1,0,164,210,0,255,1]],[[6,-1,0,152,222,0,255,1],[5,-1,0,152,222,0,255,1],[4,-1,0,152,222,0,255,1],[7,-1,0,152,222,0,255,1],[8,-1,0,152,222,0,255,1]],[[6,-1,0,140,235,0,255,1],[5,-1,0,140,235,0,255,1],[4,-1,0,140,235,0,255,1],[7,-1,0,140,235,0,255,1],[8,-1,0,140,235,0,255,1]],[[6,-1,0,128,247,0,255,1],[5,-1,0,128,247,0,255,1],[4,-1,0,128,247,0,255,1],[7,-1,0,128,247,0,255,1],[8,-1,0,128,247,0,255,1]],[[6,-1,0,116,260,0,255,1],[5,-1,0,116,260,0,255,1],[4,-1,0,116,260,0,255,1],[7,-1,0,116,260,0,255,1],[8,-1,0,116,260,0,255,1]],[[6,0,0,104,272,0,255,1],[5,0,0,104,272,0,255,1],[4,0,0,104,272,0,255,1],[7,0,0,104,272,0,255,1],[8,0,0,104,272,0,255,1]],[[6,0,0,92,285,0,255,1],[5,0,0,92,285,0,255,1],[4,0,0,92,285,0,255,1],[7,0,0,92,285,0,255,1],[8,0,0,92,285,0,255,1]],[[6,0,0,80,297,0,255,1],[5,0,0,80,297,0,255,1],[4,0,0,80,297,0,255,1],[7,0,0,80,297,0,255,1],[8,0,0,80,297,0,255,1]],[[6,0,0,68,310,0,255,1],[5,0,0,68,310,0,255,1],[4,0,0,68,310,0,255,1],[7,0,0,68,310,0,255,1],[8,0,0,68,310,0,255,1]],[[6,0,0,56,322,0,255,1],[5,0,0,56,322,0,255,1],[4,0,0,56,322,0,255,1],[7,0,0,56,322,0,255,1],[8,0,0,56,322,0,255,1]],[[6,0,0,44,335,0,255,1],[5,0,0,44,335,0,255,1],[4,0,0,44,335,0,255,1],[7,0,0,44,335,0,255,1],[8,0,0,44,335,0,255,1]],[[6,0,0,32,347,0,255,1],[5,0,0,32,347,0,255,1],[4,0,0,32,347,0,255,1],[7,0,0,32,347,0,255,1],[8,0,0,32,347,0,255,1]],[[6,0,0,20,360,0,255,1],[5,0,0,20,360,0,255,1],[4,0,0,20,360,0,255,1],[7,0,0,20,360,0,255,1],[8,0,0,20,360,0,255,1]]],"name":"Wind","position":1,"timings":[]}, +{"id":127,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1]],[[2,0,0,100,0,0,255,1]]],"name":"","position":1,"timings":[{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":0,"se":{"name":"Blow3","pan":0,"pitch":100,"volume":95}}]}, +{"id":128,"animation1Hue":130,"animation1Name":"Sword7","animation2Hue":310,"animation2Name":"Sword8","frames":[[[100,0,-56,230,0,0,255,0]],[[101,0,-56,230,0,0,255,0],[117,184,-56,240,0,0,100,0],[117,-176,-56,240,0,1,100,0]],[[102,0,-56,230,0,0,255,0],[117,184,-56,235,0,0,150,0],[117,-176,-56,235,0,1,150,0]],[[103,0,-56,230,0,0,255,0],[117,184,-56,230,0,0,255,0],[117,-176,-56,230,0,1,255,0]],[[104,0,-56,230,0,0,255,0],[118,184,-56,230,0,0,255,0],[118,-176,-56,230,0,1,255,0]],[[105,0,-56,230,0,0,255,0],[119,184,-56,230,0,0,255,0],[119,-176,-56,230,0,1,255,0]],[[106,0,-56,230,0,0,255,0],[120,184,-56,230,0,0,255,0],[120,-176,-56,230,0,1,255,0]],[[107,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[108,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[109,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[110,0,-56,230,0,0,255,0],[120,184,-56,230,0,0,255,0],[120,-176,-56,230,0,1,255,0]],[[111,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[112,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[113,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[114,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[115,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0],[0,0,-56,285,0,0,255,1]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[1,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,20,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[2,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,50,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[3,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,80,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[4,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,100,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[5,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,120,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[6,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,160,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[7,0,-56,285,0,0,255,1],[16,0,-56,285,0,0,200,0]],[[122,-176,-56,230,0,1,150,0],[116,0,-56,230,0,0,150,0],[122,184,-56,230,0,0,150,0],[8,0,-56,285,0,0,255,1]],[[122,-176,-56,230,0,1,100,0],[116,0,-56,230,0,0,100,0],[122,184,-56,230,0,0,100,0],[9,0,-56,285,0,0,255,1]],[[122,-176,-56,230,0,1,50,0],[116,0,-56,230,0,0,50,0],[122,184,-56,230,0,0,50,0],[10,0,-56,285,0,0,255,1]],[[11,0,-56,285,0,0,255,1]],[[12,0,-56,285,0,0,255,1]],[[13,0,-56,285,0,0,255,1]],[[14,0,-56,285,0,0,255,1]],[[15,0,-56,285,0,0,255,1]]],"name":"投枪","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Fog2","pan":0,"pitch":70,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":15,"se":{"name":"Slash3","pan":0,"pitch":105,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":15,"se":{"name":"Attack3","pan":0,"pitch":80,"volume":90}},{"flashColor":[187,221,255,255],"flashDuration":5,"flashScope":1,"frame":16,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":6,"flashScope":2,"frame":23,"se":null}]}, +{"id":129,"animation1Hue":0,"animation1Name":"Wind2","animation2Hue":320,"animation2Name":"Wind2","frames":[[[0,-256,0,300,0,0,255,1],[5,-256,32,400,0,0,255,1],[100,256,0,300,0,0,255,1],[105,256,32,400,0,0,255,1]],[[1,-242,0,300,0,0,255,1],[6,-242,30,400,0,0,255,1],[101,242,0,300,0,0,255,1],[105,242,30,400,0,0,255,1]],[[2,-229,0,300,0,0,255,1],[7,-229,28,400,0,0,255,1],[102,229,0,300,0,0,255,1],[107,229,28,400,0,0,255,1]],[[3,-215,0,300,0,0,255,1],[8,-215,26,400,0,0,255,1],[103,215,0,300,0,0,255,1],[108,215,26,400,0,0,255,1]],[[4,-202,0,300,0,0,255,1],[9,-202,25,400,0,0,255,1],[104,202,0,300,0,0,255,1],[109,202,25,400,0,0,255,1]],[[0,-188,0,300,0,0,255,1],[5,-188,23,400,0,0,255,1],[100,188,0,300,0,0,255,1],[105,188,23,400,0,0,255,1]],[[1,-175,0,300,0,0,255,1],[6,-175,21,400,0,0,255,1],[101,175,0,300,0,0,255,1],[105,175,21,400,0,0,255,1]],[[2,-161,0,300,0,0,255,1],[7,-161,20,400,0,0,255,1],[102,161,0,300,0,0,255,1],[107,161,20,400,0,0,255,1]],[[3,-148,0,300,0,0,255,1],[8,-148,18,400,0,0,255,1],[103,148,0,300,0,0,255,1],[108,148,18,400,0,0,255,1]],[[4,-134,0,300,0,0,255,1],[9,-134,16,400,0,0,255,1],[104,134,0,300,0,0,255,1],[109,134,16,400,0,0,255,1]],[[0,-121,0,300,0,0,255,1],[5,-121,15,400,0,0,255,1],[100,121,0,300,0,0,255,1],[105,121,15,400,0,0,255,1]],[[1,-107,0,300,0,0,255,1],[6,-107,13,400,0,0,255,1],[101,107,0,300,0,0,255,1],[105,107,13,400,0,0,255,1]],[[2,-94,0,300,0,0,255,1],[7,-94,11,400,0,0,255,1],[102,94,0,300,0,0,255,1],[107,94,11,400,0,0,255,1]],[[3,-80,0,300,0,0,255,1],[8,-80,10,400,0,0,255,1],[103,80,0,300,0,0,255,1],[108,80,10,400,0,0,255,1]],[[4,-67,0,300,0,0,255,1],[9,-67,8,400,0,0,255,1],[104,67,0,300,0,0,255,1],[109,67,8,400,0,0,255,1]],[[0,-53,0,300,0,0,255,1],[5,-53,6,400,0,0,255,1],[100,53,0,300,0,0,255,1],[105,53,6,400,0,0,255,1]],[[1,-40,0,300,0,0,255,1],[6,-40,5,400,0,0,255,1],[101,40,0,300,0,0,255,1],[105,40,5,400,0,0,255,1]],[[2,-26,0,300,0,0,255,1],[7,-26,3,400,0,0,255,1],[102,26,0,300,0,0,255,1],[107,26,3,400,0,0,255,1]],[[3,-13,0,300,0,0,255,1],[8,-13,1,400,0,0,255,1],[103,13,0,300,0,0,255,1],[108,13,1,400,0,0,255,1]],[[4,0,0,300,0,0,255,1],[9,0,0,400,0,0,255,1],[104,0,0,300,0,0,255,1],[109,0,0,400,0,0,255,1]],[],[],[],[],[],[],[],[],[],[]],"name":"龙卷风","position":3,"timings":[{"flashColor":[255,221,187,153],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Wind5","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,221,187,153],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Wind5","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":120,"flashScope":2,"frame":20,"se":{"name":"Wind11","pan":0,"pitch":100,"volume":100}}]}, +{"id":130,"animation1Hue":0,"animation1Name":"魔法8","animation2Hue":0,"animation2Name":"","frames":[[[3,-8,-136,100,0,0,255,1],[3,-8,-104,120,0,0,255,1],[3,-8,-64,140,0,0,255,1],[3,-8,-24,160,0,0,255,1],[3,-8,24,140,0,0,255,1],[3,-8,64,120,0,0,255,1],[3,-8,104,100,0,0,255,1]],[[3,-8,-136,96,0,0,255,1],[3,-8,-104,115,0,0,255,1],[3,-8,-64,135,0,0,255,1],[3,-8,-24,154,0,0,255,1],[3,-8,24,135,0,0,255,1],[3,-8,64,115,0,0,255,1],[3,-8,104,96,0,0,255,1]],[[3,-8,-136,92,0,0,255,1],[3,-8,-104,111,0,0,255,1],[3,-8,-64,130,0,0,255,1],[3,-8,-24,148,0,0,255,1],[3,-8,24,130,0,0,255,1],[3,-8,64,111,0,0,255,1],[3,-8,104,92,0,0,255,1]],[[3,-8,-136,89,0,0,255,1],[3,-8,-104,107,0,0,255,1],[3,-8,-64,125,0,0,255,1],[3,-8,-24,142,0,0,255,1],[3,-8,24,125,0,0,255,1],[3,-8,64,107,0,0,255,1],[3,-8,104,89,0,0,255,1]],[[3,-8,-136,85,0,0,255,1],[3,-8,-104,102,0,0,255,1],[3,-8,-64,120,0,0,255,1],[3,-8,-24,137,0,0,255,1],[3,-8,24,120,0,0,255,1],[3,-8,64,102,0,0,255,1],[3,-8,104,85,0,0,255,1]],[[3,-8,-136,82,0,0,255,1],[3,-8,-104,98,0,0,255,1],[3,-8,-64,115,0,0,255,1],[3,-8,-24,131,0,0,255,1],[3,-8,24,115,0,0,255,1],[3,-8,64,98,0,0,255,1],[3,-8,104,82,0,0,255,1]],[[3,-8,-136,78,0,0,255,1],[3,-8,-104,94,0,0,255,1],[3,-8,-64,110,0,0,255,1],[3,-8,-24,125,0,0,255,1],[3,-8,24,110,0,0,255,1],[3,-8,64,94,0,0,255,1],[3,-8,104,78,0,0,255,1]],[[3,-8,-136,75,0,0,255,1],[3,-8,-104,90,0,0,255,1],[3,-8,-64,105,0,0,255,1],[3,-8,-24,120,0,0,255,1],[3,-8,24,105,0,0,255,1],[3,-8,64,90,0,0,255,1],[3,-8,104,75,0,0,255,1]],[[3,-8,-136,71,0,0,255,1],[3,-8,-104,85,0,0,255,1],[3,-8,-64,100,0,0,255,1],[3,-8,-24,114,0,0,255,1],[3,-8,24,100,0,0,255,1],[3,-8,64,85,0,0,255,1],[3,-8,104,71,0,0,255,1]],[[3,-8,-136,67,0,0,255,1],[3,-8,-104,81,0,0,255,1],[3,-8,-64,95,0,0,255,1],[3,-8,-24,108,0,0,255,1],[3,-8,24,95,0,0,255,1],[3,-8,64,81,0,0,255,1],[3,-8,104,67,0,0,255,1]],[[3,-8,-136,64,0,0,255,1],[3,-8,-104,77,0,0,255,1],[3,-8,-64,90,0,0,255,1],[3,-8,-24,102,0,0,255,1],[3,-8,24,90,0,0,255,1],[3,-8,64,77,0,0,255,1],[3,-8,104,64,0,0,255,1]],[[3,-8,-136,60,0,0,255,1],[3,-8,-104,72,0,0,255,1],[3,-8,-64,85,0,0,255,1],[3,-8,-24,97,0,0,255,1],[3,-8,24,85,0,0,255,1],[3,-8,64,72,0,0,255,1],[3,-8,104,60,0,0,255,1]],[[3,-8,-136,57,0,0,255,1],[3,-8,-104,68,0,0,255,1],[3,-8,-64,80,0,0,255,1],[3,-8,-24,91,0,0,255,1],[3,-8,24,80,0,0,255,1],[3,-8,64,68,0,0,255,1],[3,-8,104,57,0,0,255,1]],[[3,-8,-136,53,0,0,255,1],[3,-8,-104,64,0,0,255,1],[3,-8,-64,75,0,0,255,1],[3,-8,-24,85,0,0,255,1],[3,-8,24,75,0,0,255,1],[3,-8,64,64,0,0,255,1],[3,-8,104,53,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,60,0,0,255,1],[3,-8,-64,70,0,0,255,1],[3,-8,-24,80,0,0,255,1],[3,-8,24,70,0,0,255,1],[3,-8,64,60,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-208,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,58,0,0,255,1],[3,-8,-64,66,0,0,255,1],[3,-8,-24,74,0,0,255,1],[3,-8,24,66,0,0,255,1],[3,-8,64,58,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-169,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,56,0,0,255,1],[3,-8,-64,62,0,0,255,1],[3,-8,-24,68,0,0,255,1],[3,-8,24,62,0,0,255,1],[3,-8,64,56,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-131,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,54,0,0,255,1],[3,-8,-64,58,0,0,255,1],[3,-8,-24,62,0,0,255,1],[3,-8,24,58,0,0,255,1],[3,-8,64,54,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-92,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,52,0,0,255,1],[3,-8,-64,54,0,0,255,1],[3,-8,-24,56,0,0,255,1],[3,-8,24,54,0,0,255,1],[3,-8,64,52,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-54,100,0,0,255,1]],[[3,-8,-136,50,0,0,255,1],[3,-8,-104,50,0,0,255,1],[3,-8,-64,50,0,0,255,1],[3,-8,-24,50,0,0,255,1],[3,-8,24,50,0,0,255,1],[3,-8,64,50,0,0,255,1],[3,-8,104,50,0,0,255,1],[0,0,-16,100,0,0,255,1]],[[1,0,-16,100,0,0,255,1]],[[2,0,-16,100,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,48,300,0,0,255,1],[3,0,-72,200,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-3,257,0,0,255,1],[3,0,-20,242,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-20,242,0,0,255,1],[3,0,-3,257,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-37,228,0,0,255,1],[3,0,13,271,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-54,214,0,0,255,1],[3,0,30,285,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,-72,200,0,0,255,1],[3,0,48,300,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,30,285,0,0,255,1],[3,0,-54,214,0,0,255,1]],[[4,0,-128,400,0,0,255,1],[3,0,13,271,0,0,255,1],[3,0,-37,228,0,0,255,1]],[[4,0,-80,300,0,0,229,1],[3,0,8,266,0,0,229,1],[3,0,-32,232,0,0,229,1]],[[4,0,-80,300,0,0,204,1],[3,0,3,262,0,0,204,1],[3,1,-28,236,0,0,204,1]],[[4,0,-80,300,0,0,178,1],[3,0,-2,258,0,0,178,1],[3,2,-23,240,0,0,178,1]],[[4,0,-80,300,0,0,153,1],[3,0,-7,253,0,0,153,1],[3,3,-19,245,0,0,153,1]],[[4,0,-80,300,0,0,127,1],[3,0,-12,249,0,0,127,1],[3,4,-14,249,0,0,127,1]],[[4,0,-80,300,0,0,102,1],[3,0,-17,245,0,0,102,1],[3,4,-10,253,0,0,102,1]],[[4,0,-80,300,0,0,76,1],[3,0,-22,240,0,0,76,1],[3,5,-5,258,0,0,76,1]],[[4,0,-80,300,0,0,51,1],[3,0,-27,236,0,0,51,1],[3,6,-1,262,0,0,51,1]],[[4,0,-80,300,0,0,25,1],[3,0,-32,232,0,0,25,1],[3,7,3,266,0,0,25,1]],[[4,0,-80,300,0,0,0,1],[3,0,-37,228,0,0,0,1],[3,8,8,271,0,0,0,1]]],"name":"究极","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic6","pan":0,"pitch":100,"volume":70}},{"flashColor":[255,255,255,255],"flashDuration":15,"flashScope":2,"frame":22,"se":{"name":"Fire9","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":32,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":42,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":52,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":62,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":72,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":82,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":92,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":102,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":112,"se":{"name":"Silence","pan":0,"pitch":100,"volume":80}}]}, +{"id":131,"animation1Hue":210,"animation1Name":"Light7","animation2Hue":0,"animation2Name":"","frames":[[[0,0,0,120,0,0,255,1]],[[0,0,0,200,0,0,255,1]],[[1,0,0,200,0,0,255,1]],[[2,0,0,200,0,0,255,1]],[[3,0,0,200,0,0,255,1]],[[4,0,0,200,0,0,255,1]],[[5,0,0,200,0,0,255,1]],[[6,0,0,200,0,0,255,1]],[[7,0,0,200,0,0,255,1]],[[8,0,0,200,0,0,255,1]],[[9,0,0,200,0,0,255,1]],[[10,0,0,200,0,0,255,1]],[[11,0,0,200,0,0,255,1]],[[12,0,0,200,0,0,255,1]],[[13,0,0,200,0,0,255,1]],[[14,0,0,200,0,0,255,1]],[[15,0,0,200,0,0,255,1]],[[16,0,0,200,0,0,255,1]],[[17,0,0,200,0,0,255,1]],[[18,0,0,200,0,0,255,1]],[[19,0,0,200,0,0,255,1]],[[20,0,0,200,0,0,255,1]],[[21,0,0,200,0,0,255,1]],[[22,0,0,200,0,0,255,1]],[[23,0,0,200,0,0,255,1]],[[24,0,0,200,0,0,255,1]],[[25,0,0,200,0,0,255,1]],[[26,0,0,200,0,0,255,1]],[[27,0,0,200,0,0,200,1]],[[28,0,0,200,0,0,180,1]],[[29,0,0,200,0,0,150,1]]],"name":"泛用/放射线","position":1,"timings":[{"flashColor":[0,0,255,255],"flashDuration":10,"flashScope":0,"frame":0,"se":{"name":"Ice7","pan":0,"pitch":125,"volume":80}}]}, +{"id":132,"animation1Hue":0,"animation1Name":"Gun2","animation2Hue":0,"animation2Name":"","frames":[[[0,160,-112,90,0,0,125,1],[0,-160,-16,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-133,-24,90,0,0,255,1],[0,133,-104,90,0,0,255,1]],[[0,-106,-32,90,0,0,255,1],[0,106,-96,90,0,0,255,1]],[[0,-80,-40,90,0,0,255,1],[0,80,-88,90,0,0,255,1]],[[0,-53,-48,90,0,0,255,1],[0,53,-80,90,0,0,255,1]],[[0,-26,-56,90,0,0,255,1],[0,26,-72,90,0,0,255,1]],[[0,0,-64,90,0,0,255,1],[0,0,-64,90,0,0,255,1],[1,0,-64,90,0,0,255,0],[1,0,-64,110,0,0,200,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,150,0,0,150,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,160,0,0,140,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,165,0,0,120,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,168,0,0,100,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,170,0,0,50,1]],[[1,0,-64,90,0,0,255,0]],[[1,0,-64,90,0,0,223,0]],[[1,0,-64,90,0,0,191,0]],[[1,0,-64,90,0,0,159,0]],[[1,0,-64,90,0,0,127,0]],[[1,0,-64,90,0,0,95,0]],[[1,0,-64,90,0,0,63,0]],[[1,0,-64,90,0,0,31,0]],[[1,0,-64,90,0,0,0,0]]],"name":"侦测","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Phone","pan":0,"pitch":150,"volume":55}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":10,"se":{"name":"Skill1","pan":0,"pitch":95,"volume":80}},{"flashColor":[255,238,153,102],"flashDuration":8,"flashScope":2,"frame":15,"se":{"name":"Skill2","pan":0,"pitch":100,"volume":80}}]}, +{"id":133,"animation1Hue":0,"animation1Name":"Sword5","animation2Hue":0,"animation2Name":"","frames":[[[3,0,0,200,0,0,255,1]],[[4,0,0,200,0,0,255,1]],[[5,0,0,200,0,0,255,1],[0,0,0,200,0,0,255,1]],[[6,0,0,200,0,0,255,1],[1,0,0,200,0,0,255,1]],[[7,0,0,200,0,0,255,1],[2,0,0,200,0,0,255,1]],[[8,0,0,200,0,0,255,1],[2,0,0,220,0,0,255,1]],[[9,0,0,200,0,0,255,1],[2,0,0,230,0,0,255,1]],[[10,0,0,200,0,0,255,1],[2,0,0,235,0,0,200,1]],[[11,0,0,200,0,0,255,1]],[[12,0,0,200,0,0,255,1]],[[13,0,0,200,0,0,255,1]],[[14,0,0,200,0,0,255,1]],[[15,0,0,200,0,0,255,1]],[[16,0,0,200,0,0,255,1]],[[17,0,0,200,0,0,255,1]],[[18,0,0,200,0,0,255,1]],[[19,0,0,200,0,0,255,1]],[[20,0,0,200,0,0,255,1]],[[21,0,0,200,0,0,255,1]],[[22,0,0,200,0,0,255,1]],[[23,0,0,200,0,0,255,1]]],"name":"斩击/必杀技2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":2,"flashScope":2,"frame":0,"se":{"name":"Sword3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,85,68,170],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Slash1","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,85,68,170],"flashDuration":3,"flashScope":1,"frame":5,"se":{"name":"Slash8","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,85,68,170],"flashDuration":3,"flashScope":1,"frame":10,"se":{"name":"Slash8","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,170,170,170],"flashDuration":5,"flashScope":2,"frame":14,"se":null},{"flashColor":[255,85,68,204],"flashDuration":5,"flashScope":1,"frame":14,"se":{"name":"Slash3","pan":0,"pitch":100,"volume":100}}]}, +{"id":134,"animation1Hue":0,"animation1Name":"Gun2","animation2Hue":0,"animation2Name":"","frames":[[[0,160,-112,90,0,0,125,1],[0,-160,-16,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,125,1],[0,160,-112,90,0,0,125,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-160,-16,90,0,0,255,1],[0,160,-112,90,0,0,255,1]],[[0,-133,-24,90,0,0,255,1],[0,133,-104,90,0,0,255,1]],[[0,-106,-32,90,0,0,255,1],[0,106,-96,90,0,0,255,1]],[[0,-80,-40,90,0,0,255,1],[0,80,-88,90,0,0,255,1]],[[0,-53,-48,90,0,0,255,1],[0,53,-80,90,0,0,255,1]],[[0,-26,-56,90,0,0,255,1],[0,26,-72,90,0,0,255,1]],[[0,0,-64,90,0,0,255,1],[0,0,-64,90,0,0,255,1],[1,0,-64,90,0,0,255,0],[1,0,-64,110,0,0,200,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,150,0,0,150,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,160,0,0,140,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,165,0,0,120,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,168,0,0,100,1]],[[1,0,-64,90,0,0,255,0],[1,0,-64,170,0,0,50,1]],[[1,0,-64,90,0,0,255,0]],[[1,0,-64,90,0,0,255,0],[3,0,-64,200,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[4,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[5,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[6,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[7,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,255,0],[8,0,-64,285,0,0,255,1],[2,216,-16,250,45,0,255,1],[2,-208,-176,250,120,1,255,1]],[[1,0,-64,90,0,0,255,0],[9,0,-64,285,0,0,255,1],[2,192,-104,200,340,0,255,1],[2,-200,-64,200,340,0,255,1]],[[1,0,-64,90,0,0,255,0],[10,0,-64,285,0,0,255,1],[2,160,-144,120,300,0,255,1],[2,-168,-8,120,50,1,255,1]],[[1,0,-64,90,0,0,255,0],[11,0,-64,285,0,0,255,1],[2,104,-128,80,60,0,255,1],[2,-120,8,80,130,0,255,1]],[[1,0,-64,90,0,0,255,0],[12,0,-64,285,0,0,255,1],[2,64,-112,50,45,0,255,1],[2,-72,-16,50,160,1,255,1]],[[1,0,-64,90,0,0,150,0],[12,0,-64,285,0,0,100,1],[13,0,-64,285,0,0,255,1]],[[1,0,-64,90,0,0,100,0],[14,0,-64,300,0,0,255,1]],[[13,0,-64,285,0,0,255,0],[15,0,-64,300,0,0,255,1]],[[16,0,-64,285,0,0,255,1],[13,-144,-72,200,0,1,255,1]],[[17,0,-64,290,0,0,255,1],[14,-144,-72,250,0,1,255,1]],[[18,0,-64,300,0,0,255,1],[15,-144,-72,250,0,1,255,1],[13,152,-32,200,0,0,255,1]],[[19,0,-64,300,0,0,255,1],[16,-144,-72,250,0,1,255,1],[14,152,-32,250,0,1,255,1]],[[20,0,-64,300,0,0,255,1],[17,-144,-72,250,0,1,255,1],[15,152,-32,250,0,1,255,1]],[[21,0,-64,300,0,0,255,1],[18,-144,-72,250,0,1,255,1],[16,152,-32,250,0,1,255,1]],[[22,0,-64,300,0,0,255,1],[19,-144,-72,250,0,1,255,1],[17,152,-32,250,0,1,255,1]],[[23,0,-64,300,0,0,255,1],[20,-144,-72,250,0,1,255,1],[18,152,-32,250,0,1,255,1]],[[24,0,-64,300,0,0,255,1],[21,-144,-72,250,0,1,255,1],[19,152,-32,250,0,1,255,1]],[[22,-144,-72,255,0,1,255,1],[20,152,-32,250,0,1,255,1]],[[23,-144,-72,255,0,1,255,1],[21,152,-32,250,0,1,255,1]],[[24,-144,-72,255,0,1,255,1],[22,152,-32,255,0,1,255,1]],[[23,152,-32,255,0,1,255,1]],[[24,152,-32,255,0,1,255,1]]],"name":"铳击/必杀技","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Phone","pan":0,"pitch":150,"volume":55}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":10,"se":{"name":"Skill1","pan":0,"pitch":95,"volume":80}},{"flashColor":[255,238,153,102],"flashDuration":8,"flashScope":2,"frame":15,"se":{"name":"Skill2","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":22,"se":{"name":"Ice7","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,221,187],"flashDuration":8,"flashScope":2,"frame":23,"se":null},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":26,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":85}},{"flashColor":[255,255,187,238],"flashDuration":5,"flashScope":1,"frame":32,"se":null},{"flashColor":[255,255,204,221],"flashDuration":10,"flashScope":2,"frame":32,"se":{"name":"Explosion4","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,187,238],"flashDuration":3,"flashScope":1,"frame":37,"se":null},{"flashColor":[255,255,187,238],"flashDuration":3,"flashScope":1,"frame":40,"se":null}]}, +{"id":135,"animation1Hue":190,"animation1Name":"Thunder3","animation2Hue":200,"animation2Name":"Thunder1","frames":[[[0,208,112,100,0,0,255,1]],[[1,0,-88,210,0,0,255,1]],[[2,0,-88,210,0,0,255,1]],[[3,0,-88,210,0,0,255,1],[103,192,-72,150,0,0,255,1]],[[4,0,-88,210,0,0,255,1],[0,0,-104,250,0,0,255,1],[104,192,-72,150,0,0,255,1],[107,192,-40,150,0,0,255,1]],[[1,0,-88,210,0,0,255,1],[105,192,-72,150,0,0,255,1],[108,192,-40,150,0,0,200,1]],[[2,0,-88,210,0,0,255,1],[103,-168,-72,150,0,0,255,1],[105,192,-72,150,0,0,100,1]],[[3,0,-88,210,0,0,255,1],[104,-168,-72,150,0,0,255,1],[103,128,-56,100,0,0,255,1],[107,-176,-40,150,0,0,255,1]],[[4,0,-88,210,0,0,255,1],[105,-168,-72,150,0,0,255,1],[104,128,-56,100,0,0,255,1],[108,-176,-40,150,0,0,200,1]],[[1,0,-88,210,0,0,255,1],[105,-168,-72,150,0,0,100,1],[105,128,-56,100,0,0,255,1],[103,-120,-56,100,0,0,255,1]],[[2,0,-88,210,0,0,255,1],[105,128,-56,100,0,0,100,1],[104,-120,-56,100,0,0,255,1]],[[0,0,-56,250,180,1,255,1],[3,0,-88,210,0,0,255,1],[105,-120,-56,100,0,0,255,1]],[[1,0,-88,210,0,0,255,1],[105,-120,-56,100,0,0,100,1]],[[1,0,-88,210,0,0,150,1]]],"name":"电/全体2","position":1,"timings":[{"flashColor":[255,255,255,238],"flashDuration":3,"flashScope":2,"frame":0,"se":{"name":"Thunder10","pan":0,"pitch":120,"volume":100}},{"flashColor":[255,255,204,170],"flashDuration":1,"flashScope":1,"frame":1,"se":{"name":"Thunder9","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,170,170],"flashDuration":3,"flashScope":2,"frame":4,"se":null},{"flashColor":[255,255,221,170],"flashDuration":3,"flashScope":1,"frame":9,"se":null},{"flashColor":[255,255,170,170],"flashDuration":3,"flashScope":2,"frame":9,"se":null}]}, +{"id":136,"animation1Hue":190,"animation1Name":"Thunder3","animation2Hue":200,"animation2Name":"Thunder1","frames":[[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[2,0,-100,200,0,0,255,1]],[[3,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,255,1]]],"name":"电/全体2","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"attunementaltar","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":31,"se":{"name":"attunementaltar","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":63,"se":{"name":"attunementaltar","pan":0,"pitch":100,"volume":80}}]}, +{"id":137,"animation1Hue":190,"animation1Name":"Thunder3","animation2Hue":200,"animation2Name":"Thunder1","frames":[[[1,0,-100,200,0,0,255,1]],[[4,0,-100,200,0,0,249,1]],[[3,0,-100,200,0,0,244,1]],[[2,0,-100,200,0,0,238,1]],[[3,0,-100,200,0,0,233,1]],[[4,0,-100,200,0,0,227,1]],[[1,0,-100,200,0,0,222,1]],[[4,0,-100,200,0,0,217,1]],[[3,0,-100,200,0,0,211,1]],[[2,0,-100,200,0,0,206,1]],[[3,0,-100,200,0,0,200,1]],[[4,0,-100,200,0,0,195,1]],[[1,0,-100,200,0,0,189,1]],[[4,0,-100,200,0,0,184,1]],[[3,0,-100,200,0,0,179,1]],[[2,0,-100,200,0,0,173,1]],[[3,0,-100,200,0,0,168,1]],[[4,0,-100,200,0,0,162,1]],[[1,0,-100,200,0,0,157,1]],[[4,0,-100,200,0,0,151,1]],[[3,0,-100,200,0,0,146,1]],[[2,0,-100,200,0,0,141,1]],[[3,0,-100,200,0,0,135,1]],[[4,0,-100,200,0,0,130,1]],[[1,0,-100,200,0,0,124,1]],[[4,0,-100,200,0,0,119,1]],[[3,0,-100,200,0,0,113,1]],[[2,0,-100,200,0,0,108,1]],[[3,0,-100,200,0,0,103,1]],[[4,0,-100,200,0,0,97,1]],[[1,0,-100,200,0,0,92,1]],[[4,0,-100,200,0,0,86,1]],[[3,0,-100,200,0,0,81,1]],[[2,0,-100,200,0,0,75,1]],[[3,0,-100,200,0,0,70,1]],[[4,0,-100,200,0,0,65,1]],[[1,0,-100,200,0,0,59,1]],[[4,0,-100,200,0,0,54,1]],[[3,0,-100,200,0,0,48,1]],[[2,0,-100,200,0,0,43,1]],[[3,0,-100,200,0,0,37,1]],[[4,0,-100,200,0,0,32,1]],[[1,0,-100,200,0,0,27,1]],[[4,0,-100,200,0,0,21,1]],[[3,0,-100,200,0,0,16,1]],[[2,0,-100,200,0,0,10,1]],[[3,0,-100,200,0,0,5,1]],[[4,0,-100,200,0,0,0,1]]],"name":"电/全体2","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"craftfail","pan":0,"pitch":100,"volume":80}}]}, +{"id":138,"animation1Hue":0,"animation1Name":"Earth2","animation2Hue":0,"animation2Name":"Earth1","frames":[[[2,0,0,100,0,0,255,1],[0,0,0,100,0,0,255,1]],[[3,0,0,100,0,0,255,1],[1,0,0,100,0,0,255,1]],[[4,0,0,100,0,0,255,1],[1,0,0,100,0,0,255,1]],[[5,0,0,100,0,0,255,1],[1,0,0,100,0,0,255,1]],[[6,0,0,100,0,0,255,1],[1,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[6,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[102,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[103,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[104,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[105,0,0,100,0,0,255,1]],[[1,0,0,100,0,0,255,1],[106,0,0,100,0,0,255,1]]],"name":"","position":1,"timings":[]}, +{"id":139,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,150,0,0,191,1],[114,0,-40,50,0,0,191,1]],[[8,0,0,150,0,0,127,1],[114,0,-40,50,0,0,127,1]],[[8,0,0,150,0,0,63,1],[114,0,-40,50,0,0,63,1]],[[8,0,0,150,0,0,0,1],[114,0,-40,50,0,0,0,1]]],"name":"圆形AOE标记(2格)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":140,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,600,0,0,191,1],[114,0,-40,50,0,0,191,1]],[[8,0,0,600,0,0,127,1],[114,0,-40,50,0,0,127,1]],[[8,0,0,600,0,0,63,1],[114,0,-40,50,0,0,63,1]],[[8,0,0,600,0,0,0,1],[114,0,-40,50,0,0,0,1]]],"name":"圆形AOE标记(8格)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":141,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,300,0,0,191,1],[114,0,-40,50,0,0,191,1]],[[8,0,0,300,0,0,127,1],[114,0,-40,50,0,0,127,1]],[[8,0,0,300,0,0,63,1],[114,0,-40,50,0,0,63,1]],[[8,0,0,300,0,0,0,1],[114,0,-40,50,0,0,0,1]]],"name":"圆形AOE标记(4格)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":142,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,255,1],[114,0,-40,50,0,0,255,1]],[[8,0,0,100,0,0,191,1],[114,0,-40,50,0,0,191,1]],[[8,0,0,100,0,0,127,1],[114,0,-40,50,0,0,127,1]],[[8,0,0,100,0,0,63,1],[114,0,-40,50,0,0,63,1]],[[8,0,0,100,0,0,0,1],[114,0,-40,50,0,0,0,1]]],"name":"圆形AOE标记(1格)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":143,"animation1Hue":0,"animation1Name":"","animation2Hue":0,"animation2Name":"","frames":[[]],"name":"","position":1,"timings":[]}, +{"id":144,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,0,0,0,1]],[[23,0,0,800,0,0,51,1]],[[23,0,0,800,0,0,102,1]],[[23,0,0,800,0,0,153,1]],[[23,0,0,800,0,0,204,1]],[[23,0,0,800,0,0,255,1]],[[23,0,0,800,0,0,212,1]],[[23,0,0,800,0,0,170,1]],[[23,0,0,800,0,0,127,1]],[[23,0,0,800,0,0,85,1]],[[23,0,0,800,0,0,42,1]],[[23,0,0,800,0,0,0,1]]],"name":"直条AOE(南)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":145,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,180,0,0,1]],[[23,0,0,800,180,0,51,1]],[[23,0,0,800,180,0,102,1]],[[23,0,0,800,180,0,153,1]],[[23,0,0,800,180,0,204,1]],[[23,0,0,800,180,0,255,1]],[[23,0,0,800,180,0,212,1]],[[23,0,0,800,180,0,170,1]],[[23,0,0,800,180,0,127,1]],[[23,0,0,800,180,0,85,1]],[[23,0,0,800,180,0,42,1]],[[23,0,0,800,180,0,0,1]]],"name":"直条AOE(北)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":146,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,90,0,0,1]],[[23,0,0,800,90,0,51,1]],[[23,0,0,800,90,0,102,1]],[[23,0,0,800,90,0,153,1]],[[23,0,0,800,90,0,204,1]],[[23,0,0,800,90,0,255,1]],[[23,0,0,800,90,0,212,1]],[[23,0,0,800,90,0,170,1]],[[23,0,0,800,90,0,127,1]],[[23,0,0,800,90,0,85,1]],[[23,0,0,800,90,0,42,1]],[[23,0,0,800,90,0,0,1]]],"name":"直条AOE(西)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":147,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,90,1,0,1]],[[23,0,0,800,90,1,51,1]],[[23,0,0,800,90,1,102,1]],[[23,0,0,800,90,1,153,1]],[[23,0,0,800,90,1,204,1]],[[23,0,0,800,90,1,255,1]],[[23,0,0,800,90,1,212,1]],[[23,0,0,800,90,1,170,1]],[[23,0,0,800,90,1,127,1]],[[23,0,0,800,90,1,85,1]],[[23,0,0,800,90,1,42,1]],[[23,0,0,800,90,1,0,1]]],"name":"直条AOE(东)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":148,"animation1Hue":0,"animation1Name":"Sword7","animation2Hue":0,"animation2Name":"Sword8","frames":[[[100,0,-56,230,0,0,255,0]],[[101,0,-56,230,0,0,255,0],[117,184,-56,240,0,0,100,0],[117,-176,-56,240,0,1,100,0]],[[102,0,-56,230,0,0,255,0],[117,184,-56,235,0,0,150,0],[117,-176,-56,235,0,1,150,0]],[[103,0,-56,230,0,0,255,0],[117,184,-56,230,0,0,255,0],[117,-176,-56,230,0,1,255,0]],[[104,0,-56,230,0,0,255,0],[118,184,-56,230,0,0,255,0],[118,-176,-56,230,0,1,255,0]],[[105,0,-56,230,0,0,255,0],[119,184,-56,230,0,0,255,0],[119,-176,-56,230,0,1,255,0]],[[106,0,-56,230,0,0,255,0],[120,184,-56,230,0,0,255,0],[120,-176,-56,230,0,1,255,0]],[[107,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[108,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[109,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[110,0,-56,230,0,0,255,0],[120,184,-56,230,0,0,255,0],[120,-176,-56,230,0,1,255,0]],[[111,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[112,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[113,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0]],[[114,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0]],[[115,0,-56,230,0,0,255,0],[121,184,-56,230,0,0,255,0],[121,-176,-56,230,0,1,255,0],[0,0,-56,285,90,0,255,1]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[1,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,20,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[2,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,50,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[3,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,80,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[4,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,100,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[5,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,120,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[6,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,160,0]],[[116,0,-56,230,0,0,255,0],[122,184,-56,230,0,0,255,0],[122,-176,-56,230,0,1,255,0],[7,0,-56,285,90,0,255,1],[16,0,-56,285,90,0,200,0]],[[122,-176,-56,230,0,1,150,0],[116,0,-56,230,0,0,150,0],[122,184,-56,230,0,0,150,0],[8,0,-56,285,90,0,255,1]],[[122,-176,-56,230,0,1,100,0],[116,0,-56,230,0,0,100,0],[122,184,-56,230,0,0,100,0],[9,0,-56,285,90,0,255,1]],[[122,-176,-56,230,0,1,50,0],[116,0,-56,230,0,0,50,0],[122,184,-56,230,0,0,50,0],[10,0,-56,285,90,0,255,1]],[[11,0,-56,285,0,0,255,1]],[[12,0,-56,285,0,0,255,1]],[[13,0,-56,285,0,0,255,1]],[[14,0,-56,285,0,0,255,1]],[[15,0,-56,285,0,0,255,1]]],"name":"斩击/必杀技3","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Fog2","pan":0,"pitch":70,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":15,"se":{"name":"Slash3","pan":0,"pitch":105,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":15,"se":{"name":"Attack3","pan":0,"pitch":80,"volume":90}},{"flashColor":[187,221,255,255],"flashDuration":5,"flashScope":1,"frame":16,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":6,"flashScope":2,"frame":23,"se":null}]}, +{"id":149,"animation1Hue":50,"animation1Name":"timg2","animation2Hue":0,"animation2Name":"Attack2","frames":[[[1,144,80,100,0,0,255,1]],[[1,101,53,100,90,0,255,1]],[[1,58,26,100,180,0,255,1]],[[1,16,0,100,270,0,255,1]],[[100,0,0,200,0,0,255,1]],[[101,0,0,200,0,0,255,1]],[[102,0,0,200,0,0,255,1]],[[103,0,0,200,0,0,255,1]],[[104,0,0,200,0,0,255,1]],[[105,0,0,200,0,0,255,1]],[[106,0,8,200,0,0,255,1]],[[107,0,8,200,0,0,255,1]]],"name":"金砖","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":4,"se":{"name":"Bite","pan":0,"pitch":135,"volume":80}}]}, +{"id":150,"animation1Hue":0,"animation1Name":"","animation2Hue":0,"animation2Name":"","frames":[[]],"name":"","position":1,"timings":[]}, +{"id":151,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[8,0,0,150,0,0,255,1],[114,0,-88,50,0,0,255,1],[114,-88,0,50,90,0,255,1],[114,0,88,50,180,0,255,1],[114,88,0,50,270,0,255,1]],[[8,0,0,150,0,0,231,1],[114,0,-88,50,0,0,231,1],[114,-88,0,50,90,0,231,1],[114,0,88,50,180,0,231,1],[114,88,0,50,270,0,231,1]],[[8,0,0,150,0,0,208,1],[114,0,-88,50,0,0,208,1],[114,-88,0,50,90,0,208,1],[114,0,88,50,180,0,208,1],[114,88,0,50,270,0,208,1]],[[8,0,0,150,0,0,185,1],[114,0,-88,50,0,0,185,1],[114,-88,0,50,90,0,185,1],[114,0,88,50,180,0,185,1],[114,88,0,50,270,0,185,1]],[[8,0,0,150,0,0,162,1],[114,0,-88,50,0,0,162,1],[114,-88,0,50,90,0,162,1],[114,0,88,50,180,0,162,1],[114,88,0,50,270,0,162,1]],[[8,0,0,150,0,0,139,1],[114,0,-88,50,0,0,139,1],[114,-88,0,50,90,0,139,1],[114,0,88,50,180,0,139,1],[114,88,0,50,270,0,139,1]],[[8,0,0,150,0,0,115,1],[114,0,-88,50,0,0,115,1],[114,-88,0,50,90,0,115,1],[114,0,88,50,180,0,115,1],[114,88,0,50,270,0,115,1]],[[8,0,0,150,0,0,92,1],[114,0,-88,50,0,0,92,1],[114,-88,0,50,90,0,92,1],[114,0,88,50,180,0,92,1],[114,88,0,50,270,0,92,1]],[[8,0,0,150,0,0,69,1],[114,0,-88,50,0,0,69,1],[114,-88,0,50,90,0,69,1],[114,0,88,50,180,0,69,1],[114,88,0,50,270,0,69,1]],[[8,0,0,150,0,0,46,1],[114,0,-88,50,0,0,46,1],[114,-88,0,50,90,0,46,1],[114,0,88,50,180,0,46,1],[114,88,0,50,270,0,46,1]],[[8,0,0,150,0,0,23,1],[114,0,-88,50,0,0,23,1],[114,-88,0,50,90,0,23,1],[114,0,88,50,180,0,23,1],[114,88,0,50,270,0,23,1]],[[8,0,0,150,0,0,0,1],[114,0,-88,50,0,0,0,1],[114,-88,0,50,90,0,0,1],[114,0,88,50,180,0,0,1],[114,88,0,50,270,0,0,1]]],"name":"圆形分摊标记(2格)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":152,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[8,0,0,100,0,0,255,1],[114,0,-88,50,0,0,255,1],[114,-88,0,50,90,0,255,1],[114,0,88,50,180,0,255,1],[114,88,0,50,270,0,255,1]],[[8,0,0,100,0,0,231,1],[114,0,-88,50,0,0,231,1],[114,-88,0,50,90,0,231,1],[114,0,88,50,180,0,231,1],[114,88,0,50,270,0,231,1]],[[8,0,0,100,0,0,208,1],[114,0,-88,50,0,0,208,1],[114,-88,0,50,90,0,208,1],[114,0,88,50,180,0,208,1],[114,88,0,50,270,0,208,1]],[[8,0,0,100,0,0,185,1],[114,0,-88,50,0,0,185,1],[114,-88,0,50,90,0,185,1],[114,0,88,50,180,0,185,1],[114,88,0,50,270,0,185,1]],[[8,0,0,100,0,0,162,1],[114,0,-88,50,0,0,162,1],[114,-88,0,50,90,0,162,1],[114,0,88,50,180,0,162,1],[114,88,0,50,270,0,162,1]],[[8,0,0,100,0,0,139,1],[114,0,-88,50,0,0,139,1],[114,-88,0,50,90,0,139,1],[114,0,88,50,180,0,139,1],[114,88,0,50,270,0,139,1]],[[8,0,0,100,0,0,115,1],[114,0,-88,50,0,0,115,1],[114,-88,0,50,90,0,115,1],[114,0,88,50,180,0,115,1],[114,88,0,50,270,0,115,1]],[[8,0,0,100,0,0,92,1],[114,0,-88,50,0,0,92,1],[114,-88,0,50,90,0,92,1],[114,0,88,50,180,0,92,1],[114,88,0,50,270,0,92,1]],[[8,0,0,100,0,0,69,1],[114,0,-88,50,0,0,69,1],[114,-88,0,50,90,0,69,1],[114,0,88,50,180,0,69,1],[114,88,0,50,270,0,69,1]],[[8,0,0,100,0,0,46,1],[114,0,-88,50,0,0,46,1],[114,-88,0,50,90,0,46,1],[114,0,88,50,180,0,46,1],[114,88,0,50,270,0,46,1]],[[8,0,0,100,0,0,23,1],[114,0,-88,50,0,0,23,1],[114,-88,0,50,90,0,23,1],[114,0,88,50,180,0,23,1],[114,88,0,50,270,0,23,1]],[[8,0,0,100,0,0,0,1],[114,0,-88,50,0,0,0,1],[114,-88,0,50,90,0,0,1],[114,0,88,50,180,0,0,1],[114,88,0,50,270,0,0,1]]],"name":"圆形分摊标记(1格)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":153,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[114,-48,-96,50,90,0,255,1],[114,-48,96,50,90,0,255,1],[114,-48,0,50,90,0,255,1],[114,-48,-192,50,90,0,255,1],[114,48,0,50,270,0,255,1],[114,-48,192,50,90,0,255,1],[114,48,-96,50,270,0,255,1],[114,48,-192,50,270,0,255,1],[114,48,96,50,270,0,255,1],[114,48,192,50,270,0,255,1]],[[114,-48,-96,50,90,0,231,1],[114,-48,96,50,90,0,231,1],[114,-48,0,50,90,0,231,1],[114,-48,-192,50,90,0,231,1],[114,48,0,50,270,0,231,1],[114,-48,192,50,90,0,231,1],[114,48,-96,50,270,0,231,1],[114,48,-192,50,270,0,231,1],[114,48,96,50,270,0,231,1],[114,48,192,50,270,0,231,1]],[[114,-48,-96,50,90,0,208,1],[114,-48,96,50,90,0,208,1],[114,-48,0,50,90,0,208,1],[114,-48,-192,50,90,0,208,1],[114,48,0,50,270,0,208,1],[114,-48,192,50,90,0,208,1],[114,48,-96,50,270,0,208,1],[114,48,-192,50,270,0,208,1],[114,48,96,50,270,0,208,1],[114,48,192,50,270,0,208,1]],[[114,-48,-96,50,90,0,185,1],[114,-48,96,50,90,0,185,1],[114,-48,0,50,90,0,185,1],[114,-48,-192,50,90,0,185,1],[114,48,0,50,270,0,185,1],[114,-48,192,50,90,0,185,1],[114,48,-96,50,270,0,185,1],[114,48,-192,50,270,0,185,1],[114,48,96,50,270,0,185,1],[114,48,192,50,270,0,185,1]],[[114,-48,-96,50,90,0,162,1],[114,-48,96,50,90,0,162,1],[114,-48,0,50,90,0,162,1],[114,-48,-192,50,90,0,162,1],[114,48,0,50,270,0,162,1],[114,-48,192,50,90,0,162,1],[114,48,-96,50,270,0,162,1],[114,48,-192,50,270,0,162,1],[114,48,96,50,270,0,162,1],[114,48,192,50,270,0,162,1]],[[114,-48,-96,50,90,0,139,1],[114,-48,96,50,90,0,139,1],[114,-48,0,50,90,0,139,1],[114,-48,-192,50,90,0,139,1],[114,48,0,50,270,0,139,1],[114,-48,192,50,90,0,139,1],[114,48,-96,50,270,0,139,1],[114,48,-192,50,270,0,139,1],[114,48,96,50,270,0,139,1],[114,48,192,50,270,0,139,1]],[[114,-48,-96,50,90,0,115,1],[114,-48,96,50,90,0,115,1],[114,-48,0,50,90,0,115,1],[114,-48,-192,50,90,0,115,1],[114,48,0,50,270,0,115,1],[114,-48,192,50,90,0,115,1],[114,48,-96,50,270,0,115,1],[114,48,-192,50,270,0,115,1],[114,48,96,50,270,0,115,1],[114,48,192,50,270,0,115,1]],[[114,-48,-96,50,90,0,92,1],[114,-48,96,50,90,0,92,1],[114,-48,0,50,90,0,92,1],[114,-48,-192,50,90,0,92,1],[114,48,0,50,270,0,92,1],[114,-48,192,50,90,0,92,1],[114,48,-96,50,270,0,92,1],[114,48,-192,50,270,0,92,1],[114,48,96,50,270,0,92,1],[114,48,192,50,270,0,92,1]],[[114,-48,-96,50,90,0,69,1],[114,-48,96,50,90,0,69,1],[114,-48,0,50,90,0,69,1],[114,-48,-192,50,90,0,69,1],[114,48,0,50,270,0,69,1],[114,-48,192,50,90,0,69,1],[114,48,-96,50,270,0,69,1],[114,48,-192,50,270,0,69,1],[114,48,96,50,270,0,69,1],[114,48,192,50,270,0,69,1]],[[114,-48,-96,50,90,0,46,1],[114,-48,96,50,90,0,46,1],[114,-48,0,50,90,0,46,1],[114,-48,-192,50,90,0,46,1],[114,48,0,50,270,0,46,1],[114,-48,192,50,90,0,46,1],[114,48,-96,50,270,0,46,1],[114,48,-192,50,270,0,46,1],[114,48,96,50,270,0,46,1],[114,48,192,50,270,0,46,1]],[[114,-48,-96,50,90,0,23,1],[114,-48,96,50,90,0,23,1],[114,-48,0,50,90,0,23,1],[114,-48,-192,50,90,0,23,1],[114,48,0,50,270,0,23,1],[114,-48,192,50,90,0,23,1],[114,48,-96,50,270,0,23,1],[114,48,-192,50,270,0,23,1],[114,48,96,50,270,0,23,1],[114,48,192,50,270,0,23,1]],[[114,-48,-96,50,90,0,0,1],[114,-48,96,50,90,0,0,1],[114,-48,0,50,90,0,0,1],[114,-48,-192,50,90,0,0,1],[114,48,0,50,270,0,0,1],[114,-48,192,50,90,0,0,1],[114,48,-96,50,270,0,0,1],[114,48,-192,50,270,0,0,1],[114,48,96,50,270,0,0,1],[114,48,192,50,270,0,0,1]]],"name":"圆形分摊标记(南北)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":154,"animation1Hue":0,"animation1Name":"","animation2Hue":0,"animation2Name":"","frames":[[]],"name":"","position":1,"timings":[]}, +{"id":155,"animation1Hue":0,"animation1Name":"Death1","animation2Hue":0,"animation2Name":"Heal2","frames":[[[5,0,144,100,0,0,100,0]],[[6,0,136,100,0,0,150,0]],[[5,0,128,100,0,0,200,0]],[[6,0,128,100,0,0,255,0]],[[5,0,128,100,0,0,255,0]],[[6,0,128,100,0,0,255,0],[0,0,168,200,0,0,255,1]],[[5,0,128,100,0,0,255,0],[104,-16,112,70,0,0,255,1],[1,0,168,200,0,0,255,1]],[[6,0,128,100,0,0,255,0],[23,-16,112,110,0,0,255,1],[105,-16,112,100,0,0,255,1],[2,0,168,200,0,0,255,1]],[[5,0,128,100,0,0,255,0],[23,-16,112,100,0,0,255,1],[107,-16,112,100,0,0,255,1],[3,0,168,200,0,0,200,1]],[[6,0,128,100,0,0,255,0],[22,-16,112,120,0,0,255,1],[4,0,168,200,0,0,150,1],[11,0,200,150,0,0,255,1]],[[5,0,128,100,0,0,255,0],[22,-16,112,100,0,0,200,1],[12,0,200,150,0,0,255,1]],[[5,0,128,100,0,0,255,0],[22,-16,112,60,0,0,200,1],[13,0,200,150,0,0,255,1]],[[7,0,128,100,0,0,255,0],[14,0,200,170,0,0,255,1]],[[8,0,128,100,0,0,255,0],[15,0,200,180,0,0,255,1]],[[9,0,128,100,0,0,255,0],[16,0,200,180,0,0,255,1]],[[10,0,128,100,0,0,255,0],[17,0,200,180,0,0,255,1]],[[10,0,128,100,0,0,255,0],[18,0,200,180,0,0,255,1]],[[10,0,128,100,0,0,255,0],[19,0,200,180,0,0,255,1]],[[10,0,128,100,0,0,200,0],[20,0,200,180,0,0,255,1]],[[10,0,128,100,0,0,150,0],[21,0,200,180,0,0,255,1]],[[21,0,200,180,0,0,150,1],[10,0,128,100,0,0,100,0]]],"name":"即死","position":1,"timings":[{"flashColor":[153,0,68,238],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Darkness5","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,0,136,255],"flashDuration":5,"flashScope":0,"frame":6,"se":{"name":"Thunder1","pan":0,"pitch":125,"volume":90}},{"flashColor":[255,102,119,204],"flashDuration":3,"flashScope":2,"frame":6,"se":null}]}, +{"id":156,"animation1Hue":0,"animation1Name":"Light2","animation2Hue":0,"animation2Name":"","frames":[[[18,0,-88,270,0,0,255,1],[0,0,56,300,0,0,100,1],[23,0,56,100,0,0,150,1]],[[18,0,-80,270,0,0,255,1],[19,0,-72,260,0,0,150,1],[23,0,56,130,0,0,180,1],[0,0,56,260,0,0,150,1]],[[19,0,-80,270,0,0,255,1],[23,0,56,150,0,0,255,1],[0,0,56,200,0,0,200,1]],[[19,0,-72,270,0,0,200,1],[23,0,56,160,0,0,180,1],[24,0,56,100,0,0,255,1],[0,0,56,180,0,0,200,1]],[[19,0,-72,270,0,0,255,1],[24,0,56,150,0,0,255,1],[0,0,56,150,0,0,200,1]],[[19,0,-72,270,0,0,200,1],[24,0,56,200,0,0,255,1],[0,0,56,100,0,0,100,1]],[[19,0,-72,270,0,0,255,1],[1,0,-56,200,0,0,255,1],[24,0,56,180,0,0,200,1]],[[19,0,-72,270,0,0,150,1],[18,0,-72,270,0,0,255,1],[13,0,-48,200,0,0,255,1],[-1,0,72,20,0,0,0,0],[2,0,-56,200,0,0,255,1]],[[18,0,-72,250,0,0,200,1],[3,0,-48,200,0,0,255,1],[14,0,-56,200,0,0,255,1],[24,-168,64,180,0,0,200,1],[1,176,-48,200,0,1,255,1],[1,-176,-48,200,0,0,255,1],[24,168,64,180,0,0,200,1]],[[4,0,-40,200,0,0,255,1],[15,0,-32,200,0,0,255,1],[20,0,64,200,0,0,255,1],[5,0,-48,200,0,0,255,1],[2,-176,-48,200,0,0,255,1],[13,-176,-48,200,0,0,255,1],[13,176,-40,200,0,0,255,1],[2,168,-40,200,0,1,255,1]],[[22,0,64,200,0,0,255,1],[16,0,-24,200,0,0,255,1],[15,0,-16,150,0,0,255,1],[8,0,-88,200,0,0,255,1],[3,-176,-48,200,0,0,255,1],[14,-176,-48,200,0,0,255,1],[14,176,-40,200,0,0,255,1],[3,176,-40,200,0,1,255,1]],[[6,0,-40,200,0,0,255,1],[17,0,-24,200,0,0,255,1],[22,0,64,220,0,0,160,1],[9,0,-88,200,0,0,255,1],[18,0,-24,200,0,0,255,1],[4,-176,-48,200,0,0,255,1],[8,-176,-104,200,0,0,255,1],[15,-176,-16,150,0,0,255,1],[15,176,-16,150,0,0,255,1],[8,176,-104,200,0,0,255,1],[4,176,-48,200,0,0,255,1],[20,-176,56,200,0,0,255,1],[20,176,56,200,0,0,255,1]],[[7,0,-40,200,0,0,255,1],[10,0,-88,200,0,0,255,1],[18,-176,-40,200,0,0,255,1],[9,-176,-104,200,0,0,255,1],[18,176,-32,200,0,0,255,1],[9,176,-104,200,0,0,255,1],[22,-176,56,200,0,0,255,1],[22,176,56,200,0,0,255,1],[4,-128,8,100,0,0,255,1],[4,128,8,100,0,0,255,1]],[[11,0,-88,200,0,0,255,1],[10,-176,-104,200,0,0,255,1],[10,176,-104,200,0,0,255,1],[22,-176,56,220,0,0,160,1],[22,176,56,220,0,0,160,1],[18,-128,-40,200,0,0,255,1],[5,-128,8,100,0,0,255,1],[13,-128,8,100,0,0,255,1],[18,128,-40,200,0,0,255,1],[13,128,8,100,0,0,255,1],[5,128,8,100,0,0,255,1]],[[12,0,-88,200,0,0,255,1],[11,-176,-104,200,0,0,255,1],[11,176,-104,200,0,0,255,1],[6,-128,8,100,0,0,255,1],[18,-128,-136,200,0,0,150,1],[6,128,8,100,0,0,255,1],[18,128,-136,200,0,0,150,1],[13,224,8,100,0,0,255,1],[4,-224,8,100,0,0,255,1],[18,224,-136,200,0,0,150,1],[4,224,8,100,0,0,255,1],[13,-224,8,100,0,0,255,1]],[[12,0,-88,210,0,0,150,1],[12,-176,-104,200,0,0,255,1],[12,176,-104,200,0,0,255,1],[7,-128,8,100,0,0,255,1],[7,128,8,100,0,0,255,1],[18,224,-40,200,0,0,255,1],[18,-224,-40,200,0,0,255,1],[5,-224,8,100,0,0,255,1],[5,224,8,100,0,0,255,1]],[[12,-176,-104,210,0,0,150,1],[12,176,-104,210,0,0,150,1],[6,-224,8,100,0,0,255,1],[18,-224,-136,200,0,0,150,1],[6,224,8,100,0,0,255,1],[18,224,-136,200,0,0,150,1]],[[7,-224,8,100,0,0,255,1],[7,224,8,100,0,0,255,1]]],"name":"圣/全体","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Saint7","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":8,"se":{"name":"Explosion5","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,255,204,204],"flashDuration":5,"flashScope":1,"frame":8,"se":{"name":"Saint4","pan":0,"pitch":120,"volume":90}},{"flashColor":[255,255,187,153],"flashDuration":5,"flashScope":2,"frame":9,"se":null}]}, +{"id":157,"animation1Hue":0,"animation1Name":"Meteor","animation2Hue":0,"animation2Name":"Gun2","frames":[[[1,0,-64,150,0,0,200,0]],[[1,0,-64,150,0,0,200,0]],[[1,0,-64,150,0,0,255,0],[103,0,-64,200,0,0,255,1],[1,0,-64,150,0,0,150,1]],[[1,0,-64,150,0,0,255,0],[1,0,-64,180,0,0,200,1],[104,0,-64,285,0,0,255,1]],[[1,0,-64,190,0,0,150,1],[105,0,-64,285,0,0,255,1]],[[1,0,-64,195,0,0,100,0],[106,0,-64,285,0,0,255,1]],[[1,0,-64,200,0,0,60,0],[107,0,-64,285,0,0,255,1]],[[1,0,-64,203,0,0,30,0],[108,0,-64,285,0,0,255,1]],[[109,0,-64,285,0,0,255,1]],[[110,0,-64,285,0,0,255,1]],[[111,0,-64,285,0,0,255,1]],[[112,0,-64,285,0,0,255,1]],[[112,0,-64,280,0,0,150,1]],[[112,0,-64,275,0,0,50,1]],[],[[4,272,-208,800,0,0,255,1]],[[4,268,-204,800,0,0,255,1]],[[4,264,-200,800,0,0,255,1]],[[4,260,-197,800,0,0,255,1]],[[4,256,-193,800,0,0,255,1]],[[4,253,-189,800,0,0,255,1]],[[4,249,-186,800,0,0,255,1]],[[4,245,-182,800,0,0,255,1]],[[4,241,-179,800,0,0,255,1]],[[4,238,-175,800,0,0,255,1]],[[4,234,-171,800,0,0,255,1]],[[4,230,-168,800,0,0,255,1]],[[4,226,-164,800,0,0,255,1]],[[4,223,-161,800,0,0,255,1]],[[4,219,-157,800,0,0,255,1]],[[4,215,-153,800,0,0,255,1]],[[4,211,-150,800,0,0,255,1]],[[4,207,-146,800,0,0,255,1]],[[4,204,-142,800,0,0,255,1]],[[4,200,-139,800,0,0,255,1]],[[4,196,-135,800,0,0,255,1]],[[4,192,-132,800,0,0,255,1]],[[4,189,-128,800,0,0,255,1]],[[4,185,-124,800,0,0,255,1]],[[4,181,-121,800,0,0,255,1]],[[4,177,-117,800,0,0,255,1]],[[4,174,-114,800,0,0,255,1]],[[4,170,-110,800,0,0,255,1]],[[4,166,-106,800,0,0,255,1]],[[4,162,-103,800,0,0,255,1]],[[4,158,-99,800,0,0,255,1]],[[4,155,-95,800,0,0,255,1]],[[4,151,-92,800,0,0,255,1]],[[4,147,-88,800,0,0,255,1]],[[4,143,-85,800,0,0,255,1]],[[4,140,-81,800,0,0,255,1]],[[4,136,-77,800,0,0,255,1]],[[4,132,-74,800,0,0,255,1]],[[4,128,-70,800,0,0,255,1]],[[4,125,-67,800,0,0,255,1]],[[4,121,-63,800,0,0,255,1]],[[4,117,-59,800,0,0,255,1]],[[4,113,-56,800,0,0,255,1]],[[4,109,-52,800,0,0,255,1]],[[4,106,-48,800,0,0,255,1]],[[4,102,-45,800,0,0,255,1]],[[4,98,-41,800,0,0,255,1]],[[4,94,-38,800,0,0,255,1]],[[4,91,-34,800,0,0,255,1]],[[4,87,-30,800,0,0,255,1]],[[4,83,-27,800,0,0,255,1]],[[4,79,-23,800,0,0,255,1]],[[4,76,-20,800,0,0,255,1]],[[4,72,-16,800,0,0,255,1]],[[4,68,-12,800,0,0,255,1]],[[4,64,-9,800,0,0,255,1]],[[4,60,-5,800,0,0,255,1]],[[4,57,-1,800,0,0,255,1]],[[4,53,1,800,0,0,255,1]],[[4,49,5,800,0,0,255,1]],[[4,45,8,800,0,0,255,1]],[[4,42,12,800,0,0,255,1]],[[4,38,16,800,0,0,255,1]],[[4,34,19,800,0,0,255,1]],[[4,30,23,800,0,0,255,1]],[[4,27,27,800,0,0,255,1]],[[4,23,30,800,0,0,255,1]],[[4,19,34,800,0,0,255,1]],[[4,15,37,800,0,0,255,1]],[[4,11,41,800,0,0,255,1]],[[4,8,45,800,0,0,255,1]],[[4,4,48,800,0,0,255,1]],[[4,0,52,800,0,0,255,1]],[[4,-3,55,800,0,0,255,1]],[[4,-6,59,800,0,0,255,1]],[[4,-10,63,800,0,0,255,1]],[[4,-14,66,800,0,0,255,1]],[[4,-18,70,800,0,0,255,1]],[[4,-22,74,800,0,0,255,1]],[[4,-25,77,800,0,0,255,1]],[[4,-29,81,800,0,0,255,1]],[[4,-33,84,800,0,0,255,1]],[[4,-37,88,800,0,0,255,1]],[[4,-40,92,800,0,0,255,1]],[[4,-44,95,800,0,0,255,1]],[[4,-48,99,800,0,0,255,1]],[[4,-52,102,800,0,0,255,1]],[[4,-55,106,800,0,0,255,1]],[[4,-59,110,800,0,0,255,1]],[[4,-63,113,800,0,0,255,1]],[[4,-67,117,800,0,0,255,1]],[[4,-71,121,800,0,0,255,1]],[[4,-74,124,800,0,0,255,1]],[[4,-78,128,800,0,0,255,1]],[[4,-82,131,800,0,0,255,1]],[[4,-86,135,800,0,0,255,1]],[[4,-89,139,800,0,0,255,1]],[[4,-93,142,800,0,0,255,1]],[[4,-97,146,800,0,0,255,1]],[[4,-101,149,800,0,0,255,1]],[[4,-104,153,800,0,0,255,1]],[[4,-108,157,800,0,0,255,1]],[[4,-112,160,800,0,0,255,1]],[[4,-116,164,800,0,0,255,1]],[[4,-120,168,800,0,0,255,1]]],"name":"无属性/全体2","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Thunder7","pan":0,"pitch":80,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":19,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":29,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":39,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":49,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":59,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":69,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":79,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":89,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":99,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":109,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}}]}, +{"id":158,"animation1Hue":0,"animation1Name":"Earth1","animation2Hue":0,"animation2Name":"","frames":[[[1,0,84,200,0,0,255,0]],[[1,0,84,200,0,0,255,0]],[[1,0,84,200,0,0,255,0]],[[1,0,84,200,0,0,255,0]],[[1,0,84,200,0,0,255,0]],[[2,0,116,200,0,0,255,0]],[[3,0,116,200,0,0,255,0]],[[4,0,116,200,0,0,255,0]],[[5,0,116,200,0,0,255,0]],[[6,0,116,200,0,0,180,0]],[[6,0,116,200,0,0,100,0]],[]],"name":"地/单体","position":1,"timings":[{"flashColor":[255,153,0,255],"flashDuration":5,"flashScope":1,"frame":5,"se":{"name":"Earth5","pan":0,"pitch":50,"volume":100}},{"flashColor":[204,153,34,187],"flashDuration":3,"flashScope":2,"frame":6,"se":null}]}, +{"id":159,"animation1Hue":0,"animation1Name":"Attack1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,24,100,0,0,255,1]],[[1,0,24,100,0,0,255,1]],[[2,0,24,100,0,0,255,1],[0,-40,-24,100,0,0,255,1]],[[2,0,24,110,0,0,180,1],[1,-40,-24,100,0,0,255,1]],[[2,0,24,115,0,0,100,1],[2,-40,-24,100,0,0,255,1]],[[2,-40,-24,110,0,0,180,1],[0,32,8,100,0,0,255,1]],[[2,-40,-24,115,0,0,100,1],[1,32,8,100,0,0,255,1]],[[2,32,8,100,0,0,255,1]],[[2,32,8,110,0,0,180,1]],[[2,32,8,115,0,0,100,1]]],"name":"格斗/物理","position":1,"timings":[{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":0,"se":{"name":"Damage4","pan":0,"pitch":150,"volume":95}},{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":2,"se":{"name":"Damage4","pan":0,"pitch":150,"volume":100}},{"flashColor":[255,255,255,221],"flashDuration":1,"flashScope":1,"frame":5,"se":{"name":"Damage4","pan":0,"pitch":150,"volume":100}}]}, +{"id":160,"animation1Hue":30,"animation1Name":"Darkness1","animation2Hue":0,"animation2Name":"","frames":[[[1,0,0,130,0,0,255,0]],[[2,0,0,150,0,0,255,0],[2,0,0,200,0,0,150,0],[4,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0],[5,0,0,200,0,1,255,1],[2,0,0,210,0,0,100,0]],[[0,0,0,150,0,0,255,0],[6,0,0,200,0,1,255,1]],[[1,0,0,150,0,0,255,0],[7,0,0,200,0,1,255,1]],[[2,0,0,150,0,0,255,0],[8,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0]],[[0,0,0,150,0,0,255,0]],[[1,0,0,150,0,0,255,0]],[[2,0,0,150,0,0,255,0],[4,0,0,200,90,1,255,1]],[[1,0,0,130,0,0,255,0]],[[2,0,0,150,0,0,255,0],[2,0,0,200,0,0,150,0],[4,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0],[5,0,0,200,0,1,255,1],[2,0,0,210,0,0,100,0]],[[0,0,0,150,0,0,255,0],[6,0,0,200,0,1,255,1]],[[1,0,0,150,0,0,255,0],[7,0,0,200,0,1,255,1]],[[2,0,0,150,0,0,255,0],[8,0,0,200,0,1,255,1]],[[3,0,0,150,0,0,255,0]],[[0,0,0,150,0,0,255,0]],[[1,0,0,150,0,0,255,0]],[[2,0,0,150,0,0,255,0],[4,0,0,200,90,1,255,1]]],"name":"暗/单体","position":1,"timings":[{"flashColor":[238,102,221,170],"flashDuration":5,"flashScope":2,"frame":2,"se":null},{"flashColor":[255,102,221,153],"flashDuration":5,"flashScope":2,"frame":10,"se":null},{"flashColor":[255,102,221,153],"flashDuration":5,"flashScope":2,"frame":18,"se":null}]}, +{"id":161,"animation1Hue":0,"animation1Name":"魔法8","animation2Hue":0,"animation2Name":"","frames":[[[3,264,72,100,0,0,255,1],[3,264,104,120,0,0,255,1],[3,264,144,140,0,0,255,1],[3,264,184,160,0,0,255,1],[3,264,208,140,0,0,255,1],[3,264,208,120,0,0,255,1],[3,264,208,100,0,0,255,1]],[[3,264,72,96,0,0,255,1],[3,264,104,115,0,0,255,1],[3,264,144,135,0,0,255,1],[3,264,184,154,0,0,255,1],[3,264,208,135,0,0,255,1],[3,264,208,115,0,0,255,1],[3,264,208,96,0,0,255,1]],[[3,264,72,92,0,0,255,1],[3,264,104,111,0,0,255,1],[3,264,144,130,0,0,255,1],[3,264,184,148,0,0,255,1],[3,264,208,130,0,0,255,1],[3,264,208,111,0,0,255,1],[3,264,208,92,0,0,255,1]],[[3,264,72,89,0,0,255,1],[3,264,104,107,0,0,255,1],[3,264,144,125,0,0,255,1],[3,264,184,142,0,0,255,1],[3,264,208,125,0,0,255,1],[3,264,208,107,0,0,255,1],[3,264,208,89,0,0,255,1]],[[3,264,72,85,0,0,255,1],[3,264,104,102,0,0,255,1],[3,264,144,120,0,0,255,1],[3,264,184,137,0,0,255,1],[3,264,208,120,0,0,255,1],[3,264,208,102,0,0,255,1],[3,264,208,85,0,0,255,1]],[[3,264,72,82,0,0,255,1],[3,264,104,98,0,0,255,1],[3,264,144,115,0,0,255,1],[3,264,184,131,0,0,255,1],[3,264,208,115,0,0,255,1],[3,264,208,98,0,0,255,1],[3,264,208,82,0,0,255,1]],[[3,264,72,78,0,0,255,1],[3,264,104,94,0,0,255,1],[3,264,144,110,0,0,255,1],[3,264,184,125,0,0,255,1],[3,264,208,110,0,0,255,1],[3,264,208,94,0,0,255,1],[3,264,208,78,0,0,255,1]],[[3,264,72,75,0,0,255,1],[3,264,104,90,0,0,255,1],[3,264,144,105,0,0,255,1],[3,264,184,120,0,0,255,1],[3,264,208,105,0,0,255,1],[3,264,208,90,0,0,255,1],[3,264,208,75,0,0,255,1]],[[3,264,72,71,0,0,255,1],[3,264,104,85,0,0,255,1],[3,264,144,100,0,0,255,1],[3,264,184,114,0,0,255,1],[3,264,208,100,0,0,255,1],[3,264,208,85,0,0,255,1],[3,264,208,71,0,0,255,1]],[[3,264,72,67,0,0,255,1],[3,264,104,81,0,0,255,1],[3,264,144,95,0,0,255,1],[3,264,184,108,0,0,255,1],[3,264,208,95,0,0,255,1],[3,264,208,81,0,0,255,1],[3,264,208,67,0,0,255,1]],[[3,264,72,64,0,0,255,1],[3,264,104,77,0,0,255,1],[3,264,144,90,0,0,255,1],[3,264,184,102,0,0,255,1],[3,264,208,90,0,0,255,1],[3,264,208,77,0,0,255,1],[3,264,208,64,0,0,255,1]],[[3,264,72,60,0,0,255,1],[3,264,104,72,0,0,255,1],[3,264,144,85,0,0,255,1],[3,264,184,97,0,0,255,1],[3,264,208,85,0,0,255,1],[3,264,208,72,0,0,255,1],[3,264,208,60,0,0,255,1]],[[3,264,72,57,0,0,255,1],[3,264,104,68,0,0,255,1],[3,264,144,80,0,0,255,1],[3,264,184,91,0,0,255,1],[3,264,208,80,0,0,255,1],[3,264,208,68,0,0,255,1],[3,264,208,57,0,0,255,1]],[[3,264,72,53,0,0,255,1],[3,264,104,64,0,0,255,1],[3,264,144,75,0,0,255,1],[3,264,184,85,0,0,255,1],[3,264,208,75,0,0,255,1],[3,264,208,64,0,0,255,1],[3,264,208,53,0,0,255,1]],[[3,264,72,50,0,0,255,1],[3,264,104,60,0,0,255,1],[3,264,144,70,0,0,255,1],[3,264,184,80,0,0,255,1],[3,264,208,70,0,0,255,1],[3,264,208,60,0,0,255,1],[3,264,208,50,0,0,255,1],[0,272,0,100,0,0,255,1]],[[3,264,72,50,0,0,255,1],[3,264,104,58,0,0,255,1],[3,264,144,66,0,0,255,1],[3,264,184,74,0,0,255,1],[3,264,208,66,0,0,255,1],[3,264,208,58,0,0,255,1],[3,264,208,50,0,0,255,1],[0,272,39,100,0,0,255,1]],[[3,264,72,50,0,0,255,1],[3,264,104,56,0,0,255,1],[3,264,144,62,0,0,255,1],[3,264,184,68,0,0,255,1],[3,264,208,62,0,0,255,1],[3,264,208,56,0,0,255,1],[3,264,208,50,0,0,255,1],[0,272,77,100,0,0,255,1]],[[3,264,72,50,0,0,255,1],[3,264,104,54,0,0,255,1],[3,264,144,58,0,0,255,1],[3,264,184,62,0,0,255,1],[3,264,208,58,0,0,255,1],[3,264,208,54,0,0,255,1],[3,264,208,50,0,0,255,1],[0,272,116,100,0,0,255,1]],[[3,264,72,50,0,0,255,1],[3,264,104,52,0,0,255,1],[3,264,144,54,0,0,255,1],[3,264,184,56,0,0,255,1],[3,264,208,54,0,0,255,1],[3,264,208,52,0,0,255,1],[3,264,208,50,0,0,255,1],[0,272,154,100,0,0,255,1]],[[3,264,72,50,0,0,255,1],[3,264,104,50,0,0,255,1],[3,264,144,50,0,0,255,1],[3,264,184,50,0,0,255,1],[3,264,208,50,0,0,255,1],[3,264,208,50,0,0,255,1],[3,264,208,50,0,0,255,1],[0,272,192,100,0,0,255,1]],[[1,272,192,100,0,0,255,1]],[[2,272,192,100,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,300,0,0,255,1],[3,272,136,200,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,205,257,0,0,255,1],[3,272,188,242,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,188,242,0,0,255,1],[3,272,205,257,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,171,228,0,0,255,1],[3,272,208,271,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,154,214,0,0,255,1],[3,272,208,285,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,136,200,0,0,255,1],[3,272,208,300,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,285,0,0,255,1],[3,272,154,214,0,0,255,1]],[[4,272,80,400,0,0,255,1],[3,272,208,271,0,0,255,1],[3,272,171,228,0,0,255,1]],[[4,272,128,300,0,0,229,1],[3,272,208,266,0,0,229,1],[3,272,176,232,0,0,229,1]],[[4,272,128,300,0,0,204,1],[3,272,208,262,0,0,204,1],[3,272,180,236,0,0,204,1]],[[4,272,128,300,0,0,178,1],[3,272,206,258,0,0,178,1],[3,272,185,240,0,0,178,1]],[[4,272,128,300,0,0,153,1],[3,272,201,253,0,0,153,1],[3,272,189,245,0,0,153,1]],[[4,272,128,300,0,0,127,1],[3,272,196,249,0,0,127,1],[3,272,194,249,0,0,127,1]],[[4,272,128,300,0,0,102,1],[3,272,191,245,0,0,102,1],[3,272,198,253,0,0,102,1]],[[4,272,128,300,0,0,76,1],[3,272,186,240,0,0,76,1],[3,272,203,258,0,0,76,1]],[[4,272,128,300,0,0,51,1],[3,272,181,236,0,0,51,1],[3,272,207,262,0,0,51,1]],[[4,272,128,300,0,0,25,1],[3,272,176,232,0,0,25,1],[3,272,208,266,0,0,25,1]],[[4,272,128,300,0,0,0,1],[3,272,171,228,0,0,0,1],[3,272,208,271,0,0,0,1]]],"name":"究极","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Magic6","pan":0,"pitch":100,"volume":70}},{"flashColor":[255,255,255,255],"flashDuration":15,"flashScope":2,"frame":22,"se":{"name":"Fire9","pan":0,"pitch":100,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":32,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":42,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":52,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":62,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":72,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":82,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":92,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":102,"se":{"name":"Earth9","pan":0,"pitch":50,"volume":80}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":112,"se":{"name":"Silence","pan":0,"pitch":100,"volume":80}}]}, +{"id":162,"animation1Hue":0,"animation1Name":"Darkness2","animation2Hue":0,"animation2Name":"Darkness3","frames":[[[5,0,0,200,0,0,180,1],[9,0,0,200,0,0,180,1]],[[6,0,0,230,0,0,200,1],[10,0,0,230,0,0,200,1]],[[7,0,0,260,0,0,230,1],[11,0,0,260,0,0,230,1],[-1,0,0,20,0,0,0,0],[13,0,0,100,0,0,255,1]],[[8,0,0,280,0,0,255,1],[12,0,0,280,0,0,255,1],[-1,0,0,20,0,0,0,0],[14,0,0,160,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[-1,0,0,20,0,0,0,0],[15,0,0,200,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[-1,0,0,20,0,0,0,0],[16,0,0,220,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[16,0,0,240,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[16,0,0,260,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[13,0,0,280,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[14,0,0,290,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[15,0,0,300,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[16,0,0,310,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[16,0,0,320,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[16,0,0,330,0,0,200,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[16,0,0,335,0,0,150,1],[17,0,0,400,0,0,255,1],[21,-200,-72,70,0,0,255,1],[21,200,48,70,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[22,-200,-72,100,0,0,255,1],[22,200,48,100,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[23,-200,-72,100,0,0,255,1],[23,200,48,100,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[20,0,0,400,0,0,255,1],[24,-200,-72,100,0,0,255,1],[24,200,48,100,0,0,255,1],[21,144,-128,50,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[17,0,0,400,0,0,255,1],[25,-200,-72,100,0,0,255,1],[25,200,48,100,0,0,255,1],[22,144,-128,80,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[23,144,-128,80,0,0,255,1],[21,-176,48,50,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[24,144,-128,80,0,0,255,1],[22,-176,48,80,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[20,0,0,400,0,0,255,1],[25,144,-128,80,0,0,255,1],[23,-176,48,80,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[17,0,0,400,0,0,255,1],[24,-176,48,80,0,0,255,1],[21,-88,-152,70,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[25,-176,48,80,0,0,255,1],[22,-88,-152,100,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[23,-88,-152,100,0,0,255,1],[21,208,-8,50,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1],[20,0,0,400,0,0,255,1],[24,-88,-152,100,0,0,255,1],[22,208,-8,80,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1],[17,0,0,400,0,0,255,1],[25,-88,-152,100,0,0,255,1],[23,208,-8,80,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1],[18,0,0,400,0,0,255,1],[24,208,-8,80,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1],[19,0,0,400,0,0,255,1],[25,208,-8,80,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[0,0,0,250,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,255,1],[1,0,0,250,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,255,1],[2,0,0,250,0,0,255,1]],[[5,0,0,300,0,0,255,1],[9,0,0,300,0,0,255,1],[3,0,0,250,0,0,255,1]],[[6,0,0,300,0,0,255,1],[10,0,0,300,0,0,255,1],[4,0,0,250,0,0,255,1]],[[7,0,0,300,0,0,255,1],[11,0,0,300,0,0,200,1],[4,0,0,180,0,0,255,1],[101,0,0,300,0,0,255,1]],[[8,0,0,300,0,0,255,1],[12,0,0,300,0,0,150,1],[4,0,0,100,0,0,255,1],[102,0,0,300,0,0,255,1]],[[103,0,0,300,0,0,255,1]],[[104,0,0,300,0,0,255,1]],[[105,0,0,300,0,0,255,1]],[[106,0,0,300,0,0,255,1]],[[107,0,0,300,0,0,255,1]],[[108,0,0,300,0,0,255,1]],[[109,0,0,300,0,0,255,1]],[[110,0,0,300,0,0,255,1]],[[111,0,0,300,0,0,255,1]],[[112,0,0,300,0,0,255,1]],[[113,0,0,300,0,0,255,1]],[[114,0,0,300,0,0,255,1]],[[115,0,0,300,0,0,255,1]],[[116,0,0,300,0,0,255,1]],[[117,0,0,300,0,0,255,1]],[[118,0,0,300,0,0,255,1]],[[119,0,0,300,0,0,255,1]],[[120,0,0,300,0,0,255,1]],[[121,0,0,300,0,0,255,1]],[[122,0,0,300,0,0,255,1]],[[123,0,0,300,0,0,255,1]],[[124,0,0,300,0,0,255,1]],[[110,0,0,300,0,0,255,1]],[[111,0,0,300,0,0,255,1]],[[112,0,0,300,0,0,255,1]],[[113,0,0,300,0,0,255,1]],[[114,0,0,300,0,0,255,1]],[[115,0,0,300,0,0,255,1]],[[116,0,0,300,0,0,255,1]],[[117,0,0,300,0,0,255,1]],[[118,0,0,300,0,0,255,1]],[[119,0,0,300,0,0,255,1]],[[120,0,0,300,0,0,255,1]],[[121,0,0,300,0,0,255,1]],[[122,0,0,300,0,0,255,1]],[[123,0,0,300,0,0,255,1]],[[124,0,0,300,0,0,255,1]],[[110,0,0,300,0,0,255,1]],[[111,0,0,300,0,0,236,1]],[[112,0,0,300,0,0,218,1]],[[113,0,0,300,0,0,200,1]],[[114,0,0,300,0,0,182,1]],[[115,0,0,300,0,0,163,1]],[[116,0,0,300,0,0,145,1]],[[117,0,0,300,0,0,127,1]],[[118,0,0,300,0,0,109,1]],[[119,0,0,300,0,0,91,1]],[[120,0,0,300,0,0,72,1]],[[121,0,0,300,0,0,54,1]],[[122,0,0,300,0,0,36,1]],[[123,0,0,300,0,0,18,1]],[[124,0,0,300,0,0,0,1]]],"name":"无之泛滥","position":3,"timings":[{"flashColor":[0,0,0,255],"flashDuration":10,"flashScope":1,"frame":0,"se":{"name":"Teleport","pan":0,"pitch":100,"volume":100}},{"flashColor":[255,136,255,170],"flashDuration":5,"flashScope":2,"frame":9,"se":null},{"flashColor":[255,119,238,204],"flashDuration":3,"flashScope":1,"frame":14,"se":null},{"flashColor":[255,136,255,170],"flashDuration":5,"flashScope":2,"frame":14,"se":null},{"flashColor":[255,119,238,170],"flashDuration":3,"flashScope":1,"frame":17,"se":null},{"flashColor":[255,119,238,170],"flashDuration":3,"flashScope":1,"frame":20,"se":null},{"flashColor":[255,119,238,170],"flashDuration":3,"flashScope":1,"frame":23,"se":null},{"flashColor":[187,221,170,187],"flashDuration":5,"flashScope":0,"frame":36,"se":{"name":"Darkness8","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,119,238,170],"flashDuration":8,"flashScope":1,"frame":36,"se":null}]}, +{"id":163,"animation1Hue":0,"animation1Name":"魔法8","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-208,200,0,0,255,1]],[[0,0,-156,200,0,0,255,1]],[[0,0,-104,200,0,0,255,1]],[[1,0,-80,200,0,0,255,1]],[[2,0,-80,200,0,0,255,1]],[[4,0,0,200,0,0,255,1]],[[4,0,-23,266,0,0,226,1]],[[4,0,-46,333,0,0,198,1]],[[4,0,-69,400,0,0,170,1]],[[4,0,-92,466,0,0,141,1]],[[4,0,-115,533,0,0,113,1]],[[4,0,-138,600,0,0,85,1]],[[4,0,-161,666,0,0,56,1]],[[4,0,-184,733,0,0,28,1]],[[4,0,-208,800,0,0,0,1]]],"name":"究极","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":3,"se":{"name":"Fire9","pan":0,"pitch":100,"volume":80}}]}, +{"id":164,"animation1Hue":0,"animation1Name":"Fire1","animation2Hue":0,"animation2Name":"","frames":[[[0,0,-16,170,0,0,255,1]],[[1,0,-16,170,0,0,255,1]],[[2,0,-16,170,0,0,255,1],[0,-200,-32,170,0,0,255,1],[7,0,-72,160,0,0,200,1]],[[3,0,-16,170,0,0,255,1],[1,-200,-32,170,0,0,255,1],[8,0,-72,160,0,0,150,1]],[[4,0,-16,170,0,0,255,1],[2,-200,-32,170,0,0,255,1],[7,-200,-72,160,0,0,200,1]],[[3,-200,-32,170,0,0,255,1],[5,0,-16,170,0,0,255,1],[0,192,-32,170,0,0,255,1],[0,-88,8,100,0,0,255,1],[8,-200,-72,160,0,0,150,1]],[[5,0,-16,170,0,0,180,1],[4,-200,-32,170,0,0,255,1],[1,192,-32,170,0,0,255,1],[1,-88,-8,130,0,0,255,1]],[[5,-200,-32,170,0,0,255,1],[2,192,-32,170,0,0,255,1],[2,-88,-8,120,0,0,255,1],[0,80,8,100,0,0,255,1],[7,192,-72,160,0,0,200,1]],[[5,-200,-32,170,0,0,150,1],[3,192,-32,170,0,0,255,1],[3,-88,-8,120,0,0,255,1],[1,80,-8,120,0,0,255,1],[8,192,-72,160,0,0,150,1]],[[4,192,-32,170,0,0,255,1],[4,-88,-8,120,0,0,255,1],[-1,64,0,120,0,0,255,1],[2,80,-8,120,0,0,255,1]],[[5,192,-32,170,0,0,255,1],[5,-88,-8,120,0,0,255,1],[3,80,-8,120,0,0,200,1]],[[5,192,-32,170,0,0,150,1],[5,-88,-8,120,0,0,150,1],[4,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,100,1]],[[0,0,-16,170,0,0,255,1]],[[1,0,-16,170,0,0,255,1]],[[2,0,-16,170,0,0,255,1],[0,-200,-32,170,0,0,255,1],[7,0,-72,160,0,0,200,1]],[[3,0,-16,170,0,0,255,1],[1,-200,-32,170,0,0,255,1],[8,0,-72,160,0,0,150,1]],[[4,0,-16,170,0,0,255,1],[2,-200,-32,170,0,0,255,1],[7,-200,-72,160,0,0,200,1]],[[3,-200,-32,170,0,0,255,1],[5,0,-16,170,0,0,255,1],[0,192,-32,170,0,0,255,1],[0,-88,8,100,0,0,255,1],[8,-200,-72,160,0,0,150,1]],[[5,0,-16,170,0,0,180,1],[4,-200,-32,170,0,0,255,1],[1,192,-32,170,0,0,255,1],[1,-88,-8,130,0,0,255,1]],[[5,-200,-32,170,0,0,255,1],[2,192,-32,170,0,0,255,1],[2,-88,-8,120,0,0,255,1],[0,80,8,100,0,0,255,1],[7,192,-72,160,0,0,200,1]],[[5,-200,-32,170,0,0,150,1],[3,192,-32,170,0,0,255,1],[3,-88,-8,120,0,0,255,1],[1,80,-8,120,0,0,255,1],[8,192,-72,160,0,0,150,1]],[[4,192,-32,170,0,0,255,1],[4,-88,-8,120,0,0,255,1],[-1,64,0,120,0,0,255,1],[2,80,-8,120,0,0,255,1]],[[5,192,-32,170,0,0,255,1],[5,-88,-8,120,0,0,255,1],[3,80,-8,120,0,0,200,1]],[[5,192,-32,170,0,0,150,1],[5,-88,-8,120,0,0,150,1],[4,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,100,1]],[[0,0,-16,170,0,0,255,1]],[[1,0,-16,170,0,0,255,1]],[[2,0,-16,170,0,0,255,1],[0,-200,-32,170,0,0,255,1],[7,0,-72,160,0,0,200,1]],[[3,0,-16,170,0,0,255,1],[1,-200,-32,170,0,0,255,1],[8,0,-72,160,0,0,150,1]],[[4,0,-16,170,0,0,255,1],[2,-200,-32,170,0,0,255,1],[7,-200,-72,160,0,0,200,1]],[[3,-200,-32,170,0,0,255,1],[5,0,-16,170,0,0,255,1],[0,192,-32,170,0,0,255,1],[0,-88,8,100,0,0,255,1],[8,-200,-72,160,0,0,150,1]],[[5,0,-16,170,0,0,180,1],[4,-200,-32,170,0,0,255,1],[1,192,-32,170,0,0,255,1],[1,-88,-8,130,0,0,255,1]],[[5,-200,-32,170,0,0,255,1],[2,192,-32,170,0,0,255,1],[2,-88,-8,120,0,0,255,1],[0,80,8,100,0,0,255,1],[7,192,-72,160,0,0,200,1]],[[5,-200,-32,170,0,0,150,1],[3,192,-32,170,0,0,255,1],[3,-88,-8,120,0,0,255,1],[1,80,-8,120,0,0,255,1],[8,192,-72,160,0,0,150,1]],[[4,192,-32,170,0,0,255,1],[4,-88,-8,120,0,0,255,1],[-1,64,0,120,0,0,255,1],[2,80,-8,120,0,0,255,1]],[[5,192,-32,170,0,0,255,1],[5,-88,-8,120,0,0,255,1],[3,80,-8,120,0,0,200,1]],[[5,192,-32,170,0,0,150,1],[5,-88,-8,120,0,0,150,1],[4,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,100,1]],[[0,0,-16,170,0,0,255,1]],[[1,0,-16,170,0,0,255,1]],[[2,0,-16,170,0,0,255,1],[0,-200,-32,170,0,0,255,1],[7,0,-72,160,0,0,200,1]],[[3,0,-16,170,0,0,255,1],[1,-200,-32,170,0,0,255,1],[8,0,-72,160,0,0,150,1]],[[4,0,-16,170,0,0,255,1],[2,-200,-32,170,0,0,255,1],[7,-200,-72,160,0,0,200,1]],[[3,-200,-32,170,0,0,255,1],[5,0,-16,170,0,0,255,1],[0,192,-32,170,0,0,255,1],[0,-88,8,100,0,0,255,1],[8,-200,-72,160,0,0,150,1]],[[5,0,-16,170,0,0,180,1],[4,-200,-32,170,0,0,255,1],[1,192,-32,170,0,0,255,1],[1,-88,-8,130,0,0,255,1]],[[5,-200,-32,170,0,0,255,1],[2,192,-32,170,0,0,255,1],[2,-88,-8,120,0,0,255,1],[0,80,8,100,0,0,255,1],[7,192,-72,160,0,0,200,1]],[[5,-200,-32,170,0,0,150,1],[3,192,-32,170,0,0,255,1],[3,-88,-8,120,0,0,255,1],[1,80,-8,120,0,0,255,1],[8,192,-72,160,0,0,150,1]],[[4,192,-32,170,0,0,255,1],[4,-88,-8,120,0,0,255,1],[-1,64,0,120,0,0,255,1],[2,80,-8,120,0,0,255,1]],[[5,192,-32,170,0,0,255,1],[5,-88,-8,120,0,0,255,1],[3,80,-8,120,0,0,200,1]],[[5,192,-32,170,0,0,150,1],[5,-88,-8,120,0,0,150,1],[4,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,200,1]],[[5,80,-8,120,0,0,100,1]]],"name":"炎/全体1","position":1,"timings":[{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":0,"se":null},{"flashColor":[255,102,0,187],"flashDuration":5,"flashScope":1,"frame":0,"se":null},{"flashColor":[255,153,0,204],"flashDuration":3,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":5,"se":null},{"flashColor":[255,119,0,187],"flashDuration":3,"flashScope":1,"frame":6,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":14,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":19,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":28,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":33,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":42,"se":null},{"flashColor":[255,187,68,153],"flashDuration":5,"flashScope":2,"frame":47,"se":null}]}, +{"id":165,"animation1Hue":0,"animation1Name":"Light2","animation2Hue":0,"animation2Name":"","frames":[[[18,-272,0,800,90,0,0,1],[18,232,0,800,90,0,0,1],[18,-272,0,800,90,0,0,1],[18,272,0,800,90,0,0,1],[18,272,-32,800,90,0,0,1],[18,-272,-32,800,90,0,0,1],[18,-272,-32,800,90,0,0,1],[18,272,-24,800,90,0,0,1],[18,-272,32,800,90,0,0,1],[18,272,32,800,90,0,0,1],[18,-272,32,800,90,0,0,1],[18,272,32,800,90,0,0,1],[18,272,-32,800,90,0,0,1]],[[18,-272,0,800,90,0,63,1],[18,232,0,800,90,0,63,1],[18,-272,0,800,90,0,63,1],[18,272,0,800,90,0,63,1],[18,272,-32,800,90,0,63,1],[18,-272,-32,800,90,0,63,1],[18,-272,-32,800,90,0,63,1],[18,272,-24,800,90,0,63,1],[18,-272,32,800,90,0,63,1],[18,272,32,800,90,0,63,1],[18,-272,32,800,90,0,63,1],[18,272,32,800,90,0,63,1],[18,272,-32,800,90,0,63,1]],[[18,-272,0,800,90,0,127,1],[18,232,0,800,90,0,127,1],[18,-272,0,800,90,0,127,1],[18,272,0,800,90,0,127,1],[18,272,-32,800,90,0,127,1],[18,-272,-32,800,90,0,127,1],[18,-272,-32,800,90,0,127,1],[18,272,-24,800,90,0,127,1],[18,-272,32,800,90,0,127,1],[18,272,32,800,90,0,127,1],[18,-272,32,800,90,0,127,1],[18,272,32,800,90,0,127,1],[18,272,-32,800,90,0,127,1]],[[18,-272,0,800,90,0,191,1],[18,232,0,800,90,0,191,1],[18,-272,0,800,90,0,191,1],[18,272,0,800,90,0,191,1],[18,272,-32,800,90,0,191,1],[18,-272,-32,800,90,0,191,1],[18,-272,-32,800,90,0,191,1],[18,272,-24,800,90,0,191,1],[18,-272,32,800,90,0,191,1],[18,272,32,800,90,0,191,1],[18,-272,32,800,90,0,191,1],[18,272,32,800,90,0,191,1],[18,272,-32,800,90,0,191,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,255,1],[18,232,0,800,90,0,255,1],[18,-272,0,800,90,0,255,1],[18,272,0,800,90,0,255,1],[18,272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,-272,-32,800,90,0,255,1],[18,272,-24,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,-272,32,800,90,0,255,1],[18,272,32,800,90,0,255,1],[18,272,-32,800,90,0,255,1]],[[18,-272,0,800,90,0,226,1],[18,232,0,800,90,0,226,1],[18,-272,0,800,90,0,226,1],[18,272,0,800,90,0,226,1],[18,272,-32,800,90,0,226,1],[18,-272,-32,800,90,0,226,1],[18,-272,-32,800,90,0,226,1],[18,272,-24,800,90,0,226,1],[18,-272,32,800,90,0,226,1],[18,272,32,800,90,0,226,1],[18,-272,32,800,90,0,226,1],[18,272,32,800,90,0,226,1],[18,272,-32,800,90,0,226,1]],[[18,-272,0,800,90,0,198,1],[18,232,0,800,90,0,198,1],[18,-272,0,800,90,0,198,1],[18,272,0,800,90,0,198,1],[18,272,-32,800,90,0,198,1],[18,-272,-32,800,90,0,198,1],[18,-272,-32,800,90,0,198,1],[18,272,-24,800,90,0,198,1],[18,-272,32,800,90,0,198,1],[18,272,32,800,90,0,198,1],[18,-272,32,800,90,0,198,1],[18,272,32,800,90,0,198,1],[18,272,-32,800,90,0,198,1]],[[18,-272,0,800,90,0,170,1],[18,232,0,800,90,0,170,1],[18,-272,0,800,90,0,170,1],[18,272,0,800,90,0,170,1],[18,272,-32,800,90,0,170,1],[18,-272,-32,800,90,0,170,1],[18,-272,-32,800,90,0,170,1],[18,272,-24,800,90,0,170,1],[18,-272,32,800,90,0,170,1],[18,272,32,800,90,0,170,1],[18,-272,32,800,90,0,170,1],[18,272,32,800,90,0,170,1],[18,272,-32,800,90,0,170,1]],[[18,-272,0,800,90,0,141,1],[18,232,0,800,90,0,141,1],[18,-272,0,800,90,0,141,1],[18,272,0,800,90,0,141,1],[18,272,-32,800,90,0,141,1],[18,-272,-32,800,90,0,141,1],[18,-272,-32,800,90,0,141,1],[18,272,-24,800,90,0,141,1],[18,-272,32,800,90,0,141,1],[18,272,32,800,90,0,141,1],[18,-272,32,800,90,0,141,1],[18,272,32,800,90,0,141,1],[18,272,-32,800,90,0,141,1]],[[18,-272,0,800,90,0,113,1],[18,232,0,800,90,0,113,1],[18,-272,0,800,90,0,113,1],[18,272,0,800,90,0,113,1],[18,272,-32,800,90,0,113,1],[18,-272,-32,800,90,0,113,1],[18,-272,-32,800,90,0,113,1],[18,272,-24,800,90,0,113,1],[18,-272,32,800,90,0,113,1],[18,272,32,800,90,0,113,1],[18,-272,32,800,90,0,113,1],[18,272,32,800,90,0,113,1],[18,272,-32,800,90,0,113,1]],[[18,-272,0,800,90,0,85,1],[18,232,0,800,90,0,85,1],[18,-272,0,800,90,0,85,1],[18,272,0,800,90,0,85,1],[18,272,-32,800,90,0,85,1],[18,-272,-32,800,90,0,85,1],[18,-272,-32,800,90,0,85,1],[18,272,-24,800,90,0,85,1],[18,-272,32,800,90,0,85,1],[18,272,32,800,90,0,85,1],[18,-272,32,800,90,0,85,1],[18,272,32,800,90,0,85,1],[18,272,-32,800,90,0,85,1]],[[18,-272,0,800,90,0,56,1],[18,232,0,800,90,0,56,1],[18,-272,0,800,90,0,56,1],[18,272,0,800,90,0,56,1],[18,272,-32,800,90,0,56,1],[18,-272,-32,800,90,0,56,1],[18,-272,-32,800,90,0,56,1],[18,272,-24,800,90,0,56,1],[18,-272,32,800,90,0,56,1],[18,272,32,800,90,0,56,1],[18,-272,32,800,90,0,56,1],[18,272,32,800,90,0,56,1],[18,272,-32,800,90,0,56,1]],[[18,-272,0,800,90,0,28,1],[18,232,0,800,90,0,28,1],[18,-272,0,800,90,0,28,1],[18,272,0,800,90,0,28,1],[18,272,-32,800,90,0,28,1],[18,-272,-32,800,90,0,28,1],[18,-272,-32,800,90,0,28,1],[18,272,-24,800,90,0,28,1],[18,-272,32,800,90,0,28,1],[18,272,32,800,90,0,28,1],[18,-272,32,800,90,0,28,1],[18,272,32,800,90,0,28,1],[18,272,-32,800,90,0,28,1]],[[18,-272,0,800,90,0,0,1],[18,232,0,800,90,0,0,1],[18,-272,0,800,90,0,0,1],[18,272,0,800,90,0,0,1],[18,272,-32,800,90,0,0,1],[18,-272,-32,800,90,0,0,1],[18,-272,-32,800,90,0,0,1],[18,272,-24,800,90,0,0,1],[18,-272,32,800,90,0,0,1],[18,272,32,800,90,0,0,1],[18,-272,32,800,90,0,0,1],[18,272,32,800,90,0,0,1],[18,272,-32,800,90,0,0,1]]],"name":"超级激光","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Slash3","pan":0,"pitch":105,"volume":100}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Attack3","pan":0,"pitch":80,"volume":90}},{"flashColor":[187,221,255,255],"flashDuration":5,"flashScope":1,"frame":1,"se":{"name":"Battle3","pan":0,"pitch":100,"volume":90}},{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":19,"se":{"name":"Silence","pan":0,"pitch":100,"volume":80}}]}, +{"id":166,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"Death1","frames":[[[23,0,0,800,90,1,0,1]],[[23,0,0,800,90,1,51,1]],[[23,0,0,800,90,1,102,1]],[[23,0,0,800,90,1,153,1]],[[23,0,0,800,90,1,204,1]],[[23,0,0,800,90,1,255,1]],[[23,0,0,800,90,1,212,1]],[[23,0,0,800,90,1,170,1]],[[23,0,0,800,90,1,127,1]],[[23,0,0,800,90,1,85,1]],[[23,0,0,800,90,1,42,1]],[[23,0,0,800,90,1,0,1]]],"name":"直条AOE(东)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"mus_f_alarm","pan":0,"pitch":100,"volume":80}}]}, +{"id":167,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,90,1,0,1]],[[23,0,0,800,90,1,51,1]],[[23,0,0,800,90,1,102,1]],[[23,0,0,800,90,1,153,1]],[[23,0,0,800,90,1,204,1]],[[23,0,0,800,90,1,255,1]],[[23,0,0,800,90,1,212,1]],[[23,0,0,800,90,1,170,1]],[[23,0,0,800,90,1,127,1]],[[23,0,0,800,90,1,85,1]],[[23,0,0,800,90,1,42,1]],[[23,0,0,800,90,1,0,1]]],"name":"直条AOE(东)","position":1,"timings":[]}, +{"id":168,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,0,0,0,1]],[[23,0,0,800,0,0,51,1]],[[23,0,0,800,0,0,102,1]],[[23,0,0,800,0,0,153,1]],[[23,0,0,800,0,0,204,1]],[[23,0,0,800,0,0,255,1]],[[23,0,0,800,0,0,212,1]],[[23,0,0,800,0,0,170,1]],[[23,0,0,800,0,0,127,1]],[[23,0,0,800,0,0,85,1]],[[23,0,0,800,0,0,42,1]],[[23,0,0,800,0,0,0,1]]],"name":"直条AOE(南)","position":1,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"mus_f_alarm","pan":0,"pitch":100,"volume":80}}]}, +{"id":169,"animation1Hue":0,"animation1Name":"Light4","animation2Hue":0,"animation2Name":"","frames":[[[23,0,0,800,0,0,0,1]],[[23,0,0,800,0,0,51,1]],[[23,0,0,800,0,0,102,1]],[[23,0,0,800,0,0,153,1]],[[23,0,0,800,0,0,204,1]],[[23,0,0,800,0,0,255,1]],[[23,0,0,800,0,0,212,1]],[[23,0,0,800,0,0,170,1]],[[23,0,0,800,0,0,127,1]],[[23,0,0,800,0,0,85,1]],[[23,0,0,800,0,0,42,1]],[[23,0,0,800,0,0,0,1]]],"name":"直条AOE(南)","position":1,"timings":[]}, +{"id":170,"animation1Hue":200,"animation1Name":"State5","animation2Hue":20,"animation2Name":"Sword6","frames":[[[114,128,-208,100,0,0,255,1],[114,0,-102,100,0,0,255,1],[114,128,-102,100,0,0,255,1],[114,0,-208,100,0,0,255,1],[114,128,8,100,0,0,255,1],[114,0,8,100,0,0,255,1],[114,-128,8,100,0,0,255,1],[114,-128,-102,100,0,0,255,1],[114,-128,-208,100,0,0,255,1],[114,256,-208,100,0,0,255,1],[114,256,-102,100,0,0,255,1],[114,256,8,100,0,0,255,1],[114,-248,8,100,0,0,255,1],[114,-248,-102,100,0,0,255,1],[114,-248,-208,100,0,0,255,1]],[[114,128,-179,100,0,0,255,1],[114,0,-73,100,0,0,255,1],[114,128,-73,100,0,0,255,1],[114,0,-179,100,0,0,255,1],[114,128,36,100,0,0,255,1],[114,0,36,100,0,0,255,1],[114,-128,36,100,0,0,255,1],[114,-128,-73,100,0,0,255,1],[114,-128,-179,100,0,0,255,1],[114,256,-179,100,0,0,255,1],[114,256,-73,100,0,0,255,1],[114,256,36,100,0,0,255,1],[114,-248,36,100,0,0,255,1],[114,-248,-73,100,0,0,255,1],[114,-248,-179,100,0,0,255,1]],[[114,128,-150,100,0,0,255,1],[114,0,-44,100,0,0,255,1],[114,128,-44,100,0,0,255,1],[114,0,-150,100,0,0,255,1],[114,128,65,100,0,0,255,1],[114,0,65,100,0,0,255,1],[114,-128,65,100,0,0,255,1],[114,-128,-44,100,0,0,255,1],[114,-128,-150,100,0,0,255,1],[114,256,-150,100,0,0,255,1],[114,256,-44,100,0,0,255,1],[114,256,65,100,0,0,255,1],[114,-248,65,100,0,0,255,1],[114,-248,-44,100,0,0,255,1],[114,-248,-150,100,0,0,255,1]],[[114,128,-122,100,0,0,255,1],[114,0,-16,100,0,0,255,1],[114,128,-16,100,0,0,255,1],[114,0,-122,100,0,0,255,1],[114,128,93,100,0,0,255,1],[114,0,93,100,0,0,255,1],[114,-128,93,100,0,0,255,1],[114,-128,-16,100,0,0,255,1],[114,-128,-122,100,0,0,255,1],[114,256,-122,100,0,0,255,1],[114,256,-16,100,0,0,255,1],[114,256,93,100,0,0,255,1],[114,-248,93,100,0,0,255,1],[114,-248,-16,100,0,0,255,1],[114,-248,-122,100,0,0,255,1]],[[114,128,-93,100,0,0,255,1],[114,0,12,100,0,0,255,1],[114,128,12,100,0,0,255,1],[114,0,-93,100,0,0,255,1],[114,128,122,100,0,0,255,1],[114,0,122,100,0,0,255,1],[114,-128,122,100,0,0,255,1],[114,-128,12,100,0,0,255,1],[114,-128,-93,100,0,0,255,1],[114,256,-93,100,0,0,255,1],[114,256,12,100,0,0,255,1],[114,256,122,100,0,0,255,1],[114,-248,122,100,0,0,255,1],[114,-248,12,100,0,0,255,1],[114,-248,-93,100,0,0,255,1]],[[114,128,-65,100,0,0,255,1],[114,0,40,100,0,0,255,1],[114,128,40,100,0,0,255,1],[114,0,-65,100,0,0,255,1],[114,128,150,100,0,0,255,1],[114,0,150,100,0,0,255,1],[114,-128,150,100,0,0,255,1],[114,-128,40,100,0,0,255,1],[114,-128,-65,100,0,0,255,1],[114,256,-65,100,0,0,255,1],[114,256,40,100,0,0,255,1],[114,256,150,100,0,0,255,1],[114,-248,150,100,0,0,255,1],[114,-248,40,100,0,0,255,1],[114,-248,-65,100,0,0,255,1]],[[114,128,-36,100,0,0,255,1],[114,0,69,100,0,0,255,1],[114,128,69,100,0,0,255,1],[114,0,-36,100,0,0,255,1],[114,128,179,100,0,0,255,1],[114,0,179,100,0,0,255,1],[114,-128,179,100,0,0,255,1],[114,-128,69,100,0,0,255,1],[114,-128,-36,100,0,0,255,1],[114,256,-36,100,0,0,255,1],[114,256,69,100,0,0,255,1],[114,256,179,100,0,0,255,1],[114,-248,179,100,0,0,255,1],[114,-248,69,100,0,0,255,1],[114,-248,-36,100,0,0,255,1]],[[114,128,-8,100,0,0,255,1],[114,0,98,100,0,0,255,1],[114,128,98,100,0,0,255,1],[114,0,-8,100,0,0,255,1],[114,128,208,100,0,0,255,1],[114,0,208,100,0,0,255,1],[114,-128,208,100,0,0,255,1],[114,-128,98,100,0,0,255,1],[114,-128,-8,100,0,0,255,1],[114,256,-8,100,0,0,255,1],[114,256,98,100,0,0,255,1],[114,256,208,100,0,0,255,1],[114,-248,208,100,0,0,255,1],[114,-248,98,100,0,0,255,1],[114,-248,-8,100,0,0,255,1]]],"name":"指定方向击退","position":3,"timings":[{"flashColor":[255,255,255,255],"flashDuration":5,"flashScope":0,"frame":0,"se":{"name":"Miss","pan":0,"pitch":100,"volume":80}}]}, +{"id":171,"animation1Hue":0,"animation1Name":"Wind3","animation2Hue":0,"animation2Name":"","frames":[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],"name":"风/全体","position":3,"timings":[{"flashColor":[255,221,187,153],"flashDuration":15,"flashScope":2,"frame":0,"se":{"name":"Wind5","pan":0,"pitch":80,"volume":100}},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":1,"se":{"name":"Wind8","pan":0,"pitch":70,"volume":100}},{"flashColor":[255,255,187,153],"flashDuration":1,"flashScope":1,"frame":3,"se":null},{"flashColor":[255,255,204,153],"flashDuration":3,"flashScope":1,"frame":5,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":10,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":15,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":17,"se":null},{"flashColor":[255,255,187,153],"flashDuration":3,"flashScope":1,"frame":20,"se":null}]} +] \ No newline at end of file diff --git a/data/Armors.json b/data/Armors.json new file mode 100644 index 0000000..61e648a --- /dev/null +++ b/data/Armors.json @@ -0,0 +1,7 @@ +[ +null, +{"id":1,"atypeId":5,"description":"","etypeId":2,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":128,"name":"盾牌","note":"","params":[0,0,0,10,0,0,0,0],"price":300}, +{"id":2,"atypeId":1,"description":"","etypeId":3,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":130,"name":"帽子","note":"","params":[0,0,0,10,0,0,0,0],"price":300}, +{"id":3,"atypeId":1,"description":"","etypeId":4,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":135,"name":"衣服","note":"","params":[0,0,0,10,0,0,0,0],"price":300}, +{"id":4,"atypeId":1,"description":"","etypeId":5,"traits":[{"code":22,"dataId":1,"value":0}],"iconIndex":145,"name":"戒指","note":"","params":[0,0,0,0,10,0,0,0],"price":300} +] \ No newline at end of file diff --git a/data/Classes.json b/data/Classes.json new file mode 100644 index 0000000..3494789 --- /dev/null +++ b/data/Classes.json @@ -0,0 +1,7 @@ +[ +null, +{"id":1,"expParams":[30,20,30,30],"traits":[{"code":23,"dataId":0,"value":1},{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":22,"dataId":2,"value":0.04},{"code":41,"dataId":1,"value":0},{"code":51,"dataId":2,"value":0},{"code":52,"dataId":1,"value":0},{"code":52,"dataId":3,"value":0},{"code":52,"dataId":5,"value":0},{"code":41,"dataId":2,"value":1},{"code":55,"dataId":1,"value":1}],"learnings":[{"level":1,"note":"","skillId":8},{"level":1,"note":"","skillId":10}],"name":"勇者","note":"","params":[[1,450,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1250,1300,1350,1400,1450,1500,1550,1600,1650,1700,1750,1800,1850,1900,1950,2000,2050,2100,2150,2200,2250,2300,2350,2400,2450,2500,2550,2600,2650,2700,2750,2800,2850,2900,2950,3000,3050,3100,3150,3200,3250,3300,3350,3400,3450,3500,3550,3600,3650,3700,3750,3800,3850,3900,3950,4000,4050,4100,4150,4200,4250,4300,4350,4400,4450,4500,4550,4600,4650,4700,4750,4800,4850,4900,4950,5000,5050,5100,5150,5200,5250,5300,5350],[0,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990,1000,1010,1020,1030,1040,1050,1060,1070],[1,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277]]}, +{"id":2,"expParams":[30,20,30,30],"traits":[{"code":23,"dataId":0,"value":1},{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":22,"dataId":2,"value":0.04},{"code":41,"dataId":1,"value":0},{"code":51,"dataId":4,"value":0},{"code":52,"dataId":1,"value":0},{"code":52,"dataId":3,"value":0},{"code":52,"dataId":4,"value":0},{"code":52,"dataId":5,"value":0},{"code":52,"dataId":6,"value":0}],"learnings":[],"name":"战士","note":"","params":[[1,450,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1250,1300,1350,1400,1450,1500,1550,1600,1650,1700,1750,1800,1850,1900,1950,2000,2050,2100,2150,2200,2250,2300,2350,2400,2450,2500,2550,2600,2650,2700,2750,2800,2850,2900,2950,3000,3050,3100,3150,3200,3250,3300,3350,3400,3450,3500,3550,3600,3650,3700,3750,3800,3850,3900,3950,4000,4050,4100,4150,4200,4250,4300,4350,4400,4450,4500,4550,4600,4650,4700,4750,4800,4850,4900,4950,5000,5050,5100,5150,5200,5250,5300,5350],[0,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990,1000,1010,1020,1030,1040,1050,1060,1070],[1,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277]]}, +{"id":3,"expParams":[30,20,30,30],"traits":[{"code":23,"dataId":0,"value":1},{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":22,"dataId":2,"value":0.04},{"code":41,"dataId":1,"value":0},{"code":51,"dataId":6,"value":0},{"code":52,"dataId":1,"value":0},{"code":52,"dataId":2,"value":0}],"learnings":[{"level":1,"note":"","skillId":9}],"name":"魔法师","note":"","params":[[1,450,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1250,1300,1350,1400,1450,1500,1550,1600,1650,1700,1750,1800,1850,1900,1950,2000,2050,2100,2150,2200,2250,2300,2350,2400,2450,2500,2550,2600,2650,2700,2750,2800,2850,2900,2950,3000,3050,3100,3150,3200,3250,3300,3350,3400,3450,3500,3550,3600,3650,3700,3750,3800,3850,3900,3950,4000,4050,4100,4150,4200,4250,4300,4350,4400,4450,4500,4550,4600,4650,4700,4750,4800,4850,4900,4950,5000,5050,5100,5150,5200,5250,5300,5350],[0,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990,1000,1010,1020,1030,1040,1050,1060,1070],[1,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277]]}, +{"id":4,"expParams":[30,20,30,30],"traits":[{"code":23,"dataId":0,"value":1},{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":22,"dataId":2,"value":0.04},{"code":41,"dataId":1,"value":0},{"code":51,"dataId":7,"value":0},{"code":52,"dataId":1,"value":0},{"code":52,"dataId":2,"value":0}],"learnings":[{"level":1,"note":"","skillId":8}],"name":"僧侣","note":"","params":[[1,450,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1250,1300,1350,1400,1450,1500,1550,1600,1650,1700,1750,1800,1850,1900,1950,2000,2050,2100,2150,2200,2250,2300,2350,2400,2450,2500,2550,2600,2650,2700,2750,2800,2850,2900,2950,3000,3050,3100,3150,3200,3250,3300,3350,3400,3450,3500,3550,3600,3650,3700,3750,3800,3850,3900,3950,4000,4050,4100,4150,4200,4250,4300,4350,4400,4450,4500,4550,4600,4650,4700,4750,4800,4850,4900,4950,5000,5050,5100,5150,5200,5250,5300,5350],[0,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990,1000,1010,1020,1030,1040,1050,1060,1070],[1,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,77,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,99,100,101,102,104,105,106,107,109,110,111,112,114,115,116,117,119,120,121,122,124,125,126,127,129,130,131,132,134,135,136,137,138],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277],[0,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162,165,167,170,172,175,177,180,182,185,187,190,192,195,197,200,202,205,207,210,212,215,217,220,222,225,227,230,232,235,237,240,242,245,247,250,252,255,257,260,262,265,267,270,272,275,277]]} +] \ No newline at end of file diff --git a/data/CommonEvents.json b/data/CommonEvents.json new file mode 100644 index 0000000..2bc9c27 --- /dev/null +++ b/data/CommonEvents.json @@ -0,0 +1,7 @@ +[ +null, +{"id":1,"list":[{"code":0,"indent":0,"parameters":[]}],"name":"","switchId":1,"trigger":0}, +{"id":2,"list":[{"code":0,"indent":0,"parameters":[]}],"name":"","switchId":1,"trigger":0}, +{"id":3,"list":[{"code":0,"indent":0,"parameters":[]}],"name":"","switchId":1,"trigger":0}, +{"id":4,"list":[{"code":0,"indent":0,"parameters":[]}],"name":"","switchId":1,"trigger":0} +] \ No newline at end of file diff --git a/data/Enemies.json b/data/Enemies.json new file mode 100644 index 0000000..9cd70a9 --- /dev/null +++ b/data/Enemies.json @@ -0,0 +1,7 @@ +[ +null, +{"id":1,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":0,"battlerName":"Bat","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"蝙蝠","note":"","params":[200,0,30,30,30,30,30,30]}, +{"id":2,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":0,"battlerName":"Slime","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"史莱姆","note":"","params":[250,0,30,30,30,30,30,30]}, +{"id":3,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":0,"battlerName":"Orc","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"兽人","note":"","params":[300,0,30,30,30,30,30,30]}, +{"id":4,"actions":[{"conditionParam1":0,"conditionParam2":0,"conditionType":0,"rating":5,"skillId":1}],"battlerHue":0,"battlerName":"Minotaur","dropItems":[{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0},{"dataId":1,"denominator":1,"kind":0}],"exp":0,"traits":[{"code":22,"dataId":0,"value":0.95},{"code":22,"dataId":1,"value":0.05},{"code":31,"dataId":1,"value":0}],"gold":0,"name":"牛头怪","note":"","params":[500,0,30,30,30,30,30,30]} +] \ No newline at end of file diff --git a/data/Items.json b/data/Items.json new file mode 100644 index 0000000..554310e --- /dev/null +++ b/data/Items.json @@ -0,0 +1,8 @@ +[ +null, +{"id":1,"animationId":41,"consumable":true,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[{"code":11,"dataId":0,"value1":0,"value2":500}],"hitType":0,"iconIndex":176,"itypeId":1,"name":"药水","note":"","occasion":0,"price":50,"repeats":1,"scope":7,"speed":0,"successRate":100,"tpGain":0}, +{"id":2,"animationId":41,"consumable":true,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[{"code":12,"dataId":0,"value1":0,"value2":200}],"hitType":0,"iconIndex":176,"itypeId":1,"name":"魔法药水","note":"","occasion":0,"price":100,"repeats":1,"scope":7,"speed":0,"successRate":100,"tpGain":0}, +{"id":3,"animationId":45,"consumable":true,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[{"code":22,"dataId":4,"value1":1,"value2":0},{"code":22,"dataId":5,"value1":1,"value2":0},{"code":22,"dataId":6,"value1":1,"value2":0},{"code":22,"dataId":7,"value1":1,"value2":0},{"code":22,"dataId":8,"value1":1,"value2":0},{"code":22,"dataId":9,"value1":1,"value2":0},{"code":22,"dataId":10,"value1":1,"value2":0}],"hitType":0,"iconIndex":176,"itypeId":1,"name":"驱魔药草","note":"","occasion":0,"price":200,"repeats":1,"scope":7,"speed":0,"successRate":100,"tpGain":0}, +{"id":4,"animationId":49,"consumable":true,"damage":{"critical":false,"elementId":0,"formula":"b.mhp / 2","type":3,"variance":20},"description":"","effects":[{"code":22,"dataId":1,"value1":1,"value2":0}],"hitType":0,"iconIndex":176,"itypeId":1,"name":"兴奋剂","note":"","occasion":0,"price":300,"repeats":1,"scope":9,"speed":0,"successRate":100,"tpGain":0}, +{"id":5,"animationId":0,"consumable":true,"damage":{"critical":false,"elementId":0,"formula":"b.mhp","type":0,"variance":20},"description":"","effects":[{"code":21,"dataId":1,"value1":1,"value2":0}],"hitType":0,"iconIndex":0,"itypeId":1,"name":"tmp","note":"","occasion":0,"price":0,"repeats":1,"scope":8,"speed":0,"successRate":100,"tpGain":0} +] \ No newline at end of file diff --git a/data/Map001.json b/data/Map001.json new file mode 100644 index 0000000..5d793ef --- /dev/null +++ b/data/Map001.json @@ -0,0 +1,8 @@ +{ +"autoplayBgm":false,"autoplayBgs":false,"battleback1Name":"","battleback2Name":"","bgm":{"name":"","pan":0,"pitch":100,"volume":90,"@c":2},"bgs":{"name":"","pan":0,"pitch":100,"volume":90,"@c":3},"disableDashing":false,"displayName":"","encounterList":{"@c":4,"@a":[]},"encounterStep":30,"height":13,"note":"","parallaxLoopX":false,"parallaxLoopY":false,"parallaxName":"Mountains5","parallaxShow":true,"parallaxSx":0,"parallaxSy":0,"scrollType":0,"specifyBattleback":false,"tilesetId":1,"width":17,"@c":1, +"data":{"@c":5,"@a":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}, +"events":[ +null, +{"id":1,"name":"EV001","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"characterIndex":0,"characterName":"","direction":2,"pattern":0,"tileId":0},"list":[{"code":203,"indent":0,"parameters":[0,0,0,0,2]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":0,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":3,"y":2} +] +} \ No newline at end of file diff --git a/data/Map001Ext.json b/data/Map001Ext.json new file mode 100644 index 0000000..cce4495 --- /dev/null +++ b/data/Map001Ext.json @@ -0,0 +1 @@ +{"events":{"@c":2},"@c":1} \ No newline at end of file diff --git a/data/Map002Ext.json b/data/Map002Ext.json new file mode 100644 index 0000000..f30aaf8 --- /dev/null +++ b/data/Map002Ext.json @@ -0,0 +1,3 @@ +{ + "events": {} +} \ No newline at end of file diff --git a/data/Map003.json b/data/Map003.json new file mode 100644 index 0000000..ced8045 --- /dev/null +++ b/data/Map003.json @@ -0,0 +1,11 @@ +{ +"autoplayBgm":false,"autoplayBgs":false,"battleback1Name":"Road1","battleback2Name":"Brick","bgm":{"name":"","pan":0,"pitch":100,"volume":90},"bgs":{"name":"","pan":0,"pitch":100,"volume":90},"disableDashing":false,"displayName":"","encounterList":[],"encounterStep":30,"height":50,"note":"","parallaxLoopX":false,"parallaxLoopY":false,"parallaxName":"","parallaxShow":true,"parallaxSx":0,"parallaxSy":0,"scrollType":0,"specifyBattleback":true,"tilesetId":5,"width":52, +"data":[5888,5888,5912,1552,5928,5916,5916,5916,5926,1552,1552,1552,1552,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,7776,7760,7784,1552,1552,1552,1552,1552,5415,3600,3608,7008,6992,7016,3600,3584,3584,3584,3584,3584,3608,7008,6992,6992,6992,6992,6992,6992,6992,5888,5888,5912,1552,6275,6274,6274,6274,6278,1552,1552,1552,1552,1585,1585,1585,1585,1585,6978,6964,6980,1552,1552,7800,7788,7798,1552,4403,4402,4402,4406,5413,3600,3608,7032,7020,7030,3600,3584,3584,3584,3584,3584,3608,7032,7020,7020,7020,7020,7020,7020,7020,5916,5916,5926,1552,6273,6272,6272,6272,6276,1552,7379,7378,7382,1585,1585,1585,1585,1585,6984,6972,6982,1552,1552,7331,7330,7334,1552,4409,4408,4408,4412,5413,3600,3608,7379,7378,7382,3600,3584,3584,3584,3584,3584,3608,7379,7378,7378,7378,7378,7378,7378,7382,6275,6274,6278,1552,6281,6280,6280,6280,6284,1552,7385,7384,7388,1585,1585,1585,1585,1585,7331,7330,7334,1552,1552,7329,7328,7332,1552,6563,6562,6562,6562,5413,3600,3608,7385,7384,7388,3600,3584,3584,3584,3584,3584,3608,7377,7376,7376,7376,7376,7376,7376,7380,6273,6272,6276,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1585,1585,1585,1585,1585,7337,7336,7340,1552,1552,7337,7336,7340,1552,6569,6568,6568,4407,5413,3600,3608,5795,5794,5798,3600,3584,3584,3584,3584,3584,3608,7385,7384,7384,7384,7384,7384,7384,7388,6273,6272,6276,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,6978,6964,6980,4413,5413,3600,3608,5793,5792,5796,3600,3584,3584,3584,3584,3584,3586,3604,3620,3722,3618,3604,3620,1633,1633,6273,6272,6276,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,6960,6944,6968,6562,5413,3600,3608,5793,5792,5796,3600,3584,3584,3584,3584,3584,3584,3584,3608,3712,3600,3584,3608,1633,1633,6281,6280,6284,1552,1552,1552,1552,1552,5363,5362,5362,5362,5366,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,1552,1552,1552,6984,6972,6982,6568,5413,3600,3608,5801,5800,5804,3624,3612,3612,3612,3612,3612,3612,3612,3622,3712,3600,3584,3608,1633,1633,7780,7780,7796,1552,1552,1552,1552,1552,5361,5360,5360,5360,5364,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,1552,1552,1552,5507,5506,5510,1552,5413,3600,3586,3620,3723,3713,3713,3702,3700,3700,3701,3713,3713,3713,3713,3719,3600,3584,3608,1633,1633,7788,7788,7798,1552,1552,1552,1552,1552,5369,5368,5368,5368,5372,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,1552,1552,1552,5505,5504,5508,1552,5413,3600,3584,3586,3604,3604,3620,3696,3680,3680,3704,3618,3604,3604,3604,3604,3585,3584,3608,1633,1633,8147,8146,8150,1552,1552,1552,1552,1552,8003,8002,8002,8002,8006,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,1552,1552,1552,5505,5504,5508,1552,5413,3624,3612,3612,3612,3612,3622,3696,3680,3680,3704,3624,3612,3612,3612,3612,3612,3612,3622,1633,1633,8145,8144,8148,1552,1552,1552,1552,1552,8001,8000,8000,8000,8004,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,1552,1552,1552,5505,5504,5508,1552,5421,5419,5418,5418,5418,5418,5422,3696,3680,3680,3704,5419,5418,5418,5418,5418,5418,5418,5418,5418,5422,8153,8152,8156,1552,1552,1552,1552,1552,8009,8008,8008,8008,8012,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,1552,1552,1552,5513,5512,5516,1552,5803,5802,5802,5802,5802,5802,5806,3720,3708,3708,3718,5803,5802,5802,5802,5802,5802,5802,5802,5802,5806,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1552,3234,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3220,3236,1633,1633,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1552,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,1633,1633,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1552,1552,1585,1585,1585,1585,1585,1585,1585,1552,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,1633,1633,1552,1552,1552,1552,7746,7732,7748,1552,1552,1552,1552,1552,1552,1585,1585,1585,1585,1585,1552,1552,1552,1552,1552,1552,7794,7780,7780,7780,7780,7796,1552,1552,3216,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3200,3224,1633,1633,1552,5267,5266,5270,7752,7740,7750,1552,6882,6868,6868,6868,6884,1585,1585,1585,1585,1585,5555,5554,5558,1552,1552,1552,7800,7788,7788,7768,7760,7784,1552,1552,3240,3228,3228,3228,3228,3228,3228,3228,3208,3204,3228,3228,3228,3228,3228,3228,3228,3238,1633,1633,1552,5273,5272,5276,8099,8098,8102,1552,6864,6852,6876,6876,6886,1585,1585,1585,1585,1585,5561,5560,5564,5555,5554,5558,8147,8146,8150,7776,7760,7784,1552,1552,1552,1552,1552,1552,1552,1552,1552,3770,3216,3224,3770,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,5651,5650,5654,8105,8104,8108,1572,6864,6872,7235,7234,7238,1585,1585,1585,1585,1585,1552,1552,1552,5561,5560,5564,8153,8152,8156,7800,7788,7798,1552,1552,1552,1552,1552,1552,1552,1552,1552,3760,3216,3224,3760,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,5267,5266,5270,1552,1552,1572,1572,6888,6886,7241,7240,7244,1585,1585,1585,1585,1585,5411,5410,5410,5410,5414,1552,1552,1552,1552,8147,8146,8150,1552,1552,6114,6100,6100,6100,6100,6100,6116,3760,3216,3224,3760,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,5273,5272,5276,1552,1552,1572,1572,7235,7238,1572,1572,1572,1585,1585,1585,1585,1585,5417,5416,5416,5416,5420,1552,1552,1552,1552,8153,8152,8156,1552,1552,6096,6080,6080,6080,6080,6080,6104,3760,3216,3224,3760,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,5651,5650,5654,1552,1552,1572,1572,7241,7244,1572,1572,1572,1585,1585,1585,1585,1585,5795,5794,5794,5794,5798,1552,1552,1552,1552,1552,1552,1552,1552,1552,6120,6108,6108,6108,6088,6080,6104,3760,3216,3224,3760,1552,1552,1552,1552,1552,1552,1552,1552,1552,6100,6116,5656,5660,1552,1552,1572,1572,1572,1572,1572,1572,1572,1585,1585,1585,1585,1585,5801,5800,5800,5800,5804,1552,1552,1552,1552,1552,1552,1552,1552,1552,4739,4738,4738,4738,6096,6080,6104,3760,3216,3224,3760,1552,1552,1552,1552,1552,1552,1552,1552,1552,6108,6118,1585,1585,1552,1552,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1552,4745,4744,4744,4744,6096,6080,6104,3760,3216,3224,3760,1552,1552,1552,1552,1552,1552,1552,1552,1552,5515,5518,1585,1585,1552,1552,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,1585,5459,5458,5458,5462,1552,1552,1552,1552,1552,6120,6108,6118,3760,3216,3224,3760,4691,4690,4690,4694,1552,1552,1552,1552,1552,6371,6374,1552,1552,1552,1552,5459,5458,5462,7794,7780,7780,7796,1585,1585,1585,1585,1585,5922,5908,5908,5908,5908,5924,1552,1552,1552,5465,5464,5464,5468,1552,1552,1552,1552,1552,4747,4746,4750,3760,3216,3224,3760,4697,4696,4696,4700,1552,1552,1552,1552,1552,6369,6372,6786,6788,1552,1552,5465,5464,5468,7800,7788,7788,7798,1585,1585,1585,1585,1585,5928,5916,5916,5916,5916,5926,1584,1584,1584,5843,5842,5842,5846,1552,1552,1552,1552,1552,1552,1552,1552,3760,3216,3224,3760,5075,5074,5074,5078,1552,1552,1552,1552,1552,6369,6372,6792,6790,1552,1552,5843,5842,5846,8145,8144,8144,8148,3770,1585,1585,1585,3770,6323,6322,6322,6322,6322,6326,1584,1584,1584,5841,5840,5840,5844,1552,1552,1552,1552,1552,1552,1552,1552,3760,3216,3224,3760,5073,5072,5072,5076,1552,1552,1552,1552,1552,6377,6380,7147,7150,1552,1552,5849,5848,5852,8153,8152,8152,8156,3760,1585,1585,1585,3760,6329,6328,6328,6328,6328,6332,1552,1552,1552,5849,5848,5848,5852,1552,1552,1552,1552,1552,1552,1552,1552,3760,3216,3224,3760,5081,5080,5080,5084,1552,1552,1552,1552,1552,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3767,1552,1552,1552,3769,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3767,3240,3238,3769,3761,3761,3761,3761,3761,3761,3761,3761,3761,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,6052,6052,6052,6052,6052,6068,3771,3761,3761,3761,3761,3761,3761,3765,1552,1552,1552,3762,3748,3748,3748,3748,3749,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3773,1568,1568,6060,6060,6060,6060,6060,6070,1552,6114,6100,6100,6100,6100,6116,3760,1552,1552,1552,3746,3756,3756,3756,3756,3766,4547,4550,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,6419,6418,6418,6418,6418,6422,1552,6120,6108,6108,6108,6108,6118,3760,1552,1552,1552,3760,5219,5218,5218,5218,5222,4553,4556,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,6417,6416,6416,6416,6416,6420,1552,6467,6466,6466,6466,6466,6470,3760,1552,1552,1552,3760,5225,5224,5224,5224,5228,4882,4886,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,8147,8146,8146,8150,1568,1568,1568,1568,1568,1568,8147,8146,8146,8150,1568,1568,6425,6424,6424,6424,6424,6428,1552,6465,6464,6468,6472,6465,6468,3760,1552,1552,1552,3760,5507,5510,5514,5507,5510,4888,4892,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,8153,8152,8152,8156,8146,8146,8146,8146,8146,8146,8153,8152,8152,8156,1568,1568,8107,8106,8106,8106,8106,8110,1552,6473,6472,6476,5615,6473,6476,3760,1552,1552,1552,3760,5513,5516,5615,5513,5516,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,5931,5921,5921,5933,8152,8152,8152,8152,8152,8152,5931,5921,5921,5933,1568,1568,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3754,1552,1552,1552,3745,3748,3748,3748,3748,3748,3748,3764,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,8147,8146,8146,8146,5931,5921,5921,5921,5921,5933,8146,8146,8146,8150,1568,1568,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3766,1552,1552,1552,3768,3756,3756,3756,3756,3756,3756,3738,3748,3748,3748,3748,3748,3748,3748,3748,3764,1568,1568,8153,8152,8152,8152,8147,8146,8146,8146,8146,8150,8152,8152,8152,8156,1568,1568,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,3768,3756,3756,3756,3756,3756,3756,3756,3756,3758,3765,1568,1568,1568,1568,1568,8153,8152,8152,8152,8152,8156,1568,1568,1568,1568,1568,1568,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,3769,3761,3761,3761,3761,3761,3761,3761,3761,3761,3773,1568,1568,1568,1568,1568,1568,1568,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1568,1568,1568,1568,1568,1568,1568,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1568,1568,1568,1568,1568,1568,1568,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,3762,3748,3748,3748,3748,3748,3748,3748,3748,3749,3761,3761,3761,3761,3761,3761,3761,3761,3761,3761,3773,1568,1568,1568,1568,1568,1568,1568,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3748,3733,3756,3756,3756,3756,3756,3756,3756,3756,3766,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3756,3766,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,4355,4354,4354,4354,4358,6882,6868,6868,6868,6868,6884,1552,1552,6978,6964,6964,6964,6964,6980,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,4361,4360,4360,4360,4364,6864,6848,6848,6848,6848,6872,1552,1552,6960,6944,6944,6944,6944,6968,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,1568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3810,3796,3796,3796,3812,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3792,3776,3776,3776,3800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3792,3776,3776,3776,3800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3792,3776,3776,3776,3800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3816,3804,3804,3804,3814,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,149,149,0,0,0,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,244,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,149,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,149,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,217,218,216,217,218,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,472,473,473,473,473,473,473,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194,195,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,307,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,0,0,0,0,93,0,485,0,0,93,0,0,93,0,0,0,0,0,93,487,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,0,0,0,0,0,0,0,0,485,493,0,494,494,0,0,494,494,0,0,0,494,494,495,0,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,149,0,0,0,0,0,0,0,0,0,501,502,502,502,508,0,494,494,0,511,502,502,502,495,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,0,0,0,0,0,0,0,0,0,0,0,0,0,501,502,502,502,502,503,0,0,0,503,0,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,275,276,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0,0,0,0,0,0,85,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,157,141,141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,106,0,0,0,0,0,0,0,0,0,493,494,495,391,388,389,390,391,102,102,102,102,0,0,0,106,0,0,0,0,0,0,141,141,0,492,0,141,141,141,102,102,102,102,0,0,0,0,0,0,0,0,0,170,0,142,65,65,0,99,100,142,501,502,503,399,396,397,398,399,0,0,0,110,132,0,0,0,0,0,0,0,0,0,149,149,0,500,0,149,149,149,110,110,110,110,0,0,0,0,0,0,0,0,0,0,0,150,73,73,0,0,0,150,87,62,87,81,404,405,406,407,122,123,0,101,132,57,57,57,170,0,0,0,0,0,0,0,0,236,0,0,0,0,0,0,134,135,0,64,0,0,64,0,0,64,69,69,69,138,0,0,116,43,86,154,95,51,95,85,0,0,0,85,64,7,64,103,103,57,57,57,142,0,0,0,0,0,0,0,0,244,0,0,0,0,0,0,0,171,0,72,0,0,72,0,0,72,77,77,77,146,113,121,124,0,94,0,0,0,0,93,0,0,0,93,72,43,72,111,111,0,43,0,150,0,0,0,0,0,0,0,0,228,0,0,0,0,0,0,0,170,0,0,0,0,0,0,0,0,69,69,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,141,77,77,77,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,208,209,210,0,0,0,0,139,139,0,0,0,0,0,0,0,0,236,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,157,0,0,0,194,195,0,0,93,0,0,0,0,0,85,0,0,0,85,216,217,218,194,195,134,135,147,147,0,0,0,0,0,0,0,0,236,0,0,0,0,0,0,0,0,0,0,0,191,0,157,157,157,0,0,0,202,203,0,171,133,0,0,0,0,0,93,0,0,0,93,224,225,226,202,203,0,0,0,0,65,65,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,157,0,0,0,40,40,0,187,170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,0,0,0,73,73,73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,157,65,65,65,80,0,0,0,0,0,70,66,70,0,82,0,0,0,0,208,209,210,208,209,210,208,209,210,65,65,65,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,157,73,73,73,116,0,0,139,139,0,78,74,78,0,85,0,0,0,85,216,217,218,211,227,219,235,235,235,73,73,73,0,0,0,0,0,0,0,0,459,447,447,459,0,0,0,0,0,0,0,0,0,0,0,43,0,124,134,135,147,147,136,120,43,0,0,93,0,0,0,93,224,225,226,224,225,226,224,225,226,0,43,0,318,142,0,0,0,0,0,0,467,455,455,467,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,0,0,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,464,189,190,0,0,0,0,0,0,0,0,0,0,0,0,0,207,187,296,296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,485,486,486,486,486,487,0,0,0,0,0,0,0,142,464,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,196,187,296,296,0,0,0,85,0,0,0,85,142,0,142,0,142,0,0,0,0,0,493,494,494,494,494,495,0,0,0,0,0,0,0,150,464,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,204,187,296,296,0,0,0,93,0,0,0,93,150,0,150,0,150,0,0,0,0,0,501,502,502,508,494,495,0,0,0,0,0,0,170,142,464,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,187,296,296,0,0,0,0,0,0,0,0,0,0,0,0,0,85,0,0,0,85,0,0,0,501,502,503,0,0,0,0,0,0,101,150,102,102,102,102,102,102,102,0,0,0,0,473,473,473,473,473,473,473,296,296,0,0,0,0,0,0,0,133,0,106,0,0,0,93,0,0,0,93,0,43,0,0,69,0,480,481,482,0,0,0,101,142,102,110,110,110,110,110,110,0,0,0,0,292,293,294,292,293,294,292,293,294,0,0,67,0,0,0,0,155,0,0,56,115,56,90,0,0,0,0,0,0,0,0,77,0,488,489,490,0,0,0,109,150,102,0,0,0,0,0,0,0,0,0,0,0,275,276,134,135,275,276,0,0,0,0,0,0,0,0,0,170,0,0,0,43,137,98,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,101,142,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194,195,83,84,121,0,145,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,233,234,109,150,0,0,170,0,0,170,0,0,0,0,0,0,262,262,262,0,0,260,261,0,0,70,0,70,82,0,42,203,0,0,0,0,0,85,0,0,0,85,0,115,0,65,65,88,0,0,498,240,241,242,0,142,0,0,0,0,0,0,0,0,0,0,0,0,0,86,0,0,0,268,269,0,0,0,43,78,0,0,50,0,275,276,0,0,0,93,0,0,0,93,0,138,43,73,73,96,0,0,506,248,249,250,0,150,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,44,44,0,0,0,0,0,0,0,0,0,0,0,0,0,146,0,0,483,0,0,0,0,0,0,0,0,142,0,43,43,0,0,170,0,0,0,0,0,0,0,0,0,0,0,277,277,0,91,92,138,0,44,44,0,0,0,0,0,0,0,391,388,389,390,391,0,492,0,0,491,0,0,0,0,0,0,0,0,150,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,285,285,0,0,0,146,0,0,0,0,0,0,0,0,0,0,399,396,397,398,399,0,500,0,0,499,0,292,293,294,0,0,0,0,142,133,0,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,407,404,405,406,407,0,0,476,477,0,0,289,296,296,0,68,68,0,150,133,0,202,203,232,233,234,0,0,0,0,64,64,64,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,56,56,56,0,0,0,0,0,0,60,0,0,60,0,0,288,0,0,76,76,0,142,0,0,40,40,240,241,242,0,0,0,0,72,72,72,72,0,0,0,0,0,0,0,0,85,478,479,0,0,85,0,0,0,0,85,0,0,0,85,0,0,0,0,0,85,292,293,294,0,0,85,0,150,0,0,85,351,248,249,250,85,0,0,85,0,0,0,0,322,85,307,307,324,0,0,0,93,0,0,0,0,93,0,0,0,0,93,0,41,0,93,0,0,0,0,0,93,0,0,0,0,0,93,0,0,0,0,93,0,0,0,0,93,0,0,93,0,0,0,0,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,85,0,0,0,0,85,0,0,0,0,85,0,0,0,85,0,0,0,0,0,85,0,0,0,0,0,85,0,0,0,0,85,0,0,0,0,85,0,0,85,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0,93,0,0,0,0,93,0,32,0,93,0,0,0,0,0,93,0,141,141,141,141,141,141,141,141,141,141,485,486,486,486,486,486,486,486,486,486,486,486,486,486,486,487,141,0,0,0,0,122,123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,149,149,149,149,149,149,149,149,493,494,494,170,170,494,494,492,492,494,494,494,170,170,494,495,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,157,157,0,0,0,0,0,0,0,0,493,494,494,494,494,494,494,500,500,494,494,494,494,494,494,495,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,0,0,296,0,0,0,0,0,501,502,502,502,508,494,494,494,494,494,494,511,502,502,502,503,157,480,481,482,480,481,482,0,0,0,0,0,0,0,0,0,32,0,0,57,57,0,57,57,0,498,157,157,0,0,0,289,0,0,0,0,0,0,60,60,501,502,502,502,502,502,502,503,60,60,0,0,157,488,489,490,488,489,490,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,506,141,141,0,289,0,0,0,0,0,0,0,472,473,473,474,0,60,60,60,60,0,472,473,473,474,0,157,0,0,0,85,0,496,497,0,85,0,0,0,0,85,0,0,0,85,0,0,0,0,0,85,0,149,149,0,0,0,0,270,0,0,0,0,0,68,68,0,472,473,473,473,473,474,0,68,68,0,0,157,0,0,0,93,0,504,505,186,93,0,351,0,184,93,44,44,44,93,0,0,134,135,0,93,0,0,0,0,0,85,0,0,0,85,0,0,0,76,76,0,0,68,56,56,68,0,0,76,76,0,0,157,0,0,0,0,0,192,193,0,0,0,0,0,0,52,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,93,0,0,0,93,0,0,0,0,351,133,0,76,0,0,76,0,0,0,0,0,0,157,0,0,0,0,0,200,201,0,0,0,0,0,0,52,0,41,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,40,0,40,0,40,0,40,0,40,0,40,0,0,52,0,49,0,52,0,40,0,40,0,40,0,40,0,40,0,40,0,40,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,0,0,0,0,0,0,0,0,0,0,0,0,0,52,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,85,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,0,0,0,85,0,0,0,0,0,0,0,0,0,52,0,0,0,52,0,0,0,0,0,85,0,0,0,0,0,93,0,0,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,0,0,0,93,0,0,0,0,93,0,0,0,0,93,0,0,0,93,0,0,134,135,0,93,0,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141,141,141,141,141,141,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,141,157,157,0,0,0,0,0,0,0,0,0,0,0,155,155,0,0,0,0,0,0,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,0,0,0,5,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], +"events":[ +null, +{"id":1,"name":"EV001","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"!Door1","direction":2,"pattern":0,"characterIndex":4},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":42,"y":41}, +{"id":2,"name":"EV002","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"!Door1","direction":2,"pattern":0,"characterIndex":4},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":43,"y":41}, +{"id":3,"name":"EV003","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor1","direction":6,"pattern":2,"characterIndex":2},"list":[{"code":101,"indent":0,"parameters":["",0,0,2]},{"code":401,"indent":0,"parameters":["rwesffhrdrhfgre"]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":10,"indent":null},{"code":45,"parameters":["this._chaseRange = 200;this._chaseSpeed = 2;this._seePlayer=true;"],"indent":null},{"code":0,"parameters":[]}],"repeat":false,"skippable":false,"wait":false},"moveSpeed":3,"moveType":3,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true},{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":true,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Vehicle","direction":2,"pattern":0,"characterIndex":0},"list":[{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":16,"y":6}, +{"id":4,"name":"EV004","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"characterIndex":0,"characterName":"","direction":2,"pattern":0,"tileId":0},"list":[{"code":127,"indent":0,"parameters":[1,0,0,10,false]},{"code":311,"indent":0,"parameters":[0,2,1,0,9999,true]},{"code":126,"indent":0,"parameters":[5,0,0,10]},{"code":214,"indent":0,"parameters":[]},{"code":355,"indent":0,"parameters":["SceneManager.push(Scene_Menu)"]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":2,"stepAnime":false,"through":false,"trigger":3,"walkAnime":true}],"x":7,"y":5} +] +} \ No newline at end of file diff --git a/data/Map003Ext.json b/data/Map003Ext.json new file mode 100644 index 0000000..244be83 --- /dev/null +++ b/data/Map003Ext.json @@ -0,0 +1 @@ +{"events":{"100001":{"id":100001,"name":"EV004","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"tileId":0,"characterName":"Actor2","direction":2,"pattern":0,"characterIndex":0},"list":[{"code":213,"indent":0,"parameters":[3,1,false]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":1,"stepAnime":false,"through":false,"trigger":0,"walkAnime":true}],"x":15,"y":8,"ext_id":100001},"@c":2},"@c":1} \ No newline at end of file diff --git a/data/MapInfos.json b/data/MapInfos.json new file mode 100644 index 0000000..6d098da --- /dev/null +++ b/data/MapInfos.json @@ -0,0 +1,6 @@ +[ +null, +{"id":1,"expanded":false,"name":"MAP001","order":2,"parentId":0,"scrollX":2457,"scrollY":1368}, +null, +{"id":3,"expanded":true,"name":"南郊(有水泵站)","order":1,"parentId":0,"scrollX":1622,"scrollY":912} +] \ No newline at end of file diff --git a/data/Quests.json b/data/Quests.json new file mode 100644 index 0000000..a75ccb7 --- /dev/null +++ b/data/Quests.json @@ -0,0 +1 @@ +[{"name":"","desc":"","@c":2},{"name":"rew","desc":"xzcxz","@c":3},{"name":"bdfbcv","desc":"zcsewfsd","@c":4},{"name":"czxca","desc":"casccvdz","@c":5},{"name":"中文?","desc":"daspdjasmv爱上你的考虑爱死你了风格\n\\c[2]sada","@c":6},{"name":"","desc":"","@c":7},{"name":"","desc":"","@c":8},{"name":"","desc":"","@c":9},{"name":"","desc":"","@c":10},{"name":"","desc":"","@c":11},{"name":"c'x'z","desc":"重新注册","@c":12},{"name":"","desc":"","@c":13},{"name":"","desc":"","@c":14},{"name":"","desc":"","@c":15}] \ No newline at end of file diff --git a/data/Skills.json b/data/Skills.json new file mode 100644 index 0000000..0d3a446 --- /dev/null +++ b/data/Skills.json @@ -0,0 +1,23 @@ +[ +null, +{"id":1,"animationId":-1,"damage":{"critical":true,"elementId":-1,"formula":"a.atk * 4 - b.def * 2","type":1,"variance":20},"description":"","effects":[{"code":21,"dataId":0,"value1":1,"value2":0}],"hitType":1,"iconIndex":76,"message1":"的攻击!","message2":"","mpCost":0,"name":"攻击","note":"1 号技能会在选择“攻击”指令时使用。","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":10}, +{"id":2,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[{"code":21,"dataId":2,"value1":1,"value2":0}],"hitType":0,"iconIndex":81,"message1":"正在保护自己。","message2":"","mpCost":0,"name":"防御","note":"1 号技能会在选择“防御”指令时使用。","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":11,"speed":2000,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":10}, +{"id":3,"animationId":-1,"damage":{"critical":true,"elementId":-1,"formula":"a.atk * 4 - b.def * 2","type":1,"variance":20},"description":"","effects":[{"code":21,"dataId":0,"value1":1,"value2":0}],"hitType":1,"iconIndex":76,"message1":"的攻击!","message2":"","mpCost":0,"name":"连续攻击","note":"","occasion":1,"repeats":2,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":5}, +{"id":4,"animationId":-1,"damage":{"critical":true,"elementId":-1,"formula":"a.atk * 4 - b.def * 2","type":1,"variance":20},"description":"","effects":[{"code":21,"dataId":0,"value1":1,"value2":0}],"hitType":1,"iconIndex":76,"message1":"的攻击!","message2":"","mpCost":0,"name":"两次攻击","note":"","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":4,"speed":0,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":5}, +{"id":5,"animationId":-1,"damage":{"critical":true,"elementId":-1,"formula":"a.atk * 4 - b.def * 2","type":1,"variance":20},"description":"","effects":[{"code":21,"dataId":0,"value1":1,"value2":0}],"hitType":1,"iconIndex":76,"message1":"的攻击!","message2":"","mpCost":0,"name":"三次攻击","note":"","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":5,"speed":0,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":4}, +{"id":6,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[{"code":41,"dataId":0,"value1":0,"value2":0}],"hitType":0,"iconIndex":82,"message1":"逃跑了。","message2":"","mpCost":0,"name":"逃跑","note":"","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":11,"speed":0,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":7,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":81,"message1":"正在观望。","message2":"","mpCost":0,"name":"观望","note":"","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":0,"speed":0,"stypeId":0,"successRate":100,"tpCost":0,"tpGain":10}, +{"id":8,"animationId":41,"damage":{"critical":false,"elementId":0,"formula":"200 + a.mat","type":3,"variance":20},"description":"???????大破敌军艾斯芬尼我发你文法\n啊爱丽丝放牛娃二那里咖啡","effects":[],"hitType":0,"iconIndex":72,"message1":"吟唱了%1!","message2":"","mpCost":5,"name":"治愈","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":10,"speed":0,"stypeId":2,"successRate":100,"tpCost":0,"tpGain":10}, +{"id":9,"animationId":66,"damage":{"critical":false,"elementId":2,"formula":"100 + a.mat * 2 - b.mdf * 2","type":1,"variance":20},"description":"","effects":[],"hitType":2,"iconIndex":64,"message1":"吟唱了%1!","message2":"","mpCost":5,"name":"火焰","note":"","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":10}, +{"id":10,"animationId":78,"damage":{"critical":false,"elementId":4,"formula":"100 + a.mat * 2 - b.mdf * 2","type":1,"variance":20},"description":"","effects":[],"hitType":2,"iconIndex":66,"message1":"吟唱了%1!","message2":"","mpCost":5,"name":"闪电","note":"","occasion":1,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":2,"speed":0,"stypeId":2,"successRate":100,"tpCost":0,"tpGain":10}, +{"id":11,"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":12,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"1,1","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":13,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"1,2","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":14,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"1,3","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":15,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"1,4","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":2,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":16,"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":17,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"2,1","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":18,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"2,2","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":19,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"2,3","note":"","occasion":0,"repeats":1,"requiredWtypeId1":0,"requiredWtypeId2":0,"scope":1,"speed":0,"stypeId":1,"successRate":100,"tpCost":0,"tpGain":0}, +{"id":20,"animationId":0,"damage":{"critical":false,"elementId":0,"formula":"0","type":0,"variance":20},"description":"","effects":[],"hitType":0,"iconIndex":0,"message1":"","message2":"","mpCost":0,"name":"2,4","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/States.json b/data/States.json new file mode 100644 index 0000000..d083494 --- /dev/null +++ b/data/States.json @@ -0,0 +1,13 @@ +[ +null, +{"id":1,"autoRemovalTiming":0,"chanceByDamage":100,"iconIndex":1,"maxTurns":1,"message1":"倒下了!","message2":"被打败了!","message3":"","message4":"复活了!","minTurns":1,"motion":3,"name":"无法战斗","note":"1 号状态在 HP 变为 0 时会自动附加。","overlay":0,"priority":100,"releaseByDamage":false,"removeAtBattleEnd":false,"removeByDamage":false,"removeByRestriction":false,"removeByWalking":false,"restriction":4,"stepsToRemove":100,"traits":[{"code":23,"dataId":9,"value":0}]}, +{"id":2,"autoRemovalTiming":2,"chanceByDamage":100,"description":"","iconIndex":4,"maxTurns":1,"message1":"","message2":"","message3":"","message4":"","minTurns":1,"motion":0,"name":"防御","note":"","overlay":0,"priority":0,"removeAtBattleEnd":true,"removeByDamage":false,"removeByRestriction":true,"removeByWalking":false,"restriction":0,"stepsToRemove":100,"traits":[{"code":62,"dataId":1,"value":0}]}, +{"id":3,"autoRemovalTiming":0,"chanceByDamage":100,"description":"","iconIndex":72,"maxTurns":1,"message1":"","message2":"","message3":"","message4":"","minTurns":1,"motion":0,"name":"不死之身","note":"","overlay":0,"priority":0,"removeAtBattleEnd":true,"removeByDamage":false,"removeByRestriction":false,"removeByWalking":false,"restriction":0,"stepsToRemove":100,"traits":[{"code":14,"dataId":1,"value":0}]}, +{"id":4,"autoRemovalTiming":0,"chanceByDamage":100,"iconIndex":2,"maxTurns":1,"message1":"中毒了!","message2":"中毒了!","message3":"","message4":"中的毒消失了!","minTurns":1,"motion":1,"overlay":1,"name":"中毒","note":"","priority":50,"releaseByDamage":false,"removeAtBattleEnd":false,"removeByDamage":false,"removeByRestriction":false,"removeByWalking":false,"restriction":0,"stepsToRemove":100,"traits":[{"code":22,"dataId":7,"value":-0.1}]}, +{"id":5,"autoRemovalTiming":1,"chanceByDamage":100,"iconIndex":3,"maxTurns":5,"message1":"陷入了黑暗!","message2":"陷入了黑暗!","message3":"","message4":"的黑暗消失了!","minTurns":3,"motion":1,"name":"黑暗","note":"","overlay":2,"priority":60,"releaseByDamage":false,"removeAtBattleEnd":true,"removeByDamage":false,"removeByRestriction":false,"removeByWalking":false,"restriction":0,"stepsToRemove":100,"traits":[{"code":22,"dataId":0,"value":-0.5}]}, +{"id":6,"autoRemovalTiming":1,"chanceByDamage":100,"iconIndex":4,"maxTurns":5,"message1":"沉默了!","message2":"沉默了!","message3":"","message4":"的沉默解除了!","minTurns":3,"motion":1,"name":"沉默","note":"","overlay":3,"priority":65,"releaseByDamage":false,"removeAtBattleEnd":true,"removeByDamage":false,"removeByRestriction":false,"removeByWalking":false,"restriction":0,"stepsToRemove":100,"traits":[{"code":42,"dataId":1,"value":0}]}, +{"id":7,"autoRemovalTiming":1,"chanceByDamage":50,"iconIndex":5,"maxTurns":4,"message1":"被激怒了!","message2":"被激怒了!","message3":"","message4":"恢复了理智!","minTurns":2,"motion":1,"name":"愤怒","note":"","overlay":4,"priority":70,"releaseByDamage":false,"removeAtBattleEnd":true,"removeByDamage":true,"removeByRestriction":false,"removeByWalking":false,"restriction":1,"stepsToRemove":100,"traits":[]}, +{"id":8,"autoRemovalTiming":1,"chanceByDamage":50,"iconIndex":6,"maxTurns":4,"message1":"陷入了混乱!","message2":"陷入了混乱!","message3":"","message4":"恢复了理智!","minTurns":2,"motion":1,"name":"混乱","note":"","overlay":5,"priority":75,"releaseByDamage":false,"removeAtBattleEnd":true,"removeByDamage":true,"removeByRestriction":false,"removeByWalking":false,"restriction":2,"stepsToRemove":100,"traits":[]}, +{"id":9,"autoRemovalTiming":1,"chanceByDamage":50,"iconIndex":7,"maxTurns":4,"message1":"被魅惑了!","message2":"被魅惑了!","message3":"","message4":"恢复了理智!","minTurns":2,"motion":1,"name":"魅惑","note":"","overlay":6,"priority":80,"releaseByDamage":false,"removeAtBattleEnd":true,"removeByDamage":true,"removeByRestriction":false,"removeByWalking":false,"restriction":3,"stepsToRemove":100,"traits":[]}, +{"id":10,"autoRemovalTiming":1,"chanceByDamage":100,"iconIndex":8,"maxTurns":5,"message1":"睡着了!","message2":"睡着了!","message3":"正在沉睡中。","message4":"醒来了!","minTurns":3,"motion":2,"name":"睡眠","note":"","overlay":7,"priority":90,"releaseByDamage":true,"removeAtBattleEnd":true,"removeByDamage":true,"removeByRestriction":false,"removeByWalking":false,"restriction":4,"stepsToRemove":100,"traits":[{"code":22,"dataId":1,"value":-1}]} +] \ No newline at end of file diff --git a/data/System.json b/data/System.json new file mode 100644 index 0000000..c1b5058 --- /dev/null +++ b/data/System.json @@ -0,0 +1 @@ +{"airship":{"bgm":{"name":"Ship3","pan":0,"pitch":100,"volume":90},"characterIndex":3,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"armorTypes":["","一般护甲","魔法护甲","轻型护甲","重型护甲","小型盾牌","大型盾牌"],"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":3,"elements":["","物理","炎","冰","雷","水","土","风","光","暗"],"equipTypes":["","武器","副手","帽子","甲衣","靴子","项链","戒指"],"gameTitle":"异常生物见闻录","gameoverMe":{"name":"Gameover1","pan":0,"pitch":100,"volume":90},"locale":"zh_CN","magicSkills":[1],"menuCommands":[true,true,true,true,true,true],"optDisplayTp":true,"optDrawTitle":true,"optExtraExp":false,"optFloorDeath":false,"optFollowers":true,"optSideView":false,"optSlipDeath":false,"optTransparent":false,"partyMembers":[1,2,3,4],"ship":{"bgm":{"name":"Ship2","pan":0,"pitch":100,"volume":90},"characterIndex":1,"characterName":"Vehicle","startMapId":0,"startX":0,"startY":0},"skillTypes":["","魔法","必杀技"],"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":3,"startX":15,"startY":28,"switches":["","","","","","","","","","","","","","","","","","","","",""],"terms":{"basic":["等级","Lv","HP","HP","MP","MP","TP","TP","经验值","EXP"],"commands":["战斗","逃跑","攻击","防御","物品","技能","装备","状态","整队","保存","游戏结束","设置","武器","护甲","重要物品","装备","最强装备","清空","开始游戏","继续游戏",null,"回到标题","取消",null,"购买","出售"],"params":["最大 HP","最大 MP","攻击力","防御力","魔法攻击","魔法防御","敏捷","幸运","命中率","回避率"],"messages":{"actionFailure":"对%1没有效果!","actorDamage":"%1受到了 %2 点伤害!","actorDrain":"%1被吸收了 %3 点 %2!","actorGain":"%1的 %2 增加了 %3 点!","actorLoss":"%1的 %2 减少了 %3 点!","actorNoDamage":"%1没有受到伤害!","actorNoHit":"Miss! %1没有受到伤害!","actorRecovery":"%1恢复了 %3 点 %2!","alwaysDash":"始终跑步","bgmVolume":"BGM 音量","bgsVolume":"BGS 音量","buffAdd":"%1的%2上升了!","buffRemove":"%1的%2恢复正常了!","commandRemember":"记住指令","counterAttack":"%1的反击!","criticalToActor":"痛恨一击!","criticalToEnemy":"会心一击!","debuffAdd":"%1的%2下降了!","defeat":"%1被击败了。","emerge":"%1出现了!","enemyDamage":"%1受到了 %2 点伤害!","enemyDrain":"%1被吸收了 %3 点 %2!","enemyGain":"%1的 %2 增加了 %3 点!","enemyLoss":"%1的 %2 减少了 %3 点!","enemyNoDamage":"没有对%1造成伤害!","enemyNoHit":"Miss!没有对%1造成伤害!","enemyRecovery":"%1恢复了 %3 点 %2!","escapeFailure":"但是没有逃跑成功!","escapeStart":"%1开始逃跑了!","evasion":"%1躲开了攻击!","expNext":"距离下一%1","expTotal":"现在的%1","file":"文件","levelUp":"%1升到了 %2 %3!","loadMessage":"读取哪个文件?","magicEvasion":"%1抵消了魔法!","magicReflection":"%1反射了魔法!","meVolume":"ME 音量","obtainExp":"获得了 %1 点%2!","obtainGold":"获得了 %1\\G!","obtainItem":"获得了%1!","obtainSkill":"学会了%1!","partyName":"%1的队伍","possession":"持有数","preemptive":"%1先发制人!","saveMessage":"保存到哪个文件?","seVolume":"SE 音量","substitute":"%1保护了%2!","surprise":"%1被偷袭了!","useItem":"%1使用了%2!","victory":"%1胜利了!"}},"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":"Plain","title2Name":"","titleBgm":{"name":"Theme6","pan":0,"pitch":100,"volume":90},"variables":["","","","","","","","","","","","","","","","","","","","",""],"versionId":92519913,"victoryMe":{"name":"Victory1","pan":0,"pitch":100,"volume":90},"weaponTypes":["","匕首","剑","流星锤","斧","鞭","杖","弓箭","弩","枪","爪","手套","矛"],"windowTone":[0,0,0,0]} \ No newline at end of file diff --git a/data/Tilesets.json b/data/Tilesets.json new file mode 100644 index 0000000..304b3e6 --- /dev/null +++ b/data/Tilesets.json @@ -0,0 +1,9 @@ +[ +null, +{"id":1,"flags":[16,1551,1551,1551,1536,1536,1536,1551,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1551,1536,1536,1551,1536,1536,1551,1536,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1551,1551,1551,1551,1551,1551,1551,1552,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1536,1536,1536,1536,1536,1551,1536,1551,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1536,1536,1552,1552,1552,1552,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1536,1536,1551,1536,1551,1536,1551,1551,1551,1536,1536,1551,1552,1552,1552,1552,1536,1536,1536,1536,1551,1551,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3584,3584,3584,3584,3648,3584,3584,3584,3584,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3584,3584,3584,3584,3648,3584,3584,3584,3584,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3584,3584,3584,3584,3648,3584,3584,3584,3584,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3584,3584,3584,3584,3648,3584,3584,3584,3584,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3584,3584,3584,3584,3648,3584,3584,3584,3584,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599],"mode":0,"name":"世界","note":"","tilesetNames":["World_A1","World_A2","Outside_A3","Dungeon_A4","Dungeon_A5","World_B","World_C","",""]}, +{"id":2,"flags":[16,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1551,1536,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1551,1552,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1536,1536,1536,1536,1551,1552,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1552,1551,1536,1536,1552,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1600,1615,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1536,1536,1536,1536,1551,1551,1551,1552,1536,1536,1536,1536,1551,1536,1551,1551,1574,1574,1574,1574,1552,1552,1552,1552,1574,1574,1574,1574,1551,1551,1551,1552,1536,1536,1536,1551,1551,1536,1551,1551,1536,1536,1536,1536,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1553,1553,1553,1553,1553,1553,1553,1553,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1553,1553,1551,1551,1551,1553,1553,1553,1551,1551,1553,1553,1553,1551,1551,1551,1553,1553,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1553,1553,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1552,1552,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1664,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1538,1536,1540,1544,1536,1544,1551,1551,1538,1536,1540,1537,1536,1537,1536,1536,1536,1536,1536,1536,1536,1536,1538,1536,1540,1542,1538,1536,1540,1542,1536,1536,1536,1536,1536,1536,1536,1536,1538,1536,1540,1542,1538,1536,1540,1542,1536,1536,1536,1536,1536,1536,1536,1536,1538,1536,1540,1542,1538,1536,1540,1542,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1546,1544,1548,1536,1536,1546,1544,1548,1538,1536,1540,1536,1536,1538,1536,1540,1538,1536,1540,1536,1536,1538,1536,1540,1551,1551,1551,1536,1536,1551,1551,1551,1551,1551,1551,1536,1536,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3840,3840,3840,3840,3904,3840,3840,3840,3840,3904,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599],"mode":1,"name":"外观","note":"","tilesetNames":["Outside_A1","Outside_A2","Outside_A3","Outside_A4","Outside_A5","Outside_B","Outside_C","",""]}, +{"id":3,"flags":[16,1536,1536,1536,1536,1574,1574,1574,1536,1536,1536,1536,1536,1574,1574,1574,1551,1551,1551,1551,1551,1536,1536,1536,1551,1551,1551,1551,1551,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1679,1679,1679,1679,1679,1551,1551,1551,1536,1536,1536,1679,1679,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1551,1536,1551,1551,1536,1551,1551,1551,1551,1536,1536,1551,1536,1551,1551,1551,1551,1679,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1551,1551,1551,1679,1679,1679,1679,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1551,1551,1551,1551,1679,1551,1679,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1552,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1538,1536,1540,1544,1536,1544,1551,1551,1551,1551,1551,1537,1536,1537,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3840,3840,3840,3840,3904,3840,3840,3840,3840,3904,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599],"mode":1,"name":"内部","note":"","tilesetNames":["Inside_A1","Inside_A2","","Inside_A4","Inside_A5","Inside_B","Inside_C","",""]}, +{"id":4,"flags":[16,1551,1536,1536,1574,1574,1574,1574,1551,1551,1536,1536,1574,1574,1574,1536,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1536,1536,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1679,1552,1552,1552,1552,1551,1551,1551,1551,1679,1679,1679,1679,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1552,1551,1551,1551,1551,1551,1551,1551,1552,1536,1536,1536,1536,1536,1536,1536,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1552,1552,1551,1552,1552,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1679,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1551,1536,1551,1551,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1552,1551,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1538,1536,1540,1542,1538,1536,1540,1542,1536,1536,1536,1536,1536,1536,1536,1536,1538,1536,1540,1542,1538,1536,1540,1542,1536,1536,1536,1536,1536,1536,1536,1536,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1538,1536,1540,1542,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1792,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3840,3840,3840,3840,3904,3840,3840,3840,3840,3904,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599],"mode":1,"name":"地下城","note":"","tilesetNames":["Dungeon_A1","Dungeon_A2","","Dungeon_A4","Dungeon_A5","Dungeon_B","Dungeon_C","",""]}, +{"id":5,"flags":[16,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1552,1552,1536,1536,1536,1551,1536,1536,1551,1551,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1552,1552,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1551,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1552,1552,1552,1552,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1536,1536,1536,1536,1552,1552,1552,1552,1536,1536,1536,1536,1679,1679,1679,1552,1574,1574,1574,1574,1552,1552,1552,1552,1574,1574,1574,1574,1552,1552,1552,1552,1536,1536,1536,1536,1679,1679,1679,1552,1536,1536,1536,1536,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1552,1551,1536,1536,1551,1536,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1536,1536,1536,1551,1551,1551,1551,1551,1536,1551,1536,1552,1551,1551,1551,1551,1536,1536,1536,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1536,1551,1536,1551,1536,1551,1551,1551,1552,1551,1551,1551,1551,1551,1551,1551,1552,1551,1551,1551,1552,1551,1551,1551,1552,1551,1551,1551,1552,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1552,1552,1552,1552,1552,1551,1551,1551,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1679,1679,1551,1551,1551,1552,1551,1552,1552,1552,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1546,1544,1548,1536,1536,1536,1536,1536,1538,1536,1540,1536,1536,1536,1536,1536,1538,1536,1540,1536,1536,1536,1536,1536,1551,1551,1551,1536,1536,1551,1536,1536,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,3919,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3904,3840,3840,3840,3840,3904,3840,3840,3840,3840,3904,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599],"mode":1,"name":"近未来外观","note":"","tilesetNames":["Outside_A1","Outside_A2","SF_Outside_A3","SF_Outside_A4","SF_Outside_A5","SF_Outside_B","SF_Outside_C","",""]}, +{"id":6,"flags":[16,1536,1536,1536,1536,1574,1574,1574,1536,1536,1536,1536,1536,1574,1574,1574,1551,1551,1551,1551,1551,1536,1536,1536,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1536,1536,1536,1680,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1679,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1536,1536,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1679,1679,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1536,1536,1536,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1679,1551,1536,1536,1551,1551,1679,1679,1679,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1551,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1679,1679,1551,1551,1551,1551,1551,1679,1679,1679,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1536,1552,1552,1551,1551,1551,1551,1552,1551,1551,1551,1551,1536,1551,1551,1536,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1536,1536,1551,1551,1551,1551,1551,1551,1551,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1536,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1552,1536,1551,1551,1551,1551,1551,1551,1552,1551,1679,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1551,1552,1552,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1552,1551,1552,1552,1552,1552,1552,1552,1551,1551,1551,1551,1551,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1551,1536,1536,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1546,1544,1548,1536,1536,1536,1536,1536,1538,1536,1540,1536,1536,1536,1536,1536,1538,1536,1540,1536,1536,1536,1536,1536,1551,1551,1551,1536,1536,1551,1536,1536,1551,1551,1551,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,2575,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3648,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,2063,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,3727,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3584,3586,3586,3586,3586,3592,3592,3592,3592,3588,3588,3588,3588,3584,3584,3584,3584,3590,3592,3594,3594,3596,3596,3588,3588,3586,3586,3598,3594,3590,3596,3598,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599,3599],"mode":1,"name":"近未来内部","note":"","tilesetNames":["Inside_A1","Inside_A2","","SF_Inside_A4","SF_Outside_A5","SF_Inside_B","SF_Inside_C","",""]} +] \ No newline at end of file diff --git a/data/Troops.json b/data/Troops.json new file mode 100644 index 0000000..8a5ad78 --- /dev/null +++ b/data/Troops.json @@ -0,0 +1,7 @@ +[ +null, +{"id":1,"members":[{"enemyId":1,"x":336,"y":436,"hidden":false},{"enemyId":1,"x":480,"y":436,"hidden":false}],"name":"蝙蝠*2","pages":[{"conditions":{"actorHp":50,"actorId":1,"actorValid":false,"enemyHp":50,"enemyIndex":0,"enemyValid":false,"switchId":1,"switchValid":false,"turnA":0,"turnB":0,"turnEnding":false,"turnValid":true},"list":[{"code":311,"indent":0,"parameters":[0,0,1,0,1000,true]},{"code":0,"indent":0,"parameters":[]}],"span":2}]}, +{"id":2,"members":[{"enemyId":2,"x":337,"y":436,"hidden":false},{"enemyId":2,"x":480,"y":436,"hidden":false}],"name":"史莱姆*2","pages":[{"conditions":{"actorHp":50,"actorId":1,"actorValid":false,"enemyHp":50,"enemyIndex":0,"enemyValid":false,"switchId":1,"switchValid":false,"turnA":0,"turnB":0,"turnEnding":false,"turnValid":false},"list":[{"code":0,"indent":0,"parameters":[]}],"span":0}]}, +{"id":3,"members":[{"enemyId":3,"x":408,"y":436,"hidden":false}],"name":"兽人","pages":[{"conditions":{"actorHp":50,"actorId":1,"actorValid":false,"enemyHp":50,"enemyIndex":0,"enemyValid":false,"switchId":1,"switchValid":false,"turnA":0,"turnB":0,"turnEnding":false,"turnValid":false},"list":[{"code":0,"indent":0,"parameters":[]}],"span":0}]}, +{"id":4,"members":[{"enemyId":4,"x":408,"y":436,"hidden":false}],"name":"牛头怪","pages":[{"conditions":{"actorHp":50,"actorId":1,"actorValid":false,"enemyHp":50,"enemyIndex":0,"enemyValid":false,"switchId":1,"switchValid":false,"turnA":0,"turnB":0,"turnEnding":false,"turnValid":false},"list":[{"code":0,"indent":0,"parameters":[]}],"span":0}]} +] \ No newline at end of file diff --git a/data/Weapons.json b/data/Weapons.json new file mode 100644 index 0000000..2afdbd7 --- /dev/null +++ b/data/Weapons.json @@ -0,0 +1,7 @@ +[ +null, +{"id":1,"animationId":6,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0},{"code":21,"dataId":0,"value":0.5}],"iconIndex":97,"name":"剑","note":"","params":[0,0,10,0,0,0,0,0],"price":500,"wtypeId":2}, +{"id":2,"animationId":6,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":99,"name":"斧","note":"","params":[0,0,10,0,0,0,0,0],"price":500,"wtypeId":4}, +{"id":3,"animationId":1,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":101,"name":"杖","note":"","params":[0,0,10,0,0,0,0,0],"price":500,"wtypeId":6}, +{"id":4,"animationId":11,"description":"","etypeId":1,"traits":[{"code":31,"dataId":1,"value":0},{"code":22,"dataId":0,"value":0}],"iconIndex":102,"name":"弓","note":"","params":[0,0,10,0,0,0,0,0],"price":500,"wtypeId":7} +] \ No newline at end of file diff --git a/fonts/gamefont.css b/fonts/gamefont.css new file mode 100644 index 0000000..e7c9f5d --- /dev/null +++ b/fonts/gamefont.css @@ -0,0 +1,11 @@ +@font-face { + font-family: GameFont; + src: url("mplus-1m-regular.ttf"); +} + +.IIV::-webkit-media-controls-play-button, +video::-webkit-media-controls-start-playback-button { + opacity: 0; + pointer-events: none; + width: 5px; +} \ No newline at end of file diff --git a/fonts/mplus-1m-regular.ttf b/fonts/mplus-1m-regular.ttf new file mode 100644 index 0000000..17b7bf8 Binary files /dev/null and b/fonts/mplus-1m-regular.ttf differ diff --git a/icon/icon.png b/icon/icon.png new file mode 100644 index 0000000..e778a6b Binary files /dev/null and b/icon/icon.png differ diff --git a/img/actorhud/EXP_Meter.png b/img/actorhud/EXP_Meter.png new file mode 100644 index 0000000..52c768c Binary files /dev/null and b/img/actorhud/EXP_Meter.png differ diff --git a/img/actorhud/Face_1.png b/img/actorhud/Face_1.png new file mode 100644 index 0000000..5211638 Binary files /dev/null and b/img/actorhud/Face_1.png differ diff --git a/img/actorhud/Face_2.png b/img/actorhud/Face_2.png new file mode 100644 index 0000000..19dc1e6 Binary files /dev/null and b/img/actorhud/Face_2.png differ diff --git a/img/actorhud/Face_3.png b/img/actorhud/Face_3.png new file mode 100644 index 0000000..aac3045 Binary files /dev/null and b/img/actorhud/Face_3.png differ diff --git a/img/actorhud/Face_4.png b/img/actorhud/Face_4.png new file mode 100644 index 0000000..36dfd87 Binary files /dev/null and b/img/actorhud/Face_4.png differ diff --git a/img/actorhud/Face_5.png b/img/actorhud/Face_5.png new file mode 100644 index 0000000..3e224cb Binary files /dev/null and b/img/actorhud/Face_5.png differ diff --git a/img/actorhud/HP_Meter.png b/img/actorhud/HP_Meter.png new file mode 100644 index 0000000..70c7c14 Binary files /dev/null and b/img/actorhud/HP_Meter.png differ diff --git a/img/actorhud/HP_Number.png b/img/actorhud/HP_Number.png new file mode 100644 index 0000000..1bdbb7b Binary files /dev/null and b/img/actorhud/HP_Number.png differ diff --git a/img/actorhud/HP_Number2.png b/img/actorhud/HP_Number2.png new file mode 100644 index 0000000..3d4fde4 Binary files /dev/null and b/img/actorhud/HP_Number2.png differ diff --git a/img/actorhud/LV_Number.png b/img/actorhud/LV_Number.png new file mode 100644 index 0000000..3055ad2 Binary files /dev/null and b/img/actorhud/LV_Number.png differ diff --git a/img/actorhud/Layout.png b/img/actorhud/Layout.png new file mode 100644 index 0000000..7f36eba Binary files /dev/null and b/img/actorhud/Layout.png differ diff --git a/img/actorhud/Layout2.png b/img/actorhud/Layout2.png new file mode 100644 index 0000000..693a362 Binary files /dev/null and b/img/actorhud/Layout2.png differ diff --git a/img/actorhud/MP_Meter.png b/img/actorhud/MP_Meter.png new file mode 100644 index 0000000..86926b0 Binary files /dev/null and b/img/actorhud/MP_Meter.png differ diff --git a/img/actorhud/MP_Number.png b/img/actorhud/MP_Number.png new file mode 100644 index 0000000..6451e69 Binary files /dev/null and b/img/actorhud/MP_Number.png differ diff --git a/img/actorhud/MP_Number2.png b/img/actorhud/MP_Number2.png new file mode 100644 index 0000000..2a7d0cd Binary files /dev/null and b/img/actorhud/MP_Number2.png differ diff --git a/img/actorhud/TP_Meter.png b/img/actorhud/TP_Meter.png new file mode 100644 index 0000000..d3c3bf5 Binary files /dev/null and b/img/actorhud/TP_Meter.png differ diff --git a/img/actorhud/TP_Number.png b/img/actorhud/TP_Number.png new file mode 100644 index 0000000..f869ef9 Binary files /dev/null and b/img/actorhud/TP_Number.png differ diff --git a/img/actorhud/TP_Number2.png b/img/actorhud/TP_Number2.png new file mode 100644 index 0000000..3ac1b3f Binary files /dev/null and b/img/actorhud/TP_Number2.png differ diff --git a/img/animations/Absorb.png b/img/animations/Absorb.png new file mode 100644 index 0000000..6ada18a Binary files /dev/null and b/img/animations/Absorb.png differ diff --git a/img/animations/ArrowSpecial.png b/img/animations/ArrowSpecial.png new file mode 100644 index 0000000..ec2cd72 Binary files /dev/null and b/img/animations/ArrowSpecial.png differ diff --git a/img/animations/Attack1.png b/img/animations/Attack1.png new file mode 100644 index 0000000..12ea618 Binary files /dev/null and b/img/animations/Attack1.png differ diff --git a/img/animations/Attack10.png b/img/animations/Attack10.png new file mode 100644 index 0000000..7fa6283 Binary files /dev/null and b/img/animations/Attack10.png differ diff --git a/img/animations/Attack11.png b/img/animations/Attack11.png new file mode 100644 index 0000000..5d83200 Binary files /dev/null and b/img/animations/Attack11.png differ diff --git a/img/animations/Attack12.png b/img/animations/Attack12.png new file mode 100644 index 0000000..304a722 Binary files /dev/null and b/img/animations/Attack12.png differ diff --git a/img/animations/Attack2.png b/img/animations/Attack2.png new file mode 100644 index 0000000..5228f6a Binary files /dev/null and b/img/animations/Attack2.png differ diff --git a/img/animations/Attack3.png b/img/animations/Attack3.png new file mode 100644 index 0000000..cec6161 Binary files /dev/null and b/img/animations/Attack3.png differ diff --git a/img/animations/Attack4.png b/img/animations/Attack4.png new file mode 100644 index 0000000..5047695 Binary files /dev/null and b/img/animations/Attack4.png differ diff --git a/img/animations/Attack5.png b/img/animations/Attack5.png new file mode 100644 index 0000000..2a65ae9 Binary files /dev/null and b/img/animations/Attack5.png differ diff --git a/img/animations/Attack6.png b/img/animations/Attack6.png new file mode 100644 index 0000000..9fb8c16 Binary files /dev/null and b/img/animations/Attack6.png differ diff --git a/img/animations/Attack7.png b/img/animations/Attack7.png new file mode 100644 index 0000000..c07b8ef Binary files /dev/null and b/img/animations/Attack7.png differ diff --git a/img/animations/Attack8.png b/img/animations/Attack8.png new file mode 100644 index 0000000..4caf2d8 Binary files /dev/null and b/img/animations/Attack8.png differ diff --git a/img/animations/Attack9.png b/img/animations/Attack9.png new file mode 100644 index 0000000..68a2be8 Binary files /dev/null and b/img/animations/Attack9.png differ diff --git a/img/animations/Blow.png b/img/animations/Blow.png new file mode 100644 index 0000000..080ec82 Binary files /dev/null and b/img/animations/Blow.png differ diff --git a/img/animations/Blow1.png b/img/animations/Blow1.png new file mode 100644 index 0000000..bc74123 Binary files /dev/null and b/img/animations/Blow1.png differ diff --git a/img/animations/Blow2.png b/img/animations/Blow2.png new file mode 100644 index 0000000..6f1c04c Binary files /dev/null and b/img/animations/Blow2.png differ diff --git a/img/animations/Blow3.png b/img/animations/Blow3.png new file mode 100644 index 0000000..11c4089 Binary files /dev/null and b/img/animations/Blow3.png differ diff --git a/img/animations/Breath.png b/img/animations/Breath.png new file mode 100644 index 0000000..e8c1011 Binary files /dev/null and b/img/animations/Breath.png differ diff --git a/img/animations/Claw.png b/img/animations/Claw.png new file mode 100644 index 0000000..0065c18 Binary files /dev/null and b/img/animations/Claw.png differ diff --git a/img/animations/ClawPhoton.png b/img/animations/ClawPhoton.png new file mode 100644 index 0000000..edd0cf4 Binary files /dev/null and b/img/animations/ClawPhoton.png differ diff --git a/img/animations/ClawSpecial1.png b/img/animations/ClawSpecial1.png new file mode 100644 index 0000000..75deb06 Binary files /dev/null and b/img/animations/ClawSpecial1.png differ diff --git a/img/animations/ClawSpecial2.png b/img/animations/ClawSpecial2.png new file mode 100644 index 0000000..e1b6071 Binary files /dev/null and b/img/animations/ClawSpecial2.png differ diff --git a/img/animations/Cure1.png b/img/animations/Cure1.png new file mode 100644 index 0000000..e967880 Binary files /dev/null and b/img/animations/Cure1.png differ diff --git a/img/animations/Cure2.png b/img/animations/Cure2.png new file mode 100644 index 0000000..6040cfb Binary files /dev/null and b/img/animations/Cure2.png differ diff --git a/img/animations/Cure3.png b/img/animations/Cure3.png new file mode 100644 index 0000000..1dd1d65 Binary files /dev/null and b/img/animations/Cure3.png differ diff --git a/img/animations/Cure4.png b/img/animations/Cure4.png new file mode 100644 index 0000000..21c8119 Binary files /dev/null and b/img/animations/Cure4.png differ diff --git a/img/animations/Curse.png b/img/animations/Curse.png new file mode 100644 index 0000000..e1df383 Binary files /dev/null and b/img/animations/Curse.png differ diff --git a/img/animations/Darkness1.png b/img/animations/Darkness1.png new file mode 100644 index 0000000..689e952 Binary files /dev/null and b/img/animations/Darkness1.png differ diff --git a/img/animations/Darkness2.png b/img/animations/Darkness2.png new file mode 100644 index 0000000..eec12a2 Binary files /dev/null and b/img/animations/Darkness2.png differ diff --git a/img/animations/Darkness3.png b/img/animations/Darkness3.png new file mode 100644 index 0000000..095dada Binary files /dev/null and b/img/animations/Darkness3.png differ diff --git a/img/animations/Darkness4.png b/img/animations/Darkness4.png new file mode 100644 index 0000000..235cec9 Binary files /dev/null and b/img/animations/Darkness4.png differ diff --git a/img/animations/Darkness5.png b/img/animations/Darkness5.png new file mode 100644 index 0000000..d7d80f3 Binary files /dev/null and b/img/animations/Darkness5.png differ diff --git a/img/animations/Death1.png b/img/animations/Death1.png new file mode 100644 index 0000000..b2e4b6c Binary files /dev/null and b/img/animations/Death1.png differ diff --git a/img/animations/Earth1.png b/img/animations/Earth1.png new file mode 100644 index 0000000..e421683 Binary files /dev/null and b/img/animations/Earth1.png differ diff --git a/img/animations/Earth2.png b/img/animations/Earth2.png new file mode 100644 index 0000000..8d693d7 Binary files /dev/null and b/img/animations/Earth2.png differ diff --git a/img/animations/Earth3.png b/img/animations/Earth3.png new file mode 100644 index 0000000..2bde79f Binary files /dev/null and b/img/animations/Earth3.png differ diff --git a/img/animations/Earth4.png b/img/animations/Earth4.png new file mode 100644 index 0000000..963e9d6 Binary files /dev/null and b/img/animations/Earth4.png differ diff --git a/img/animations/Earth5.png b/img/animations/Earth5.png new file mode 100644 index 0000000..078153b Binary files /dev/null and b/img/animations/Earth5.png differ diff --git a/img/animations/Explosion1.png b/img/animations/Explosion1.png new file mode 100644 index 0000000..7e04e52 Binary files /dev/null and b/img/animations/Explosion1.png differ diff --git a/img/animations/Explosion2.png b/img/animations/Explosion2.png new file mode 100644 index 0000000..35d490b Binary files /dev/null and b/img/animations/Explosion2.png differ diff --git a/img/animations/Fire1.png b/img/animations/Fire1.png new file mode 100644 index 0000000..3fe238c Binary files /dev/null and b/img/animations/Fire1.png differ diff --git a/img/animations/Fire2.png b/img/animations/Fire2.png new file mode 100644 index 0000000..bb904c2 Binary files /dev/null and b/img/animations/Fire2.png differ diff --git a/img/animations/Fire3.png b/img/animations/Fire3.png new file mode 100644 index 0000000..c21992e Binary files /dev/null and b/img/animations/Fire3.png differ diff --git a/img/animations/Fire4.png b/img/animations/Fire4.png new file mode 100644 index 0000000..ba643e4 Binary files /dev/null and b/img/animations/Fire4.png differ diff --git a/img/animations/Flash.png b/img/animations/Flash.png new file mode 100644 index 0000000..fd108e7 Binary files /dev/null and b/img/animations/Flash.png differ diff --git a/img/animations/Gun1.png b/img/animations/Gun1.png new file mode 100644 index 0000000..88167ee Binary files /dev/null and b/img/animations/Gun1.png differ diff --git a/img/animations/Gun2.png b/img/animations/Gun2.png new file mode 100644 index 0000000..c0d0a7b Binary files /dev/null and b/img/animations/Gun2.png differ diff --git a/img/animations/Gun3.png b/img/animations/Gun3.png new file mode 100644 index 0000000..cbabd31 Binary files /dev/null and b/img/animations/Gun3.png differ diff --git a/img/animations/Heal1.png b/img/animations/Heal1.png new file mode 100644 index 0000000..e8ca14b Binary files /dev/null and b/img/animations/Heal1.png differ diff --git a/img/animations/Heal2.png b/img/animations/Heal2.png new file mode 100644 index 0000000..656f27a Binary files /dev/null and b/img/animations/Heal2.png differ diff --git a/img/animations/Heal3.png b/img/animations/Heal3.png new file mode 100644 index 0000000..937f551 Binary files /dev/null and b/img/animations/Heal3.png differ diff --git a/img/animations/Heal4.png b/img/animations/Heal4.png new file mode 100644 index 0000000..6d42415 Binary files /dev/null and b/img/animations/Heal4.png differ diff --git a/img/animations/Heal5.png b/img/animations/Heal5.png new file mode 100644 index 0000000..2e62d8b Binary files /dev/null and b/img/animations/Heal5.png differ diff --git a/img/animations/Heal6.png b/img/animations/Heal6.png new file mode 100644 index 0000000..e19a638 Binary files /dev/null and b/img/animations/Heal6.png differ diff --git a/img/animations/Hit1.png b/img/animations/Hit1.png new file mode 100644 index 0000000..a31c301 Binary files /dev/null and b/img/animations/Hit1.png differ diff --git a/img/animations/Hit2.png b/img/animations/Hit2.png new file mode 100644 index 0000000..21faa1e Binary files /dev/null and b/img/animations/Hit2.png differ diff --git a/img/animations/HitFire.png b/img/animations/HitFire.png new file mode 100644 index 0000000..0d6525a Binary files /dev/null and b/img/animations/HitFire.png differ diff --git a/img/animations/HitIce.png b/img/animations/HitIce.png new file mode 100644 index 0000000..676f762 Binary files /dev/null and b/img/animations/HitIce.png differ diff --git a/img/animations/HitPhoton.png b/img/animations/HitPhoton.png new file mode 100644 index 0000000..1d05e1d Binary files /dev/null and b/img/animations/HitPhoton.png differ diff --git a/img/animations/HitSpecial1.png b/img/animations/HitSpecial1.png new file mode 100644 index 0000000..4b9752a Binary files /dev/null and b/img/animations/HitSpecial1.png differ diff --git a/img/animations/HitSpecial2.png b/img/animations/HitSpecial2.png new file mode 100644 index 0000000..8b83bfd Binary files /dev/null and b/img/animations/HitSpecial2.png differ diff --git a/img/animations/HitThunder.png b/img/animations/HitThunder.png new file mode 100644 index 0000000..fa8a3ce Binary files /dev/null and b/img/animations/HitThunder.png differ diff --git a/img/animations/Holy1.png b/img/animations/Holy1.png new file mode 100644 index 0000000..1a10370 Binary files /dev/null and b/img/animations/Holy1.png differ diff --git a/img/animations/Holy2.png b/img/animations/Holy2.png new file mode 100644 index 0000000..a101a97 Binary files /dev/null and b/img/animations/Holy2.png differ diff --git a/img/animations/Holy3.png b/img/animations/Holy3.png new file mode 100644 index 0000000..377badc Binary files /dev/null and b/img/animations/Holy3.png differ diff --git a/img/animations/Holy4.png b/img/animations/Holy4.png new file mode 100644 index 0000000..21f32e6 Binary files /dev/null and b/img/animations/Holy4.png differ diff --git a/img/animations/Holy5.png b/img/animations/Holy5.png new file mode 100644 index 0000000..e232d02 Binary files /dev/null and b/img/animations/Holy5.png differ diff --git a/img/animations/Howl.png b/img/animations/Howl.png new file mode 100644 index 0000000..b005039 Binary files /dev/null and b/img/animations/Howl.png differ diff --git a/img/animations/Ice1.png b/img/animations/Ice1.png new file mode 100644 index 0000000..dd585e4 Binary files /dev/null and b/img/animations/Ice1.png differ diff --git a/img/animations/Ice2.png b/img/animations/Ice2.png new file mode 100644 index 0000000..10d4429 Binary files /dev/null and b/img/animations/Ice2.png differ diff --git a/img/animations/Ice3.png b/img/animations/Ice3.png new file mode 100644 index 0000000..0c61029 Binary files /dev/null and b/img/animations/Ice3.png differ diff --git a/img/animations/Ice4.png b/img/animations/Ice4.png new file mode 100644 index 0000000..f5dab52 Binary files /dev/null and b/img/animations/Ice4.png differ diff --git a/img/animations/Ice5.png b/img/animations/Ice5.png new file mode 100644 index 0000000..cc7df2c Binary files /dev/null and b/img/animations/Ice5.png differ diff --git a/img/animations/Laser1.png b/img/animations/Laser1.png new file mode 100644 index 0000000..a6e2834 Binary files /dev/null and b/img/animations/Laser1.png differ diff --git a/img/animations/Laser2.png b/img/animations/Laser2.png new file mode 100644 index 0000000..143e96b Binary files /dev/null and b/img/animations/Laser2.png differ diff --git a/img/animations/Light1.png b/img/animations/Light1.png new file mode 100644 index 0000000..0d8bc76 Binary files /dev/null and b/img/animations/Light1.png differ diff --git a/img/animations/Light2.png b/img/animations/Light2.png new file mode 100644 index 0000000..8e5d6e2 Binary files /dev/null and b/img/animations/Light2.png differ diff --git a/img/animations/Light3.png b/img/animations/Light3.png new file mode 100644 index 0000000..5c862e2 Binary files /dev/null and b/img/animations/Light3.png differ diff --git a/img/animations/Light4.png b/img/animations/Light4.png new file mode 100644 index 0000000..7fa7a2a Binary files /dev/null and b/img/animations/Light4.png differ diff --git a/img/animations/Light5.png b/img/animations/Light5.png new file mode 100644 index 0000000..5c10434 Binary files /dev/null and b/img/animations/Light5.png differ diff --git a/img/animations/Light6.png b/img/animations/Light6.png new file mode 100644 index 0000000..ade5cfb Binary files /dev/null and b/img/animations/Light6.png differ diff --git a/img/animations/Light7.png b/img/animations/Light7.png new file mode 100644 index 0000000..16d7e53 Binary files /dev/null and b/img/animations/Light7.png differ diff --git a/img/animations/Magic1.png b/img/animations/Magic1.png new file mode 100644 index 0000000..58e3117 Binary files /dev/null and b/img/animations/Magic1.png differ diff --git a/img/animations/Magic2.png b/img/animations/Magic2.png new file mode 100644 index 0000000..3e78099 Binary files /dev/null and b/img/animations/Magic2.png differ diff --git a/img/animations/Meteor.png b/img/animations/Meteor.png new file mode 100644 index 0000000..0b298f7 Binary files /dev/null and b/img/animations/Meteor.png differ diff --git a/img/animations/Mist.png b/img/animations/Mist.png new file mode 100644 index 0000000..aae6ce2 Binary files /dev/null and b/img/animations/Mist.png differ diff --git a/img/animations/Pollen.png b/img/animations/Pollen.png new file mode 100644 index 0000000..ff68947 Binary files /dev/null and b/img/animations/Pollen.png differ diff --git a/img/animations/PreSpecial1.png b/img/animations/PreSpecial1.png new file mode 100644 index 0000000..bc63357 Binary files /dev/null and b/img/animations/PreSpecial1.png differ diff --git a/img/animations/PreSpecial2.png b/img/animations/PreSpecial2.png new file mode 100644 index 0000000..1f14d87 Binary files /dev/null and b/img/animations/PreSpecial2.png differ diff --git a/img/animations/PreSpecial3.png b/img/animations/PreSpecial3.png new file mode 100644 index 0000000..e3d70d4 Binary files /dev/null and b/img/animations/PreSpecial3.png differ diff --git a/img/animations/Recovery1.png b/img/animations/Recovery1.png new file mode 100644 index 0000000..0926abb Binary files /dev/null and b/img/animations/Recovery1.png differ diff --git a/img/animations/Recovery2.png b/img/animations/Recovery2.png new file mode 100644 index 0000000..9770926 Binary files /dev/null and b/img/animations/Recovery2.png differ diff --git a/img/animations/Recovery3.png b/img/animations/Recovery3.png new file mode 100644 index 0000000..8a6cf15 Binary files /dev/null and b/img/animations/Recovery3.png differ diff --git a/img/animations/Recovery4.png b/img/animations/Recovery4.png new file mode 100644 index 0000000..a3ae0a9 Binary files /dev/null and b/img/animations/Recovery4.png differ diff --git a/img/animations/Recovery5.png b/img/animations/Recovery5.png new file mode 100644 index 0000000..b3f325e Binary files /dev/null and b/img/animations/Recovery5.png differ diff --git a/img/animations/Revival1.png b/img/animations/Revival1.png new file mode 100644 index 0000000..290e145 Binary files /dev/null and b/img/animations/Revival1.png differ diff --git a/img/animations/Revival2.png b/img/animations/Revival2.png new file mode 100644 index 0000000..0b22bd4 Binary files /dev/null and b/img/animations/Revival2.png differ diff --git a/img/animations/Slash.png b/img/animations/Slash.png new file mode 100644 index 0000000..fb74686 Binary files /dev/null and b/img/animations/Slash.png differ diff --git a/img/animations/SlashFire.png b/img/animations/SlashFire.png new file mode 100644 index 0000000..9fda9b8 Binary files /dev/null and b/img/animations/SlashFire.png differ diff --git a/img/animations/SlashIce.png b/img/animations/SlashIce.png new file mode 100644 index 0000000..8139781 Binary files /dev/null and b/img/animations/SlashIce.png differ diff --git a/img/animations/SlashPhoton.png b/img/animations/SlashPhoton.png new file mode 100644 index 0000000..bca8ce4 Binary files /dev/null and b/img/animations/SlashPhoton.png differ diff --git a/img/animations/SlashSpecial1.png b/img/animations/SlashSpecial1.png new file mode 100644 index 0000000..65fa0d7 Binary files /dev/null and b/img/animations/SlashSpecial1.png differ diff --git a/img/animations/SlashSpecial2.png b/img/animations/SlashSpecial2.png new file mode 100644 index 0000000..7853158 Binary files /dev/null and b/img/animations/SlashSpecial2.png differ diff --git a/img/animations/SlashSpecial3.png b/img/animations/SlashSpecial3.png new file mode 100644 index 0000000..8db76f4 Binary files /dev/null and b/img/animations/SlashSpecial3.png differ diff --git a/img/animations/SlashThunder.png b/img/animations/SlashThunder.png new file mode 100644 index 0000000..8026fc0 Binary files /dev/null and b/img/animations/SlashThunder.png differ diff --git a/img/animations/Song.png b/img/animations/Song.png new file mode 100644 index 0000000..c0f22bc Binary files /dev/null and b/img/animations/Song.png differ diff --git a/img/animations/Sonic.png b/img/animations/Sonic.png new file mode 100644 index 0000000..22cc4ab Binary files /dev/null and b/img/animations/Sonic.png differ diff --git a/img/animations/Spear1.png b/img/animations/Spear1.png new file mode 100644 index 0000000..78c689d Binary files /dev/null and b/img/animations/Spear1.png differ diff --git a/img/animations/Spear2.png b/img/animations/Spear2.png new file mode 100644 index 0000000..aefd75d Binary files /dev/null and b/img/animations/Spear2.png differ diff --git a/img/animations/Spear3.png b/img/animations/Spear3.png new file mode 100644 index 0000000..c6b4734 Binary files /dev/null and b/img/animations/Spear3.png differ diff --git a/img/animations/Special1.png b/img/animations/Special1.png new file mode 100644 index 0000000..92154c6 Binary files /dev/null and b/img/animations/Special1.png differ diff --git a/img/animations/Special10.png b/img/animations/Special10.png new file mode 100644 index 0000000..18e689e Binary files /dev/null and b/img/animations/Special10.png differ diff --git a/img/animations/Special11.png b/img/animations/Special11.png new file mode 100644 index 0000000..7690588 Binary files /dev/null and b/img/animations/Special11.png differ diff --git a/img/animations/Special12.png b/img/animations/Special12.png new file mode 100644 index 0000000..c0d5b71 Binary files /dev/null and b/img/animations/Special12.png differ diff --git a/img/animations/Special13.png b/img/animations/Special13.png new file mode 100644 index 0000000..6538f66 Binary files /dev/null and b/img/animations/Special13.png differ diff --git a/img/animations/Special14.png b/img/animations/Special14.png new file mode 100644 index 0000000..057f1fb Binary files /dev/null and b/img/animations/Special14.png differ diff --git a/img/animations/Special15.png b/img/animations/Special15.png new file mode 100644 index 0000000..595c137 Binary files /dev/null and b/img/animations/Special15.png differ diff --git a/img/animations/Special16.png b/img/animations/Special16.png new file mode 100644 index 0000000..ecc1b0e Binary files /dev/null and b/img/animations/Special16.png differ diff --git a/img/animations/Special17.png b/img/animations/Special17.png new file mode 100644 index 0000000..52430ca Binary files /dev/null and b/img/animations/Special17.png differ diff --git a/img/animations/Special2.png b/img/animations/Special2.png new file mode 100644 index 0000000..cedcec1 Binary files /dev/null and b/img/animations/Special2.png differ diff --git a/img/animations/Special3.png b/img/animations/Special3.png new file mode 100644 index 0000000..a527962 Binary files /dev/null and b/img/animations/Special3.png differ diff --git a/img/animations/Special4.png b/img/animations/Special4.png new file mode 100644 index 0000000..9423621 Binary files /dev/null and b/img/animations/Special4.png differ diff --git a/img/animations/Special5.png b/img/animations/Special5.png new file mode 100644 index 0000000..4193123 Binary files /dev/null and b/img/animations/Special5.png differ diff --git a/img/animations/Special6.png b/img/animations/Special6.png new file mode 100644 index 0000000..d8ff1d1 Binary files /dev/null and b/img/animations/Special6.png differ diff --git a/img/animations/Special7.png b/img/animations/Special7.png new file mode 100644 index 0000000..fecb28b Binary files /dev/null and b/img/animations/Special7.png differ diff --git a/img/animations/Special8.png b/img/animations/Special8.png new file mode 100644 index 0000000..fa2d2d3 Binary files /dev/null and b/img/animations/Special8.png differ diff --git a/img/animations/Special9.png b/img/animations/Special9.png new file mode 100644 index 0000000..9f847d7 Binary files /dev/null and b/img/animations/Special9.png differ diff --git a/img/animations/State1.png b/img/animations/State1.png new file mode 100644 index 0000000..46be1f7 Binary files /dev/null and b/img/animations/State1.png differ diff --git a/img/animations/State2.png b/img/animations/State2.png new file mode 100644 index 0000000..98ac125 Binary files /dev/null and b/img/animations/State2.png differ diff --git a/img/animations/State3.png b/img/animations/State3.png new file mode 100644 index 0000000..9b4fdee Binary files /dev/null and b/img/animations/State3.png differ diff --git a/img/animations/State4.png b/img/animations/State4.png new file mode 100644 index 0000000..36ea8a1 Binary files /dev/null and b/img/animations/State4.png differ diff --git a/img/animations/State5.png b/img/animations/State5.png new file mode 100644 index 0000000..dc48eb2 Binary files /dev/null and b/img/animations/State5.png differ diff --git a/img/animations/State6.png b/img/animations/State6.png new file mode 100644 index 0000000..e555616 Binary files /dev/null and b/img/animations/State6.png differ diff --git a/img/animations/StateChaos.png b/img/animations/StateChaos.png new file mode 100644 index 0000000..d926eef Binary files /dev/null and b/img/animations/StateChaos.png differ diff --git a/img/animations/StateDark.png b/img/animations/StateDark.png new file mode 100644 index 0000000..77e91bc Binary files /dev/null and b/img/animations/StateDark.png differ diff --git a/img/animations/StateDeath.png b/img/animations/StateDeath.png new file mode 100644 index 0000000..d0348de Binary files /dev/null and b/img/animations/StateDeath.png differ diff --git a/img/animations/StateDown1.png b/img/animations/StateDown1.png new file mode 100644 index 0000000..312600d Binary files /dev/null and b/img/animations/StateDown1.png differ diff --git a/img/animations/StateDown2.png b/img/animations/StateDown2.png new file mode 100644 index 0000000..18c5f6e Binary files /dev/null and b/img/animations/StateDown2.png differ diff --git a/img/animations/StateDown3.png b/img/animations/StateDown3.png new file mode 100644 index 0000000..ed13af3 Binary files /dev/null and b/img/animations/StateDown3.png differ diff --git a/img/animations/StateParalys.png b/img/animations/StateParalys.png new file mode 100644 index 0000000..5427a70 Binary files /dev/null and b/img/animations/StateParalys.png differ diff --git a/img/animations/StatePoison.png b/img/animations/StatePoison.png new file mode 100644 index 0000000..72944e7 Binary files /dev/null and b/img/animations/StatePoison.png differ diff --git a/img/animations/StateSilent.png b/img/animations/StateSilent.png new file mode 100644 index 0000000..3c968cd Binary files /dev/null and b/img/animations/StateSilent.png differ diff --git a/img/animations/StateSleep.png b/img/animations/StateSleep.png new file mode 100644 index 0000000..fa73c06 Binary files /dev/null and b/img/animations/StateSleep.png differ diff --git a/img/animations/StateUp1.png b/img/animations/StateUp1.png new file mode 100644 index 0000000..b9c1573 Binary files /dev/null and b/img/animations/StateUp1.png differ diff --git a/img/animations/StateUp2.png b/img/animations/StateUp2.png new file mode 100644 index 0000000..350a895 Binary files /dev/null and b/img/animations/StateUp2.png differ diff --git a/img/animations/Stick.png b/img/animations/Stick.png new file mode 100644 index 0000000..46e48a6 Binary files /dev/null and b/img/animations/Stick.png differ diff --git a/img/animations/StickPhoton.png b/img/animations/StickPhoton.png new file mode 100644 index 0000000..c7fa759 Binary files /dev/null and b/img/animations/StickPhoton.png differ diff --git a/img/animations/StickSpecial1.png b/img/animations/StickSpecial1.png new file mode 100644 index 0000000..b57e608 Binary files /dev/null and b/img/animations/StickSpecial1.png differ diff --git a/img/animations/StickSpecial2.png b/img/animations/StickSpecial2.png new file mode 100644 index 0000000..11e03a8 Binary files /dev/null and b/img/animations/StickSpecial2.png differ diff --git a/img/animations/StickSpecial3.png b/img/animations/StickSpecial3.png new file mode 100644 index 0000000..be8fd4b Binary files /dev/null and b/img/animations/StickSpecial3.png differ diff --git a/img/animations/Sword1.png b/img/animations/Sword1.png new file mode 100644 index 0000000..fe3663b Binary files /dev/null and b/img/animations/Sword1.png differ diff --git a/img/animations/Sword10.png b/img/animations/Sword10.png new file mode 100644 index 0000000..110c70f Binary files /dev/null and b/img/animations/Sword10.png differ diff --git a/img/animations/Sword2.png b/img/animations/Sword2.png new file mode 100644 index 0000000..259d104 Binary files /dev/null and b/img/animations/Sword2.png differ diff --git a/img/animations/Sword3.png b/img/animations/Sword3.png new file mode 100644 index 0000000..07ed488 Binary files /dev/null and b/img/animations/Sword3.png differ diff --git a/img/animations/Sword4.png b/img/animations/Sword4.png new file mode 100644 index 0000000..1141771 Binary files /dev/null and b/img/animations/Sword4.png differ diff --git a/img/animations/Sword5.png b/img/animations/Sword5.png new file mode 100644 index 0000000..1347bb4 Binary files /dev/null and b/img/animations/Sword5.png differ diff --git a/img/animations/Sword6.png b/img/animations/Sword6.png new file mode 100644 index 0000000..1a81b41 Binary files /dev/null and b/img/animations/Sword6.png differ diff --git a/img/animations/Sword7.png b/img/animations/Sword7.png new file mode 100644 index 0000000..260e7ff Binary files /dev/null and b/img/animations/Sword7.png differ diff --git a/img/animations/Sword8.png b/img/animations/Sword8.png new file mode 100644 index 0000000..31baa3b Binary files /dev/null and b/img/animations/Sword8.png differ diff --git a/img/animations/Sword9.png b/img/animations/Sword9.png new file mode 100644 index 0000000..58d45af Binary files /dev/null and b/img/animations/Sword9.png differ diff --git a/img/animations/Thunder1.png b/img/animations/Thunder1.png new file mode 100644 index 0000000..a934333 Binary files /dev/null and b/img/animations/Thunder1.png differ diff --git a/img/animations/Thunder2.png b/img/animations/Thunder2.png new file mode 100644 index 0000000..71d59d5 Binary files /dev/null and b/img/animations/Thunder2.png differ diff --git a/img/animations/Thunder3.png b/img/animations/Thunder3.png new file mode 100644 index 0000000..d465bf7 Binary files /dev/null and b/img/animations/Thunder3.png differ diff --git a/img/animations/Thunder4.png b/img/animations/Thunder4.png new file mode 100644 index 0000000..cde649a Binary files /dev/null and b/img/animations/Thunder4.png differ diff --git a/img/animations/Thunder5.png b/img/animations/Thunder5.png new file mode 100644 index 0000000..a1f6565 Binary files /dev/null and b/img/animations/Thunder5.png differ diff --git a/img/animations/Ultima.png b/img/animations/Ultima.png new file mode 100644 index 0000000..7e9ffbc Binary files /dev/null and b/img/animations/Ultima.png differ diff --git a/img/animations/Water1.png b/img/animations/Water1.png new file mode 100644 index 0000000..c08c417 Binary files /dev/null and b/img/animations/Water1.png differ diff --git a/img/animations/Water2.png b/img/animations/Water2.png new file mode 100644 index 0000000..4254ddd Binary files /dev/null and b/img/animations/Water2.png differ diff --git a/img/animations/Water3.png b/img/animations/Water3.png new file mode 100644 index 0000000..a618444 Binary files /dev/null and b/img/animations/Water3.png differ diff --git a/img/animations/Water4.png b/img/animations/Water4.png new file mode 100644 index 0000000..1b0dc96 Binary files /dev/null and b/img/animations/Water4.png differ diff --git a/img/animations/Water5.png b/img/animations/Water5.png new file mode 100644 index 0000000..378ba7a Binary files /dev/null and b/img/animations/Water5.png differ diff --git a/img/animations/Wind1.png b/img/animations/Wind1.png new file mode 100644 index 0000000..2e7053c Binary files /dev/null and b/img/animations/Wind1.png differ diff --git a/img/animations/Wind2.png b/img/animations/Wind2.png new file mode 100644 index 0000000..14d7f76 Binary files /dev/null and b/img/animations/Wind2.png differ diff --git a/img/animations/Wind3.png b/img/animations/Wind3.png new file mode 100644 index 0000000..b5529eb Binary files /dev/null and b/img/animations/Wind3.png differ diff --git a/img/animations/Wind4.png b/img/animations/Wind4.png new file mode 100644 index 0000000..6385571 Binary files /dev/null and b/img/animations/Wind4.png differ diff --git a/img/animations/Wind5.png b/img/animations/Wind5.png new file mode 100644 index 0000000..34df388 Binary files /dev/null and b/img/animations/Wind5.png differ diff --git a/img/animations/timg (9).jpg b/img/animations/timg (9).jpg new file mode 100644 index 0000000..fb51160 Binary files /dev/null and b/img/animations/timg (9).jpg differ diff --git a/img/animations/timg (9).png b/img/animations/timg (9).png new file mode 100644 index 0000000..e0c5aea Binary files /dev/null and b/img/animations/timg (9).png differ diff --git a/img/animations/timg.jpg b/img/animations/timg.jpg new file mode 100644 index 0000000..7cf6b83 Binary files /dev/null and b/img/animations/timg.jpg differ diff --git a/img/animations/timg.png b/img/animations/timg.png new file mode 100644 index 0000000..af0b217 Binary files /dev/null and b/img/animations/timg.png differ diff --git a/img/animations/timg2.png b/img/animations/timg2.png new file mode 100644 index 0000000..5c21087 Binary files /dev/null and b/img/animations/timg2.png differ diff --git a/img/animations/测试2.png b/img/animations/测试2.png new file mode 100644 index 0000000..1dac9b7 Binary files /dev/null and b/img/animations/测试2.png differ diff --git a/img/animations/魔法8.png b/img/animations/魔法8.png new file mode 100644 index 0000000..1070bc3 Binary files /dev/null and b/img/animations/魔法8.png differ diff --git a/img/atb/ATB_Gauge.png b/img/atb/ATB_Gauge.png new file mode 100644 index 0000000..79f0226 Binary files /dev/null and b/img/atb/ATB_Gauge.png differ diff --git a/img/atb/Actor_1.png b/img/atb/Actor_1.png new file mode 100644 index 0000000..a1c56a1 Binary files /dev/null and b/img/atb/Actor_1.png differ diff --git a/img/atb/Actor_2.png b/img/atb/Actor_2.png new file mode 100644 index 0000000..514c125 Binary files /dev/null and b/img/atb/Actor_2.png differ diff --git a/img/atb/Actor_3.png b/img/atb/Actor_3.png new file mode 100644 index 0000000..ad61e8f Binary files /dev/null and b/img/atb/Actor_3.png differ diff --git a/img/atb/Actor_4.png b/img/atb/Actor_4.png new file mode 100644 index 0000000..9ad74eb Binary files /dev/null and b/img/atb/Actor_4.png differ diff --git a/img/atb/Actor_5.png b/img/atb/Actor_5.png new file mode 100644 index 0000000..6e6aa78 Binary files /dev/null and b/img/atb/Actor_5.png differ diff --git a/img/atb/Actor_6.png b/img/atb/Actor_6.png new file mode 100644 index 0000000..6e6aa78 Binary files /dev/null and b/img/atb/Actor_6.png differ diff --git a/img/atb/Enemy_1.png b/img/atb/Enemy_1.png new file mode 100644 index 0000000..cec9b14 Binary files /dev/null and b/img/atb/Enemy_1.png differ diff --git a/img/atb/Enemy_2.png b/img/atb/Enemy_2.png new file mode 100644 index 0000000..a63beef Binary files /dev/null and b/img/atb/Enemy_2.png differ diff --git a/img/atb/Enemy_3.png b/img/atb/Enemy_3.png new file mode 100644 index 0000000..cb4ea05 Binary files /dev/null and b/img/atb/Enemy_3.png differ diff --git a/img/atb/Enemy_4.png b/img/atb/Enemy_4.png new file mode 100644 index 0000000..440453a Binary files /dev/null and b/img/atb/Enemy_4.png differ diff --git a/img/atb/Enemy_5.png b/img/atb/Enemy_5.png new file mode 100644 index 0000000..e757d42 Binary files /dev/null and b/img/atb/Enemy_5.png differ diff --git a/img/atb/Enemy_6.png b/img/atb/Enemy_6.png new file mode 100644 index 0000000..e54e541 Binary files /dev/null and b/img/atb/Enemy_6.png differ diff --git a/img/atb/Enemy_7.png b/img/atb/Enemy_7.png new file mode 100644 index 0000000..cec9b14 Binary files /dev/null and b/img/atb/Enemy_7.png differ diff --git a/img/atb/Enemy_8.png b/img/atb/Enemy_8.png new file mode 100644 index 0000000..e757d42 Binary files /dev/null and b/img/atb/Enemy_8.png differ diff --git a/img/atb/Enemy_9.png b/img/atb/Enemy_9.png new file mode 100644 index 0000000..a0c8b03 Binary files /dev/null and b/img/atb/Enemy_9.png differ diff --git a/img/atb/Escape_A.png b/img/atb/Escape_A.png new file mode 100644 index 0000000..76f7edc Binary files /dev/null and b/img/atb/Escape_A.png differ diff --git a/img/atb/Escape_B.png b/img/atb/Escape_B.png new file mode 100644 index 0000000..165afc3 Binary files /dev/null and b/img/atb/Escape_B.png differ diff --git a/img/atb/FaceTemplate.png b/img/atb/FaceTemplate.png new file mode 100644 index 0000000..572f1d6 Binary files /dev/null and b/img/atb/FaceTemplate.png differ diff --git a/img/battlebacks1/Castle1.png b/img/battlebacks1/Castle1.png new file mode 100644 index 0000000..152152b Binary files /dev/null and b/img/battlebacks1/Castle1.png differ diff --git a/img/battlebacks1/Castle2.png b/img/battlebacks1/Castle2.png new file mode 100644 index 0000000..221cdd9 Binary files /dev/null and b/img/battlebacks1/Castle2.png differ diff --git a/img/battlebacks1/Clouds.png b/img/battlebacks1/Clouds.png new file mode 100644 index 0000000..670016d Binary files /dev/null and b/img/battlebacks1/Clouds.png differ diff --git a/img/battlebacks1/Cobblestones1.png b/img/battlebacks1/Cobblestones1.png new file mode 100644 index 0000000..9423b7d Binary files /dev/null and b/img/battlebacks1/Cobblestones1.png differ diff --git a/img/battlebacks1/Cobblestones2.png b/img/battlebacks1/Cobblestones2.png new file mode 100644 index 0000000..b0153fd Binary files /dev/null and b/img/battlebacks1/Cobblestones2.png differ diff --git a/img/battlebacks1/Cobblestones3.png b/img/battlebacks1/Cobblestones3.png new file mode 100644 index 0000000..6c5bea3 Binary files /dev/null and b/img/battlebacks1/Cobblestones3.png differ diff --git a/img/battlebacks1/Cobblestones4.png b/img/battlebacks1/Cobblestones4.png new file mode 100644 index 0000000..3964c6d Binary files /dev/null and b/img/battlebacks1/Cobblestones4.png differ diff --git a/img/battlebacks1/Cobblestones5.png b/img/battlebacks1/Cobblestones5.png new file mode 100644 index 0000000..9c1384f Binary files /dev/null and b/img/battlebacks1/Cobblestones5.png differ diff --git a/img/battlebacks1/CobblestonesPool.png b/img/battlebacks1/CobblestonesPool.png new file mode 100644 index 0000000..86600a0 Binary files /dev/null and b/img/battlebacks1/CobblestonesPool.png differ diff --git a/img/battlebacks1/Crystal.png b/img/battlebacks1/Crystal.png new file mode 100644 index 0000000..5c71087 Binary files /dev/null and b/img/battlebacks1/Crystal.png differ diff --git a/img/battlebacks1/DarkSpace.png b/img/battlebacks1/DarkSpace.png new file mode 100644 index 0000000..ec0ee6e Binary files /dev/null and b/img/battlebacks1/DarkSpace.png differ diff --git a/img/battlebacks1/DecorativeTile.png b/img/battlebacks1/DecorativeTile.png new file mode 100644 index 0000000..3ef5a68 Binary files /dev/null and b/img/battlebacks1/DecorativeTile.png differ diff --git a/img/battlebacks1/DemonCastle1.png b/img/battlebacks1/DemonCastle1.png new file mode 100644 index 0000000..a1d706c Binary files /dev/null and b/img/battlebacks1/DemonCastle1.png differ diff --git a/img/battlebacks1/DemonCastle2.png b/img/battlebacks1/DemonCastle2.png new file mode 100644 index 0000000..2530836 Binary files /dev/null and b/img/battlebacks1/DemonCastle2.png differ diff --git a/img/battlebacks1/DemonicWorld.png b/img/battlebacks1/DemonicWorld.png new file mode 100644 index 0000000..a412b68 Binary files /dev/null and b/img/battlebacks1/DemonicWorld.png differ diff --git a/img/battlebacks1/Desert.png b/img/battlebacks1/Desert.png new file mode 100644 index 0000000..f92cd76 Binary files /dev/null and b/img/battlebacks1/Desert.png differ diff --git a/img/battlebacks1/Dirt1.png b/img/battlebacks1/Dirt1.png new file mode 100644 index 0000000..217a06f Binary files /dev/null and b/img/battlebacks1/Dirt1.png differ diff --git a/img/battlebacks1/Dirt2.png b/img/battlebacks1/Dirt2.png new file mode 100644 index 0000000..3a99ddb Binary files /dev/null and b/img/battlebacks1/Dirt2.png differ diff --git a/img/battlebacks1/DirtField.png b/img/battlebacks1/DirtField.png new file mode 100644 index 0000000..94239fd Binary files /dev/null and b/img/battlebacks1/DirtField.png differ diff --git a/img/battlebacks1/FaceTile.png b/img/battlebacks1/FaceTile.png new file mode 100644 index 0000000..dced500 Binary files /dev/null and b/img/battlebacks1/FaceTile.png differ diff --git a/img/battlebacks1/Factory.png b/img/battlebacks1/Factory.png new file mode 100644 index 0000000..43e4c43 Binary files /dev/null and b/img/battlebacks1/Factory.png differ diff --git a/img/battlebacks1/GrassMaze.png b/img/battlebacks1/GrassMaze.png new file mode 100644 index 0000000..15aebf8 Binary files /dev/null and b/img/battlebacks1/GrassMaze.png differ diff --git a/img/battlebacks1/GrassMazePool.png b/img/battlebacks1/GrassMazePool.png new file mode 100644 index 0000000..019c876 Binary files /dev/null and b/img/battlebacks1/GrassMazePool.png differ diff --git a/img/battlebacks1/Grassland.png b/img/battlebacks1/Grassland.png new file mode 100644 index 0000000..4c87c7f Binary files /dev/null and b/img/battlebacks1/Grassland.png differ diff --git a/img/battlebacks1/IceCave.png b/img/battlebacks1/IceCave.png new file mode 100644 index 0000000..90165ce Binary files /dev/null and b/img/battlebacks1/IceCave.png differ diff --git a/img/battlebacks1/InBody.png b/img/battlebacks1/InBody.png new file mode 100644 index 0000000..b8f58e2 Binary files /dev/null and b/img/battlebacks1/InBody.png differ diff --git a/img/battlebacks1/Lava1.png b/img/battlebacks1/Lava1.png new file mode 100644 index 0000000..0529cfc Binary files /dev/null and b/img/battlebacks1/Lava1.png differ diff --git a/img/battlebacks1/Lava2.png b/img/battlebacks1/Lava2.png new file mode 100644 index 0000000..b2ca952 Binary files /dev/null and b/img/battlebacks1/Lava2.png differ diff --git a/img/battlebacks1/LavaCave.png b/img/battlebacks1/LavaCave.png new file mode 100644 index 0000000..68b2ff8 Binary files /dev/null and b/img/battlebacks1/LavaCave.png differ diff --git a/img/battlebacks1/Meadow.png b/img/battlebacks1/Meadow.png new file mode 100644 index 0000000..0188437 Binary files /dev/null and b/img/battlebacks1/Meadow.png differ diff --git a/img/battlebacks1/PoisonSwamp.png b/img/battlebacks1/PoisonSwamp.png new file mode 100644 index 0000000..f990188 Binary files /dev/null and b/img/battlebacks1/PoisonSwamp.png differ diff --git a/img/battlebacks1/Road1.png b/img/battlebacks1/Road1.png new file mode 100644 index 0000000..6813127 Binary files /dev/null and b/img/battlebacks1/Road1.png differ diff --git a/img/battlebacks1/Road2.png b/img/battlebacks1/Road2.png new file mode 100644 index 0000000..478ae77 Binary files /dev/null and b/img/battlebacks1/Road2.png differ diff --git a/img/battlebacks1/Road3.png b/img/battlebacks1/Road3.png new file mode 100644 index 0000000..dc0e6e9 Binary files /dev/null and b/img/battlebacks1/Road3.png differ diff --git a/img/battlebacks1/RockCave.png b/img/battlebacks1/RockCave.png new file mode 100644 index 0000000..4e70e02 Binary files /dev/null and b/img/battlebacks1/RockCave.png differ diff --git a/img/battlebacks1/Ruins1.png b/img/battlebacks1/Ruins1.png new file mode 100644 index 0000000..c6b7ee7 Binary files /dev/null and b/img/battlebacks1/Ruins1.png differ diff --git a/img/battlebacks1/Ruins2.png b/img/battlebacks1/Ruins2.png new file mode 100644 index 0000000..3c9ed8c Binary files /dev/null and b/img/battlebacks1/Ruins2.png differ diff --git a/img/battlebacks1/Ruins3.png b/img/battlebacks1/Ruins3.png new file mode 100644 index 0000000..f8c0b4e Binary files /dev/null and b/img/battlebacks1/Ruins3.png differ diff --git a/img/battlebacks1/Ruins4.png b/img/battlebacks1/Ruins4.png new file mode 100644 index 0000000..08f838e Binary files /dev/null and b/img/battlebacks1/Ruins4.png differ diff --git a/img/battlebacks1/Ruins5.png b/img/battlebacks1/Ruins5.png new file mode 100644 index 0000000..5bbbf6c Binary files /dev/null and b/img/battlebacks1/Ruins5.png differ diff --git a/img/battlebacks1/Sand.png b/img/battlebacks1/Sand.png new file mode 100644 index 0000000..6ff00ab Binary files /dev/null and b/img/battlebacks1/Sand.png differ diff --git a/img/battlebacks1/Ship.png b/img/battlebacks1/Ship.png new file mode 100644 index 0000000..ae1bbe0 Binary files /dev/null and b/img/battlebacks1/Ship.png differ diff --git a/img/battlebacks1/Sky.png b/img/battlebacks1/Sky.png new file mode 100644 index 0000000..9d3d695 Binary files /dev/null and b/img/battlebacks1/Sky.png differ diff --git a/img/battlebacks1/Snowfield.png b/img/battlebacks1/Snowfield.png new file mode 100644 index 0000000..9410e3d Binary files /dev/null and b/img/battlebacks1/Snowfield.png differ diff --git a/img/battlebacks1/Tent.png b/img/battlebacks1/Tent.png new file mode 100644 index 0000000..06e7f16 Binary files /dev/null and b/img/battlebacks1/Tent.png differ diff --git a/img/battlebacks1/Translucent.png b/img/battlebacks1/Translucent.png new file mode 100644 index 0000000..4ac20f8 Binary files /dev/null and b/img/battlebacks1/Translucent.png differ diff --git a/img/battlebacks1/Wasteland.png b/img/battlebacks1/Wasteland.png new file mode 100644 index 0000000..0fc30b5 Binary files /dev/null and b/img/battlebacks1/Wasteland.png differ diff --git a/img/battlebacks1/WireMesh.png b/img/battlebacks1/WireMesh.png new file mode 100644 index 0000000..cca9219 Binary files /dev/null and b/img/battlebacks1/WireMesh.png differ diff --git a/img/battlebacks1/Wood1.png b/img/battlebacks1/Wood1.png new file mode 100644 index 0000000..4400dff Binary files /dev/null and b/img/battlebacks1/Wood1.png differ diff --git a/img/battlebacks1/Wood2.png b/img/battlebacks1/Wood2.png new file mode 100644 index 0000000..5cbf736 Binary files /dev/null and b/img/battlebacks1/Wood2.png differ diff --git a/img/battlebacks2/Brick.png b/img/battlebacks2/Brick.png new file mode 100644 index 0000000..b51f721 Binary files /dev/null and b/img/battlebacks2/Brick.png differ diff --git a/img/battlebacks2/Bridge.png b/img/battlebacks2/Bridge.png new file mode 100644 index 0000000..608366a Binary files /dev/null and b/img/battlebacks2/Bridge.png differ diff --git a/img/battlebacks2/Castle1.png b/img/battlebacks2/Castle1.png new file mode 100644 index 0000000..7c64ab7 Binary files /dev/null and b/img/battlebacks2/Castle1.png differ diff --git a/img/battlebacks2/Castle2.png b/img/battlebacks2/Castle2.png new file mode 100644 index 0000000..13296c0 Binary files /dev/null and b/img/battlebacks2/Castle2.png differ diff --git a/img/battlebacks2/Castle3.png b/img/battlebacks2/Castle3.png new file mode 100644 index 0000000..4c9a155 Binary files /dev/null and b/img/battlebacks2/Castle3.png differ diff --git a/img/battlebacks2/Cliff.png b/img/battlebacks2/Cliff.png new file mode 100644 index 0000000..eb8c332 Binary files /dev/null and b/img/battlebacks2/Cliff.png differ diff --git a/img/battlebacks2/Clouds.png b/img/battlebacks2/Clouds.png new file mode 100644 index 0000000..ebc083d Binary files /dev/null and b/img/battlebacks2/Clouds.png differ diff --git a/img/battlebacks2/Crystal.png b/img/battlebacks2/Crystal.png new file mode 100644 index 0000000..4a4aea6 Binary files /dev/null and b/img/battlebacks2/Crystal.png differ diff --git a/img/battlebacks2/DarkSpace.png b/img/battlebacks2/DarkSpace.png new file mode 100644 index 0000000..df763f7 Binary files /dev/null and b/img/battlebacks2/DarkSpace.png differ diff --git a/img/battlebacks2/DemonCastle1.png b/img/battlebacks2/DemonCastle1.png new file mode 100644 index 0000000..fcf068c Binary files /dev/null and b/img/battlebacks2/DemonCastle1.png differ diff --git a/img/battlebacks2/DemonCastle2.png b/img/battlebacks2/DemonCastle2.png new file mode 100644 index 0000000..7e2ef6e Binary files /dev/null and b/img/battlebacks2/DemonCastle2.png differ diff --git a/img/battlebacks2/DemonCastle3.png b/img/battlebacks2/DemonCastle3.png new file mode 100644 index 0000000..ae29203 Binary files /dev/null and b/img/battlebacks2/DemonCastle3.png differ diff --git a/img/battlebacks2/DemonicWorld.png b/img/battlebacks2/DemonicWorld.png new file mode 100644 index 0000000..350fe7b Binary files /dev/null and b/img/battlebacks2/DemonicWorld.png differ diff --git a/img/battlebacks2/Desert.png b/img/battlebacks2/Desert.png new file mode 100644 index 0000000..8195c07 Binary files /dev/null and b/img/battlebacks2/Desert.png differ diff --git a/img/battlebacks2/DirtCave.png b/img/battlebacks2/DirtCave.png new file mode 100644 index 0000000..38e9f2d Binary files /dev/null and b/img/battlebacks2/DirtCave.png differ diff --git a/img/battlebacks2/Forest.png b/img/battlebacks2/Forest.png new file mode 100644 index 0000000..46fc262 Binary files /dev/null and b/img/battlebacks2/Forest.png differ diff --git a/img/battlebacks2/Fort1.png b/img/battlebacks2/Fort1.png new file mode 100644 index 0000000..57a37f1 Binary files /dev/null and b/img/battlebacks2/Fort1.png differ diff --git a/img/battlebacks2/Fort2.png b/img/battlebacks2/Fort2.png new file mode 100644 index 0000000..cb624ca Binary files /dev/null and b/img/battlebacks2/Fort2.png differ diff --git a/img/battlebacks2/GrassMaze.png b/img/battlebacks2/GrassMaze.png new file mode 100644 index 0000000..bcc517a Binary files /dev/null and b/img/battlebacks2/GrassMaze.png differ diff --git a/img/battlebacks2/Grassland.png b/img/battlebacks2/Grassland.png new file mode 100644 index 0000000..026470f Binary files /dev/null and b/img/battlebacks2/Grassland.png differ diff --git a/img/battlebacks2/IceCave.png b/img/battlebacks2/IceCave.png new file mode 100644 index 0000000..756c3f3 Binary files /dev/null and b/img/battlebacks2/IceCave.png differ diff --git a/img/battlebacks2/IceMaze.png b/img/battlebacks2/IceMaze.png new file mode 100644 index 0000000..da10678 Binary files /dev/null and b/img/battlebacks2/IceMaze.png differ diff --git a/img/battlebacks2/InBody.png b/img/battlebacks2/InBody.png new file mode 100644 index 0000000..46057b4 Binary files /dev/null and b/img/battlebacks2/InBody.png differ diff --git a/img/battlebacks2/Lava.png b/img/battlebacks2/Lava.png new file mode 100644 index 0000000..87adb6a Binary files /dev/null and b/img/battlebacks2/Lava.png differ diff --git a/img/battlebacks2/LavaCave.png b/img/battlebacks2/LavaCave.png new file mode 100644 index 0000000..a146dcb Binary files /dev/null and b/img/battlebacks2/LavaCave.png differ diff --git a/img/battlebacks2/Metal.png b/img/battlebacks2/Metal.png new file mode 100644 index 0000000..e8e703e Binary files /dev/null and b/img/battlebacks2/Metal.png differ diff --git a/img/battlebacks2/Mine.png b/img/battlebacks2/Mine.png new file mode 100644 index 0000000..5082299 Binary files /dev/null and b/img/battlebacks2/Mine.png differ diff --git a/img/battlebacks2/PoisonSwamp.png b/img/battlebacks2/PoisonSwamp.png new file mode 100644 index 0000000..48f6e88 Binary files /dev/null and b/img/battlebacks2/PoisonSwamp.png differ diff --git a/img/battlebacks2/Port.png b/img/battlebacks2/Port.png new file mode 100644 index 0000000..5c191b5 Binary files /dev/null and b/img/battlebacks2/Port.png differ diff --git a/img/battlebacks2/RockCave.png b/img/battlebacks2/RockCave.png new file mode 100644 index 0000000..2187470 Binary files /dev/null and b/img/battlebacks2/RockCave.png differ diff --git a/img/battlebacks2/Room1.png b/img/battlebacks2/Room1.png new file mode 100644 index 0000000..8b9f33b Binary files /dev/null and b/img/battlebacks2/Room1.png differ diff --git a/img/battlebacks2/Room2.png b/img/battlebacks2/Room2.png new file mode 100644 index 0000000..179bd6b Binary files /dev/null and b/img/battlebacks2/Room2.png differ diff --git a/img/battlebacks2/Room3.png b/img/battlebacks2/Room3.png new file mode 100644 index 0000000..52dff14 Binary files /dev/null and b/img/battlebacks2/Room3.png differ diff --git a/img/battlebacks2/Ruins1.png b/img/battlebacks2/Ruins1.png new file mode 100644 index 0000000..e0f0658 Binary files /dev/null and b/img/battlebacks2/Ruins1.png differ diff --git a/img/battlebacks2/Ruins2.png b/img/battlebacks2/Ruins2.png new file mode 100644 index 0000000..8ba1f0a Binary files /dev/null and b/img/battlebacks2/Ruins2.png differ diff --git a/img/battlebacks2/Ship.png b/img/battlebacks2/Ship.png new file mode 100644 index 0000000..90abee3 Binary files /dev/null and b/img/battlebacks2/Ship.png differ diff --git a/img/battlebacks2/Sky.png b/img/battlebacks2/Sky.png new file mode 100644 index 0000000..0135297 Binary files /dev/null and b/img/battlebacks2/Sky.png differ diff --git a/img/battlebacks2/Snowfield.png b/img/battlebacks2/Snowfield.png new file mode 100644 index 0000000..786f265 Binary files /dev/null and b/img/battlebacks2/Snowfield.png differ diff --git a/img/battlebacks2/Stone1.png b/img/battlebacks2/Stone1.png new file mode 100644 index 0000000..7e94f87 Binary files /dev/null and b/img/battlebacks2/Stone1.png differ diff --git a/img/battlebacks2/Stone2.png b/img/battlebacks2/Stone2.png new file mode 100644 index 0000000..fa2a807 Binary files /dev/null and b/img/battlebacks2/Stone2.png differ diff --git a/img/battlebacks2/Stone3.png b/img/battlebacks2/Stone3.png new file mode 100644 index 0000000..b8ed81c Binary files /dev/null and b/img/battlebacks2/Stone3.png differ diff --git a/img/battlebacks2/Temple.png b/img/battlebacks2/Temple.png new file mode 100644 index 0000000..650763f Binary files /dev/null and b/img/battlebacks2/Temple.png differ diff --git a/img/battlebacks2/Tent.png b/img/battlebacks2/Tent.png new file mode 100644 index 0000000..5a84da9 Binary files /dev/null and b/img/battlebacks2/Tent.png differ diff --git a/img/battlebacks2/Tower.png b/img/battlebacks2/Tower.png new file mode 100644 index 0000000..69643e8 Binary files /dev/null and b/img/battlebacks2/Tower.png differ diff --git a/img/battlebacks2/Town1.png b/img/battlebacks2/Town1.png new file mode 100644 index 0000000..92860af Binary files /dev/null and b/img/battlebacks2/Town1.png differ diff --git a/img/battlebacks2/Town2.png b/img/battlebacks2/Town2.png new file mode 100644 index 0000000..d0b51c2 Binary files /dev/null and b/img/battlebacks2/Town2.png differ diff --git a/img/battlebacks2/Town3.png b/img/battlebacks2/Town3.png new file mode 100644 index 0000000..df695e0 Binary files /dev/null and b/img/battlebacks2/Town3.png differ diff --git a/img/battlebacks2/Town4.png b/img/battlebacks2/Town4.png new file mode 100644 index 0000000..b786d8c Binary files /dev/null and b/img/battlebacks2/Town4.png differ diff --git a/img/battlebacks2/Town5.png b/img/battlebacks2/Town5.png new file mode 100644 index 0000000..aa49504 Binary files /dev/null and b/img/battlebacks2/Town5.png differ diff --git a/img/battlebacks2/Wasteland.png b/img/battlebacks2/Wasteland.png new file mode 100644 index 0000000..724a8c0 Binary files /dev/null and b/img/battlebacks2/Wasteland.png differ diff --git a/img/battlehud/ATB_Meter.png b/img/battlehud/ATB_Meter.png new file mode 100644 index 0000000..0a6d4d7 Binary files /dev/null and b/img/battlehud/ATB_Meter.png differ diff --git a/img/battlehud/Face_1.png b/img/battlehud/Face_1.png new file mode 100644 index 0000000..6dcabc6 Binary files /dev/null and b/img/battlehud/Face_1.png differ diff --git a/img/battlehud/Face_2.png b/img/battlehud/Face_2.png new file mode 100644 index 0000000..beab96f Binary files /dev/null and b/img/battlehud/Face_2.png differ diff --git a/img/battlehud/Face_3.png b/img/battlehud/Face_3.png new file mode 100644 index 0000000..d85cc2c Binary files /dev/null and b/img/battlehud/Face_3.png differ diff --git a/img/battlehud/Face_4.png b/img/battlehud/Face_4.png new file mode 100644 index 0000000..c7e967c Binary files /dev/null and b/img/battlehud/Face_4.png differ diff --git a/img/battlehud/Face_5.png b/img/battlehud/Face_5.png new file mode 100644 index 0000000..f53d9bc Binary files /dev/null and b/img/battlehud/Face_5.png differ diff --git a/img/battlehud/Face_6.png b/img/battlehud/Face_6.png new file mode 100644 index 0000000..1b18225 Binary files /dev/null and b/img/battlehud/Face_6.png differ diff --git a/img/battlehud/HP_Meter.png b/img/battlehud/HP_Meter.png new file mode 100644 index 0000000..c1590a8 Binary files /dev/null and b/img/battlehud/HP_Meter.png differ diff --git a/img/battlehud/HP_Number.png b/img/battlehud/HP_Number.png new file mode 100644 index 0000000..6e8d139 Binary files /dev/null and b/img/battlehud/HP_Number.png differ diff --git a/img/battlehud/Layout.png b/img/battlehud/Layout.png new file mode 100644 index 0000000..867c7ad Binary files /dev/null and b/img/battlehud/Layout.png differ diff --git a/img/battlehud/Layout2.png b/img/battlehud/Layout2.png new file mode 100644 index 0000000..5f33c29 Binary files /dev/null and b/img/battlehud/Layout2.png differ diff --git a/img/battlehud/Layout_Actor.png b/img/battlehud/Layout_Actor.png new file mode 100644 index 0000000..a5f2cb4 Binary files /dev/null and b/img/battlehud/Layout_Actor.png differ diff --git a/img/battlehud/Layout_Command.png b/img/battlehud/Layout_Command.png new file mode 100644 index 0000000..c206694 Binary files /dev/null and b/img/battlehud/Layout_Command.png differ diff --git a/img/battlehud/Layout_Enemy.png b/img/battlehud/Layout_Enemy.png new file mode 100644 index 0000000..74d4a7d Binary files /dev/null and b/img/battlehud/Layout_Enemy.png differ diff --git a/img/battlehud/Layout_Help.png b/img/battlehud/Layout_Help.png new file mode 100644 index 0000000..71840ea Binary files /dev/null and b/img/battlehud/Layout_Help.png differ diff --git a/img/battlehud/Layout_Item.png b/img/battlehud/Layout_Item.png new file mode 100644 index 0000000..663c73f Binary files /dev/null and b/img/battlehud/Layout_Item.png differ diff --git a/img/battlehud/Layout_Party.png b/img/battlehud/Layout_Party.png new file mode 100644 index 0000000..ce0308c Binary files /dev/null and b/img/battlehud/Layout_Party.png differ diff --git a/img/battlehud/Layout_Screen.png b/img/battlehud/Layout_Screen.png new file mode 100644 index 0000000..5f60894 Binary files /dev/null and b/img/battlehud/Layout_Screen.png differ diff --git a/img/battlehud/Layout_Skill.png b/img/battlehud/Layout_Skill.png new file mode 100644 index 0000000..41bf9d0 Binary files /dev/null and b/img/battlehud/Layout_Skill.png differ diff --git a/img/battlehud/MP_Meter.png b/img/battlehud/MP_Meter.png new file mode 100644 index 0000000..5dd5068 Binary files /dev/null and b/img/battlehud/MP_Meter.png differ diff --git a/img/battlehud/MP_Number.png b/img/battlehud/MP_Number.png new file mode 100644 index 0000000..5a9c145 Binary files /dev/null and b/img/battlehud/MP_Number.png differ diff --git a/img/battlehud/TP_Meter.png b/img/battlehud/TP_Meter.png new file mode 100644 index 0000000..39ee725 Binary files /dev/null and b/img/battlehud/TP_Meter.png differ diff --git a/img/battlehud/TP_Number.png b/img/battlehud/TP_Number.png new file mode 100644 index 0000000..9d17d64 Binary files /dev/null and b/img/battlehud/TP_Number.png differ diff --git a/img/battlehud/Turn.png b/img/battlehud/Turn.png new file mode 100644 index 0000000..f28e57f Binary files /dev/null and b/img/battlehud/Turn.png differ diff --git a/img/characters/!$Gate1.png b/img/characters/!$Gate1.png new file mode 100644 index 0000000..b320bbc Binary files /dev/null and b/img/characters/!$Gate1.png differ diff --git a/img/characters/!$Gate2.png b/img/characters/!$Gate2.png new file mode 100644 index 0000000..0100588 Binary files /dev/null and b/img/characters/!$Gate2.png differ diff --git a/img/characters/!Chest.png b/img/characters/!Chest.png new file mode 100644 index 0000000..950675b Binary files /dev/null and b/img/characters/!Chest.png differ diff --git a/img/characters/!Crystal.png b/img/characters/!Crystal.png new file mode 100644 index 0000000..967fba8 Binary files /dev/null and b/img/characters/!Crystal.png differ diff --git a/img/characters/!Door1.png b/img/characters/!Door1.png new file mode 100644 index 0000000..2f5c018 Binary files /dev/null and b/img/characters/!Door1.png differ diff --git a/img/characters/!Door2.png b/img/characters/!Door2.png new file mode 100644 index 0000000..35d4302 Binary files /dev/null and b/img/characters/!Door2.png differ diff --git a/img/characters/!Flame.png b/img/characters/!Flame.png new file mode 100644 index 0000000..982882e Binary files /dev/null and b/img/characters/!Flame.png differ diff --git a/img/characters/!Other1.png b/img/characters/!Other1.png new file mode 100644 index 0000000..c767c39 Binary files /dev/null and b/img/characters/!Other1.png differ diff --git a/img/characters/!Other2.png b/img/characters/!Other2.png new file mode 100644 index 0000000..0d9c014 Binary files /dev/null and b/img/characters/!Other2.png differ diff --git a/img/characters/!SF_Door1.png b/img/characters/!SF_Door1.png new file mode 100644 index 0000000..ee7c563 Binary files /dev/null and b/img/characters/!SF_Door1.png differ diff --git a/img/characters/!SF_Door2.png b/img/characters/!SF_Door2.png new file mode 100644 index 0000000..72de7d4 Binary files /dev/null and b/img/characters/!SF_Door2.png differ diff --git a/img/characters/!Switch1.png b/img/characters/!Switch1.png new file mode 100644 index 0000000..41bbdb5 Binary files /dev/null and b/img/characters/!Switch1.png differ diff --git a/img/characters/!Switch2.png b/img/characters/!Switch2.png new file mode 100644 index 0000000..0d9148f Binary files /dev/null and b/img/characters/!Switch2.png differ diff --git a/img/characters/$BigMonster1.png b/img/characters/$BigMonster1.png new file mode 100644 index 0000000..e23f458 Binary files /dev/null and b/img/characters/$BigMonster1.png differ diff --git a/img/characters/$BigMonster2.png b/img/characters/$BigMonster2.png new file mode 100644 index 0000000..918b18b Binary files /dev/null and b/img/characters/$BigMonster2.png differ diff --git a/img/characters/Actor1.png b/img/characters/Actor1.png new file mode 100644 index 0000000..51b9004 Binary files /dev/null and b/img/characters/Actor1.png differ diff --git a/img/characters/Actor2.png b/img/characters/Actor2.png new file mode 100644 index 0000000..bc05e4f Binary files /dev/null and b/img/characters/Actor2.png differ diff --git a/img/characters/Actor3.png b/img/characters/Actor3.png new file mode 100644 index 0000000..019440c Binary files /dev/null and b/img/characters/Actor3.png differ diff --git a/img/characters/Damage1.png b/img/characters/Damage1.png new file mode 100644 index 0000000..56b3089 Binary files /dev/null and b/img/characters/Damage1.png differ diff --git a/img/characters/Damage2.png b/img/characters/Damage2.png new file mode 100644 index 0000000..132cdb4 Binary files /dev/null and b/img/characters/Damage2.png differ diff --git a/img/characters/Damage3.png b/img/characters/Damage3.png new file mode 100644 index 0000000..92a48d1 Binary files /dev/null and b/img/characters/Damage3.png differ diff --git a/img/characters/Evil.png b/img/characters/Evil.png new file mode 100644 index 0000000..a42b2b8 Binary files /dev/null and b/img/characters/Evil.png differ diff --git a/img/characters/Monster.png b/img/characters/Monster.png new file mode 100644 index 0000000..9340596 Binary files /dev/null and b/img/characters/Monster.png differ diff --git a/img/characters/Nature.png b/img/characters/Nature.png new file mode 100644 index 0000000..f614f30 Binary files /dev/null and b/img/characters/Nature.png differ diff --git a/img/characters/People1.png b/img/characters/People1.png new file mode 100644 index 0000000..d6ff9e8 Binary files /dev/null and b/img/characters/People1.png differ diff --git a/img/characters/People2.png b/img/characters/People2.png new file mode 100644 index 0000000..0e6d08f Binary files /dev/null and b/img/characters/People2.png differ diff --git a/img/characters/People3.png b/img/characters/People3.png new file mode 100644 index 0000000..22e188f Binary files /dev/null and b/img/characters/People3.png differ diff --git a/img/characters/People4.png b/img/characters/People4.png new file mode 100644 index 0000000..f42c3eb Binary files /dev/null and b/img/characters/People4.png differ diff --git a/img/characters/Vehicle.png b/img/characters/Vehicle.png new file mode 100644 index 0000000..1b4f622 Binary files /dev/null and b/img/characters/Vehicle.png differ diff --git a/img/enemies/Actor1_3.png b/img/enemies/Actor1_3.png new file mode 100644 index 0000000..b223ece Binary files /dev/null and b/img/enemies/Actor1_3.png differ diff --git a/img/enemies/Actor1_4.png b/img/enemies/Actor1_4.png new file mode 100644 index 0000000..1de3901 Binary files /dev/null and b/img/enemies/Actor1_4.png differ diff --git a/img/enemies/Actor1_5.png b/img/enemies/Actor1_5.png new file mode 100644 index 0000000..1653e6f Binary files /dev/null and b/img/enemies/Actor1_5.png differ diff --git a/img/enemies/Actor1_6.png b/img/enemies/Actor1_6.png new file mode 100644 index 0000000..87b9d4d Binary files /dev/null and b/img/enemies/Actor1_6.png differ diff --git a/img/enemies/Actor1_7.png b/img/enemies/Actor1_7.png new file mode 100644 index 0000000..452a99c Binary files /dev/null and b/img/enemies/Actor1_7.png differ diff --git a/img/enemies/Actor2_1.png b/img/enemies/Actor2_1.png new file mode 100644 index 0000000..5c6662d Binary files /dev/null and b/img/enemies/Actor2_1.png differ diff --git a/img/enemies/Actor2_2.png b/img/enemies/Actor2_2.png new file mode 100644 index 0000000..e9b66cc Binary files /dev/null and b/img/enemies/Actor2_2.png differ diff --git a/img/enemies/Actor2_3.png b/img/enemies/Actor2_3.png new file mode 100644 index 0000000..b723f79 Binary files /dev/null and b/img/enemies/Actor2_3.png differ diff --git a/img/enemies/Actor2_4.png b/img/enemies/Actor2_4.png new file mode 100644 index 0000000..193c8c7 Binary files /dev/null and b/img/enemies/Actor2_4.png differ diff --git a/img/enemies/Actor2_5.png b/img/enemies/Actor2_5.png new file mode 100644 index 0000000..6d404eb Binary files /dev/null and b/img/enemies/Actor2_5.png differ diff --git a/img/enemies/Actor2_6.png b/img/enemies/Actor2_6.png new file mode 100644 index 0000000..2a21473 Binary files /dev/null and b/img/enemies/Actor2_6.png differ diff --git a/img/enemies/Actor3_1.png b/img/enemies/Actor3_1.png new file mode 100644 index 0000000..82d75cf Binary files /dev/null and b/img/enemies/Actor3_1.png differ diff --git a/img/enemies/Actor3_2.png b/img/enemies/Actor3_2.png new file mode 100644 index 0000000..00d5f35 Binary files /dev/null and b/img/enemies/Actor3_2.png differ diff --git a/img/enemies/Actor3_5.png b/img/enemies/Actor3_5.png new file mode 100644 index 0000000..2cc5e29 Binary files /dev/null and b/img/enemies/Actor3_5.png differ diff --git a/img/enemies/Actor3_6.png b/img/enemies/Actor3_6.png new file mode 100644 index 0000000..3530ee8 Binary files /dev/null and b/img/enemies/Actor3_6.png differ diff --git a/img/enemies/Angel.png b/img/enemies/Angel.png new file mode 100644 index 0000000..af1b6ee Binary files /dev/null and b/img/enemies/Angel.png differ diff --git a/img/enemies/Assassin.png b/img/enemies/Assassin.png new file mode 100644 index 0000000..30ce9e9 Binary files /dev/null and b/img/enemies/Assassin.png differ diff --git a/img/enemies/Bat.png b/img/enemies/Bat.png new file mode 100644 index 0000000..1f4de7a Binary files /dev/null and b/img/enemies/Bat.png differ diff --git a/img/enemies/Behemoth.png b/img/enemies/Behemoth.png new file mode 100644 index 0000000..065f79a Binary files /dev/null and b/img/enemies/Behemoth.png differ diff --git a/img/enemies/Captain.png b/img/enemies/Captain.png new file mode 100644 index 0000000..95dfefe Binary files /dev/null and b/img/enemies/Captain.png differ diff --git a/img/enemies/Cerberus.png b/img/enemies/Cerberus.png new file mode 100644 index 0000000..51f1045 Binary files /dev/null and b/img/enemies/Cerberus.png differ diff --git a/img/enemies/Chimera.png b/img/enemies/Chimera.png new file mode 100644 index 0000000..3e43eb7 Binary files /dev/null and b/img/enemies/Chimera.png differ diff --git a/img/enemies/Cockatrice.png b/img/enemies/Cockatrice.png new file mode 100644 index 0000000..ffe7115 Binary files /dev/null and b/img/enemies/Cockatrice.png differ diff --git a/img/enemies/Darklord-final.png b/img/enemies/Darklord-final.png new file mode 100644 index 0000000..46cea19 Binary files /dev/null and b/img/enemies/Darklord-final.png differ diff --git a/img/enemies/Darklord.png b/img/enemies/Darklord.png new file mode 100644 index 0000000..8df3e86 Binary files /dev/null and b/img/enemies/Darklord.png differ diff --git a/img/enemies/Death.png b/img/enemies/Death.png new file mode 100644 index 0000000..547ad36 Binary files /dev/null and b/img/enemies/Death.png differ diff --git a/img/enemies/Demon.png b/img/enemies/Demon.png new file mode 100644 index 0000000..88430d2 Binary files /dev/null and b/img/enemies/Demon.png differ diff --git a/img/enemies/Dragon.png b/img/enemies/Dragon.png new file mode 100644 index 0000000..95438d5 Binary files /dev/null and b/img/enemies/Dragon.png differ diff --git a/img/enemies/Earthspirit.png b/img/enemies/Earthspirit.png new file mode 100644 index 0000000..87f4153 Binary files /dev/null and b/img/enemies/Earthspirit.png differ diff --git a/img/enemies/Evilgod.png b/img/enemies/Evilgod.png new file mode 100644 index 0000000..a7265e8 Binary files /dev/null and b/img/enemies/Evilgod.png differ diff --git a/img/enemies/Fairy.png b/img/enemies/Fairy.png new file mode 100644 index 0000000..ad30e47 Binary files /dev/null and b/img/enemies/Fairy.png differ diff --git a/img/enemies/Fanatic.png b/img/enemies/Fanatic.png new file mode 100644 index 0000000..5c4e7f1 Binary files /dev/null and b/img/enemies/Fanatic.png differ diff --git a/img/enemies/Firespirit.png b/img/enemies/Firespirit.png new file mode 100644 index 0000000..3020ecc Binary files /dev/null and b/img/enemies/Firespirit.png differ diff --git a/img/enemies/Gargoyle.png b/img/enemies/Gargoyle.png new file mode 100644 index 0000000..5c0a704 Binary files /dev/null and b/img/enemies/Gargoyle.png differ diff --git a/img/enemies/Garuda.png b/img/enemies/Garuda.png new file mode 100644 index 0000000..affe125 Binary files /dev/null and b/img/enemies/Garuda.png differ diff --git a/img/enemies/Gazer.png b/img/enemies/Gazer.png new file mode 100644 index 0000000..594aacb Binary files /dev/null and b/img/enemies/Gazer.png differ diff --git a/img/enemies/General_f.png b/img/enemies/General_f.png new file mode 100644 index 0000000..1a1f49a Binary files /dev/null and b/img/enemies/General_f.png differ diff --git a/img/enemies/General_m.png b/img/enemies/General_m.png new file mode 100644 index 0000000..e1d7e39 Binary files /dev/null and b/img/enemies/General_m.png differ diff --git a/img/enemies/Ghost.png b/img/enemies/Ghost.png new file mode 100644 index 0000000..dd1468e Binary files /dev/null and b/img/enemies/Ghost.png differ diff --git a/img/enemies/God.png b/img/enemies/God.png new file mode 100644 index 0000000..ddba6a6 Binary files /dev/null and b/img/enemies/God.png differ diff --git a/img/enemies/Goddess.png b/img/enemies/Goddess.png new file mode 100644 index 0000000..21924ae Binary files /dev/null and b/img/enemies/Goddess.png differ diff --git a/img/enemies/Hornet.png b/img/enemies/Hornet.png new file mode 100644 index 0000000..683c233 Binary files /dev/null and b/img/enemies/Hornet.png differ diff --git a/img/enemies/Imp.png b/img/enemies/Imp.png new file mode 100644 index 0000000..bc22b0e Binary files /dev/null and b/img/enemies/Imp.png differ diff --git a/img/enemies/Irongiant.png b/img/enemies/Irongiant.png new file mode 100644 index 0000000..871d0df Binary files /dev/null and b/img/enemies/Irongiant.png differ diff --git a/img/enemies/Jellyfish.png b/img/enemies/Jellyfish.png new file mode 100644 index 0000000..df49781 Binary files /dev/null and b/img/enemies/Jellyfish.png differ diff --git a/img/enemies/Lamia.png b/img/enemies/Lamia.png new file mode 100644 index 0000000..f26851c Binary files /dev/null and b/img/enemies/Lamia.png differ diff --git a/img/enemies/Mage.png b/img/enemies/Mage.png new file mode 100644 index 0000000..2c4a8ab Binary files /dev/null and b/img/enemies/Mage.png differ diff --git a/img/enemies/Mimic.png b/img/enemies/Mimic.png new file mode 100644 index 0000000..9e0c3c5 Binary files /dev/null and b/img/enemies/Mimic.png differ diff --git a/img/enemies/Minotaur.png b/img/enemies/Minotaur.png new file mode 100644 index 0000000..61c024c Binary files /dev/null and b/img/enemies/Minotaur.png differ diff --git a/img/enemies/Ogre.png b/img/enemies/Ogre.png new file mode 100644 index 0000000..fe7b444 Binary files /dev/null and b/img/enemies/Ogre.png differ diff --git a/img/enemies/Orc.png b/img/enemies/Orc.png new file mode 100644 index 0000000..8c75173 Binary files /dev/null and b/img/enemies/Orc.png differ diff --git a/img/enemies/Plant.png b/img/enemies/Plant.png new file mode 100644 index 0000000..614c4a3 Binary files /dev/null and b/img/enemies/Plant.png differ diff --git a/img/enemies/Puppet.png b/img/enemies/Puppet.png new file mode 100644 index 0000000..e84a547 Binary files /dev/null and b/img/enemies/Puppet.png differ diff --git a/img/enemies/Rat.png b/img/enemies/Rat.png new file mode 100644 index 0000000..9b3fc30 Binary files /dev/null and b/img/enemies/Rat.png differ diff --git a/img/enemies/Rogue.png b/img/enemies/Rogue.png new file mode 100644 index 0000000..1d1cb2d Binary files /dev/null and b/img/enemies/Rogue.png differ diff --git a/img/enemies/Sahuagin.png b/img/enemies/Sahuagin.png new file mode 100644 index 0000000..69c895f Binary files /dev/null and b/img/enemies/Sahuagin.png differ diff --git a/img/enemies/Scorpion.png b/img/enemies/Scorpion.png new file mode 100644 index 0000000..6f6e4f9 Binary files /dev/null and b/img/enemies/Scorpion.png differ diff --git a/img/enemies/Skeleton.png b/img/enemies/Skeleton.png new file mode 100644 index 0000000..4d02630 Binary files /dev/null and b/img/enemies/Skeleton.png differ diff --git a/img/enemies/Slime.png b/img/enemies/Slime.png new file mode 100644 index 0000000..4914afb Binary files /dev/null and b/img/enemies/Slime.png differ diff --git a/img/enemies/Snake.png b/img/enemies/Snake.png new file mode 100644 index 0000000..7d9dc19 Binary files /dev/null and b/img/enemies/Snake.png differ diff --git a/img/enemies/Soldier.png b/img/enemies/Soldier.png new file mode 100644 index 0000000..54dfba4 Binary files /dev/null and b/img/enemies/Soldier.png differ diff --git a/img/enemies/Spider.png b/img/enemies/Spider.png new file mode 100644 index 0000000..5e4b145 Binary files /dev/null and b/img/enemies/Spider.png differ diff --git a/img/enemies/Succubus.png b/img/enemies/Succubus.png new file mode 100644 index 0000000..d7da0d1 Binary files /dev/null and b/img/enemies/Succubus.png differ diff --git a/img/enemies/Swordsman.png b/img/enemies/Swordsman.png new file mode 100644 index 0000000..5d1090c Binary files /dev/null and b/img/enemies/Swordsman.png differ diff --git a/img/enemies/Vampire.png b/img/enemies/Vampire.png new file mode 100644 index 0000000..0d90fab Binary files /dev/null and b/img/enemies/Vampire.png differ diff --git a/img/enemies/Waterspirit.png b/img/enemies/Waterspirit.png new file mode 100644 index 0000000..dfb1565 Binary files /dev/null and b/img/enemies/Waterspirit.png differ diff --git a/img/enemies/Werewolf.png b/img/enemies/Werewolf.png new file mode 100644 index 0000000..90da65f Binary files /dev/null and b/img/enemies/Werewolf.png differ diff --git a/img/enemies/Willowisp.png b/img/enemies/Willowisp.png new file mode 100644 index 0000000..f8bdb15 Binary files /dev/null and b/img/enemies/Willowisp.png differ diff --git a/img/enemies/Windspirit.png b/img/enemies/Windspirit.png new file mode 100644 index 0000000..cf20918 Binary files /dev/null and b/img/enemies/Windspirit.png differ diff --git a/img/enemies/Zombie.png b/img/enemies/Zombie.png new file mode 100644 index 0000000..292a240 Binary files /dev/null and b/img/enemies/Zombie.png differ diff --git a/img/faces/Actor1.png b/img/faces/Actor1.png new file mode 100644 index 0000000..11f98fe Binary files /dev/null and b/img/faces/Actor1.png differ diff --git a/img/faces/Actor2.png b/img/faces/Actor2.png new file mode 100644 index 0000000..6d585cf Binary files /dev/null and b/img/faces/Actor2.png differ diff --git a/img/faces/Actor3.png b/img/faces/Actor3.png new file mode 100644 index 0000000..f5d77e5 Binary files /dev/null and b/img/faces/Actor3.png differ diff --git a/img/faces/Evil.png b/img/faces/Evil.png new file mode 100644 index 0000000..2606267 Binary files /dev/null and b/img/faces/Evil.png differ diff --git a/img/faces/Monster.png b/img/faces/Monster.png new file mode 100644 index 0000000..f5550ea Binary files /dev/null and b/img/faces/Monster.png differ diff --git a/img/faces/Nature.png b/img/faces/Nature.png new file mode 100644 index 0000000..ee699c7 Binary files /dev/null and b/img/faces/Nature.png differ diff --git a/img/faces/People1.png b/img/faces/People1.png new file mode 100644 index 0000000..b26f6da Binary files /dev/null and b/img/faces/People1.png differ diff --git a/img/faces/People2.png b/img/faces/People2.png new file mode 100644 index 0000000..85ae779 Binary files /dev/null and b/img/faces/People2.png differ diff --git a/img/faces/People3.png b/img/faces/People3.png new file mode 100644 index 0000000..5cde4ad Binary files /dev/null and b/img/faces/People3.png differ diff --git a/img/faces/People4.png b/img/faces/People4.png new file mode 100644 index 0000000..cc31beb Binary files /dev/null and b/img/faces/People4.png differ diff --git a/img/parallaxes/BlueSky.png b/img/parallaxes/BlueSky.png new file mode 100644 index 0000000..f0a4ced Binary files /dev/null and b/img/parallaxes/BlueSky.png differ diff --git a/img/parallaxes/CloudySky1.png b/img/parallaxes/CloudySky1.png new file mode 100644 index 0000000..b7fd733 Binary files /dev/null and b/img/parallaxes/CloudySky1.png differ diff --git a/img/parallaxes/CloudySky2.png b/img/parallaxes/CloudySky2.png new file mode 100644 index 0000000..63e11fe Binary files /dev/null and b/img/parallaxes/CloudySky2.png differ diff --git a/img/parallaxes/DarkSpace1.png b/img/parallaxes/DarkSpace1.png new file mode 100644 index 0000000..ce2a90b Binary files /dev/null and b/img/parallaxes/DarkSpace1.png differ diff --git a/img/parallaxes/DarkSpace2.png b/img/parallaxes/DarkSpace2.png new file mode 100644 index 0000000..f5053fd Binary files /dev/null and b/img/parallaxes/DarkSpace2.png differ diff --git a/img/parallaxes/Mountains1.png b/img/parallaxes/Mountains1.png new file mode 100644 index 0000000..b48a7b9 Binary files /dev/null and b/img/parallaxes/Mountains1.png differ diff --git a/img/parallaxes/Mountains2.png b/img/parallaxes/Mountains2.png new file mode 100644 index 0000000..99fcb8c Binary files /dev/null and b/img/parallaxes/Mountains2.png differ diff --git a/img/parallaxes/Mountains3.png b/img/parallaxes/Mountains3.png new file mode 100644 index 0000000..33e30a8 Binary files /dev/null and b/img/parallaxes/Mountains3.png differ diff --git a/img/parallaxes/Mountains4.png b/img/parallaxes/Mountains4.png new file mode 100644 index 0000000..201ebf5 Binary files /dev/null and b/img/parallaxes/Mountains4.png differ diff --git a/img/parallaxes/Mountains5.png b/img/parallaxes/Mountains5.png new file mode 100644 index 0000000..7c5f5bd Binary files /dev/null and b/img/parallaxes/Mountains5.png differ diff --git a/img/parallaxes/Ocean1.png b/img/parallaxes/Ocean1.png new file mode 100644 index 0000000..da2a13c Binary files /dev/null and b/img/parallaxes/Ocean1.png differ diff --git a/img/parallaxes/Ocean2.png b/img/parallaxes/Ocean2.png new file mode 100644 index 0000000..4a47e14 Binary files /dev/null and b/img/parallaxes/Ocean2.png differ diff --git a/img/parallaxes/SeaofClouds.png b/img/parallaxes/SeaofClouds.png new file mode 100644 index 0000000..10d733b Binary files /dev/null and b/img/parallaxes/SeaofClouds.png differ diff --git a/img/parallaxes/StarlitSky.png b/img/parallaxes/StarlitSky.png new file mode 100644 index 0000000..ab1a5da Binary files /dev/null and b/img/parallaxes/StarlitSky.png differ diff --git a/img/parallaxes/Sunset.png b/img/parallaxes/Sunset.png new file mode 100644 index 0000000..e1f6d71 Binary files /dev/null and b/img/parallaxes/Sunset.png differ diff --git a/img/scene_ui/scene_actor/actor_prop.png b/img/scene_ui/scene_actor/actor_prop.png new file mode 100644 index 0000000..51f1251 Binary files /dev/null and b/img/scene_ui/scene_actor/actor_prop.png differ diff --git a/img/scene_ui/scene_actor/actor_skill.png b/img/scene_ui/scene_actor/actor_skill.png new file mode 100644 index 0000000..d5084da Binary files /dev/null and b/img/scene_ui/scene_actor/actor_skill.png differ diff --git a/img/scene_ui/scene_actor/background.png b/img/scene_ui/scene_actor/background.png new file mode 100644 index 0000000..a25c62a Binary files /dev/null and b/img/scene_ui/scene_actor/background.png differ diff --git a/img/scene_ui/scene_actor/cancel.png b/img/scene_ui/scene_actor/cancel.png new file mode 100644 index 0000000..419526f Binary files /dev/null and b/img/scene_ui/scene_actor/cancel.png differ diff --git a/img/scene_ui/scene_actor/skill_back.png b/img/scene_ui/scene_actor/skill_back.png new file mode 100644 index 0000000..4e68e4a Binary files /dev/null and b/img/scene_ui/scene_actor/skill_back.png differ diff --git a/img/scene_ui/scene_actor/skill_page_down.png b/img/scene_ui/scene_actor/skill_page_down.png new file mode 100644 index 0000000..196223d Binary files /dev/null and b/img/scene_ui/scene_actor/skill_page_down.png differ diff --git a/img/scene_ui/scene_actor/skill_page_number_back.png b/img/scene_ui/scene_actor/skill_page_number_back.png new file mode 100644 index 0000000..196223d Binary files /dev/null and b/img/scene_ui/scene_actor/skill_page_number_back.png differ diff --git a/img/scene_ui/scene_actor/skill_page_up.png b/img/scene_ui/scene_actor/skill_page_up.png new file mode 100644 index 0000000..196223d Binary files /dev/null and b/img/scene_ui/scene_actor/skill_page_up.png differ diff --git a/img/scene_ui/scene_actor/skill_pop_back.png b/img/scene_ui/scene_actor/skill_pop_back.png new file mode 100644 index 0000000..0c97a8b Binary files /dev/null and b/img/scene_ui/scene_actor/skill_pop_back.png differ diff --git a/img/scene_ui/scene_actor/skill_pop_cancel.png b/img/scene_ui/scene_actor/skill_pop_cancel.png new file mode 100644 index 0000000..4e46bb9 Binary files /dev/null and b/img/scene_ui/scene_actor/skill_pop_cancel.png differ diff --git a/img/scene_ui/scene_actor/skill_pop_face_back.png b/img/scene_ui/scene_actor/skill_pop_face_back.png new file mode 100644 index 0000000..a30df4b Binary files /dev/null and b/img/scene_ui/scene_actor/skill_pop_face_back.png differ diff --git a/img/scene_ui/scene_actor/skill_pop_use.png b/img/scene_ui/scene_actor/skill_pop_use.png new file mode 100644 index 0000000..cebe1fe Binary files /dev/null and b/img/scene_ui/scene_actor/skill_pop_use.png differ diff --git a/img/scene_ui/scene_actor/skill_pop_window_back.png b/img/scene_ui/scene_actor/skill_pop_window_back.png new file mode 100644 index 0000000..6070fbc Binary files /dev/null and b/img/scene_ui/scene_actor/skill_pop_window_back.png differ diff --git a/img/scene_ui/scene_actor_select/actor_back.png b/img/scene_ui/scene_actor_select/actor_back.png new file mode 100644 index 0000000..90ade2a Binary files /dev/null and b/img/scene_ui/scene_actor_select/actor_back.png differ diff --git a/img/scene_ui/scene_actor_select/background.png b/img/scene_ui/scene_actor_select/background.png new file mode 100644 index 0000000..52b1de5 Binary files /dev/null and b/img/scene_ui/scene_actor_select/background.png differ diff --git a/img/scene_ui/scene_actor_select/cancel.png b/img/scene_ui/scene_actor_select/cancel.png new file mode 100644 index 0000000..47be032 Binary files /dev/null and b/img/scene_ui/scene_actor_select/cancel.png differ diff --git a/img/scene_ui/scene_actor_select/face_back.png b/img/scene_ui/scene_actor_select/face_back.png new file mode 100644 index 0000000..ee1bacb Binary files /dev/null and b/img/scene_ui/scene_actor_select/face_back.png differ diff --git a/img/scene_ui/scene_actor_select/home.png b/img/scene_ui/scene_actor_select/home.png new file mode 100644 index 0000000..834f1b6 Binary files /dev/null and b/img/scene_ui/scene_actor_select/home.png differ diff --git a/img/scene_ui/scene_actor_select/level_back.png b/img/scene_ui/scene_actor_select/level_back.png new file mode 100644 index 0000000..c6cb7c8 Binary files /dev/null and b/img/scene_ui/scene_actor_select/level_back.png differ diff --git a/img/scene_ui/scene_actor_select/page_down.png b/img/scene_ui/scene_actor_select/page_down.png new file mode 100644 index 0000000..bd3e46d Binary files /dev/null and b/img/scene_ui/scene_actor_select/page_down.png differ diff --git a/img/scene_ui/scene_actor_select/page_up.png b/img/scene_ui/scene_actor_select/page_up.png new file mode 100644 index 0000000..fd02c81 Binary files /dev/null and b/img/scene_ui/scene_actor_select/page_up.png differ diff --git a/img/scene_ui/scene_menu/achivement_cold.png b/img/scene_ui/scene_menu/achivement_cold.png new file mode 100644 index 0000000..af20265 Binary files /dev/null and b/img/scene_ui/scene_menu/achivement_cold.png differ diff --git a/img/scene_ui/scene_menu/achivement_hot.png b/img/scene_ui/scene_menu/achivement_hot.png new file mode 100644 index 0000000..af20265 Binary files /dev/null and b/img/scene_ui/scene_menu/achivement_hot.png differ diff --git a/img/scene_ui/scene_menu/actor_cold.png b/img/scene_ui/scene_menu/actor_cold.png new file mode 100644 index 0000000..0a8807f Binary files /dev/null and b/img/scene_ui/scene_menu/actor_cold.png differ diff --git a/img/scene_ui/scene_menu/actor_hot.png b/img/scene_ui/scene_menu/actor_hot.png new file mode 100644 index 0000000..0a8807f Binary files /dev/null and b/img/scene_ui/scene_menu/actor_hot.png differ diff --git a/img/scene_ui/scene_menu/background.png b/img/scene_ui/scene_menu/background.png new file mode 100644 index 0000000..f1cf215 Binary files /dev/null and b/img/scene_ui/scene_menu/background.png differ diff --git a/img/scene_ui/scene_menu/cancel_cold.png b/img/scene_ui/scene_menu/cancel_cold.png new file mode 100644 index 0000000..8eaaec9 Binary files /dev/null and b/img/scene_ui/scene_menu/cancel_cold.png differ diff --git a/img/scene_ui/scene_menu/cancel_hot.png b/img/scene_ui/scene_menu/cancel_hot.png new file mode 100644 index 0000000..8eaaec9 Binary files /dev/null and b/img/scene_ui/scene_menu/cancel_hot.png differ diff --git a/img/scene_ui/scene_menu/database_cold.png b/img/scene_ui/scene_menu/database_cold.png new file mode 100644 index 0000000..19ca118 Binary files /dev/null and b/img/scene_ui/scene_menu/database_cold.png differ diff --git a/img/scene_ui/scene_menu/database_hot.png b/img/scene_ui/scene_menu/database_hot.png new file mode 100644 index 0000000..19ca118 Binary files /dev/null and b/img/scene_ui/scene_menu/database_hot.png differ diff --git a/img/scene_ui/scene_menu/dialog_background.png b/img/scene_ui/scene_menu/dialog_background.png new file mode 100644 index 0000000..9729fdf Binary files /dev/null and b/img/scene_ui/scene_menu/dialog_background.png differ diff --git a/img/scene_ui/scene_menu/formation_cold.png b/img/scene_ui/scene_menu/formation_cold.png new file mode 100644 index 0000000..480b46a Binary files /dev/null and b/img/scene_ui/scene_menu/formation_cold.png differ diff --git a/img/scene_ui/scene_menu/formation_hot.png b/img/scene_ui/scene_menu/formation_hot.png new file mode 100644 index 0000000..480b46a Binary files /dev/null and b/img/scene_ui/scene_menu/formation_hot.png differ diff --git a/img/scene_ui/scene_menu/help_cold.png b/img/scene_ui/scene_menu/help_cold.png new file mode 100644 index 0000000..bbf5bfc Binary files /dev/null and b/img/scene_ui/scene_menu/help_cold.png differ diff --git a/img/scene_ui/scene_menu/help_hot.png b/img/scene_ui/scene_menu/help_hot.png new file mode 100644 index 0000000..bbf5bfc Binary files /dev/null and b/img/scene_ui/scene_menu/help_hot.png differ diff --git a/img/scene_ui/scene_menu/options_cold.png b/img/scene_ui/scene_menu/options_cold.png new file mode 100644 index 0000000..173403b Binary files /dev/null and b/img/scene_ui/scene_menu/options_cold.png differ diff --git a/img/scene_ui/scene_menu/options_hot.png b/img/scene_ui/scene_menu/options_hot.png new file mode 100644 index 0000000..173403b Binary files /dev/null and b/img/scene_ui/scene_menu/options_hot.png differ diff --git a/img/scene_ui/scene_menu/quest_cold.png b/img/scene_ui/scene_menu/quest_cold.png new file mode 100644 index 0000000..0dfc0dc Binary files /dev/null and b/img/scene_ui/scene_menu/quest_cold.png differ diff --git a/img/scene_ui/scene_menu/quest_hot.png b/img/scene_ui/scene_menu/quest_hot.png new file mode 100644 index 0000000..0dfc0dc Binary files /dev/null and b/img/scene_ui/scene_menu/quest_hot.png differ diff --git a/img/scene_ui/scene_menu/save_cold.png b/img/scene_ui/scene_menu/save_cold.png new file mode 100644 index 0000000..22d6c8b Binary files /dev/null and b/img/scene_ui/scene_menu/save_cold.png differ diff --git a/img/scene_ui/scene_menu/save_hot.png b/img/scene_ui/scene_menu/save_hot.png new file mode 100644 index 0000000..22d6c8b Binary files /dev/null and b/img/scene_ui/scene_menu/save_hot.png differ diff --git a/img/scene_ui/scene_menu/title_cold.png b/img/scene_ui/scene_menu/title_cold.png new file mode 100644 index 0000000..56df4e3 Binary files /dev/null and b/img/scene_ui/scene_menu/title_cold.png differ diff --git a/img/scene_ui/scene_menu/title_hot.png b/img/scene_ui/scene_menu/title_hot.png new file mode 100644 index 0000000..56df4e3 Binary files /dev/null and b/img/scene_ui/scene_menu/title_hot.png differ diff --git a/img/scene_ui/scene_title/back_ground.png b/img/scene_ui/scene_title/back_ground.png new file mode 100644 index 0000000..fa58852 Binary files /dev/null and b/img/scene_ui/scene_title/back_ground.png differ diff --git a/img/scene_ui/scene_title/cg_cold.png b/img/scene_ui/scene_title/cg_cold.png new file mode 100644 index 0000000..c371501 Binary files /dev/null and b/img/scene_ui/scene_title/cg_cold.png differ diff --git a/img/scene_ui/scene_title/cg_hot.png b/img/scene_ui/scene_title/cg_hot.png new file mode 100644 index 0000000..21ac2de Binary files /dev/null and b/img/scene_ui/scene_title/cg_hot.png differ diff --git a/img/scene_ui/scene_title/exit_cold.png b/img/scene_ui/scene_title/exit_cold.png new file mode 100644 index 0000000..8248174 Binary files /dev/null and b/img/scene_ui/scene_title/exit_cold.png differ diff --git a/img/scene_ui/scene_title/exit_hot.png b/img/scene_ui/scene_title/exit_hot.png new file mode 100644 index 0000000..0c9b8eb Binary files /dev/null and b/img/scene_ui/scene_title/exit_hot.png differ diff --git a/img/scene_ui/scene_title/game_title.png b/img/scene_ui/scene_title/game_title.png new file mode 100644 index 0000000..fbb2d31 Binary files /dev/null and b/img/scene_ui/scene_title/game_title.png differ diff --git a/img/scene_ui/scene_title/load_cold.png b/img/scene_ui/scene_title/load_cold.png new file mode 100644 index 0000000..f326b2d Binary files /dev/null and b/img/scene_ui/scene_title/load_cold.png differ diff --git a/img/scene_ui/scene_title/load_hot.png b/img/scene_ui/scene_title/load_hot.png new file mode 100644 index 0000000..59b89c2 Binary files /dev/null and b/img/scene_ui/scene_title/load_hot.png differ diff --git a/img/scene_ui/scene_title/music_cold.png b/img/scene_ui/scene_title/music_cold.png new file mode 100644 index 0000000..7b71f1e Binary files /dev/null and b/img/scene_ui/scene_title/music_cold.png differ diff --git a/img/scene_ui/scene_title/music_hot.png b/img/scene_ui/scene_title/music_hot.png new file mode 100644 index 0000000..3bf853f Binary files /dev/null and b/img/scene_ui/scene_title/music_hot.png differ diff --git a/img/scene_ui/scene_title/qq_group_cold.png b/img/scene_ui/scene_title/qq_group_cold.png new file mode 100644 index 0000000..26a6803 Binary files /dev/null and b/img/scene_ui/scene_title/qq_group_cold.png differ diff --git a/img/scene_ui/scene_title/qq_group_hot.png b/img/scene_ui/scene_title/qq_group_hot.png new file mode 100644 index 0000000..b36e7d6 Binary files /dev/null and b/img/scene_ui/scene_title/qq_group_hot.png differ diff --git a/img/scene_ui/scene_title/start_cold.png b/img/scene_ui/scene_title/start_cold.png new file mode 100644 index 0000000..d28bbde Binary files /dev/null and b/img/scene_ui/scene_title/start_cold.png differ diff --git a/img/scene_ui/scene_title/start_hot.png b/img/scene_ui/scene_title/start_hot.png new file mode 100644 index 0000000..9c50887 Binary files /dev/null and b/img/scene_ui/scene_title/start_hot.png differ diff --git a/img/scene_ui/scene_title/开始界面拆分.rar b/img/scene_ui/scene_title/开始界面拆分.rar new file mode 100644 index 0000000..f5e84cc Binary files /dev/null and b/img/scene_ui/scene_title/开始界面拆分.rar differ diff --git a/img/sv_actors/Actor1_1.png b/img/sv_actors/Actor1_1.png new file mode 100644 index 0000000..b7760f4 Binary files /dev/null and b/img/sv_actors/Actor1_1.png differ diff --git a/img/sv_actors/Actor1_2.png b/img/sv_actors/Actor1_2.png new file mode 100644 index 0000000..74f0eb9 Binary files /dev/null and b/img/sv_actors/Actor1_2.png differ diff --git a/img/sv_actors/Actor1_3.png b/img/sv_actors/Actor1_3.png new file mode 100644 index 0000000..1cc1fd6 Binary files /dev/null and b/img/sv_actors/Actor1_3.png differ diff --git a/img/sv_actors/Actor1_4.png b/img/sv_actors/Actor1_4.png new file mode 100644 index 0000000..297d92c Binary files /dev/null and b/img/sv_actors/Actor1_4.png differ diff --git a/img/sv_actors/Actor1_5.png b/img/sv_actors/Actor1_5.png new file mode 100644 index 0000000..edcd294 Binary files /dev/null and b/img/sv_actors/Actor1_5.png differ diff --git a/img/sv_actors/Actor1_6.png b/img/sv_actors/Actor1_6.png new file mode 100644 index 0000000..7785a4c Binary files /dev/null and b/img/sv_actors/Actor1_6.png differ diff --git a/img/sv_actors/Actor1_7.png b/img/sv_actors/Actor1_7.png new file mode 100644 index 0000000..e75f77c Binary files /dev/null and b/img/sv_actors/Actor1_7.png differ diff --git a/img/sv_actors/Actor1_8.png b/img/sv_actors/Actor1_8.png new file mode 100644 index 0000000..8278a76 Binary files /dev/null and b/img/sv_actors/Actor1_8.png differ diff --git a/img/sv_actors/Actor2_1.png b/img/sv_actors/Actor2_1.png new file mode 100644 index 0000000..64879cd Binary files /dev/null and b/img/sv_actors/Actor2_1.png differ diff --git a/img/sv_actors/Actor2_2.png b/img/sv_actors/Actor2_2.png new file mode 100644 index 0000000..7674c64 Binary files /dev/null and b/img/sv_actors/Actor2_2.png differ diff --git a/img/sv_actors/Actor2_3.png b/img/sv_actors/Actor2_3.png new file mode 100644 index 0000000..20c1312 Binary files /dev/null and b/img/sv_actors/Actor2_3.png differ diff --git a/img/sv_actors/Actor2_4.png b/img/sv_actors/Actor2_4.png new file mode 100644 index 0000000..7b8e65f Binary files /dev/null and b/img/sv_actors/Actor2_4.png differ diff --git a/img/sv_actors/Actor2_5.png b/img/sv_actors/Actor2_5.png new file mode 100644 index 0000000..203c6b9 Binary files /dev/null and b/img/sv_actors/Actor2_5.png differ diff --git a/img/sv_actors/Actor2_6.png b/img/sv_actors/Actor2_6.png new file mode 100644 index 0000000..0974d2e Binary files /dev/null and b/img/sv_actors/Actor2_6.png differ diff --git a/img/sv_actors/Actor2_7.png b/img/sv_actors/Actor2_7.png new file mode 100644 index 0000000..da22306 Binary files /dev/null and b/img/sv_actors/Actor2_7.png differ diff --git a/img/sv_actors/Actor2_8.png b/img/sv_actors/Actor2_8.png new file mode 100644 index 0000000..415fbe3 Binary files /dev/null and b/img/sv_actors/Actor2_8.png differ diff --git a/img/sv_actors/Actor3_5.png b/img/sv_actors/Actor3_5.png new file mode 100644 index 0000000..94488e6 Binary files /dev/null and b/img/sv_actors/Actor3_5.png differ diff --git a/img/sv_actors/Actor3_6.png b/img/sv_actors/Actor3_6.png new file mode 100644 index 0000000..eb1336e Binary files /dev/null and b/img/sv_actors/Actor3_6.png differ diff --git a/img/sv_actors/Actor3_7.png b/img/sv_actors/Actor3_7.png new file mode 100644 index 0000000..72469d1 Binary files /dev/null and b/img/sv_actors/Actor3_7.png differ diff --git a/img/sv_actors/Actor3_8.png b/img/sv_actors/Actor3_8.png new file mode 100644 index 0000000..6075f03 Binary files /dev/null and b/img/sv_actors/Actor3_8.png differ diff --git a/img/sv_enemies/Actor1_3.png b/img/sv_enemies/Actor1_3.png new file mode 100644 index 0000000..452faa8 Binary files /dev/null and b/img/sv_enemies/Actor1_3.png differ diff --git a/img/sv_enemies/Actor1_4.png b/img/sv_enemies/Actor1_4.png new file mode 100644 index 0000000..7d9e091 Binary files /dev/null and b/img/sv_enemies/Actor1_4.png differ diff --git a/img/sv_enemies/Actor1_5.png b/img/sv_enemies/Actor1_5.png new file mode 100644 index 0000000..2c80ff1 Binary files /dev/null and b/img/sv_enemies/Actor1_5.png differ diff --git a/img/sv_enemies/Actor1_6.png b/img/sv_enemies/Actor1_6.png new file mode 100644 index 0000000..6b24417 Binary files /dev/null and b/img/sv_enemies/Actor1_6.png differ diff --git a/img/sv_enemies/Actor1_7.png b/img/sv_enemies/Actor1_7.png new file mode 100644 index 0000000..9ee514b Binary files /dev/null and b/img/sv_enemies/Actor1_7.png differ diff --git a/img/sv_enemies/Actor2_1.png b/img/sv_enemies/Actor2_1.png new file mode 100644 index 0000000..d93e5e5 Binary files /dev/null and b/img/sv_enemies/Actor2_1.png differ diff --git a/img/sv_enemies/Actor2_2.png b/img/sv_enemies/Actor2_2.png new file mode 100644 index 0000000..fd6e844 Binary files /dev/null and b/img/sv_enemies/Actor2_2.png differ diff --git a/img/sv_enemies/Actor2_3.png b/img/sv_enemies/Actor2_3.png new file mode 100644 index 0000000..38bca47 Binary files /dev/null and b/img/sv_enemies/Actor2_3.png differ diff --git a/img/sv_enemies/Actor2_4.png b/img/sv_enemies/Actor2_4.png new file mode 100644 index 0000000..30d1d5a Binary files /dev/null and b/img/sv_enemies/Actor2_4.png differ diff --git a/img/sv_enemies/Actor2_5.png b/img/sv_enemies/Actor2_5.png new file mode 100644 index 0000000..98f6096 Binary files /dev/null and b/img/sv_enemies/Actor2_5.png differ diff --git a/img/sv_enemies/Actor2_6.png b/img/sv_enemies/Actor2_6.png new file mode 100644 index 0000000..2cb3b1b Binary files /dev/null and b/img/sv_enemies/Actor2_6.png differ diff --git a/img/sv_enemies/Actor3_1.png b/img/sv_enemies/Actor3_1.png new file mode 100644 index 0000000..3b4cb7d Binary files /dev/null and b/img/sv_enemies/Actor3_1.png differ diff --git a/img/sv_enemies/Actor3_2.png b/img/sv_enemies/Actor3_2.png new file mode 100644 index 0000000..f99d3f1 Binary files /dev/null and b/img/sv_enemies/Actor3_2.png differ diff --git a/img/sv_enemies/Actor3_5.png b/img/sv_enemies/Actor3_5.png new file mode 100644 index 0000000..76e302b Binary files /dev/null and b/img/sv_enemies/Actor3_5.png differ diff --git a/img/sv_enemies/Actor3_6.png b/img/sv_enemies/Actor3_6.png new file mode 100644 index 0000000..3a4fdf7 Binary files /dev/null and b/img/sv_enemies/Actor3_6.png differ diff --git a/img/sv_enemies/Angel.png b/img/sv_enemies/Angel.png new file mode 100644 index 0000000..56b7dc9 Binary files /dev/null and b/img/sv_enemies/Angel.png differ diff --git a/img/sv_enemies/Assassin.png b/img/sv_enemies/Assassin.png new file mode 100644 index 0000000..c34e790 Binary files /dev/null and b/img/sv_enemies/Assassin.png differ diff --git a/img/sv_enemies/Bat.png b/img/sv_enemies/Bat.png new file mode 100644 index 0000000..3b221ca Binary files /dev/null and b/img/sv_enemies/Bat.png differ diff --git a/img/sv_enemies/Behemoth.png b/img/sv_enemies/Behemoth.png new file mode 100644 index 0000000..065f79a Binary files /dev/null and b/img/sv_enemies/Behemoth.png differ diff --git a/img/sv_enemies/Captain.png b/img/sv_enemies/Captain.png new file mode 100644 index 0000000..f910073 Binary files /dev/null and b/img/sv_enemies/Captain.png differ diff --git a/img/sv_enemies/Cerberus.png b/img/sv_enemies/Cerberus.png new file mode 100644 index 0000000..8c5944a Binary files /dev/null and b/img/sv_enemies/Cerberus.png differ diff --git a/img/sv_enemies/Chimera.png b/img/sv_enemies/Chimera.png new file mode 100644 index 0000000..735c529 Binary files /dev/null and b/img/sv_enemies/Chimera.png differ diff --git a/img/sv_enemies/Cockatrice.png b/img/sv_enemies/Cockatrice.png new file mode 100644 index 0000000..4b71026 Binary files /dev/null and b/img/sv_enemies/Cockatrice.png differ diff --git a/img/sv_enemies/Darklord-final.png b/img/sv_enemies/Darklord-final.png new file mode 100644 index 0000000..5302058 Binary files /dev/null and b/img/sv_enemies/Darklord-final.png differ diff --git a/img/sv_enemies/Darklord.png b/img/sv_enemies/Darklord.png new file mode 100644 index 0000000..ba454dc Binary files /dev/null and b/img/sv_enemies/Darklord.png differ diff --git a/img/sv_enemies/Death.png b/img/sv_enemies/Death.png new file mode 100644 index 0000000..547ad36 Binary files /dev/null and b/img/sv_enemies/Death.png differ diff --git a/img/sv_enemies/Demon.png b/img/sv_enemies/Demon.png new file mode 100644 index 0000000..fa5d089 Binary files /dev/null and b/img/sv_enemies/Demon.png differ diff --git a/img/sv_enemies/Dragon.png b/img/sv_enemies/Dragon.png new file mode 100644 index 0000000..136e947 Binary files /dev/null and b/img/sv_enemies/Dragon.png differ diff --git a/img/sv_enemies/Earthspirit.png b/img/sv_enemies/Earthspirit.png new file mode 100644 index 0000000..f976924 Binary files /dev/null and b/img/sv_enemies/Earthspirit.png differ diff --git a/img/sv_enemies/Evilgod.png b/img/sv_enemies/Evilgod.png new file mode 100644 index 0000000..a1dafe2 Binary files /dev/null and b/img/sv_enemies/Evilgod.png differ diff --git a/img/sv_enemies/Fairy.png b/img/sv_enemies/Fairy.png new file mode 100644 index 0000000..3cf78b2 Binary files /dev/null and b/img/sv_enemies/Fairy.png differ diff --git a/img/sv_enemies/Fanatic.png b/img/sv_enemies/Fanatic.png new file mode 100644 index 0000000..196a0dd Binary files /dev/null and b/img/sv_enemies/Fanatic.png differ diff --git a/img/sv_enemies/Firespirit.png b/img/sv_enemies/Firespirit.png new file mode 100644 index 0000000..b08b2e6 Binary files /dev/null and b/img/sv_enemies/Firespirit.png differ diff --git a/img/sv_enemies/Gargoyle.png b/img/sv_enemies/Gargoyle.png new file mode 100644 index 0000000..e0b1f57 Binary files /dev/null and b/img/sv_enemies/Gargoyle.png differ diff --git a/img/sv_enemies/Garuda.png b/img/sv_enemies/Garuda.png new file mode 100644 index 0000000..affe125 Binary files /dev/null and b/img/sv_enemies/Garuda.png differ diff --git a/img/sv_enemies/Gazer.png b/img/sv_enemies/Gazer.png new file mode 100644 index 0000000..f150db7 Binary files /dev/null and b/img/sv_enemies/Gazer.png differ diff --git a/img/sv_enemies/General_f.png b/img/sv_enemies/General_f.png new file mode 100644 index 0000000..81ad1e1 Binary files /dev/null and b/img/sv_enemies/General_f.png differ diff --git a/img/sv_enemies/General_m.png b/img/sv_enemies/General_m.png new file mode 100644 index 0000000..7a81455 Binary files /dev/null and b/img/sv_enemies/General_m.png differ diff --git a/img/sv_enemies/Ghost.png b/img/sv_enemies/Ghost.png new file mode 100644 index 0000000..dd1468e Binary files /dev/null and b/img/sv_enemies/Ghost.png differ diff --git a/img/sv_enemies/God.png b/img/sv_enemies/God.png new file mode 100644 index 0000000..b28caac Binary files /dev/null and b/img/sv_enemies/God.png differ diff --git a/img/sv_enemies/Goddess.png b/img/sv_enemies/Goddess.png new file mode 100644 index 0000000..6d306e9 Binary files /dev/null and b/img/sv_enemies/Goddess.png differ diff --git a/img/sv_enemies/Hornet.png b/img/sv_enemies/Hornet.png new file mode 100644 index 0000000..4a967a2 Binary files /dev/null and b/img/sv_enemies/Hornet.png differ diff --git a/img/sv_enemies/Imp.png b/img/sv_enemies/Imp.png new file mode 100644 index 0000000..b0ef94d Binary files /dev/null and b/img/sv_enemies/Imp.png differ diff --git a/img/sv_enemies/Irongiant.png b/img/sv_enemies/Irongiant.png new file mode 100644 index 0000000..e3d6933 Binary files /dev/null and b/img/sv_enemies/Irongiant.png differ diff --git a/img/sv_enemies/Jellyfish.png b/img/sv_enemies/Jellyfish.png new file mode 100644 index 0000000..cbf84df Binary files /dev/null and b/img/sv_enemies/Jellyfish.png differ diff --git a/img/sv_enemies/Lamia.png b/img/sv_enemies/Lamia.png new file mode 100644 index 0000000..2e835f9 Binary files /dev/null and b/img/sv_enemies/Lamia.png differ diff --git a/img/sv_enemies/Mage.png b/img/sv_enemies/Mage.png new file mode 100644 index 0000000..8cb3033 Binary files /dev/null and b/img/sv_enemies/Mage.png differ diff --git a/img/sv_enemies/Mimic.png b/img/sv_enemies/Mimic.png new file mode 100644 index 0000000..313f4c6 Binary files /dev/null and b/img/sv_enemies/Mimic.png differ diff --git a/img/sv_enemies/Minotaur.png b/img/sv_enemies/Minotaur.png new file mode 100644 index 0000000..adb93f6 Binary files /dev/null and b/img/sv_enemies/Minotaur.png differ diff --git a/img/sv_enemies/Ogre.png b/img/sv_enemies/Ogre.png new file mode 100644 index 0000000..39cdca5 Binary files /dev/null and b/img/sv_enemies/Ogre.png differ diff --git a/img/sv_enemies/Orc.png b/img/sv_enemies/Orc.png new file mode 100644 index 0000000..d2c540a Binary files /dev/null and b/img/sv_enemies/Orc.png differ diff --git a/img/sv_enemies/Plant.png b/img/sv_enemies/Plant.png new file mode 100644 index 0000000..097482a Binary files /dev/null and b/img/sv_enemies/Plant.png differ diff --git a/img/sv_enemies/Puppet.png b/img/sv_enemies/Puppet.png new file mode 100644 index 0000000..13f7b9b Binary files /dev/null and b/img/sv_enemies/Puppet.png differ diff --git a/img/sv_enemies/Rat.png b/img/sv_enemies/Rat.png new file mode 100644 index 0000000..8200fce Binary files /dev/null and b/img/sv_enemies/Rat.png differ diff --git a/img/sv_enemies/Rogue.png b/img/sv_enemies/Rogue.png new file mode 100644 index 0000000..6c630f9 Binary files /dev/null and b/img/sv_enemies/Rogue.png differ diff --git a/img/sv_enemies/Sahuagin.png b/img/sv_enemies/Sahuagin.png new file mode 100644 index 0000000..9229708 Binary files /dev/null and b/img/sv_enemies/Sahuagin.png differ diff --git a/img/sv_enemies/Scorpion.png b/img/sv_enemies/Scorpion.png new file mode 100644 index 0000000..fe3560d Binary files /dev/null and b/img/sv_enemies/Scorpion.png differ diff --git a/img/sv_enemies/Skeleton.png b/img/sv_enemies/Skeleton.png new file mode 100644 index 0000000..fd4a563 Binary files /dev/null and b/img/sv_enemies/Skeleton.png differ diff --git a/img/sv_enemies/Slime.png b/img/sv_enemies/Slime.png new file mode 100644 index 0000000..22f3abc Binary files /dev/null and b/img/sv_enemies/Slime.png differ diff --git a/img/sv_enemies/Snake.png b/img/sv_enemies/Snake.png new file mode 100644 index 0000000..0e61214 Binary files /dev/null and b/img/sv_enemies/Snake.png differ diff --git a/img/sv_enemies/Soldier.png b/img/sv_enemies/Soldier.png new file mode 100644 index 0000000..1cf2d94 Binary files /dev/null and b/img/sv_enemies/Soldier.png differ diff --git a/img/sv_enemies/Spider.png b/img/sv_enemies/Spider.png new file mode 100644 index 0000000..61aa6f1 Binary files /dev/null and b/img/sv_enemies/Spider.png differ diff --git a/img/sv_enemies/Succubus.png b/img/sv_enemies/Succubus.png new file mode 100644 index 0000000..43e821c Binary files /dev/null and b/img/sv_enemies/Succubus.png differ diff --git a/img/sv_enemies/Swordsman.png b/img/sv_enemies/Swordsman.png new file mode 100644 index 0000000..e6aeef6 Binary files /dev/null and b/img/sv_enemies/Swordsman.png differ diff --git a/img/sv_enemies/Vampire.png b/img/sv_enemies/Vampire.png new file mode 100644 index 0000000..43964c1 Binary files /dev/null and b/img/sv_enemies/Vampire.png differ diff --git a/img/sv_enemies/Waterspirit.png b/img/sv_enemies/Waterspirit.png new file mode 100644 index 0000000..b019e5c Binary files /dev/null and b/img/sv_enemies/Waterspirit.png differ diff --git a/img/sv_enemies/Werewolf.png b/img/sv_enemies/Werewolf.png new file mode 100644 index 0000000..30c119a Binary files /dev/null and b/img/sv_enemies/Werewolf.png differ diff --git a/img/sv_enemies/Willowisp.png b/img/sv_enemies/Willowisp.png new file mode 100644 index 0000000..dd2c84c Binary files /dev/null and b/img/sv_enemies/Willowisp.png differ diff --git a/img/sv_enemies/Windspirit.png b/img/sv_enemies/Windspirit.png new file mode 100644 index 0000000..2ee95b7 Binary files /dev/null and b/img/sv_enemies/Windspirit.png differ diff --git a/img/sv_enemies/Zombie.png b/img/sv_enemies/Zombie.png new file mode 100644 index 0000000..40a2ccf Binary files /dev/null and b/img/sv_enemies/Zombie.png differ diff --git a/img/system/Balloon.png b/img/system/Balloon.png new file mode 100644 index 0000000..0499db2 Binary files /dev/null and b/img/system/Balloon.png differ diff --git a/img/system/ButtonSet.png b/img/system/ButtonSet.png new file mode 100644 index 0000000..593251e Binary files /dev/null and b/img/system/ButtonSet.png differ diff --git a/img/system/Damage.png b/img/system/Damage.png new file mode 100644 index 0000000..4f1cfb6 Binary files /dev/null and b/img/system/Damage.png differ diff --git a/img/system/GameOver.png b/img/system/GameOver.png new file mode 100644 index 0000000..26fdce5 Binary files /dev/null and b/img/system/GameOver.png differ diff --git a/img/system/IconSet.png b/img/system/IconSet.png new file mode 100644 index 0000000..f598da8 Binary files /dev/null and b/img/system/IconSet.png differ diff --git a/img/system/Loading.png b/img/system/Loading.png new file mode 100644 index 0000000..d359683 Binary files /dev/null and b/img/system/Loading.png differ diff --git a/img/system/MadeWithMv.png b/img/system/MadeWithMv.png new file mode 100644 index 0000000..1a83402 Binary files /dev/null and b/img/system/MadeWithMv.png differ diff --git a/img/system/Shadow1.png b/img/system/Shadow1.png new file mode 100644 index 0000000..6cb5d50 Binary files /dev/null and b/img/system/Shadow1.png differ diff --git a/img/system/Shadow2.png b/img/system/Shadow2.png new file mode 100644 index 0000000..8814a09 Binary files /dev/null and b/img/system/Shadow2.png differ diff --git a/img/system/States.png b/img/system/States.png new file mode 100644 index 0000000..002adb4 Binary files /dev/null and b/img/system/States.png differ diff --git a/img/system/Weapons1.png b/img/system/Weapons1.png new file mode 100644 index 0000000..58c6d75 Binary files /dev/null and b/img/system/Weapons1.png differ diff --git a/img/system/Weapons2.png b/img/system/Weapons2.png new file mode 100644 index 0000000..a752ba5 Binary files /dev/null and b/img/system/Weapons2.png differ diff --git a/img/system/Weapons3.png b/img/system/Weapons3.png new file mode 100644 index 0000000..0015415 Binary files /dev/null and b/img/system/Weapons3.png differ diff --git a/img/system/Window - 副本.png b/img/system/Window - 副本.png new file mode 100644 index 0000000..497978c Binary files /dev/null and b/img/system/Window - 副本.png differ diff --git a/img/system/Window.png b/img/system/Window.png new file mode 100644 index 0000000..f93e866 Binary files /dev/null and b/img/system/Window.png differ diff --git a/img/tilesets/Dungeon_A1.png b/img/tilesets/Dungeon_A1.png new file mode 100644 index 0000000..793c623 Binary files /dev/null and b/img/tilesets/Dungeon_A1.png differ diff --git a/img/tilesets/Dungeon_A1.txt b/img/tilesets/Dungeon_A1.txt new file mode 100644 index 0000000..881cd0f --- /dev/null +++ b/img/tilesets/Dungeon_A1.txt @@ -0,0 +1,16 @@ +Water A|水場A +Deep Water|深い水場 +Swamp Grass|水草 +Lotus Pads (Flowers)|蓮の葉(花) +Lava|溶岩 +Waterfall A (Lava Cave)|滝A(溶岩洞窟) +Water B (Grass Maze)|水場B(草迷宮) +Waterfall B (Grass Maze)|滝B(草迷宮) +Water C (Dirt Cave)|水場C(土洞窟) +Waterfall C (Dirt Cave)|滝C(土洞窟) +Water D (Rock Cave)|水場D(岩洞窟) +Waterfall D (Rock Cave)|滝D(岩洞窟) +Water E (Crystal)|水場E(水晶) +Waterfall E (Crystal)|滝E(水晶) +Canal|水路 +Waterfall (Stone Wall)|滝F(石壁) diff --git a/img/tilesets/Dungeon_A2.png b/img/tilesets/Dungeon_A2.png new file mode 100644 index 0000000..5705c87 Binary files /dev/null and b/img/tilesets/Dungeon_A2.png differ diff --git a/img/tilesets/Dungeon_A2.txt b/img/tilesets/Dungeon_A2.txt new file mode 100644 index 0000000..1fc02f7 --- /dev/null +++ b/img/tilesets/Dungeon_A2.txt @@ -0,0 +1,32 @@ +Ground A (Dirt Cave)|床A(土洞窟) +Ground B (Grass Maze)|床B(草迷宮) +Dark Ground A (Dirt Cave)|濃い床A(土洞窟) +Dark Ground B (Grass Maze)|濃い床B(草迷宮) +Hole A (Dirt Cave)|穴A(土洞窟) +Hole B (Grass Maze)|穴B(草迷宮) +Hole I (Stone Floor)|穴I(石の床) +Ground Cracks|床のひび割れ +Ground C (Rock Cave)|床C(岩洞窟) +Ground D (Crystal)|床D(水晶) +Dark Ground C (Rock Cave)|濃い床C(岩洞窟) +Dark Ground D (Crystal)|濃い床D(水晶) +Hole C (Rock Cave)|穴C(岩洞窟) +Hole D (Crystal)|穴D(水晶) +Hole J|穴J +Soil on Ground|床の汚れ +Ground E (Lava Cave)|床E(溶岩洞窟) +Ground F (In Body)|床F(体内) +Dark Ground E (Lava Cave)|濃い床E(溶岩洞窟) +Rug A|じゅうたんA +Hole E (Lava Cave)|穴E(溶岩洞窟) +Hole F (In Body)|穴F(体内) +Fencepost|柵 +Moss on Ground|床の苔 +Ground G (Ice Cave)|床G(氷洞窟) +Ground H (Demonic World)|床H(魔界) +Dark Ground G (Ice Cave)|濃い床G(氷洞窟) +Rug B|じゅうたんB +Hole G (Ice Cave)|穴G(氷洞窟) +Hole H (Demonic World)|穴H(魔界) +Raised Stone|石段 +Poison Swamp|毒の沼 diff --git a/img/tilesets/Dungeon_A4.png b/img/tilesets/Dungeon_A4.png new file mode 100644 index 0000000..9d240ba Binary files /dev/null and b/img/tilesets/Dungeon_A4.png differ diff --git a/img/tilesets/Dungeon_A4.txt b/img/tilesets/Dungeon_A4.txt new file mode 100644 index 0000000..f0733f0 --- /dev/null +++ b/img/tilesets/Dungeon_A4.txt @@ -0,0 +1,48 @@ +Wall A (Dirt Cave)|壁A(土洞窟) +Wall B (Rock Cave)|壁B(岩洞窟) +Wall C (Lava Cave)|壁C(溶岩洞窟) +Wall D (Ice Cave)|壁D(氷洞窟) +Wall E (Grass Maze)|壁E(草迷宮) +Wall F (Crystal)|壁F(水晶) +Wall G (In Body)|壁G(体内) +Wall H (Demonic World)|壁H(魔界) +Wall A (Dirt Cave)|壁A(土洞窟) +Wall B (Rock Cave)|壁B(岩洞窟) +Wall C (Lava Cave)|壁C(溶岩洞窟) +Wall D (Ice Cave)|壁D(氷洞窟) +Wall E (Grass Maze)|壁E(草迷宮) +Wall F (Crystal)|壁F(水晶) +Wall G (In Body)|壁G(体内) +Wall H (Demonic World)|壁H(魔界) +Wall I (Stone)|壁I(石) +Wall J (Brick)|壁J(レンガ) +Wall K (Brick)|壁K(レンガ) +Wall L (Stone)|壁L(石) +Wall M (Stone)|壁M(石) +Wall N (Castle)|壁N(城) +Wall O (Fort)|壁O(砦) +Wall P (Demon Castle)|壁P(魔王城) +Wall I (Stone)|壁I(石) +Wall J (Brick)|壁J(レンガ) +Wall K (Brick)|壁K(レンガ) +Wall L (Stone)|壁L(石) +Wall M (Stone)|壁M(石) +Wall N (Castle)|壁N(城) +Wall O (Fort)|壁O(砦) +Wall P (Demon Castle)|壁P(魔王城) +Wall Q (Temple)|壁Q(神殿) +Wall R (Marble)|壁R(大理石) +Wall S (Frozen)|壁S(凍結) +Wall T (Factory)|壁T(工場) +Ledge A (Dirt Cave)|段差A(土洞窟) +Ledge B (Rock Cave)|段差B(岩洞窟) +Ledge C (Lava Cave)|段差C(溶岩洞窟) +Ledge D (Ice Cave)|段差D(氷洞窟) +Wall Q (Temple)|壁Q(神殿) +Wall R (Marble)|壁R(大理石) +Wall S (Frozen)|壁S(凍結) +Wall T (Factory)|壁T(工場) +Ledge A (Dirt Cave)|段差A(土洞窟) +Ledge B (Rock Cave)|段差B(岩洞窟) +Ledge C (Lava Cave)|段差C(溶岩洞窟) +Ledge D (Ice Cave)|段差D(氷洞窟) diff --git a/img/tilesets/Dungeon_A5.png b/img/tilesets/Dungeon_A5.png new file mode 100644 index 0000000..20d2cec Binary files /dev/null and b/img/tilesets/Dungeon_A5.png differ diff --git a/img/tilesets/Dungeon_A5.txt b/img/tilesets/Dungeon_A5.txt new file mode 100644 index 0000000..e467f87 --- /dev/null +++ b/img/tilesets/Dungeon_A5.txt @@ -0,0 +1,128 @@ +Darkness|暗闇 +Translucent Floor A|半透明の床A +Translucent Floor B|半透明の床B +Translucent Floor C|半透明の床C +Translucent Floor D|半透明の床D +Stairs A (Translucent)|階段A(半透明) +Stairs B (Translucent)|階段B(半透明) +Wire Mesh|金網 +Transparent|透明 +Translucent Floor A|半透明の床A +Translucent Floor B|半透明の床B +Translucent Floor C|半透明の床C +Translucent Floor D|半透明の床D +Stairs A (Translucent)|階段C(半透明) +Stairs B (Translucent)|階段D(半透明) +Wire Mesh|金網 +Ground A (Dirt Cave)|床A(土洞窟) +Ground B (Rock Cave)|床B(岩洞窟) +Ground C (Lava Cave)|床C(溶岩洞窟) +Ground D (Ice Cave)|床D(氷洞窟) +Ground E (Grass Maze)|床E(草迷宮) +Ground F (Crystal)|床F(水晶) +Ground G (In Body)|床G(体内) +Ground H (Demonic World)|床H(魔界) +Stairs A (Dirt Cave, Left)|階段A(土洞窟・左) +Stairs A (Dirt Cave, Center)|階段A(土洞窟・中央) +Stairs A (Dirt Cave, Right)|階段A(土洞窟・右) +Stairs A (Dirt Cave)|階段A(土洞窟) +Stairs B (Rock Cave, Left)|階段B(岩洞窟・左) +Stairs B (Rock Cave, Center)|階段B(岩洞窟・中央) +Stairs B (Rock Cave, Right)|階段B(岩洞窟・右) +Stairs B (Rock Cave)|階段B(岩洞窟) +Cobblestones A|石畳A +Cobblestones B|石畳B +Cobblestones C|石畳C +Cobblestones D|石畳D +Cobblestones E|石畳E +Cobblestones F|石畳F +Cobblestones G|石畳G +Interior Floor A (Demon Castle)|内装床A(魔王城) +Stairs C (Lava Cave, Left)|階段C(溶岩洞窟・左) +Stairs C (Lava Cave, Center)|階段C(溶岩洞窟・中央) +Stairs C (Lava Cave, Right)|階段C(溶岩洞窟・右) +Stairs C (Lava Cave)|階段C(溶岩洞窟) +Stairs D (Ice Cave, Left)|階段D(氷洞窟・左) +Stairs D (Ice Cave, Center)|階段D(氷洞窟・中央) +Stairs D (Ice Cave, Right)|階段D(氷洞窟・右) +Stairs D (Ice Cave)|階段D(氷洞窟) +Cobblestones H|石畳H +Interior Floor B (Concrete)|内装床B(コンクリート) +Icy Ground A|氷の床A +Interior Floor C (Factory)|内装床C(工場) +Decorative Tile|舗装床 +Cobblestones I|石畳I +Cobblestones J|石畳J +Decorative Tile|化粧タイル +Stairs E (Grass Maze, Left)|階段E(草迷宮・左) +Stairs E (Grass Maze, Center)|階段E(草迷宮・中央) +Stairs E (Grass Maze, Right)|階段E(草迷宮・右) +Stairs E (Grass Maze)|階段E(草迷宮) +Stairs F (Crystal, Left)|階段F(水晶・左) +Stairs F (Crystal, Center)|階段F(水晶・中央) +Stairs F (Crystal, Right)|階段F(水晶・右) +Stairs F (Crystal)|階段F(水晶) +Stairs G (In Body, Left)|階段G(体内・左) +Stairs G (In Body, Center)|階段G(体内・中央) +Stairs G (In Body, Right)|階段G(体内・右) +Stairs G (In Body)|階段G(体内) +Stairs H (Demonic World, Left)|階段H(魔界・左) +Stairs H (Demonic World, Center)|階段H(魔界・中央) +Stairs H (Demonic World, Right)|階段H(魔界・右) +Stairs H (Demonic World)|階段H(魔界) +Stairs I (Stone, Left)|階段I(石・左) +Stairs I (Stone, Center)|階段I(石・中央) +Stairs I (Stone, Right)|階段I(石・右) +Stairs I (Stone)|階段I(石) +Stairs J (Ruins, Left)|階段J(廃墟・左) +Stairs J (Ruins, Center)|階段J(廃墟・中央) +Stairs J (Ruins, Right)|階段J(廃墟・右) +Stairs J (Ruins)|階段J(廃墟) +Stairs K (Stone, Left)|階段K(石・左) +Stairs K (Stone, Center)|階段K(石・中央) +Stairs K (Stone, Right)|階段K(石・右) +Stairs K (Stone)|階段K(石) +Stairs L (Ruins, Left)|階段L(廃墟・左) +Stairs L (Ruins, Center)|階段L(廃墟・中央) +Stairs L (Ruins, Right)|階段L(廃墟・右) +Stairs L (Ruins)|階段L(廃墟) +Ground (Dirt Cave, Ruins)|床A(土洞窟・廃墟) +Ground (Rock Cave, Ruins)|床B(岩洞窟・廃墟) +Ground (Lava Cave, Ruins)|床C(溶岩洞窟・廃墟) +Ground (Ice Cave, Ruins)|床D(氷洞窟・廃墟) +Ground (Grass Maze, Ruins)|床E(草迷宮・廃墟) +Ground (Crystal, Ruins)|床F(水晶・廃墟) +Ground (In Body, Ruins)|床G(体内・廃墟) +Ground (Demonic World, Ruins)|床H(魔界・廃墟) +Cobblestones A (Ruins)|石畳A(廃墟) +Cobblestones B (Ruins)|石畳B(廃墟) +Cobblestones C (Ruins)|石畳C(廃墟) +Cobblestones D (Ruins)|石畳D(廃墟) +Cobblestones E (Ruins)|石畳E(廃墟) +Cobblestones F (Ruins)|石畳F(廃墟) +Cobblestones G (Ruins)|石畳G(廃墟) +Interior Floor A (Demon Castle, Ruins)|内装床A(魔王城・廃墟) +Cobblestones H (Ruins)|石畳H(廃墟) +Interior Floor B (Concrete, Ruins)|内装床B(コンクリート・廃墟) +Icy Ground B|氷の床B +Interior Floor D (Factory)|内装床D(工場) +Decorative Tile (Ruins)|舗装床(廃墟) +Cobblestones I (Ruins)|石畳I(廃墟) +Cobblestones J (Ruins)|石畳J(廃墟) +Decorative Tile (Ruins)|化粧タイル(廃墟) +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile B|大きなレリーフ床B +Large Relief Floor Tile B|大きなレリーフ床B +Directional Floor Tile A (Down)|方向床A(下) +Directional Floor Tile B (Up)|方向床B(上) +Relief Floor Tile A (Gold)|レリーフ床A(金) +Relief Floor Tile B (Gold)|レリーフ床B(金) +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile B|大きなレリーフ床B +Large Relief Floor Tile B|大きなレリーフ床B +Directional Floor Tile C (Left)|方向床C(左) +Directional Floor Tile D (Right)|方向床D(右) +Relief Floor Tile C (Gold)|レリーフ床C(金) +Relief Floor Tile D (Gold, Ruins)|レリーフ床D(金・廃墟) diff --git a/img/tilesets/Dungeon_B.png b/img/tilesets/Dungeon_B.png new file mode 100644 index 0000000..3efc894 Binary files /dev/null and b/img/tilesets/Dungeon_B.png differ diff --git a/img/tilesets/Dungeon_B.txt b/img/tilesets/Dungeon_B.txt new file mode 100644 index 0000000..ea3ac8b --- /dev/null +++ b/img/tilesets/Dungeon_B.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Beanstalk A|豆の木A +Stairs A (Up)|階段A(上り) +Stairs B (Up)|階段B(上り) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Vines A|ツタA +Beanstalk B (Snow)|豆の木B(雪) +Beanstalk C (Dead)|豆の木C(枯れ) +Stairs A (Down)|階段A(下り) +Stairs B (Down)|階段B(下り) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Vines A|ツタA +Crumbling Wall|崩れた壁 +Dug-Up Ground|掘られた床 +Stairs C (Up)|階段C(上り) +Stairs D (Up)|階段D(上り) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Vines B (Down)|ツタB(下り) +Crumbling Wall|崩れた壁 +Dug-Up Ground|掘られた床 +Stairs C (Down)|階段C(下り) +Stairs D (Down)|階段D(下り) +Hole A (Metal Ladder)|穴A(鉄ばしご) +Hole B (Rope Ladder)|穴B(縄ばしご) +Hole C (Rope)|穴C(ロープ) +Hole D|穴D +Log Bridge (V)|丸太の橋(縦) +Log Bridge (H)|丸太の橋(横) +Wood Bridge (V)|木の橋(縦) +Wood Bridge (H)|木の橋(横) +Stone Bridge (V)|石の橋(縦) +Stone Bridge (H)|石の橋(横) +Wood Bridge (V)|木の橋(縦) +Wood Bridge (H)|木の橋(横) +Bridge Spar (Wood, Center A)|橋げた(木・中央A) +Bridge Spar (Wood, Left)|橋げた(木・左) +Bridge Spar (Wood, Center B)|橋げた(木・中央B) +Bridge Spar (Wood, Right)|橋げた(木・右) +Bridge Spar (Stone, Center A)|橋げた(石・中央A) +Bridge Spar (Stone, Left)|橋げた(石・左) +Bridge Spar (Stone, Center B)||橋げた(石・中央B) +Bridge Spar (Stone, Right)|橋げた(石・右) +Gravel A (Dirt Cave)|砂利A(土洞窟) +Gravel B (Rock Cave)|砂利B(岩洞窟) +Gravel C (Lava Cave)|砂利C(溶岩洞窟) +Ice Pieces |氷の欠片 +Small Sprouts A (Grass Maze)|小さな芽A(草迷宮) +Small Crystals|小さな水晶 +Detritus (In Body)|床装飾(体内) +Small Sprouts B (Demonic World)|小さな芽B(魔界) +Boulder A (Dirt Cave)|岩A(土洞窟) +Boulder B (Rock Cave)|岩B(岩洞窟) +Boulder C (Lava Cave)|岩C(溶岩洞窟) +Lump of Ice|氷塊 +Boulder D (Grass Maze)|岩D(草迷宮) +Crystal|水晶 +Spherical Lump|球状突起物 +Boulder E (Demonic World)|岩E(魔界) +Tall Rock A (Dirt Cave)|大きな岩A(土洞窟) +Tall Rock B (Rock Cave)|大きな岩B(岩洞窟) +Tall Rock C (Lava Cave)|大きな岩C(溶岩洞窟) +Tall Lump of Ice|大きな氷塊 +Tall Rock D (Grass Maze)|大きな岩D(草迷宮) +Large Crystal|大きな水晶 +Large Growth|大型突起物 +Tall Rock E (Demonic World)|大きな岩E(魔界) +Tall Rock A (Dirt Cave)|大きな岩A(土洞窟) +Tall Rock B (Rock Cave)|大きな岩B(岩洞窟) +Tall Rock C (Lava Cave)|大きな岩C(溶岩洞窟) +Tall Lump of Ice|大きな氷塊 +Tall Rock D (Grass Maze)|大きな岩D(草迷宮) +Large Crystal|大きな水晶 +Large Growth|大型突起物 +Tall Rock E (Demonic World)|大きな岩E(魔界) +Stone Pillar A|石の柱A +Stone Pillar B|石の柱B +Stone Pillar C|石の柱C +Stone Pillar C (Moss)|石の柱C(苔) +Stone Pillar C (Ice)|石の柱C(氷) +Wood Pillar|木の柱 +Stone Pillar D|石の柱D +Orb Pillar|オーブの柱 +Stone Pillar A|石の柱A +Stone Pillar B|石の柱B +Stone Pillar C|石の柱C +Stone Pillar C (Moss)|石の柱C(苔) +Stone Pillar C (Ice)|石の柱C(氷) +Wood Pillar|木の柱 +Stone Pillar D|石の柱D +Orb Pillar|オーブの柱 +Broken Stone Pillar A|折れた石の柱A +Broken Stone Pillar B|折れた石の柱B +Broken Stone Pillar C|折れた石の柱C +Broken Stone Pillar C (Moss)|折れた石の柱C(苔) +Broken Stone Pillar C (Ice)|折れた石の柱C(氷) +Broken Wood Pillar A|折れた木の柱A +Broken Stone Pillar D|折れた石の柱D +Broken Orb Pillar|折れたオーブの柱 +Rubble|瓦礫A +Rubble (Moss)|瓦礫B(苔) +Rubble (Ice)|瓦礫C(氷) +Broken Wood Pillar B|折れた木の柱B +Rubble (Dirt)|瓦礫D(土) +Scrap Wood|端材 +Barricade A (H)|バリケードA(横) +Barricade B (V)|バリケードB(縦) +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing (Abandoned Mine)|壁の補強材(廃坑) +Wall Bracing (Abandoned Mine)|壁の補強材(廃坑) +Wall Bracing (Abandoned Mine)|壁の補強材(廃坑) +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing|壁の補強材 +Wall Bracing (Abandoned Mine)|壁の補強材(廃坑) +Wall Bracing (Abandoned Mine)|壁の補強材(廃坑) +Wall Bracing (Abandoned Mine)|壁の補強材(廃坑) +Exit A|外への出口A +Entrance A|入口A +Exit B|外への出口B +Entrance B|入口B +Exit C|外への出口C +Entrance C|入口C +Window A|窓A +Window B|窓B +Exit D|外への出口D +Entrance D|入口D +Exit E|外への出口E +Entrance E|入口E +Light From Exit A (Top)|出口からの光A(上) +Light From Exit B (Bottom)|出口からの光B(下) +Window A|窓A +Window B|窓B +Spider Web|蜘蛛の巣 +Stone Tablet|石版 +Stone Tablet (Ruins)|石版(廃墟) +Entrance A|入口A +Entrance A (Extend)|入口A(延長部分) +Entrance A (Top Half A)|入口A(上半分A) +Entrance B|入口B +Entrance A (Top Half B)|入口A(上半分B) +Wall Vines A|壁のツタA +Wall Vines B|壁のツタB +Wall Vines C|壁のツタC +Wall Fern|壁のシダ +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Fissures D|亀裂D +Wall Vines A|壁のツタA +Wall Vines B|壁のツタB +Wall Vines C|壁のツタC +Wall Moss|壁の苔 +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Fissures D|亀裂D +Monument A|石碑A +Monument B|石碑B +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Monument A|石碑A +Monument C|石碑C +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Statue A|石像A +Angel Statue A|天使像A +Angel Statue B|天使像B +Dais|台座 +Statue B|石像B +Demon Statue|悪魔像 +Dragon Statue|竜像 +Dragon Statue|竜像 +Statue A|石像A +Angel Statue A|天使像A +Angel Statue B|天使像B +Dais|台座 +Statue B|石像B +Demon Statue|悪魔像 +Dragon Statue|竜像 +Dragon Statue|竜像 +Large Gravel Mound A (Dirt)|大きな土砂A(土) +Large Gravel Mound A (Dirt)|大きな土砂A(土) +Large Gravel Mound B (Stone)|大きな土砂B(石) +Large Gravel Mound B (Stone)|大きな土砂B(石) +Large Gold Mound|大きな金の山 +Large Gold Mound|大きな金の山 +Large Silver Mound|大きな銀の山 +Large Silver Mound|大きな銀の山 +Large Gravel Mound A (Dirt)|大きな土砂A(土) +Large Gravel Mound A (Dirt)|大きな土砂A(土) +Large Gravel Mound B (Stone)|大きな土砂B(石) +Large Gravel Mound B (Stone)|大きな土砂B(石) +Large Gold Mound|大きな金の山 +Large Gold Mound|大きな金の山 +Large Silver Mound|大きな銀の山 +Large Silver Mound|大きな銀の山 +Gravel Mound (Dirt)|土砂A(土) +Gravel Mound (Stone)|土砂B(石) +Gold Bricks A|金の延べ棒A +Gold Bricks B|金の延べ棒B +Crate A (Dirt)|木箱A(土) +Crate B (Stone)|木箱B(石) +Crate C (Ruins)|木箱C(廃墟) +Pot A (Ruins)|壺A(廃墟) +Gold Mound|金の山 +Silver Mound|銀の山 +Silver Bricks A|銀の延べ棒A +Silver Bricks B|銀の延べ棒B +Crate D (Gold Dust)|木箱D(金) +Crate E (Silver Dust)|木箱E(銀) +Pot A|壺A +Pot B|壺B +Shovel|スコップ +Pickax|つるはし +Rope|ロープ +Mound of Gold Coins|金貨の山 +Crate F|木箱F +Crate G|木箱G +Barrel A|樽A +Barrel B (Ruins)|樽B(廃墟) +Large Bones|大きな骸骨 +Large Bones|大きな骸骨 +Bones A|骸骨A +Table (Ruins)|テーブル(廃墟) +Jail Bars|鉄格子 +Jail Bars|鉄格子 +Jail Bars|鉄格子 +Jail Bars|鉄格子 +Large Bones|大きな骸骨 +Large Bones|大きな骸骨 +Bones B|骸骨B +Stool (Ruins)|椅子(廃墟) +Jail Bars|鉄格子 +Jail Bars|鉄格子 +Jail Bars|鉄格子 +Jail Bars|鉄格子 diff --git a/img/tilesets/Dungeon_C.png b/img/tilesets/Dungeon_C.png new file mode 100644 index 0000000..162a410 Binary files /dev/null and b/img/tilesets/Dungeon_C.png differ diff --git a/img/tilesets/Dungeon_C.txt b/img/tilesets/Dungeon_C.txt new file mode 100644 index 0000000..c3c684c --- /dev/null +++ b/img/tilesets/Dungeon_C.txt @@ -0,0 +1,256 @@ +Decorative Pillar A (Stone)|装飾柱A(石) +Decorative Pillar B (Stone)|装飾柱B(石) +Decorative Pillar C (Temple)|装飾柱C(遺跡) +Decorative Pillar D (Rock Cave)|装飾柱D(岩洞窟) +Decorative Pillar E (Demon Castle)|装飾柱E(魔王城) +Decorative Pillar F (Fort)|装飾柱F(砦) +Decorative Pillar G (Dirt Cave)|装飾柱G(土洞窟) +Decorative Pillar H (Factory)|装飾柱H(工場) +Decorative Pillar A (Stone)|装飾柱A(石) +Decorative Pillar B (Stone)|装飾柱B(石) +Decorative Pillar C (Temple)|装飾柱C(遺跡) +Decorative Pillar D (Rock Cave)|装飾柱D(岩洞窟) +Decorative Pillar E (Demon Castle)|装飾柱E(魔王城) +Decorative Pillar F (Fort)|装飾柱F(砦) +Decorative Pillar G (Dirt Cave)|装飾柱G(土洞窟) +Decorative Pillar H (Factory)|装飾柱H(工場) +Decorative Pillar A (Stone)|装飾柱A(石) +Decorative Pillar B (Stone)|装飾柱B(石) +Decorative Pillar C (Temple)|装飾柱C(遺跡) +Decorative Pillar D (Rock Cave)|装飾柱D(岩洞窟) +Decorative Pillar E (Demon Castle)|装飾柱E(魔王城) +Decorative Pillar F (Fort)|装飾柱F(砦) +Decorative Pillar G (Dirt Cave)|装飾柱G(土洞窟) +Decorative Pillar H (Factory)|装飾柱H(工場) +Decorative Pillar A (Stone, Ruins)|装飾柱A(石・廃墟) +Decorative Pillar B (Stone, Ruins)|装飾柱B(石・廃墟) +Decorative Pillar C (Temple, Ruins)|装飾柱C(遺跡・廃墟) +Decorative Pillar D (Rock Cave, Ruins)|装飾柱D(岩洞窟・廃墟) +Decorative Pillar E (Demon Castle, Ruins)|装飾柱E(魔王城・廃墟) +Decorative Pillar F (Fort, Ruins)|装飾柱F(砦・廃墟) +Decorative Pillar G (Dirt Cave, Ruins)|装飾柱G(土洞窟・廃墟) +Decorative Pillar A (Stone, Front, Ruins)|装飾柱A(石・手前・廃墟) +Decorative Pillar A (Stone, Ruins)|装飾柱A(石・廃墟) +Decorative Pillar B (Stone, Ruins)|装飾柱B(石・廃墟) +Decorative Pillar C (Temple, Ruins)|装飾柱C(遺跡・廃墟) +Decorative Pillar D (Rock Cave, Ruins)|装飾柱D(岩洞窟・廃墟) +Decorative Pillar E (Demon Castle, Ruins)|装飾柱E(魔王城・廃墟) +Decorative Pillar F (Fort, Ruins)|装飾柱F(砦・廃墟) +Decorative Pillar G (Dirt Cave, Ruins)|装飾柱G(土洞窟・廃墟) +Decorative Pillar D (Rock Cave, Front, Ruins)|装飾柱F(岩洞窟・手前・廃墟) +Decorative Pillar A (Stone, Ruins)|装飾柱A(石・廃墟) +Decorative Pillar B (Stone, Ruins)|装飾柱B(石・廃墟) +Decorative Pillar C (Temple, Ruins)|装飾柱C(遺跡・廃墟) +Decorative Pillar D (Rock Cave, Ruins)|装飾柱D(岩洞窟・廃墟) +Decorative Pillar E (Demon Castle, Ruins)|装飾柱E(魔王城・廃墟) +Decorative Pillar F (Fort, Ruins)|装飾柱F(砦・廃墟) +Decorative Pillar G (Dirt Cave, Ruins)|装飾柱G(土洞窟・廃墟) +Decorative Pillar F (Fort, Front, Ruins)|装飾柱F(砦・手前・廃墟) +Decorative Pillar A (Stone, Front)|装飾柱A(石・手前) +Decorative Pillar B (Stone, Front)|装飾柱B(石・手前) +Decorative Pillar C (Temple, Front)|装飾柱C(神殿・手前) +Decorative Pillar D (Rock Cave, Front)|装飾柱D(岩洞窟・手前) +Decorative Pillar E (Demon Castle, Front)|装飾柱E(魔王城・手前) +Decorative Pillar F (Fort, Front)|装飾柱F(砦・手前) +Decorative Pillar G (Dirt Cave, Front)|装飾柱G(土洞窟・手前) +Decorative Pillar H (Factory, Front)|装飾柱H(工場・手前) +Gate A|門A +Gate A|門A +Gate A|門A +Gate B|門B +Gate B|門B +Gate B|門B +Decorative Pillar I (Demonic)|装飾柱I(悪魔) +Decorative Pillar I (Demonic, Ruins)|装飾柱I(悪魔・廃墟) +Gate A|門A +Gate A|門A +Gate A|門A +Gate B|門B +Gate B|門B +Gate B|門B +Decorative Pillar I (Demonic)|装飾柱I(悪魔) +Decorative Pillar I (Demonic, Ruins)|装飾柱I(悪魔・廃墟) +Gate A|門A +Gate A|門A +Gate A|門A +Gate B|門B +Gate B|門B +Gate B|門B +Coffin A (Right)|棺A(右) +Coffin A (Right)|棺A(右) +Hexagram|魔法陣 +Hexagram|魔法陣 +Hexagram|魔法陣 +Hexagram (Lit)|魔法陣(光) +Hexagram (Lit)|魔法陣(光) +Hexagram (Lit)|魔法陣(光) +Coffin B (Top)|棺B(上) +Coffin C (Bottom)|棺C(下) +Hexagram|魔法陣 +Hexagram|魔法陣 +Hexagram|魔法陣 +Hexagram (Lit)|魔法陣(光) +Hexagram (Lit)|魔法陣(光) +Hexagram (Lit)|魔法陣(光) +Coffin B (Top)|棺B(上) +Coffin C (Bottom)|棺C(下) +Hexagram|魔法陣 +Hexagram|魔法陣 +Hexagram|魔法陣 +Hexagram (Lit)|魔法陣(光) +Hexagram (Lit)|魔法陣(光) +Hexagram (Lit)|魔法陣(光) +Coffin D (Left)|棺D(左) +Coffin D (Left)|棺D(左) +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Rails (Ruins)|線路(廃墟) +Rails (Ruins)|線路(廃墟) +Rails (Ruins)|線路(廃墟) +Rails (Ruins)|線路(廃墟) +Rails|線路 +Railroad Ties A|枕木A +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Railroad Ties B|枕木B +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Rails|線路 +Mural A|壁画A +Hieroglyph|ヒエログリフ +Hieroglyph|ヒエログリフ +Large Mural A|大きな壁画A +Large Mural A|大きな壁画A +Large Mural A|大きな壁画A +Bed|ベッド +Bed (Ruins)|ベッド(廃墟) +Mural B|壁画B +Hieroglyph|ヒエログリフ +Hieroglyph|ヒエログリフ +Large Mural B|大きな壁画B +Large Mural B|大きな壁画B +Large Mural B|大きな壁画B +Bed|ベッド +Bed (Ruins)|ベッド(廃墟) +Middle Window A|中型窓A +Middle Window B|中型窓B +Middle Window C|中型窓C +Middle Window D (Ruins)|中型窓窓D(廃墟) +Window (Demon Castle)|窓(魔王城) +Table|テーブル +Cheap Bed|粗末なベッド +Straw Bed|むしろの寝床 +Middle Window A|中型窓A +Middle Window B|中型窓B +Middle Window C|中型窓C +Middle Window D (Ruins)|中型窓窓D(廃墟) +Window (Demon Castle)|窓(魔王城) +Stool|椅子 +Cheap Bed|粗末なベッド +Straw Bed|むしろの寝床 +Large Window A|大型窓A +Large Window B|大型窓B +Large Window C|大型窓C +Stained Glass Window|ステンドグラス +Large Window D|大型窓D +Window A|窓A +Window B|窓B +Window C|窓C +Large Window A|大型窓A +Large Window B|大型窓B +Large Window C|大型窓C +Stained Glass Window|ステンドグラス +Large Window D|大型窓D +Window A|窓A +Window B|窓B +Window C|窓C +Chest A|チェストA +Cabinet|キャビネット +Closet|クローゼット +Chest of Drawers|タンス +Dish Cabinet|食器棚 +Wine Rack|ワインセラー +Bottle Shelf A|ボトル棚A +Bottle Shelf B|ボトル棚B +Chest B|チェストB +Chest C|チェストC +Closet|クローゼット +Chest of Drawers|タンス +Dish Cabinet|食器棚 +Wine Rack|ワインセラー +Bottle Shelf A|ボトル棚A +Bottle Shelf B|ボトル棚B +Tipped Shelf|倒れた棚 +Sundries Shelf A|雑貨棚A +Sundries Shelf A|雑貨棚A +Sundries Shelf B|雑貨棚B +Medicine Shelf|薬品棚 +Bookshelf A|本棚A +Bookshelf B|本棚B +Bookshelf B|本棚B +Tipped Shelf|倒れた棚 +Sundries Shelf A|雑貨棚A +Sundries Shelf A|雑貨棚A +Sundries Shelf B|雑貨棚B +Medicine Shelf|薬品棚 +Bookshelf A|本棚A +Bookshelf B|本棚B +Bookshelf B|本棚B +Curtains A|カーテンA +Curtains B|カーテンB +Curtains C|カーテンC +Curtains D|カーテンD +Curtains A (Ruins)|カーテンA(廃墟) +Curtains B (Ruins)|カーテンB(廃墟) +Curtains C (Ruins)|カーテンC(廃墟) +Curtains D (Ruins)|カーテンD(廃墟) +Curtains A|カーテンA +Curtains B|カーテンB +Curtains C|カーテンC +Curtains D|カーテンD +Curtains A (Ruins)|カーテンA(廃墟) +Curtains B (Ruins)|カーテンB(廃墟) +Curtains C (Ruins)|カーテンC(廃墟) +Curtains D (Ruins)|カーテンD(廃墟) +Clock|時計 +Mirror|鏡 +Clock (Ruins)|時計(廃墟) +Mirror (Ruins)|鏡(廃墟) +Stacked Crates|積まれた木箱 +Stacked Crates|積まれた木箱 +Tapestry A|タペストリーA +Tapestry A (Ruins)|タペストリーA(廃墟) +Clock|時計 +Mirror|鏡 +Clock (Ruins)|時計(廃墟) +Mirror (Ruins)|鏡(廃墟) +Stacked Crates|積まれた木箱 +Stacked Crates|積まれた木箱 +Tapestry A|タペストリーA +Tapestry A (Ruins)|タペストリーA(廃墟) +Chair A (Wood)|背もたれ椅子A(木製) +Chair B (Stone)|背もたれ椅子B(石) +Throne A|玉座A +Throne A|玉座A +Throne A|玉座A +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Chair A (Wood)|背もたれ椅子A(木製) +Chair B (Stone)|背もたれ椅子B(石) +Throne A|玉座A +Throne A|玉座A +Throne A|玉座A +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) diff --git a/img/tilesets/Inside_A1.png b/img/tilesets/Inside_A1.png new file mode 100644 index 0000000..6ec6677 Binary files /dev/null and b/img/tilesets/Inside_A1.png differ diff --git a/img/tilesets/Inside_A1.txt b/img/tilesets/Inside_A1.txt new file mode 100644 index 0000000..1bc6f2b --- /dev/null +++ b/img/tilesets/Inside_A1.txt @@ -0,0 +1,16 @@ +Canal A|水路A +Deep Canal|深い水路 +Lotus Pads (Flowers)|蓮の葉(花) +Junk|ゴミ +Pool A (Stone Lined)|水場A(石の縁) +Waterfall A (Stone Wall)|滝A(石壁) +Pool B (Wood Lined)|水場B(木の縁) +Waterfall B (Stone Wall)|滝B(石壁) +Canal B|水路B +Waterfall C (Stone Wall)|滝C(石壁) +Pool C (Stone Lined)|水場C(石の縁) +Waterfall D (Stone Wall)|滝D(石壁) +Bathing Spot|水浴び場 +Waterfall E (Dirt Wall)|滝E(土壁) +Open Bath|露天風呂 +Waterfall F (Demon Castle)|滝F(魔王城) diff --git a/img/tilesets/Inside_A2.png b/img/tilesets/Inside_A2.png new file mode 100644 index 0000000..77b8c0a Binary files /dev/null and b/img/tilesets/Inside_A2.png differ diff --git a/img/tilesets/Inside_A2.txt b/img/tilesets/Inside_A2.txt new file mode 100644 index 0000000..6adec05 --- /dev/null +++ b/img/tilesets/Inside_A2.txt @@ -0,0 +1,32 @@ +Wood Floor A|木の床A +Cobblestones A|石畳A +Rug A|じゅうたんA +Straw Mat|ござ +Hole A (Wood Floor)|穴A(木の床) +Raised Stone A|石段A +Ground Cracks|床のひび割れ +Table A|テーブルA +Wood Floor B|木の床B +Cobblestones B|石畳B +Rug B|じゅうたんB +Rug C|じゅうたんC +Hole B (Wood Floor)|穴B(木の床) +Raised Stone B|石段B +Soil on Ground|床の汚れ +Table B|テーブルB +Cobblestones C|石畳C +Cobblestones D|石畳D +Rug D|じゅうたんD +Demon Castle Floor|魔王城の床 +Hole C (Stone Floor)|穴C(石の床) +Raised Stone C|石段C +Moss on Ground|床の苔 +Table C|テーブルC +Cobblestones E|石畳E +Cobblestones F|石畳F +Rug E|じゅうたんE +Rug F|じゅうたんF +Hole D|穴D +Raised Stone D|石段D +Wire mesh|金網 +Table D|テーブルD diff --git a/img/tilesets/Inside_A4.png b/img/tilesets/Inside_A4.png new file mode 100644 index 0000000..5e37e44 Binary files /dev/null and b/img/tilesets/Inside_A4.png differ diff --git a/img/tilesets/Inside_A4.txt b/img/tilesets/Inside_A4.txt new file mode 100644 index 0000000..d43c249 --- /dev/null +++ b/img/tilesets/Inside_A4.txt @@ -0,0 +1,48 @@ +Wall A (Stone)|壁A(石) +Wall B (Brick)|壁B(レンガ) +Wall C (Brick)|壁C(レンガ) +Wall D (Stone)|壁D(石) +Wall E (Stone)|壁E(石) +Wall F (Castle)|壁F(城) +Wall G (Fort)|壁G(砦) +Wall H (Demon Castle)|壁H(魔王城) +Wall A (Stone)|壁A(石) +Wall B (Brick)|壁B(レンガ) +Wall C (Brick)|壁C(レンガ) +Wall D (Stone)|壁D(石) +Wall E (Stone)|壁E(石) +Wall F (Castle)|壁F(城) +Wall G (Fort)|壁G(砦) +Wall H (Demon Castle)|壁H(魔王城) +Wall I (Wood)|壁I(木造) +Wall J (Log)|壁J(丸太) +Wall K (Wood)|壁K(木造) +Interior Wall A (Wood)|内装壁A(木造) +Interior Wall (Stone)|内装壁B(石) +Wall L (Stone)|壁L(石) +Wall M (Marble)|壁M(大理石) +Wall N (Concrete)|壁N(コンクリート) +Wall I (Wood)|壁I(木造) +Wall J (Log)|壁J(丸太) +Wall K (Wood)|壁K(木造) +Interior Wall A (Wood)|内装壁A(木造) +Interior Wall (Stone)|内装壁B(石) +Wall L (Stone)|壁L(石) +Wall M (Marble)|壁M(大理石) +Wall N (Concrete)|壁N(コンクリート) +Interior Wall C (Stone)|内装壁C(石) +Interior Wall D (Brick)|内装壁D(レンガ) +Interior Wall E (Stone)|内装壁E(石) +Interior Wall F (Desert)|内装壁F(砂漠風) +Interior Wall G (Mansion)|内装壁G(豪邸) +Interior Wall H (Temple)|内装壁H(神殿) +Wall O (Tent)|壁O(テント) +Wall P (Stage)|壁P(舞台) +Interior Wall C (Stone)|内装壁C(石) +Interior Wall D (Brick)|内装壁D(レンガ) +Interior Wall E (Stone)|内装壁E(石) +Interior Wall F (Desert)|内装壁F(砂漠風) +Interior Wall G (Mansion)|内装壁G(豪邸) +Interior Wall H (Temple)|内装壁H(神殿) +Wall O (Tent)|壁O(テント) +Wall P (Stage)|壁P(舞台) diff --git a/img/tilesets/Inside_A5.png b/img/tilesets/Inside_A5.png new file mode 100644 index 0000000..fd7890d Binary files /dev/null and b/img/tilesets/Inside_A5.png differ diff --git a/img/tilesets/Inside_A5.txt b/img/tilesets/Inside_A5.txt new file mode 100644 index 0000000..2fef89d --- /dev/null +++ b/img/tilesets/Inside_A5.txt @@ -0,0 +1,129 @@ +Darkness|暗闇 +Wire Mesh|金網 +Stone Bridge (V, Left)|石の橋(縦・左) +Stone Bridge (V Center)|石の橋(縦・中央) +Stone Bridge (V, Riight)|石の橋(縦・右) +Stone Bridge (H, Top)|石の橋(横・上) +Stone Bridge (H Center)|石の橋(横・中央) +Broken Bridge (H, Top)|壊れた橋(横・上) +Transparent|透明 +Wire Mesh|金網 +Broken Bridge (V, Left)|壊れた橋(縦・左) +Broken Bridge (V Center)|壊れた橋(縦・中央) +Broken Bridge (V, Riight)|壊れた橋(縦・右) +Stone Bridge (H, Bottom)|石の橋(横・下) +Broken Bridge (H Center)|壊れた橋(横・中央) +Broken Bridge (H, Bottom)|壊れた橋(横・下) +Wood Floor A|木の床A +Wood Floor B|木の床B +Wood Floor C|木の床C +Wood Floor D|木の床D +Cobblestones A|石畳A +Cobblestones B|石畳B +Cobblestones C|石畳C +Cobblestones D|石畳D +Ledge A (Wood)|段差A(木製) +Ledge B (Wood)|段差B(木製) +Ledge C (Log)|段差C(丸太) +Ledge D (Log)|段差D(丸太) +Ledge E (Brick)|段差E(レンガ) +Ledge F (Stone)|段差F(石) +Ledge G (Stone)|段差G(石) +Ledge H (Stone)|段差H(石) +Cobblestones E|石畳E +Cobblestones F|石畳F +Wood Floor E|木の床E +Wood Floor F|木の床F +Cobblestones G|石畳G +Cobblestones H|石畳H +Cobblestones I|石畳I +Cobblestones J|石畳J +Ledge I (Brick)|段差I(レンガ) +Ledge J (Castle)|段差J(城) +Ledge K (Fort)|段差K(砦) +Ledge L (Wood)|段差L(木製) +Ledge M (Stone)|段差M(石) +Ledge N (Stone)|段差N(石) +Ledge O (Marble)|段差O(大理石) +Ledge P (Stone)|段差P(石) +Interior Floor A (Wood)|内装床A(木製) +Interior Floor B (Brick)|内装床B(レンガ) +Interior Floor C (Temple)|内装床C(神殿) +Interior Floor D (Stone)|内装床D(石) +Interior Floor E (Demon Castle)|内装床E(魔王城) +Interior Floor F (Tent)|内装床F(テント) +Interior Floor G (Concrete)|内装床G(コンクリート) +Interior Floor H (Dirt)|内装床H(土) +Ledge Q (Wood)|段差Q(木製) +Ledge R (Desert)|段差R(砂漠風) +Ledge S (Temple)|段差S(神殿) +Ledge T (Stone)|段差T(石) +Ledge U (Demon Castle)|段差U(魔界城) +Ledge V (Tent)|段差V(テント) +Ledge W (Concrete)|段差W(コンクリート) +Ledge X (Dirt)|段差X(土) +Stairs A (Wood, Left)|階段A(木製・左) +Stairs A (Wood, Center)|階段A(木製・中央) +Stairs A (Wood)|階段A(木製・右) +Stairs A (Wood)|階段A(木製) +Stairs B (Stone, Left)|階段B(石・左) +Stairs B (Stone, Center)|階段B(石・中央) +Stairs B (Stone, Right)|階段B(石・右) +Stairs B (Stone)|階段B(石) +Stairs C (Stone, Left)|階段C(石・左) +Stairs C (Stone, Center)|階段C(石・中央) +Stairs C (Stone, Right)|階段C(石・右) +Stairs C (Stone)|階段C(石) +Stairs C (Stone, Ruins, Left)|階段C(石・廃墟・左) +Stairs C (Stone, Ruins, Center)|階段C(石・廃墟・中央) +Stairs C (Stone, Ruins, Right)|階段C(石・廃墟・右) +Stairs C (Stone, Ruins)|階段C(石・廃墟) +Stairs D (Carpet, Left)|階段D(じゅうたん・左) +Stairs D (Carpet, Center)|階段D(じゅうたん・中央) +Stairs D (Carpet, Right)|階段D(じゅうたん・右) +Stairs D (Carpet)|階段D(じゅうたん) +Stairs E (Carpet, Left)|階段E(じゅうたん・左) +Stairs E (Carpet, Center)|階段E(じゅうたん・中央) +Stairs E (Carpet, Right)|階段E(じゅうたん・右) +Stairs E (Carpet)|階段E(じゅうたん) +Wood Floor A (Ruins)|木の床A(廃墟) +Wood Floor B (Ruins)|木の床B(廃墟) +Wood Floor C (Ruins)|木の床C(廃墟) +Wood Floor D (Ruins)|木の床D(廃墟) +Cobblestones A (Ruins)|石畳A(廃墟) +Cobblestones B (Ruins)|石畳B(廃墟) +Cobblestones C (Ruins)|石畳C(廃墟) +Cobblestones D (Ruins)|石畳D(廃墟) +Cobblestones E (Ruins)|石畳E(廃墟) +Cobblestones F (Ruins)|石畳F(廃墟) +Wood Floor E (Ruins)|木の床E(廃墟) +Wood Floor F (Ruins)|木の床F(廃墟) +Cobblestones G (Ruins)|石畳G(廃墟) +Cobblestones H (Ruins)|石畳H(廃墟) +Cobblestones I (Ruins)|石畳I(廃墟) +Cobblestones J (Ruins)|石畳J(廃墟) +Interior Floor A (Wood, Ruins)|内装床A(木製・廃墟) +Interior Floor B (Brick, Ruins)|内装床B(レンガ・廃墟) +Interior Floor C (Temple, Ruins)|内装床C(神殿・廃墟) +Interior Floor D (Stone, Ruins)|内装床D(石・廃墟) +Interior Floor E (Demon Castle, Ruins)|内装床E(魔王城・廃墟) +Interior Floor F (Concrete, Ruins)|内装床F(コンクリート・廃墟) +Interior Floor G (Tent, Ruins)|内装床G(テント・廃墟) +Interior Floor H (Dirt, Ruins)|内装床H(土・廃墟) +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile B|大きなレリーフ床B +Large Relief Floor Tile B|大きなレリーフ床B +Relief Floor Tile A (Silver)|レリーフ床A(銀) +Relief Floor Tile B (Silver)|レリーフ床B(銀) +Relief Floor Tile C (Gold)|レリーフ床C(金) +Relief Floor Tile D (Gold)|レリーフ床D(金) +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile B|大きなレリーフ床B +Large Relief Floor Tile B|大きなレリーフ床B +Relief Floor Tile E (Silver, Ruins)|レリーフ床E(銀・廃墟) +Relief Floor Tile F (Silver)|レリーフ床F(銀) +Relief Floor Tile G (Gold, Ruins)|レリーフ床G(金・廃墟) +Relief Floor Tile H (Gold)|レリーフ床H(金) + diff --git a/img/tilesets/Inside_B.png b/img/tilesets/Inside_B.png new file mode 100644 index 0000000..0bdd7d5 Binary files /dev/null and b/img/tilesets/Inside_B.png differ diff --git a/img/tilesets/Inside_B.txt b/img/tilesets/Inside_B.txt new file mode 100644 index 0000000..e697aa4 --- /dev/null +++ b/img/tilesets/Inside_B.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Stairs A (Up)|階段A(上り) +Stairs B (Up)|階段B(上り) +Stairs C (Up)|階段C(上り) +Stairs D (Up)|階段D(上り) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Hole|穴 +Stairs A (Down)|階段A(下り) +Stairs B (Down)|階段B(下り) +Stairs C (Down)|階段C(下り) +Stairs D (Down)|階段D(下り) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Middle Window A|中型窓A +Middle Window B|中型窓B +Middle Window C|中型窓C +Middle Window D (Ruins)|中型窓D(廃墟) +Window (Demon Castle)|窓(魔王城) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Middle Window A|中型窓A +Middle Window B|中型窓B +Middle Window C|中型窓C +Middle Window D (Ruins)|中型窓D(廃墟) +Window (Demon Castle)|窓(魔王城) +Hole A (Metal Ladder)|穴A(鉄ばしご) +Hole B (Rope Ladder)|穴B(縄ばしご) +Hole C (Rope)|穴C(ロープ) +Large Window A|大型窓A +Large Window B|大型窓B +Large Window C|大型窓C +Stained Glass Window|ステンドグラス +Large Window D|大型窓D +Window A|窓A +Window B|窓B +Window C|窓C +Large Window A|大型窓A +Large Window B|大型窓B +Large Window C|大型窓C +Stained Glass Window|ステンドグラス +Large Window D|大型窓D +Window A|窓A +Window B|窓B +Window C|窓C +Chest A|チェストA +Cabinet|キャビネット +Closet|クローゼット +Chest of Drawers|タンス +Dish Cabinet|食器棚 +Wine Rack|ワインセラー +Bottle Shelf A|ボトル棚A +Bottle Shelf B|ボトル棚B +Chest B|チェストB +Chest C|チェストC +Closet|クローゼット +Chest of Drawers|タンス +Dish Cabinet|食器棚 +Wine Rack|ワインセラー +Bottle Shelf A|ボトル棚A +Bottle Shelf B|ボトル棚B +Bread Shelf|パン棚 +Sundries Shelf A|雑貨棚A +Sundries Shelf A|雑貨棚A +Sundries Shelf B|雑貨棚B +Medicine Shelf|薬品棚 +Bookshelf A|本棚A +Bookshelf B|本棚B +Bookshelf B|本棚B +Bread Shelf|パン棚 +Sundries Shelf A|雑貨棚A +Sundries Shelf A|雑貨棚A +Sundries Shelf B|雑貨棚B +Medicine Shelf|薬品棚 +Bookshelf A|本棚A +Bookshelf B|本棚B +Bookshelf B|本棚B +Bed|ベッド +Large Bed|ダブルベッド +Large Bed|ダブルベッド +Cheap Bed A|粗末なベッドA +Cheap Bed B|粗末なベッドB +Straw Bed|むしろの寝床 +Bed (Ruins)|ベッド(廃墟) +Tipped Shelf|倒れた棚 +Bed|ベッド +Large Bed|ダブルベッド +Large Bed|ダブルベッド +Cheap Bed A|粗末なベッドA +Cheap Bed B|粗末なベッドB +Straw Bed|むしろの寝床 +Bed (Ruins)|ベッド(廃墟) +Tipped Shelf|倒れた棚 +Table A|テーブルA +Table B|テーブルB +Table C|テーブルC +Fortuneteller's Table A|占い台A +Mini Table A|ミニテーブルA +Piano|ピアノ +Piano|ピアノ +Piano|ピアノ +Stool A|椅子A +Stool B|椅子B +Stool C|椅子C +Fortuneteller's Table B (Crystal)|占い台B(水晶) +Mini Table B (Flower)|ミニテーブルB(花瓶) +Piano|ピアノ +Piano|ピアノ +Piano|ピアノ +Oven|かまど +Sink|流し +Kitchen Counter A|調理台A +Kitchen Counter B|調理台B +Dresser|ドレッサー +Pipe Organ|パイプオルガン +Pipe Organ|パイプオルガン +Pipe Organ|パイプオルガン +Simple Shelf A|簡易棚A +Simple Shelf B (Jars)|簡易棚B(瓶) +Simple Shelf C (Books)|簡易棚C(本) +Simple Shelf D (Sacks)|簡易棚D(袋) +Simple Shelf E (Bottles)|簡易棚E(ボトル) +Pipe Organ|パイプオルガン +Pipe Organ|パイプオルガン +Pipe Organ|パイプオルガン +Large Fireplace|大きな暖炉 +Large Fireplace|大きな暖炉 +Large Fireplace|大きな暖炉 +Fireplace A (Stone)|暖炉A(石) +Fireplace B (Brick)|暖炉B(レンガ) +Fireplace C (Iron)|暖炉C(鉄) +Tapestry A|タペストリーA +Tapestry A (Ruins)|タペストリーA(廃墟) +Large Fireplace|大きな暖炉 +Large Fireplace|大きな暖炉 +Large Fireplace|大きな暖炉 +Fireplace A (Stone)|暖炉A(石) +Fireplace B (Brick)|暖炉B(レンガ) +Fireplace C (Iron)|暖炉C(鉄) +Tapestry A|タペストリーA +Tapestry A (Ruins)|タペストリーA(廃墟) +Curtains A|カーテンA +Curtains B|カーテンB +Curtains C|カーテンC +Curtains D|カーテンD +Curtains A (Ruins)|カーテンA(廃墟) +Curtains B (Ruins)|カーテンB(廃墟) +Curtains C (Ruins)|カーテンC(廃墟) +Curtains D (Ruins)|カーテンD(廃墟) +Curtains A|カーテンA +Curtains B|カーテンB +Curtains C|カーテンC +Curtains D|カーテンD +Curtains A (Ruins)|カーテンA(廃墟) +Curtains B (Ruins)|カーテンB(廃墟) +Curtains C (Ruins)|カーテンC(廃墟) +Curtains D (Ruins)|カーテンD(廃墟) +Clock|時計 +Mirror|鏡 +Posted Notice|貼り紙 +Posted Notice (Ruins)|貼り紙(廃墟) +World Map|世界地図 +World Map|世界地図 +Painting|絵画 +Painting|絵画 +Clock|時計 +Mirror|鏡 +Stone Tablet|石版 +Stone Tablet (Ruins)|石版(廃墟) +Portrait A|肖像画A +Portrait B|肖像画B +Painting A|絵画A +Painting B|絵画B +Chair A (Wood)|背もたれ椅子A(木製) +Chair B (Stone)|背もたれ椅子B(石) +Throne A|玉座A +Throne A|玉座A +Throne A|玉座A +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Chair A (Wood)|背もたれ椅子A(木製) +Chair B (Stone)|背もたれ椅子B(石) +Throne A|玉座A +Throne A|玉座A +Throne A|玉座A +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Throne B (Demon Castle)|玉座B(魔王城) +Shield|盾 +Swords A|剣A +Swords B|剣B +Entrance A|入口A +Entrance A (Extend)|入口A(延長部分) +Entrance A (Top Half A)|入口A(上半分A)S +Entrance B|入口B +Entrance A (Top Half B)|入口A(上半分B) +Pot A|壺A +Pot B|壺B +Pot C (Ruins)|壺C(廃墟) +Table A (Ruins)|テーブルA(廃墟) +Stone Pillar A|石の柱A +Stone Pillar B|石の柱B +Fort Pillar|砦の柱 +Rubble|瓦礫 +Basin|桶 +Barrel |樽 +Barrel (Ruins)|樽(廃墟) +Stool (Ruins)|椅子(廃墟) +Stone Pillar A|石の柱A +Stone Pillar B|石の柱B +Fort Pillar|砦の柱 +Rubble|瓦礫 +Basin|桶 +Tub A|たらいA +Tub B|たらいB +Crate A (Ruins)|木箱A(廃墟) +Broken Stone Pillar A|折れた石の柱A +Broken Stone Pillar B|折れた石の柱B +Broken Fort Pillar|折れた砦の柱 +Scrap Wood|端材 +Crate B|木箱B +Crate C|木箱C +Stacked Crates|積まれた木箱 +Stacked Crates|積まれた木箱 +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Fissures D|亀裂D +Crate D|木箱D +Crate E|木箱E +Stacked Crates|積まれた木箱 +Stacked Crates|積まれた木箱 +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Fissures D|亀裂D +Crate F|木箱F +Crate G|木箱G +Sacks C|麻袋C +Large Crate|大きな木箱 +Jail Bar|鉄格子 +Jail Bar|鉄格子 +Jail Bar|鉄格子 +Jail Bar|鉄格子 +Sack A|麻袋A +Sack B|麻袋B +Sacks C|麻袋C +Large Crate|大きな木箱 +Jail Bar|鉄格子 +Jail Bar|鉄格子 +Jail Bar|鉄格子 +Jail Bar|鉄格子 diff --git a/img/tilesets/Inside_C.png b/img/tilesets/Inside_C.png new file mode 100644 index 0000000..5ffb3ec Binary files /dev/null and b/img/tilesets/Inside_C.png differ diff --git a/img/tilesets/Inside_C.txt b/img/tilesets/Inside_C.txt new file mode 100644 index 0000000..8dc2ad5 --- /dev/null +++ b/img/tilesets/Inside_C.txt @@ -0,0 +1,256 @@ +Cup & Teapot A (Bottom)|カップとポットA(下) +Cup & Teapot B (Top)|カップとポットB(上) +Cup & Teapot C (Left)|カップとポットC(左) +Cup & Teapot D (Right)|カップとポットD(右) +Cup A (Bottom)|カップA(下) +Cup B (Top)|カップB(上) +Cup C (Left)|カップC(左) +Cup D (Right)|カップD(右) +Glass & Bottle A (Bottom)|グラスとボトルA(下) +Glass & Bottle B (Top)|グラスとボトルB(上) +Glass & Bottle C (Left)|グラスとボトルC(左) +Glass & Bottle D (Right)|グラスとボトルD(右) +Glass A (Bottom)|グラスA(下) +Glass B (Top)|グラスB(上) +Glass C (Left)|グラスC(左) +Glass D (Right)|グラスD(右) +Pint Mug & Ale Bottle A (Bottom)|ジョッキと瓶A(下) +Pint Mug & Ale Bottles B (Top)|ジョッキと瓶B(上) +Pint Mug & Ale Bottles C (Left)|ジョッキと瓶C(左) +Pint Mug & Ale Bottle D (Right)|ジョッキと瓶D(右) +Pint Mug A (Bottom)|ジョッキA(下) +Pint Mug B (Top)|ジョッキB(上) +Pint Mug C (Left)|ジョッキC(左) +Pint Mug D (Right)|ジョッキD(右) +Teapot|ポット +Bottle A|ボトルA +Bottles B|ボトルB +Bottles C|ボトルC +Broken Bottle|割れたボトル +Ale Bottle A|瓶A +Ale Bottles B|瓶B +Ale Bottles C|瓶C +Meal (Fish)|魚料理 +Meal (Meat)|肉料理 +Side Dishes|副菜 +Fruit Bowl|フルーツ盛り合わせ +Roast Pig|丸焼き +Cake|ケーキ +Pizza|ピザ +Meal (Fish)|魚料理 +Dinner Set A (Bottom)|夕食セットA(下) +Dinner Set B (Top)|夕食セットB(上) +Dinner Set C (Left)|夕食セットC(左) +Dinner Set D (Right)|夕食セットD(右) +Pie|パイ +Fried Rice|チャーハン +Mystery Dishes|謎の料理 +Cooking Disaster|失敗料理 +Breakfast Set A (Bottom)|朝食セットA(下) +Breakfast Set B (Top)|朝食セットB(上) +Breakfast Set C (Left)|朝食セットC(左) +Breakfast Set D (Right)|朝食セットD(右) +Plate A|皿A +Bowl|ボウル +Plates B|皿B +Plates C|皿C +Closed Book A (Bottom)|閉じた本A(下) +Closed Book B (Top)|閉じた本B(上) +Closed Book C (Left)|閉じた本C(左) +Closed Book D (Right)|閉じた本D(右) +Open Book A (Bottom)|開いた本A(下) +Open Book B (Top)|開いた本B(上) +Open Book C (Left)|開いた本C(左) +Open Book D (Right)|開いた本D(右) +Closed Old Book A (Bottom)|閉じた古文書A(下) +Closed Old Book B (Top)|閉じた古文書B(上) +Closed Old Book C (Left)|閉じた古文書C(左) +Closed Old Book D (Right)|閉じた古文書D(右) +Open Old Book A (Bottom)|開いた古文書A(下) +Open Old Book B (Top)|開いた古文書B(上) +Open Old Book C (Left)|開いた古文書C(左) +Open Old Book D (Right)|開いた古文書D(右) +Notes & Pen A (Bottom)|メモとペンA(下) +Notes & Pen B (Top)|メモとペンB(上) +Notes & Pen C (Left)|メモとペンC(左) +Notes & Pen D (Right)|メモとペンD(右) +Map A (Bottom)|地図A(下) +Map B (Top)|地図B(上) +Map C (Left)|地図C(左) +Map D (Right)|地図D(右) +Envelope & Letter|封筒と便箋 +Envelope|封筒 +Scrolls A|巻物A +Scrolls B|巻物B +Vase|花瓶 +Potted Plant A|植木鉢A +Potted Plant B|植木鉢B +Planter|プランター +Case A|ケースA +Case B|ケースB +Letter Case|レターケース +Cutting Board|まな板 +Small Box A|小箱A +Small Box B|小箱B +Small Box C|小箱C +Small Box D|小箱D +Sack A|袋A +Sacks B|袋B +Sacks C|袋C +Medicine Bottle A|薬瓶A +Medicine Bottles B|薬瓶B +Medicine Bottles C|薬瓶C +Potion A|液体入り瓶A +Potions B|液体入り瓶B +Basket A|バスケットA +Basket B|バスケットB +Basket C|バスケットC +Basket D|バスケットD +Rugs A|じゅうたんA +Rugs B|じゅうたんB +Rugs C|じゅうたんC +Lab Equipment|実験器具 +Stuffed Doll A|ぬいぐるみA +Stuffed Doll B|ぬいぐるみB +Stuffed Doll C|ぬいぐるみC +Stuffed Doll D|ぬいぐるみD +Doll A|人形A +Doll B|人形B +Gifts A|プレゼントA +Gifts B|プレゼントB +Shovel|スコップ +Pickax|つるはし +Rope A|ロープA +Rope B|ロープB +Pendant|ペンダント +Jewelry Case A|宝石ケースA +Necklace|ネックレス +Jewelry Case B|宝石ケースB +Sword A|剣A +Swords B|剣B +Swords C|剣C +Axes|斧 +Spears A|槍A +Spears B|槍B +Whip|鞭 +Knives|短剣 +Cooking Utensils|調理器具 +Dry Flowers|ドライフラワー +Shield A|盾A +Shield B|盾B +Men's Clothing A (Hanging)|男物の服A(壁掛け) +Men's Clothing B (Hanging)|男物の服B(壁掛け) +Women's Clothing A (Hanging)|女物の服A(壁掛け) +Women's Clothing B (Hanging)|女物の服B(壁掛け) +Sword Rack A|剣掛台A +Sword Rack B|剣掛台B +Hammers|ハンマー +Bows & Arrows|弓矢 +Blacksmith's Table A|金床A +Blacksmith's Table B|金床B +Large Basin|水桶 +Scrap Metal|鉄くず +Helmet A|兜A +Helmet B|兜B +Helmet C|兜C +Hat A (Stand)|帽子A(スタンド) +Hat B (Stand)|帽子B(スタンド) +Hat C (Stand)|帽子C(スタンド) +Women's Clothing (Stand)|女物の服(スタンド) +Dress (Stand)|ドレス(スタンド) +Armor A (Stand)|鎧A(スタンド) +Armor B (Stand)|鎧B(スタンド) +Armor C (Stand)|鎧C(スタンド) +Armor D (Stand)|鎧D(スタンド) +Men's Clothing (Stand)|男物の服(スタンド) +Cape (Stand)|マント(スタンド) +Robe A (Stand)|ローブA(スタンド) +Robe B (Stand)|ローブB(スタンド) +Church Symbol|教会のシンボル +Angel Statue A|天使像A +Angel Statue B|天使像B +Goddess Statue|女神像 +Statue|石像 +Dais|台座 +Repository of Swords|剣立て +Repository of Spears|槍立て +Church Symbol|教会のシンボル +Angel Statue A|天使像A +Angel Statue B|天使像B +Goddess Statue|女神像 +Statue|石像 +Broken Statue|壊れた像 +Repository of Swords|剣立て +Repository of Spears|槍立て +Church Table A|教会机A +Church Table A|教会机A +Church Table A|教会机A +Church Table B|教会机B +Decorative Pillar A|装飾柱A +Decorative Pillar B|装飾柱B +Decorative Pillar A (Ruins)|装飾柱A(廃墟) +Decorative Pillar B (Ruins)|装飾柱B(廃墟) +Church Table A|教会机A +Church Table A|教会机A +Church Table A|教会机A +Church Table B|教会机B +Decorative Pillar A|装飾柱A +Decorative Pillar B|装飾柱B +Decorative Pillar A (Ruins)|装飾柱A(廃墟) +Decorative Pillar B (Ruins)|装飾柱B(廃墟) +Gold Bricks A|金の延べ棒A +Gold Bricks B|金の延べ棒B +Silver Bricks A|銀の延べ棒A +Silver Bricks B|銀の延べ棒B +Decorative Pillar A|装飾柱A +Decorative Pillar B|装飾柱B +Decorative Pillar A (Ruins)|装飾柱A(廃墟) +Decorative Pillar B (Ruins)|装飾柱B(廃墟) +Monument A|石碑A +Monument B|石碑B +Demon Statue|悪魔像 +Dragon Statue|竜像 +Dragon Statue|竜像 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Monument A|石碑A +Monument C|石碑C +Demon Statue|悪魔像 +Dragon Statue|竜像 +Dragon Statue|竜像 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Railings (Wood)|段差用手すり(木製) +Banister A (Wood)|階段用手すりA(木製) +Banister A (Wood)|階段用手すりA(木製) +Banister B (Stone)|階段用手すりB(石) +Banister B (Stone)|階段用手すりB(石) +Banister C (Temple)|階段用手すりC(神殿) +Banister C (Temple)|階段用手すりC(神殿) +Banister D (Castle)|階段用手すりD(城) +Banister D (Castle)|階段用手すりD(城) +Banister A (Wood)|階段用手すりA(木製) +Banister A (Wood)|階段用手すりA(木製) +Banister B (Stone)|階段用手すりB(石) +Banister B (Stone)|階段用手すりB(石) +Banister C (Temple)|階段用手すりC(神殿) +Banister C (Temple)|階段用手すりC(神殿) +Banister D (Castle)|階段用手すりD(城) +Banister D (Castle)|階段用手すりD(城) +Banister A (Wood)|階段用手すりA(木製) +Banister A (Wood)|階段用手すりA(木製) +Banister B (Stone)|階段用手すりB(石) +Banister B (Stone)|階段用手すりB(石) +Banister C (Temple)|階段用手すりC(神殿) +Banister C (Temple)|階段用手すりC(神殿) +Banister D (Castle)|階段用手すりD(城) +Banister D (Castle)|階段用手すりD(城) diff --git a/img/tilesets/Outside_A1.png b/img/tilesets/Outside_A1.png new file mode 100644 index 0000000..95966db Binary files /dev/null and b/img/tilesets/Outside_A1.png differ diff --git a/img/tilesets/Outside_A1.txt b/img/tilesets/Outside_A1.txt new file mode 100644 index 0000000..949f891 --- /dev/null +++ b/img/tilesets/Outside_A1.txt @@ -0,0 +1,16 @@ +Water A (Meadow)|水場A(草地) +Deep Water|深い水場 +Lotus Pads|蓮の葉 +Swamp Grass|水草 +Water B (Snow)|水場B(雪) +Waterfall A (Stone Wall)|滝A(石壁) +Canal|水路 +Waterfall B (Dirt Wall)|滝B(土壁) +Water C (Dirt)|水場C(土) +Waterfall C (Cliff)|滝C(崖) +Water D (Sand)|水場 D(砂) +Waterfall D (Boulder)|滝D(玉石) +Water E (Port)|水場E(港) +Waterfall E (Stone Wall)|滝E(石壁) +Poison Swamp|毒の沼 +Dead Tree|枯れ木 diff --git a/img/tilesets/Outside_A2.png b/img/tilesets/Outside_A2.png new file mode 100644 index 0000000..14c029a Binary files /dev/null and b/img/tilesets/Outside_A2.png differ diff --git a/img/tilesets/Outside_A2.txt b/img/tilesets/Outside_A2.txt new file mode 100644 index 0000000..00b45e1 --- /dev/null +++ b/img/tilesets/Outside_A2.txt @@ -0,0 +1,32 @@ +Meadow|草地 +Dirt (Meadow)|土(草地) +Road (Meadow)|道(草地) +Cobblestones A|石畳A +Bush|茂み +Road Edging|縁石 +Fencepost A (Wood)|柵A(木製) +Fissures|ひび割れ +Dirt|土 +Grass (Dirt)|草地(土) +Road (Dirt)|道(土) +Cobblestones A (Snow)|石畳A(雪) +Bush (Dead)|茂み(枯れ草) +Road Edging (Snow)|縁石(雪) +Fencepost B (Metal)|柵B(金属) +Soil|汚れ +Sand|砂地 +Grass (Sand)|草地(砂地) +Road (Sand)|道(砂地) +Cobblestones B|石畳B +Bush (Sand)|茂み(砂地) +Hole|穴 +Fencepost C (Stone)|柵C(石) +Moss|苔 +Snow|雪 +Dirt (Snow)|土(雪) +Road (Snow)|道(雪) +Carpet|カーペット +Bush (Snow)|茂み(雪) +Hole|穴 +Fencepost A (Wood, Snow)|柵A(木製・雪) +Poison Swamp|毒の沼 diff --git a/img/tilesets/Outside_A3.png b/img/tilesets/Outside_A3.png new file mode 100644 index 0000000..0f192a1 Binary files /dev/null and b/img/tilesets/Outside_A3.png differ diff --git a/img/tilesets/Outside_A3.txt b/img/tilesets/Outside_A3.txt new file mode 100644 index 0000000..a298332 --- /dev/null +++ b/img/tilesets/Outside_A3.txt @@ -0,0 +1,32 @@ +Roof A (Red Tile)|屋根A(赤瓦) +Roof B (Orange Tile)|屋根B(橙瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof D (Green Tile)|屋根D(緑瓦) +Roof E (Blue Tile)|屋根E(青瓦) +Roof F (Dressed Tile)|屋根F(化粧瓦) +Roof G (Khaki Tile)|屋根G(カーキ瓦) +Roof H (Sheet Metal)|屋根H(鉄板) +Outer Wall A (Plaster)|外壁A(白壁) +Outer Wall B (Rock Wall)|外壁B(石壁) +Outer Wall C (Rock Wall)|外壁C(石壁) +Outer Wall D (Rock Wall)|外壁D(石壁) +Outer Wall E (Brick)|外壁E(レンガ) +Outer Wall F (Decorative Tile)|外壁F(化粧タイル) +Outer Wall G (Dirt)|外壁G(土壁) +Outer Wall H (Wood)|外壁H(木造) +Roof I (Wood)|屋根I(木造) +Roof J (Wood)|屋根J(木造) +Roof K (Log)|屋根K(丸太) +Roof L (Thatch)|屋根L(藁) +Roof M (Stone)|屋根M(石) +Roof N (Tent)|屋根N(テント) +Snow Roof A|雪の屋根A +Snow Roof B|雪の屋根B +Outer Wall I (Wood)|外壁I(木造) +Outer Wall J (Wood)|外壁J(木造) +Outer Wall K (Log)|外壁K(丸太) +Outer Wall L (Wood)|外壁L(木造) +Outer Wall M (Rock Wall)|外壁M(石壁) +Outer Wall N (Tent)|外壁N(テント) +Snow Outer Wall (Wood)|雪の外壁(木造) +Snow Outer Wall (Brick)|雪の外壁(レンガ) diff --git a/img/tilesets/Outside_A4.png b/img/tilesets/Outside_A4.png new file mode 100644 index 0000000..c9af5cf Binary files /dev/null and b/img/tilesets/Outside_A4.png differ diff --git a/img/tilesets/Outside_A4.txt b/img/tilesets/Outside_A4.txt new file mode 100644 index 0000000..40525dd --- /dev/null +++ b/img/tilesets/Outside_A4.txt @@ -0,0 +1,48 @@ +Wall A (Stone)|壁A(石) +Wall B (Brick)|壁B(レンガ) +Wall C (Stone)|壁C(石) +Wall D (Stone)|壁D(石) +Wall E (Stone)|壁E(石) +Wall F (Marble)|壁F(大理石) +Wall G (Hedge)|壁G(生け垣) +Wall G (Frozen)|壁H(凍結) +Wall A (Stone)|壁A(石) +Wall B (Brick)|壁B(レンガ) +Wall C (Stone)|壁C(石) +Wall D (Stone)|壁D(石) +Wall E (Stone)|壁E(石) +Wall F (Marble)|壁F(大理石) +Wall G (Hedge)|壁G(生け垣) +Wall G (Frozen)|壁H(凍結) +Building A (Urban)|建物A(都会風) +Building B (Dirt Wall)|建物B(土壁) +Building C (Desert)|建物C(砂漠風) +Building D (Temple, Snow)|建物D(神殿・雪) +Building E (Castle)|建物E(城) +Building F (Castle, Snow)|建物F(城・雪) +Building G (Fort)|建物G(砦) +Building H (Fort, Snow)|建物H(砦・雪) +Building A (Urban)|建物A(都会風) +Building B (Dirt Wall)|建物B(土壁) +Building C (Desert)|建物C(砂漠風) +Building D (Temple, Snow)|建物D(神殿・雪) +Building E (Castle)|建物E(城) +Building F (Castle, Snow)|建物F(城・雪) +Building G (Fort)|建物G(砦) +Building H (Fort, Snow)|建物H(砦・雪) +Ledge A (Meadow)|段差A(草地) +Ledge B (Dirt)|段差B(土) +Ledge C (Desert)|段差C(砂地) +Ledge D (Snow)|段差D(雪) +Ledge E (Paved)|段差E(舗装) +Forest A|森A +Forest B (Snow)|森B(雪) +Demon Castle|魔王城 +Cliff A (Meadow)|崖A(草地) +Cliff B (Dirt)|崖B(土) +Cliff C (Desert)|崖C(砂地) +Cliff D (Snow)|崖D(雪) +Wall (Paved)|壁(舗装) +Forest A|森A +Forest B (Snow)|森B(雪) +Demon Castle|魔王城 diff --git a/img/tilesets/Outside_A5.png b/img/tilesets/Outside_A5.png new file mode 100644 index 0000000..c5ac2fd Binary files /dev/null and b/img/tilesets/Outside_A5.png differ diff --git a/img/tilesets/Outside_A5.txt b/img/tilesets/Outside_A5.txt new file mode 100644 index 0000000..e368238 --- /dev/null +++ b/img/tilesets/Outside_A5.txt @@ -0,0 +1,128 @@ +Darkness|暗闇 +Wire Mesh|金網 +Large Bridge (V, Left)|大きな橋(縦・左) +Large Bridge (V, Center)|大きな橋(縦・中央) +Large Bridge (V, Right)|大きな橋(縦・右) +Large Bridge (H, Top)|大きな橋(横・上) +Large Bridge (H, Center)|大きな橋(横・中央) +Large Bridge (Snow, H, Top)|大きな橋(雪・横・上) +Transparent|透明 +Wire Mesh|金網 +Large Bridge (Snow, V, Left)|大きな橋(雪・縦・左) +Large Bridge (Snow, V, Center)|大きな橋(雪・縦・中央) +Large Bridge (Snow, V, Right)|大きな橋(雪・縦・右) +Large Bridge (H, Bottom)|大きな橋(横・下) +Large Bridge (Snow, H, Center)|大きな橋(雪・横・中央) +Large Bridge (Snow, H, Bottom)|大きな橋(雪・横・下) +Meadow A|草地A +Dirt A|土A +Desert A|砂地A +Snow A|雪A +Meadow|草地B +Dirt B|土B +Desert B|砂地B +Snow B|雪B +Stairs (Meadow, Left)|階段(草地・左) +Stairs (Meadow, Center)|階段(草地・中央) +Stairs (Meadow, Right)|階段(草地・右) +Stairs (Meadow)|階段 +Stairs (Dirt, Left)|階段(土・左) +Stairs (Dirt, Center)|階段(土・中央) +Stairs (Dirt, Right)|階段(土・右) +Stairs (Dirt)|階段(土) +Cobblestones A|石畳A +Cobblestones B|石畳B +Cobblestones C|石畳C +Cobblestones D|石畳D +Cobblestones A (Ruins)|石畳A(廃墟) +Cobblestones B (Ruins)|石畳B(廃墟) +Cobblestones C (Ruins)|石畳C(廃墟) +Cobblestones D (Ruins)|石畳D(廃墟) +Stairs (Desert, Left)|階段(砂地・左) +Stairs (Desert, Center)|階段(砂地・中央) +Stairs (Desert, Right)|階段(砂地・右) +Stairs (Desert)|階段(砂地) +Stairs (Snow, Left)|階段(雪・左) +Stairs (Snow, Center)|階段(雪・中央) +Stairs (Snow, Right)|階段(雪・右) +Stairs (Snow)|階段(雪) +Cobblestones E|石畳E +Cobblestones F|石畳F +Cobblestones G|石畳G +Ice Floor A|氷の床A +Cobblestones E (Ruins)|石畳E(廃墟) +Cobblestones F (Ruins)|石畳F(廃墟) +Cobblestones G (Ruins)|石畳G(廃墟) +Ice Floor B|氷の床B +Stairs (Paved, Left)|階段(舗装・左) +Stairs (Paved, Center)|階段(舗装・中央) +Stairs (Paved, Right)|階段(舗装・右) +Stairs (Paved)|階段(舗装) +Stairs (Ruins, Left)|階段(廃墟・左) +Stairs (Ruins, Center)|階段(廃墟・中央) +Stairs (Ruins, Right)|階段(廃墟・右) +Stairs (Ruins)|階段(廃墟) +Ledge (Port, Left)|段差(港・左) +Ledge (Port, Center)|段差(港・中央) +Ledge (Port, Right)|段差(港・右) +Ledge (Port)|段差(港) +Cobblestones H|石畳H +Cobblestones I|石畳I +Cloud A|雲A +Cloud B|雲B +Farm Field A (Top)|畑A(上) +Farm Field A (Center)|畑A(中央) +Farm Field B (Snow, Top)|畑B(雪・上) +Farm Field B (Snow, Center)|畑B(雪・中央) +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile B|大きなレリーフ床B +Large Relief Floor Tile B|大きなレリーフ床B +Farm Field A (Bottom)|畑A(下) +Farm Field A|畑A +Farm Field B (Snow, Bottom)|畑B(雪・下) +Farm Field B (Snow)|畑B(雪) +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile A|大きなレリーフ床A +Large Relief Floor Tile B|大きなレリーフ床B +Large Relief Floor Tile B|大きなレリーフ床B +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Garden A|花壇A +Garden B (Snow)|花壇B(雪) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Meadow)|段差(草地) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Cliff|崖 +Cliff|崖 +Cliff|崖 +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Cliff|崖 +Cliff|崖 +Cliff|崖 +Cliff (Meadow)|崖(草地) +Cliff (Meadow)|崖(草地) +Cliff (Meadow)|崖(草地) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Cliff (Dirt)|崖(土) +Cliff (Dirt)|崖(土) +Cliff (Dirt)|崖(土) diff --git a/img/tilesets/Outside_B.png b/img/tilesets/Outside_B.png new file mode 100644 index 0000000..c907136 Binary files /dev/null and b/img/tilesets/Outside_B.png differ diff --git a/img/tilesets/Outside_B.txt b/img/tilesets/Outside_B.txt new file mode 100644 index 0000000..4eb340e --- /dev/null +++ b/img/tilesets/Outside_B.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Shop Sign (Sword)|看板(剣) +Shop Sign (Sword & Shield)|看板(剣と盾) +Shop Sign (Armor)|看板(鎧) +Shop Sign (Sack)|看板(袋) +Shop Sign (Teapot)|看板(ポット) +Shop Sign (Inn)|看板(宿) +Shop Sign (Pub)|看板(酒場) +Shop Sign (Eatery)|看板(食堂) +Shop Sign (Hexagram)|看板(魔法陣) +Shop Sign (Staves)|看板(杖) +Shop Sign (Coin)|看板(コイン) +Shop Sign (Necklace)|看板(ネックレス) +Shop Sign (Hammer)|看板(ハンマー) +Shop Sign (Crest)|看板(紋章) +Shop Sign (Blank)|看板(無地) +Log Bridge (V)|丸太の橋(縦) +Log Bridge (H)|丸太の橋(横) +Wood Bridge (V)|木の橋(縦) +Wood Bridge (H)|木の橋(横) +Stone Bridge (V)|石の橋(縦) +Stone Bridge (H)|石の橋(横) +Wood Bridge (V)|木の橋(縦) +Wood Bridge (H)|木の橋(横) +Bridge Spar (Wood, Center A)|橋げた(木・中央A) +Bridge Spar (Wood, Left)|橋げた(木・左) +Bridge Spar (Wood, Center B)|橋げた(木・中央B) +Bridge Spar (Wood, Right)|橋げた(木・右) +Bridge Spar (Stone, Center A)|橋げた(石・中央A) +Bridge Spar (Stone, Left)|橋げた(石・左) +Bridge Spar (Stone, Center B)||橋げた(石・中央B) +Bridge Spar (Stone, Right)|橋げた(石・右) +Window A|窓A +Window B|窓B +Window C|窓C +Window D|窓D +Middle Window A|中型窓A +Middle Window B|中型窓B +Middle Window C|中型窓C +Middle Window D|中型窓D +Window E|窓E +Window F|窓F +Window G|窓G +Stained Glass Window A|ステンドグラスA +Middle Window A|中型窓A +Middle Window E|中型窓E +Middle Window C|中型窓C +Middle Window D|中型窓D +Large Window A|大型窓A +Large Window B|大型窓B +Large Window C|大型窓C +Stained Glass Window B|ステンドグラスB +Large Window D|大型窓D +Middle Window F|中型窓F +Middle Window G|中型窓G +Middle Window H|中型窓H +Large Window A|大型窓A +Large Window E|大型窓E +Large Window C|大型窓C +Stained Glass Window B|ステンドグラスB +Large Window D|大型窓D +Middle Window F|中型窓F +Middle Window G|中型窓G +Middle Window H|中型窓H +Chimney A|煙突A +Mooring Bollard A|ビットA +Mooring Bollard B (Rope)|ビットB(ロープ) +Entrance A|入口A +Entrance A (Extend)|入口A(延長部分) +Entrance A (Top Half A)|入口A(上半分A)S +Entrance B|入口B +Entrance A (Top Half B)|入口A(上半分B) +Chimney B|煙突B +Sign A|立て札A +Sign B|立て札B +Well|井戸 +Stepping Stones|踏み石 +Barrel|樽 +Grave A|墓A +Grave B|墓B +Pot|壺 +Basin A|桶A +Basin B|桶B +Rock Fire Pit A|石のかまどA +Rock Fire Pit B|石のかまどB +Barricade (H)|バリケード(横) +Barricade (V)|バリケード(縦) +Beanstalk|豆の木 +Grass A|草A +Grass B|草B +Grass C|草C +Grass D|草D +Stump|切り株 +Tree|木 +Tree|木 +Boulder A|岩A +Flowers A|花A +Flowers B|花B +Flowers C|花C +Flowers D|花D +Fallen Log|倒木 +Tree|木 +Bush|植え込み +Boulder B|岩B +Scarecrow|かかし +Hole|穴 +Firewood|薪 +Rocks|小石 +Crops A|農作物A +Crops B|農作物B +Crops C|農作物C +Crops D|農作物D +Large Tree|大木 +Large Tree|大木 +Large Tree|大木 +Large Tree|大木 +Large Crate|大きな木箱 +Crate A|木箱A +Crate B|木箱B +Crate C|木箱C +Large Tree|大木 +Large Tree|大木 +Large Tree|大木 +Large Tree|大木 +Large Crate|大きな木箱 +Crate D|木箱D +Crate E|木箱E +Crate F|木箱F +Conifer Tree (Snow)|針葉樹(雪) +Conifer Tree (Snow)|針葉樹(雪) +Conifer Tree (Snow)|針葉樹(雪) +Conifer Tree (Snow)|針葉樹(雪) +Scarecrow (Snow)|かかし(雪) +Pot (Snow)|壺(雪) +Bucket (Snow)|桶(雪) +Crate (Snow)|木箱(雪) +Large Conifer Tree (Snow)|大針葉樹(雪) +Large Conifer Tree (Snow)|大針葉樹(雪) +Large Conifer Tree (Snow)|大針葉樹(雪) +Large Conifer Tree (Snow)|大針葉樹(雪) +Mooring Bollard (Snow)|ビット(雪) +Barricade (H, Snow)|バリケード(横・雪) +Barricade (H, Snow)|バリケード(縦・雪) +Beanstalk (Snow)|豆の木(雪) +Chimney (Snow)|煙突(雪) +Sign A (Snow)|立て札A(雪) +Sign B (Snow)|立て札B(雪) +Well (Snow)|井戸(雪) +Stepping Stones (Snow)|踏み石(雪) +Barrel (Snow)|樽(雪) +Grave A (Snow)|墓A(雪) +Grave B (Snow)|墓B(雪) +Grass A (Snow)|草A(雪) +Grass B (Snow)|草B(雪) +Grass C (Snow)|草C(雪) +Grass D (Snow)|草D(雪) +Stump (Snow)|切り株(雪) +Conifer Tree (Snow)|針葉樹(雪) +Conifer Tree (Snow)|針葉樹(雪) +Boulder A (Snow)|岩A(雪) +Snowman|雪だるま +Hole (Snow)|穴(雪) +Firewood (Snow)|薪(雪) +Rocks (Snow)|小石(雪) +Fallen Log (Snow)|倒木(雪) +Conifer Tree (Snow)|針葉樹(雪) +Bush (Snow)|植え込み(雪) +Boulder B (Snow)|岩B(雪) +Dead Tree|枯れ木 +Dead Tree|枯れ木 +Mushrooms A|キノコA +Mushrooms B|キノコB +Palm Tree|ヤシの木 +Palm Tree|ヤシの木 +Cactus|サボテン +Dead Grass A|枯れ草A +Dead Tree|枯れ木 +Dead Tree (Shrub)|枯れ木(低木) +Rafflesia|ラフレシア +Stump (Moss)|切り株(苔) +Palm Tree|ヤシの木 +Bush (Flowers)|植え込み(花) +Fern|シダ +Dead Grass B|枯れ草B +Hay|干し草 +Hay (Snow)|干し草(雪) +Floral Patch|花畑 +Susuki Grass|ススキ +Fallen Leaves|落ち葉 +Lotus Pads A|蓮の葉A +Lotus Pads B (Flowers)|蓮の葉B(花) +Lotus Pads C|蓮の葉C +Wall Vines A|壁のツタA +Wall Vines B|壁のツタB +Wall Vines C|壁のツタC +Wall Fern|壁のシダ +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Fissures D|亀裂D +Wall Vines A|壁のツタA +Wall Vines B|壁のツタB +Wall Vines C|壁のツタC +Wall Moss|壁の苔 +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Fissures D|亀裂D +Tent A|テントA +Tent A|テントA +Tent A|テントA +Streetlight A|街灯A +Stairs A (Up)|階段A(上り) +Stairs B (Up)|階段B(上り) +Stairs C (Up)|階段C(上り) +Stairs D (Up)|階段D(上り) +Tent A|テントA +Tent A|テントA +Tent A|テントA +Streetlight A|街灯A +Stairs A (Down)|階段A(下り) +Stairs B (Down)|階段B(下り) +Stairs C (Down)|階段C(下り) +Stairs D (Down)|階段D(下り) +Tent A|テントA +Tent A (Entrance)|テントA(入口) +Tent A|テントA +Streetlight A|街灯A +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Vines A|ツタ +Tent B (Snow)|テントB(雪) +Tent B (Snow)|テントB(雪) +Tent B (Snow)|テントB(雪) +Streetlight B (Snow)|街灯B(雪) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Vines A|ツタA +Tent B (Snow)|テントB(雪) +Tent B (Snow)|テントB(雪) +Tent B (Snow)|テントB(雪) +Streetlight B (Snow)|街灯B(雪) +Metal Ladder|鉄ばしご +Rope Ladder|縄ばしご +Rope|ロープ +Vines B (Down)|ツタB(下り) +Tent B (Snow)|テントB(雪) +Tent B (Entrance, Snow)|テント(入口・雪) +Tent B (Snow)|テントB(雪) +Streetlight B (Snow)|街灯B(雪) +Hole A (Metal Ladder)|穴A(鉄ばしご) +Hole B (Rope Ladder)|穴B(縄ばしご) +Hole C (Rope)|穴C(ロープ) +Hole D|穴D diff --git a/img/tilesets/Outside_C.png b/img/tilesets/Outside_C.png new file mode 100644 index 0000000..0b8ff78 Binary files /dev/null and b/img/tilesets/Outside_C.png differ diff --git a/img/tilesets/Outside_C.txt b/img/tilesets/Outside_C.txt new file mode 100644 index 0000000..7472b07 --- /dev/null +++ b/img/tilesets/Outside_C.txt @@ -0,0 +1,256 @@ +Stone Pillar A|石の柱A +Stone Pillar B|石の柱B +Stone Pillar C|石の柱C +Stone Pillar C (Moss)|石の柱C(苔) +Stone Pillar C (Snow)|石の柱C(雪) +Wood Pillar|木の柱 +Stone Pillar D|石の柱D +Demon Castle Pillar|魔王城の柱 +Stone Pillar A|石の柱A +Stone Pillar B|石の柱B +Stone Pillar C|石の柱C +Stone Pillar C (Moss)|石の柱C(苔) +Stone Pillar C (Snow)|石の柱C(雪) +Wood Pillar|木の柱 +Stone Pillar D|石の柱D +Demon Castle Pillar|魔王城の柱 +Broken Stone Pillar|折れた石の柱A +Broken Stone Pillar|折れた石の柱B +Broken Stone Pillar|折れた石の柱C +Broken Stone Pillar C (Moss)|折れた石の柱C(苔) +Broken Stone Pillar C (Snow)|折れた石の柱C(雪) +Broken Wood Pillar|折れた木の柱 +Broken Stone Pillar F|折れた石の柱D +Broken Demon Castle Pillar|折れた魔王城の柱 +Bones A|骸骨A +Bones B|骸骨B +Rubble|瓦礫A +Rubble B (Moss)|瓦礫B(苔) +Rubble C (Snow)|瓦礫C(雪) +Broken Wood Pillar|折れた木の柱 +Rubble D|瓦礫D +Rubble E (Demon Castle)|瓦礫E(魔王城) +Tapestry A|タペストリーA +Tapestry A (Ruins)|タペストリーA(廃墟) +Tapestry B|タペストリーB +Tapestry B (Ruins)|タペストリーB(廃墟) +Tapestry C|タペストリーC +Tapestry C (Ruins)|タペストリーC(廃墟) +Tapestry D|タペストリーD +Tapestry D (Ruins)|タペストリーD(廃墟) +Tapestry A|タペストリーA +Tapestry A (Ruins)|タペストリーA(廃墟) +Tapestry B|タペストリーB +Tapestry B (Ruins)|タペストリーB(廃墟) +Tapestry C|タペストリーC +Tapestry C (Ruins)|タペストリーC(廃墟) +Tapestry D|タペストリーD +Tapestry D (Ruins)|タペストリーD(廃墟) +Monument A|石碑A +Monument B|石碑B +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Monument A|石碑A +Monument C|石碑C +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument|大きな石碑 +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Large Monument (Lit)|大きな石碑(光) +Monument A (Snow)|石碑A(雪) +Monument B (Snow)|石碑B(雪) +Large Monument (Snow)|大きな石碑(雪) +Large Monument (Snow)|大きな石碑(雪) +Large Monument (Snow)|大きな石碑(雪) +Large Monument (Ruins)|大きな石碑(廃墟) +Large Monument (Ruins)|大きな石碑(廃墟) +Large Monument (Ruins)|大きな石碑(廃墟) +Monument A (Snow)|石碑A(雪) +Monument B (Snow)|石碑B(雪) +Large Monument (Snow)|大きな石碑(雪) +Large Monument (Snow)|大きな石碑(雪) +Large Monument (Snow)|大きな石碑(雪) +Large Monument (Ruins)|大きな石碑(廃墟) +Large Monument (Ruins)|大きな石碑(廃墟) +Large Monument (Ruins)|大きな石碑(廃墟) +Statue A|石像A +Angel Statue A|天使像A +Angel Statue B|天使像B +Demon Statue|悪魔像 +Dais|台座 +Dragon Statue|竜像 +Dragon Statue|竜像 +Statue B|石像B +Statue A|石像A +Angel Statue A|天使像A +Angel Statue B|天使像B +Demon Statue|悪魔像 +Dais|台座 +Dragon Statue|竜像 +Dragon Statue|竜像 +Statue B|石像B +Statue A (Snow)|石像A(雪) +Angel Statue A (Snow)|天使像A(雪) +Angel Statue B (Snow)|天使像B(雪) +Demon Statue (Snow)|悪魔像(雪) +Dais (Snow)|台座(雪) +Dragon Statue (Snow)|竜像(雪) +Dragon Statue (Snow)|竜像(雪) +Ice Statue|氷像 +Statue A (Snow)|石像A(雪) +Angel Statue A (Snow)|天使像A(雪) +Angel Statue B (Snow)|天使像B(雪) +Demon Statue (Snow)|悪魔像(雪) +Dais (Snow)|台座(雪) +Dragon Statue (Snow)|竜像(雪) +Dragon Statue (Snow)|竜像(雪) +Ice Statue|氷像 +Window A (Demon Castle)|窓A(魔王城) +Window B (Demon Castle)|窓B(魔王城) +Window C (Demon Castle)|窓C(魔王城) +Gravel Mound (Dirt)|土砂A(土) +Large Gravel Mound (Dirt)|大きな土砂(土) +Large Gravel Mound (Dirt)|大きな土砂(土) +Cave Entrance|洞窟入口 +Mine Entrance|坑道入口 +Window A (Demon Castle)|窓A(魔王城) +Window B (Demon Castle)|窓B(魔王城) +Window D (Demon Castle)|窓D(魔王城) +Gravel Mound B (Dirt, Snow)|土砂B(土・雪) +Large Gravel Mound (Dirt)|大きな土砂(土) +Large Gravel Mound (Dirt)|大きな土砂(土) +Cave Entrance|洞窟入口 +Mine Entrance|坑道入口 +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof A (Red Tile)|屋根A(赤瓦) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof B (Snow)|屋根B(雪) +Roof B (Snow)|屋根B(雪) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof C (Indigo Tile)|屋根C(藍瓦) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle)|円塔A(城) +Roof Detail A (Red Tile)|屋根飾りA(赤瓦) +Roof Detail B (Snow)|屋根飾りB(雪) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle)|円塔A(城) +Roof Detail C (Indigo Tile)|屋根飾りC(藍瓦) +Roof Detail D (Wood)|屋根飾りD(木造) +Roof D (Wood)|屋根D(木造) +Roof D (Wood)|屋根D(木造) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle's Spire)|円塔A(城の尖塔) +Round Tower A (Castle's Spire)|円塔A(城の尖塔) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle's Spire)|円塔A(城の尖塔) +Round Tower A (Castle's Spire)|円塔A(城の尖塔) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle's Spire)|円塔A(城の尖塔) +Round Tower A (Castle's Spire)|円塔A(城の尖塔) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower B (Fort)|円塔B(砦) +Round Tower B (Fort)|円塔B(砦) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle)|円塔A(城) +Round Tower A (Castle)|円塔A(城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle's Spire, Snow)|円塔A(城の尖塔・雪) +Round Tower A (Castle's Spire, Snow)|円塔A(城の尖塔・雪) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle's Spire, Snow)|円塔A(城の尖塔・雪) +Round Tower A (Castle's Spire, Snow)|円塔A(城の尖塔・雪) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle's Spire, Snow)|円塔A(城の尖塔・雪) +Round Tower A (Castle's Spire, Snow)|円塔A(城の尖塔・雪) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower C (Demon Castle)|円塔C(魔王城) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower A (Castle, Snow)|円塔A(城・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) +Round Tower B (Fort, Snow)|円塔B(砦・雪) diff --git a/img/tilesets/SF_Inside_A4.png b/img/tilesets/SF_Inside_A4.png new file mode 100644 index 0000000..4c99507 Binary files /dev/null and b/img/tilesets/SF_Inside_A4.png differ diff --git a/img/tilesets/SF_Inside_A4.txt b/img/tilesets/SF_Inside_A4.txt new file mode 100644 index 0000000..d875728 --- /dev/null +++ b/img/tilesets/SF_Inside_A4.txt @@ -0,0 +1,48 @@ +Wall A (Concrete)|壁A(コンクリート) +Wall B (Concrete, Dirty)|壁B(コンクリート・汚れ) +Wall C (House)|壁C(現代住宅) +Wall D (Metal)|壁D(金属) +Wall E (Metal, Red Rust)|壁E(金属・赤錆) +Wall F (Metal, Patina)|壁F(金属・緑青錆) +Wall G (Barracks)|壁G(バラック) +Wall H (Chinese)|壁H(中華風) +Wall A (Concrete)|壁A(コンクリート) +Wall B (Concrete, Dirty)|壁B(コンクリート・汚れ) +Wall C (House)|壁C(現代住宅) +Wall D (Metal)|壁D(金属) +Wall E (Metal, Red Rust)|壁E(金属・赤錆) +Wall F (Metal, Patina)|壁F(金属・緑青錆) +Wall G (Barracks)|壁G(バラック) +Wall H (Chinese)|壁H(中華風) +Wall I (Factory)|壁I(工場) +Wall J (Factory)|壁J(工場) +Wall K (Building)|壁K(ビル) +Wall L (Checkered)|壁L(市松) +Interior Wall A (Pattern)|内装壁A(模様) +Interior Wall B (Pattern)|内装壁B(模様) +Interior Wall C (Pattern)|内装壁C(模様) +Wall M (Brick)|壁M(レンガ) +Wall I (Factory)|壁I(工場) +Wall J (Factory)|壁J(工場) +Wall K (Building)|壁K(ビル) +Wall L (Checkered)|壁L(市松) +Interior Wall A (Pattern)|内装壁A(模様) +Interior Wall B (Pattern)|内装壁B(模様) +Interior Wall C (Pattern)|内装壁C(模様) +Wall M (Brick)|壁M(レンガ) +Wall N (Wood)|壁N(木造) +Wall O (Wood, Dirty)|壁O(木造・汚れ) +Wall P (Artery)|壁P(動脈) +Wall Q (In Body)|壁Q(体内) +Wall R (Neon)|壁R(ネオン) +Wall S (Wire Mesh)|壁S(金網) +Wall T (Wire Mesh, Red Rust)|壁T(金網・赤錆) +Wall U (Wire Mesh, Patina)|壁U(金網・緑青錆) +Wall N (Wood)|壁N(木造) +Wall O (Wood, Dirty)|壁O(木造・汚れ) +Wall P (Artery)|壁P(動脈) +Wall Q (In Body)|壁Q(体内) +Wall R (Neon)|壁R(ネオン) +Wall S (Wire Mesh)|壁S(金網) +Wall T (Wire Mesh, Red Rust)|壁T(金網・赤錆) +Wall U (Wire Mesh, Patina)|壁U(金網・緑青錆) diff --git a/img/tilesets/SF_Inside_B.png b/img/tilesets/SF_Inside_B.png new file mode 100644 index 0000000..7314841 Binary files /dev/null and b/img/tilesets/SF_Inside_B.png differ diff --git a/img/tilesets/SF_Inside_B.txt b/img/tilesets/SF_Inside_B.txt new file mode 100644 index 0000000..15aa94a --- /dev/null +++ b/img/tilesets/SF_Inside_B.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Stairs A (Up)|階段A(上り) +Stairs B (Up)|階段B(上り) +Stairs C (Up)|階段C(上り) +Stairs D (Up)|階段D(上り) +Metal Ladder|鉄ばしご +Metal Stairs|金属階段 +Rope|ロープ +Hole|穴 +Stairs A (Down)|階段A(下り) +Stairs B (Down)|階段B(下り) +Stairs C (Down)|階段C(下り) +Stairs D (Down)|階段D(下り) +Metal Ladder|鉄ばしご +Metal Stairs|金属階段 +Rope|ロープ +Midsize Window A|中型窓A +Midsize Window B|中型窓B +Large Window A|大型窓A +Midsize Window C|中型窓C +Large Window B|大型窓B +Metal Ladder|鉄ばしご +Metal Stairs|金属階段 +Rope|ロープ +Midsize Window A|中型窓A +Midsize Window B|中型窓B +Large Window A|大型窓A +Midsize Window C|中型窓C +Large Window B|大型窓B +Hole A (Metal Ladder)|穴A(鉄ばしご) +Hole B (Metal Stairs)|穴B(金属階段) +Hole C (Rope)|穴C(ロープ) +Asphalt Bridge (V)|アスファルトの橋(縦) +Asphalt Bridge (H)|アスファルトの橋(横) +Stone Bridge (V)|石の橋(縦) +Stone Bridge (H)|石の橋(横) +Metal Bridge A (V)|金属の橋A(縦) +Metal Bridge A (H)|金属の橋A(横) +Metal Bridge B (V)|金属の橋B(縦) +Metal Bridge B (H)|金属の橋B(横) +Bridge Spar A (Asphalt, Center A)|橋げたA(アスファルト・中央A) +Bridge Spar A (Asphalt, Left)|橋げたA(アスファルト・左) +Bridge Spar A (Asphalt, Center B)|橋げたA(アスファルト・中央B) +Bridge Spar A (Asphalt, Right)|橋げたA(アスファルト・右) +Bridge Spar B (Metal, Center A)|橋げたB(金属・中央A) +Bridge Spar B (Metal, Left)|橋げたB(金属・左) +Bridge Spar B (Metal, Center B)|橋げたB(金属・中央B) +Bridge Spar B (Metal, Right)|橋げたB(金属・右) +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Warning Plate (Keep Out)|警告プレート(KEEP OUT) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal, Stairs)|連絡橋(金属・階段) +Metal Fence|金属フェンス +Warning Plate (Exclamation Mark)|警告プレート(!マーク) +Metal Fence|金属フェンス +Warning Plate (Radioactivity Mark)|警告プレート(放射能マーク) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal, Stairs)|連絡橋(金属・階段) +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Warning Plate (Biohazard Mark)|警告プレート(バイオハザードマーク) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal)|連絡橋(金属) +Connecting Bridge (Metal)|連絡橋(金属) +Podium (H)|教壇机(横) +Pillar A (Asphalt)|柱A(アスファルト) +Pillar B (Metal)|柱B(金属) +Pillar C (Machine)|柱C(機械) +Pillar D (Decoration)|柱D(装飾) +Pillar E (Metal)|柱E(金属) +Pillar F (Brick)|柱F(レンガ) +Large Window C|大型窓C +Podium (H)|教壇机(横) +Pillar A (Asphalt)|柱A(アスファルト) +Pillar B (Metal)|柱B(金属) +Pillar C (Machine)|柱C(機械) +Pillar D (Decoration)|柱D(装飾) +Pillar E (Metal)|柱E(金属) +Pillar F (Brick)|柱F(レンガ) +Large Window C|大型窓C +Podium (V)|教壇机(縦) +Broken Pillar A (Asphalt)|折れた柱A(アスファルト) +Broken Pillar B (Metal)|折れた柱B(金属) +Broken Pillar C (Machine)|折れた柱C(機械) +Broken Pillar D (Decoration)|折れた柱D(装飾) +Broken Pillar E (Metal)|折れた柱E(金属) +Broken Pillar F (Brick)|折れた柱F(レンガ) +Barricade (No Entry)|バリケード(通行禁止) +Podium (V)|教壇机(縦) +Girder A (Asphalt, Left)|梁A(アスファルト・左) +Girder A (Asphalt, Center)|梁A(アスファルト・中央) +Girder A (Asphalt, Right)|梁A(アスファルト・右) +Girder C (Decoration, Left)|梁C(装飾・左) +Girder C (Decoration, Center)|梁C(装飾・中央) +Girder C (Decoration, Right)|梁C(装飾・右) +Bar (No Entry)|バー(通行禁止) +Bar (No Entry)|バー(通行禁止) +Girder B (Metal, Left)|梁B(金属・左) +Girder B (Metal, Center)|梁B(金属・中央) +Girder B (Metal, Right)|梁B(金属・右) +Rubble A (Asphalt)|瓦礫A(アスファルト) +Rubble B (Metal)|瓦礫B(金属) +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Jail Bars|鉄格子 +Laser Barrier|レーザーバリア +Wheelchair (Left)|車いす(左) +Wheelchair (Right)|車いす(右) +Pipe Frame Bed (Ruins)|パイプベッド(廃墟) +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Jail Bars|鉄格子 +Laser Barrier|レーザーバリア +Wheelchair (Bottom)|車いす(下) +Wheelchair (Fallen)|車いす(倒れ) +Pipe Frame Bed (Ruins)|パイプベッド(廃墟) +Lab Equipment|実験器具 +School Desk (V)|学校机(縦) +School Desk (H)|学校机(横) +TV|テレビ +Computer|PC +Laptop|ノートPC +Printer|プリンター +Telephone|電話 +Intercom (Hanging)|インターホン(壁掛け) +Tablet Device|タブレット端末 +Table Clock|置時計 +Gas Stove|ガスコンロ +Kitchen Counter|調理台 +Sink|流し +Exhaust Fan|換気扇 +Air Conditioner|エアコン +Wastebasket|ゴミ箱 +Book Stand|本立て +Document|書類 +School Chair (Bottom)|学校イス(下) +School Chair (Top)|学校イス(上) +School Chair (Right)|学校イス(右) +School Chair (Left)|学校イス(左) +Sofa (Right)|ソファ(右) +Sofa (Left)|ソファ(左) +Sofa (Down)|ソファ(下) +Sofa (Up)|ソファ(下) +Office Chair (Bottom)|オフィスチェア(下) +Office Chair (Top)|オフィスチェア(上) +Office Chair (Right)|オフィスチェア(右) +Office Chair (Left)|オフィスチェア(左) +Sofa (Right)|ソファ(右) +Sofa (Left)|ソファ(左) +Sofa (Top)|ソファ(上) +Sofa (Top)|ソファ(上) +Washing Machine|洗濯機 +Western Style Toilet|洋式便器 +Urinal|男性用便器 +Bathroom Sink|洗面台 +Bathtub (V)|バスタブ(縦) +Bathtub (H)|バスタブ(横) +Bathtub (H)|バスタブ(横) +Glass Table (V)|ガラステーブル(縦) +Washing Machine|洗濯機 +Western Style Toilet|洋式便器 +Urinal|男性用便器 +Wash Basin|洗面台 +Bathtub (V)|バスタブ(縦) +Glass Table (H)|ガラステーブル(横) +Glass Table (H)|ガラステーブル(横) +Glass Table (V)|ガラステーブル(縦) +Refrigerator|冷蔵庫 +Bookshelf A|本棚A +Chest of Drawers A|タンスA +Miscellaneous Item Shelf|雑貨棚 +Locker A|ロッカーA +Document Shelf|資料棚 +Medicine Shelf|薬品棚 +Locker B (School)|ロッカーB(学校) +Refrigerator|冷蔵庫 +Bookshelf A|本棚A +Chest of Drawers A|タンスA +Miscellaneous Item Shelf |雑貨棚 +Locker A|ロッカーA +Document Shelf|資料棚 +Medicine Shelf|薬品棚 +Locker B (School)|ロッカーB(学校) +Display Shelf A|商品陳列棚A +Display Shelf B|商品陳列棚B +Convenience Store Shelf A|コンビニ棚A +Convenience Store Shelf B|コンビニ棚B +Document Shelf (Ruins)|資料棚(廃墟) +Chest of Drawers B (Decoration)|タンスB(装飾) +Shelf A (Decoration)|棚A(装飾) +Bookshelf B (Decoration)|本棚B(装飾) +Display Shelf A|商品陳列棚A +Display Shelf B|商品陳列棚B +Convenience Store Shelf A|コンビニ棚A +Convenience Store Shelf B|コンビニ棚B +Document Shelf (Ruins)|資料棚(廃墟) +Chest of Drawers B (Decoration)|タンスB(装飾) +Shelf A (Decoration)|棚A(装飾) +Bookshelf B (Decoration)|本棚B(装飾) +Stacked Crates|積まれた木箱 +Shipping Container|コンテナ +Stacked Cardboard Boxes|積まれたダンボール +Vending Machine|自動販売機 +ATM|ATM +Steel Shelf|鉄骨棚 +Operating Table|手術台 +Hospital Bed|病院ベッド +Stacked Crates|積まれた木箱 +Shipping Container|コンテナ +Stacked Cardboard Boxes|積まれたダンボール +Vending Machine|自動販売機 +ATM|ATM +Steel Shelf|鉄骨棚 +Operating Table|手術台 +Hospital Bed|病院ベッド +Bed|ベッド +Mattress|敷布団 +Large Bed|ダブルベッド +Large Bed|ダブルベッド +Pipe Frame Bed|パイプベッド +Slot Machine |スロット +Poker Table|ポーカー台 +Poker Table|ポーカー台 +Bed|ベッド +Mattress|敷布団 +Large Bed|ダブルベッド +Large Bed|ダブルベッド +Pipe Frame Bed|パイプベッド +Slot Machine|スロット +Poker Table|ポーカー台 +Poker Table|ポーカー台 +Chest A (Wood)|チェストA(木製) +Chest B (Metal)|チェストB(金属) +Chest C (Decoration)|チェストC(装飾) +Large Desk A|大きいデスクA +Large Desk A|大きいデスクA +Roulette Table|ルーレット台 +Roulette Table|ルーレット台 +Roulette Table|ルーレット台 +Side Desk A (Wood)|サイドデスクA(木製) +Side Desk B (Metal)|サイドデスクB(金属) +Desk|デスク +Large Desk B|大きいデスクB +Large Desk B|大きいデスクB +Roulette Table|ルーレット台 +Roulette Table|ルーレット台 +Roulette Table|ルーレット台 diff --git a/img/tilesets/SF_Inside_C.png b/img/tilesets/SF_Inside_C.png new file mode 100644 index 0000000..abc6f3a Binary files /dev/null and b/img/tilesets/SF_Inside_C.png differ diff --git a/img/tilesets/SF_Inside_C.txt b/img/tilesets/SF_Inside_C.txt new file mode 100644 index 0000000..a9f5308 --- /dev/null +++ b/img/tilesets/SF_Inside_C.txt @@ -0,0 +1,256 @@ +Black Board|黒板 +Black Board|黒板 +Black Board|黒板 +White Board|ホワイトボード +White Board|ホワイトボード +White Board|ホワイトボード +Cloth Partition A|布の衝立A +Cloth Partition B|布の衝立B +Black Board|黒板 +Black Board|黒板 +Black Board|黒板 +White Board|ホワイトボード +White Board|ホワイトボード +White Board|ホワイトボード +Cloth Partition A|布の衝立A +Cloth Partition B|布の衝立B +Stool|腰掛けイス +Skeleton Model|骨格模型 +Biological Specimen|生物標本 +Potted Plant|植木鉢 +Armchair|肘掛け椅子 +Insect Specimen|昆虫標本 +Restroom Mark (Men)|トイレマーク(男性) +Restroom Mark (Women)|トイレマーク(女性) +Wall Speaker|壁掛けスピーカー +Skeleton Model |骨格模型 +Biological Specimen|生物標本 +Fire Extinguisher|消火器 +Armchair|肘掛け椅子 +Room Plate|室名札 +EXIT Sign|EXITプレート +Vent|通気口 +Painting A|絵画A +Painting B|絵画B +Vision Test Chart|視力検査表 +Plaster Bust|石膏胸像 +Calendar|カレンダー +Plant A|植物A +Plant B|植物B +Plant C|植物C +Painting C|絵画C +Painting D|絵画D +Anatomical Chart|人体図 +Canvas|キャンバス +Bulletin Board|掲示板 +Plant A|植物A +Plant B|植物B +Plant C|植物C +Plumbing|配管 +Plumbing|配管 +Valve|バルブ +Machine A|機械A +Machine B|機械B +Machine C|機械C +Air Vent A|通風口A +Air Vent B|通風口B +Plumbing|配管 +Plumbing|配管 +Plumbing|配管 +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Fan|ファン +Fluorescent Light|蛍光灯 +Plumbing|配管 +Plumbing|配管 +Plumbing|配管 +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Outdoor Air Intake Unit|室外機 +Shutter|シャッター +Plumbing|配管 +Plumbing|配管 +Plumbing|配管 +Control Panel A|操作パネルA +Control Panel B|操作パネルB +Control Panel C|操作パネルC +Pipe (H)|パイプ(横) +Pipe (V)|パイプ(縦) +Line A|ラインA +Line B|ラインB +Road Closed|通行止め +Waste|廃棄物 +Scrap Metal|スクラップ +Mysterious Liquid|謎の液体 +Scattered Papers|散らばった紙 +Pipe (V)|パイプ(縦) +Belt Conveyor (V)|ベルトコンベアー(縦) +Belt Conveyor (H)|ベルトコンベアー(横) +Belt Conveyor (H)|ベルトコンベアー(横) +Belt Conveyor (H)|ベルトコンベアー(横) +Duct|ダクト +Mechanical Device|機械装置 +Pile of Rubble|瓦礫の山 +Pile of Rubble|瓦礫の山 +Belt Conveyor (V)|ベルトコンベアー(縦) +Robot Arm|ロボットアーム +Server Machine|サーバマシン +Meters|計器類 +Duct|ダクト +Mechanical Device|機械装置 +Pile of Rubble|瓦礫の山 +Pile of Rubble|瓦礫の山 +Belt Conveyor (V)|ベルトコンベアー(縦) +Robot Arm|ロボットアーム +Server Machine|サーバマシン +Meters|計器類 +Duct|ダクト +Drain|排水口 +Graffiti|落書き +Graffiti|落書き +Monitor A|モニターA +Monitor B|モニターB +Large Monitor|大型モニター +Large Monitor|大型モニター +IV Stand|点滴スタンド +ECG Monitor|心電図モニタ +Sewing Mannequin|トルソー +Rubble|瓦礫 +Operation Board A|操作盤A +Operation Board B|操作盤B +Operation Board C|操作盤C +Operation Board D|操作盤D +IV Stand|点滴スタンド +ECG Monitor|心電図モニタ +Sewing Mannequin|トルソー +Broken Machine|壊れた機械 +Stairs|階段 +Stairs|階段 +Stairs|階段 +Cage|檻 +Cage|檻 +Handrail|欄干 +Handrail|欄干 +Handrail|欄干 +Stairs|階段 +Stairs|階段 +Stairs|階段 +Curtains A|カーテンA +Curtains B|カーテンB +Curtains C|カーテンC +Curtains D|カーテンD +Handrail|欄干 +Stairs|階段 +Stairs|階段 +Stairs|階段 +Curtains A|カーテンA +Curtains B|カーテンB +Curtains C|カーテンC +Curtains D|カーテンD +Emergency Alarm|非常ベル +Spider Web|蜘蛛の巣 +Mirror|鏡 +Vase|花瓶 +Piano|ピアノ +Piano|ピアノ +Piano|ピアノ +Stained Glass|ステンドグラス +Decorative Pillar|装飾柱 +Dripping|液垂れ +Mirror|鏡 +Lamp|電気スタンド +Piano|ピアノ +Piano|ピアノ +Piano|ピアノ +Stained Glass|ステンドグラス +Decorative Pillar|装飾柱 +Picture Frame|写真立て +Side Table|サイドテーブル +Altar|祭壇 +Fireplace|暖炉 +Fireplace|暖炉 +Fireplace|暖炉 +Stuffed Doll A|ぬいぐるみA +Decorative Pillar|装飾柱 +Book A|本A +Book B|本B +Glass Pieces|ガラス片 +Fireplace|暖炉 +Fireplace|暖炉 +Fireplace|暖炉 +Doll|人形 +Stuffed Doll B|ぬいぐるみB +Beer Mug|ビールジョッキ +Wine & Glass|ワインとグラス +Noodle Dish|麺料理 +Bread|パン +Banister A (V)|手すりA(縦) +Banister A (V)|手すりA(縦) +Banister B (V)|手すりB(縦) +Banister B (V)|手すりB(縦) +Meat Dish|肉料理 +Roast Chicken|ローストチキン +Cake|ケーキ +Fruit Bowl|果物盛り合わせ +Banister A (V)|手すりA(縦) +Banister A (V)|手すりA(縦) +Banister B (V)|手すりB(縦) +Banister B (V)|手すりB(縦) +Plate A|皿A +Teapot & Cup|ティーポットとカップ +Ration|レーション +Plate B|皿B +Banister A (V)|手すりA(縦) +Banister A (V)|手すりA(縦) +Banister B (V)|手すりB(縦) +Banister B (V)|手すりB(縦) +Demon Statue|悪魔像 +Goddess Statue|女神像 +Soldier Statue|兵士像 +Wall Clock|柱時計 +Banister A (H)|手すりA(横) +Banister A (H)|手すりA(横) +Banister A (H)|手すりA(横) +Banister A (H)|手すりA(横) +Demon Statue|悪魔像 +Goddess Statue|女神像 +Soldier Statue|兵士像 +Wall Clock|柱時計 +Banister B (H)|手すりB(横) +Banister B (H)|手すりB(横) +Banister B (H)|手すりB(横) +Banister B (H)|手すりB(横) +Monument A|モニュメントA +Monument B|モニュメントB +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Monument A|モニュメントA +Monument B|モニュメントB +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Monument C|モニュメントC +Monument D|モニュメントD +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Large Machine|大型機械 +Large Machine|大型機械 +Large Machine|大型機械 +Monument C|モニュメントC +Control Panel|コントロールパネル +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Large Machine|大型機械 +Large Machine|大型機械 +Large Machine|大型機械 diff --git a/img/tilesets/SF_Outside_A3.png b/img/tilesets/SF_Outside_A3.png new file mode 100644 index 0000000..e324bd7 Binary files /dev/null and b/img/tilesets/SF_Outside_A3.png differ diff --git a/img/tilesets/SF_Outside_A3.txt b/img/tilesets/SF_Outside_A3.txt new file mode 100644 index 0000000..719e7da --- /dev/null +++ b/img/tilesets/SF_Outside_A3.txt @@ -0,0 +1,32 @@ +Roof A (Metal)|屋根A(金属) +Roof B (Metal, Red Rust)|屋根B(金属・赤錆) +Roof C (Metal, Patina)|屋根C(金属・緑青錆) +Roof D (Barracks)|屋根D(バラック) +Roof E (Barracks)|屋根E(バラック) +Roof F (Factory)|屋根F(工場) +Roor G (Ivy)|屋根G(ツタ) +Roof H (House)|屋根H(現代住宅) +Outer Wall A (Metal)|外壁A(金属) +Outer Wall B (Metal, Red Rust)|外壁B(金属・赤錆) +Outer Wall C (Metal, Patina)|外壁C(金属・緑青錆) +Outer Wall D (Barracks)|外壁D(バラック) +Outer Wall E (Barracks)|外壁E(バラック) +Outer Wall F (Factory)|外壁F(工場) +Outer Wall G (Ivy)|外壁G(ツタ) +Outer Wall H (House)|外壁H(現代住宅) +Roof I (House)|屋根I(現代住宅) +Roof J (Brick)|屋根J(レンガ) +Roof K (Brick)|屋根K(レンガ) +Roof L (Chinese)|屋根L(中華風) +Roof M (Blue Sheet)|屋根M(ブルーシート) +Roof N (Wood)|屋根N(木造) +Roof O (Brick)|屋根O(レンガ) +Roof P (Wood)|屋根P(木造) +Outer Wall I (House)|外壁I(現代住宅) +Outer Wall J (Brick)|外壁J(レンガ) +Outer Wall K (Brick)|外壁K(レンガ) +Outer Wall L (Chinese)|外壁L(中華風) +Outer Wall M (Blue Sheet)|外壁M(ブルーシート) +Outer Wall N (Wood)|外壁N(木造) +Outer Wall O (Brick)|外壁O(レンガ) +Outer Wall P (Wood)|外壁P(木造) diff --git a/img/tilesets/SF_Outside_A4.png b/img/tilesets/SF_Outside_A4.png new file mode 100644 index 0000000..593120b Binary files /dev/null and b/img/tilesets/SF_Outside_A4.png differ diff --git a/img/tilesets/SF_Outside_A4.txt b/img/tilesets/SF_Outside_A4.txt new file mode 100644 index 0000000..8209c6c --- /dev/null +++ b/img/tilesets/SF_Outside_A4.txt @@ -0,0 +1,48 @@ +Wall A (Concrete)|壁A(コンクリート) +Wall B (Concrete, Dirty)|壁B(コンクリート・汚れ) +Wall C (Block)|壁C(ブロック) +Wall D (Apartment)|壁D(マンション) +Wall E (Apartment)|壁E(マンション) +Wall F (Metal)|壁F(金属) +Wall G (Metal, Red Rust)|壁G(金属・赤錆) +Wall H (Metal, Patina)|壁H(金属・緑青錆) +Wall A (Concrete)|壁A(コンクリート) +Wall B (Concrete, Dirty)|壁B(コンクリート・汚れ) +Wall C (Block)|壁C(ブロック) +Wall D (Apartment)|壁D(マンション) +Wall E (Apartment)|壁E(マンション) +Wall F (Metal)|壁F(金属) +Wall G (Metal, Red Rust)|壁G(金属・赤錆) +Wall H (Metal, Patina)|壁H(金属・緑青錆) +Wall I (Barracks)|壁I(バラック) +Wall J (Barracks)|壁J(バラック) +Wall K (Factory)|壁K(工場) +Cliff A (Meadow)|崖A(草地) +Wall L (Factory)|壁L(工場) +Wall M (Factory)|壁M(工場) +Wall N (Building)|壁N(ビル) +Wall O (Brick)|壁O(レンガ) +Wall I (Barracks)|壁I(バラック) +Wall J (Barracks)|壁J(バラック) +Wall K (Factory)|壁K(工場) +Cliff A (Meadow)|崖A(草地) +Wall L (Factory)|壁L(工場) +Wall M (Factory)|壁M(工場) +Wall N (Building)|壁N(ビル) +Wall O (Brick)|壁O(レンガ) +Wall P (Chinese)|壁P(中華風) +Wall Q (Wire Mesh)|壁Q(金網) +Wall R (Wire Mesh, Red Rust)|壁R(金網・赤錆) +Wall S (Wire Mesh, Patina)|壁S(金網・緑青錆) +Wall T (Wood)|壁T(木造) +Wall U (Wood, Dirty)|壁U(木造・汚れ) +Wall V (Building)|壁V(ビル) +Wall W (Building)|壁W(ビル) +Wall P (Chinese)|壁P(中華風) +Wall Q (Wire Mesh)|壁Q(金網) +Wall R (Wire Mesh, Red Rust)|壁R(金網・赤錆) +Wall S (Wire Mesh, Patina)|壁S(金網・緑青錆) +Wall T (Wood)|壁T(木造) +Wall U (Wood, Dirty)|壁U(木造・汚れ) +Wall V (Building)|壁V(ビル) +Wall W (Building)|壁W(ビル) diff --git a/img/tilesets/SF_Outside_A5.png b/img/tilesets/SF_Outside_A5.png new file mode 100644 index 0000000..a34c96c Binary files /dev/null and b/img/tilesets/SF_Outside_A5.png differ diff --git a/img/tilesets/SF_Outside_A5.txt b/img/tilesets/SF_Outside_A5.txt new file mode 100644 index 0000000..b084cda --- /dev/null +++ b/img/tilesets/SF_Outside_A5.txt @@ -0,0 +1,128 @@ +Darkness|暗闇 +Grid floor|格子床 +Metal Bridge (V, Left)|金属橋(縦・左) +Metal Bridge (V, Center)|金属橋(縦・中央) +Metal Bridge (V, Right)|金属橋(縦・右) +Asphalt Bridge (H, Top)|アスファルト橋(横・上) +Metal Bridge (H, Center)|金属橋(横・中央) +Metal Bridge (H, Top)|金属橋(横・上) +Transparent|透明 +Grid floor|格子床 +Asphalt Bridge (V, Left)|アスファルト橋(縦・左) +Asphalt Bridge (V, Center)|アスファルト橋(縦・中央) +Asphalt Bridge (V, Right)|アスファルト橋(縦・右) +Asphalt Bridge (H, Bottom)|アスファルト橋(横・下) +Asphalt Bridge (H, Center)|アスファルト橋(横・中央) +Metal Bridge (H, Bottom)|金属橋(横・下) +Asphalt Floor|アスファルト床 +Metal Floor A (Factory)|金属床A(工場) +Concrete Floor|コンクリート床 +Concrete Floor (Ruins)|コンクリート床(廃墟) +Hole|穴 +Grid floor (Ruins)|格子床(廃墟) +Asphalt Floor (Ruins)|アスファルト床(廃墟) +Metal Floor A (Factory, Ruins)|金属床A(工場・廃墟) +Asphalt Floor|アスファルト床 +Metal Floor A (Factory)|金属床A(工場) +Concrete Floor|コンクリート床 +Interior Floor A (In Body)|内装床A(体内) +Stairs A (Asphalt, Left)|階段A(アスファルト・左) +Stairs A (Asphalt, Center)|階段A(アスファルト・中央) +Stairs A (Asphalt, Right)|階段A(アスファルト・右) +Stairs A (Asphalt)|階段A(アスファルト) +Meadow|草地 +Desert|砂地 +Wood Floor A|木の床A +Wood Floor A (Ruins)|木の床A(廃墟) +Asphalt Floor (Dirty)|アスファルト床(汚れ) +Asphalt Floor (Dirty, Ruins)|アスファルト床(汚れ・廃墟) +Metal Floor A (Factory, Rust)|金属床A(工場・サビ) +Interior Floor B (Artery)|内装床B(動脈) +Bumpy Tile A|点字ブロックA +Bumpy Tile B|点字ブロックB +Bumpy Tile C|点字ブロックC +Bumpy Tile C (Ruins)|点字ブロックC(廃墟) +Stairs B (Metal, Left)|階段B(金属・左) +Stairs B (Metal, Center)|階段B(金属・中央) +Stairs B (Metal, Right)|階段B(金属・右) +Stairs B (Metal)|階段B(金属) +Interior Floor C (Green Resin)|内装床C(緑樹脂) +Interior Floor D (Tile)|内装床D(タイル) +Interior Floor D (Tile, Ruins)|内装床D(タイル・廃墟) +Interior Floor E (Decoration)|内装床E(装飾) +Bush|茂み +Waste Land|荒地 +Wood Floor B|木の床B +Wood Floor B (Ruins)|木の床B(廃墟) +Stairs C (Meadow, Left)|階段C(草地・左) +Stairs C (Meadow, Center)|階段C(草地・中央) +Stairs C (Meadow, Right)|階段C(草地・右) +Stairs C (Meadow)|階段C(草地) +Stairs D (Wood, Left)|階段D(木製・左) +Stairs D (Wood, Center)|階段D(木製・中央) +Stairs D (Wood, Right)|階段D(木製・右) +Stairs D (Wood)|階段D(木製) +Cobblestones A|石畳A +Cobblestones B|石畳B +Cobblestones C|石畳C +Cobblestones D|石畳D +Interior Floor F (Checkered)|内装床F(市松) +Interior Floor F (Checkered, Ruins)|内装床F(市松・廃墟) +Metal Floor B|金属床B +Metal Floor B (Rust, Ruins)|金属床B(サビ・廃墟) +Stairs E (Carpet, Left)|階段E(じゅうたん・左) +Stairs E (Carpet, Center)|階段E(じゅうたん・中央) +Stairs E (Carpet, Right)|階段E(じゅうたん・右) +Stairs E (Carpet)|階段E(じゅうたん) +Stairs F (Desert, Left)|階段F(砂地・左) +Stairs F (Desert, Center)|階段F(砂地・中央) +Stairs F (Desert, Right)|階段F(砂地・右) +Stairs F (Desert)|階段F(砂地) +Mark Floor A|マーク床A +Mark Floor B|マーク床B +Mark Floor C|マーク床C +Mark Floor D|マーク床D +Mark Floor E|マーク床E +Mark Floor E (Ruins)|マーク床E(廃墟) +Mark Floor F (Off)|マーク床F(消) +Mark Floor F|マーク床F +Neon Floor|ネオン床 +Interior Floor G (Tile Carpet)|内装床G(タイルカーペット) +Interior Floor G (Tile Carpet, Ruins)|内装床G(タイルカーペット・廃墟) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Marble Floor|大理石床 +Interior Floor H (Linoleum)|内装床H(リノリウム) +Interior Floor H (Linoleum, Ruins)|内装床H(リノリウム・廃墟) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Stairs G (Tile Carpet, Left)|階段G(タイルカーペット・左) +Stairs G (Tile Carpet, Center)|階段G(タイルカーペット・中央) +Stairs G (Tile Carpet, Right)|階段G(タイルカーペット・右) +Stairs G (Tile Carpet)|階段G(タイルカーペット) +Cobblestones A (Ruins)|石畳A(廃墟) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Ledge (Dirt)|段差(土) +Stairs H (Linoleum, Left)|階段H(リノリウム・左) +Stairs H (Linoleum, Center)|階段H(リノリウム・中央) +Stairs H (Linoleum, Right)|階段H(リノリウム・右) +Stairs H (Linoleum)|階段H(リノリウム) +Cobblestones C (Ruins)|石畳C(廃墟) +Cliff (Dirt)|崖(土) +Cliff (Dirt)|崖(土) +Cliff (Dirt)|崖(土) +Marble Floor (Ruins)|大理石床(廃墟) +Wood Floor C|木の床C +Wood Floor C (Ruins)|木の床C(廃墟) +Metal Floor C (Machine)|金属床C(機械) +Metal Floor C (Machine, Ruins)|金属床C(機械・廃墟) +Cliff (Dirt)|崖(土) +Cliff (Dirt)|崖(土) +Cliff (Dirt)|崖(土) diff --git a/img/tilesets/SF_Outside_B.png b/img/tilesets/SF_Outside_B.png new file mode 100644 index 0000000..07da2b8 Binary files /dev/null and b/img/tilesets/SF_Outside_B.png differ diff --git a/img/tilesets/SF_Outside_B.txt b/img/tilesets/SF_Outside_B.txt new file mode 100644 index 0000000..49fff3a --- /dev/null +++ b/img/tilesets/SF_Outside_B.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Neon Shop Sign (Weapon)|ネオン看板(武器屋) +Neon Shop Sign (Armor)|ネオン看板(防具屋) +Neon Shop Sign (Item)|ネオン看板(アイテム屋) +Neon Shop Sign (Pharmacy)|ネオン看板(薬屋) +Neon Shop Sign (Cafe)|ネオン看板(酒場) +Neon Shop Sign (Inn)|ネオン看板(宿屋) +Neon Shop Sign (Market)|ネオン看板(マーケット) +Metal Shop Sign (Weapon)|金属看板(武器屋) +Metal Shop Sign (Armor)|金属看板(防具屋) +Metal Shop Sign (Item)|金属看板(アイテム屋) +Metal Shop Sign (Pharmacy)|金属看板(薬屋) +Metal Shop Sign (Cafe)|金属看板(酒場) +Metal Shop Sign (Inn)|金属看板(宿屋) +Metal Shop Sign (Firearm)|金属看板(銃器屋) +Metal Shop Sign (Blank)|金属看板(無地) +Asphalt Bridge (V)|アスファルトの橋(縦) +Asphalt Bridge (H)|アスファルトの橋(横) +Stone Bridge (V)|石の橋(縦) +Stone Bridge (H)|石の橋(横) +Metal Bridge A (V)|金属の橋A(縦) +Metal Bridge A (H)|金属の橋A(横) +Metal Bridge B (V)|金属の橋B(縦) +Metal Bridge B (H)|金属の橋B(横) +Bridge Spar A (Asphalt, Center A)|橋げたA(アスファルト・中央A) +Bridge Spar A (Asphalt, Left)|橋げたA(アスファルト・左) +Bridge Spar A (Asphalt, Center B)|橋げたA(アスファルト・中央B) +Bridge Spar A (Asphalt, Right)|橋げたA(アスファルト・右) +Bridge Spar B (Metal, Center A)|橋げたB(金属・中央A) +Bridge Spar B (Metal, Left)|橋げたB(金属・左) +Bridge Spar B (Metal, Center B)|橋げたB(金属・中央B) +Bridge Spar B (Metal, Right)|橋げたB(金属・右) +White Line|白線 +White Line|白線 +White Line|白線 +White Line|白線 +White Line|白線 +Yellow & Black Line|黄黒線 +Yellow & Black Line|黄黒線 +Yellow & Black Line|黄黒線 +White Line|白線 +Traffic Lights (Car)|信号機(車) +Traffic Lights (Pedestrian)|信号機(歩行者) +Entrance A|入口A +White Line (Crosswalk)|白線(横断歩道) +Yellow & Black Line|黄黒線 +Traffic Cone|通行止めコーン +Yellow & Black Line|黄黒線 +White Line|白線 +Traffic Lights (Car)|信号機(車) +Traffic Lights (Walker)|信号機(歩行者) +Entrance B|入口B +White Line (Crosswalk)|白線(横断歩道) +Yellow & Black Line|黄黒線 +Yellow & Black Line|黄黒線 +Yellow & Black Line|黄黒線 +Window A|窓A +Window B|窓B +Window C|窓C +Window D|窓D +Window E|窓E +Window F|窓F +Window G|窓G +Window H|窓H +Midsize Window A|中型窓A +Midsize Window B|中型窓B +Midsize Window C|中型窓C +Midsize Window D|中型窓D +Midsize Window E|中型窓E +Midsize Window F|中型窓F +Midsize Window G|中型窓G +Midsize Window H|中型窓H +Midsize Window A|中型窓A +Midsize Window B|中型窓B +Midsize Window C|中型窓C +Midsize Window D|中型窓D +Midsize Window E|中型窓E +Midsize Window F|中型窓F +Midsize Window G|中型窓G +Midsize Window H|中型窓H +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (H)|ネオン看板(横) +Neon Shop Sign (H)|ネオン看板(横) +Street Light A|街灯A +Street Light B|街灯B +Stained Glass Window|ステンドグラス +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (H)|ネオン看板(横) +Neon Shop Sign (H)|ネオン看板(横) +Street Light A|街灯A +Street Light B|街灯B +Stained Glass Window|ステンドグラス +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (V)|ネオン看板(縦) +Neon Shop Sign (H)|ネオン看板(横) +Neon Shop Sign (H)|ネオン看板(横) +Stacked Crates|積まれた木箱 +Shipping Container|コンテナ +Stacked Cardboard|積まれたダンボール +Chimney A|煙突A +Chimney B|煙突B +Chimney C|煙突C +Exhaust Port Wall|壁面用排気口 +Roof Window|屋根用出窓 +Stacked Crates|積まれた木箱 +Shipping Container|コンテナ +Stacked Cardboard Boxes|積まれたダンボール +Wall Poster|張り紙 +Signboard A|看板A +Signboard C|看板C +Digital Signage A|電子看板A +Digital Signage C|電子看板C +Neon Shop Sign (CASINO)|ネオン看板(カジノ) +Neon Shop Sign (CASINO)|ネオン看板(カジノ) +Small Crane|小型クレーン +Poster|ポスター +Signboard B|看板B +Digital Signage B|電子看板B +Digital Signage B|電子看板B +Digital Signage C|電子看板C +Iron Materials|鉄資材 +Helmet & Tool|ヘルメットと工具 +Small Crane|小型クレーン +Crate|木箱 +Shipping Container|コンテナ +Cardboard Box|ダンボール +Barrel|樽 +Oil Drum|ドラム缶 +Garbage Can|ゴミ箱 +Sorted Waste Bins|分別ゴミ箱 +Sorted Waste Bins|分別ゴミ箱 +Plant A|植物A +Plant B|植物B +Plant C|植物C +Vending Machine|自動販売機 +ATM|ATM +Tree|木 +Roadside Tree|街路樹 +Utility Pole|電柱 +Plant A|植物A +Plant B|植物B +Plant C|植物C +Vending Machine|自動販売機 +ATM|ATM +Tree|木 +Avenue Tree|街路樹 +Utility Pole|電柱 +Public Phone|公衆電話 +Machine Device|機械端末 +Planter (Flower)|プランター(花) +Planter (Plant)|プランター(植物) +Potted Plant|植木鉢 +Tree (Loop)|木(ループ) +Tombstone (Cross)|墓石(十字架) +Tombstone (Plaque)|墓石(プレート) +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Machine A|機械A +Machine B|機械B +Machine C|機械C +Barricade (No Entry)|バリケード(通行禁止) +Bar (No Entry)|バー(通行禁止) +Bar (No Entry)|バー(通行禁止) +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Outdoor Air Intake Unit|室外機 +Waste|廃棄物 +Scrap Metal|スクラップ +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Neon Tube|ネオン管 +Neon Tube|ネオン管 +Air Vent A|通風口A +Air Vent B|通風口B +Shutter|シャッター +Fissures A|亀裂A +Fissures B|亀裂B +Fissures C|亀裂C +Drain|排水口 +Guardrail|ガードレール +Timetable|時刻表 +Piled Up Tires|積まれたタイヤ +Small Fuel Tank|小型燃料タンク +Car (White)|車(白) +Car (White)|車(白) +Manhole|マンホール +Bus|バス +Bus|バス +Truck|トラック +Truck|トラック +Wrecked Car|壊れた車 +Car (Black)|車(黒) +Car (Black)|車(黒) +Vent|通気口 +Bus|バス +Bus|バス +Truck|トラック +Truck|トラック +Wrecked Car|壊れた車 +Car (Red)|車(赤) +Car (Red)|車(赤) +Oil Drum (Leak)|ドラム缶(液漏れ) +Food Stalls|露店(食べ物) +Food Stalls|露店(食べ物) +Food Stalls|露店(食べ物) +Stall Goods A|露店商品A +Stairs A (Up)|階段A(上り) +Stairs B (Up)|階段B(上り) +Stairs C (Up)|階段C(上り) +Stairs D (Up)|階段D(上り) +Food Stalls|露店(食べ物) +Food Stalls|露店(食べ物) +Food Stalls|露店(食べ物) +Stall Goods B|露店商品B +Stairs A (Down)|階段A(下り) +Stairs B (Down)|階段B(下り) +Stairs C (Down)|階段C(下り) +Stairs D (Down)|階段D(下り) +Food Stalls|露店(食べ物) +Food Stalls|露店(食べ物) +Food Stalls|露店(食べ物) +Stall Goods C|露店商品C +Metal Ladder|鉄ばしご +Metal Stairs|金属階段 +Rope|ロープ +Net|ネット +Junk Stalls|露店(ジャンク) +Junk Stalls|露店(ジャンク) +Junk Stalls|露店(ジャンク) +Stall Goods D|露店商品D +Metal Ladder|鉄ばしご +Metal Stairs|金属階段 +Rope|ロープ +Net|ネット +Junk Stalls|露店(ジャンク) +Junk Stalls|露店(ジャンク) +Junk Stalls|露店(ジャンク) +Stall Goods E|露店商品E +Metal Ladder|鉄ばしご +Metal Stairs|金属階段 +Rope|ロープ +Net|ネット +Junk Stalls|露店(ジャンク) +Junk Stalls|露店(ジャンク) +Junk Stalls|露店(ジャンク) +Stall Goods F|露店商品F +Hole A (Metal Ladder)|穴A(鉄ばしご) +Hole B (Metal Stairs)|穴B(金属階段) +Hole C (Rope)|穴C(ロープ) +Hole|穴 diff --git a/img/tilesets/SF_Outside_C.png b/img/tilesets/SF_Outside_C.png new file mode 100644 index 0000000..23eac09 Binary files /dev/null and b/img/tilesets/SF_Outside_C.png differ diff --git a/img/tilesets/SF_Outside_C.txt b/img/tilesets/SF_Outside_C.txt new file mode 100644 index 0000000..89c478a --- /dev/null +++ b/img/tilesets/SF_Outside_C.txt @@ -0,0 +1,256 @@ +Fountain A|噴水A +Fountain A|噴水A +Fountain B|噴水B +Fountain B|噴水B +Slide|滑り台 +Slide|滑り台 +Exercise Bar|鉄棒 +Drinking Fountain|水飲み場 +Fountain A|噴水A +Fountain A|噴水A +Fountain B|噴水B +Fountain B|噴水B +Slide|滑り台 +Slide|滑り台 +Water Well Pump|ポンプ井戸 +Garbage Dumpster|ごみ収集箱 +Fountain C|噴水C +Fountain C|噴水C +Fountain C|噴水C +Bench A|ベンチA +Bench A|ベンチA +Swing|ブランコ +Shop Canopy|店用天蓋 +Barbed Wire|有刺鉄線 +Fountain C|噴水C +Fountain C|噴水C +Fountain C|噴水C +Bench B|ベンチB +Bench B|ベンチB +Swing|ブランコ +Shop Canopy|店用天蓋 +Barbed Wire|有刺鉄線 +Grass A|草A +Grass B|草B +Hole|穴 +Small Stones|小石 +Flower Bed|花壇 +Flower Bed|花壇 +Flower Bed|花壇 +Barbed Wire|有刺鉄線 +Flower|花 +Cage|檻 +Cage|檻 +Graffiti|落書き +Graffiti|落書き +Barbed Wire|有刺鉄線 +Barbed Wire|有刺鉄線 +Barbed Wire|有刺鉄線 +Demon Statue|悪魔像 +Goddess Statue|女神像 +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Gutter|側溝 +Gutter|側溝 +Gutter|側溝 +Demon Statue|悪魔像 +Goddess Statue|女神像 +Metal Fence|金属フェンス +Warning Plate (Keep Out)|警告プレート(KEEP OUT) +Metal Fence|金属フェンス +Gutter|側溝 +Postal Box|ポスト +Gutter|側溝 +Soldier Statue|兵士像 +Warning Plate (Biohazard Mark)|警告プレート(バイオハザードマーク) +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Metal Fence|金属フェンス +Gutter|側溝 +Gutter|側溝 +Gutter|側溝 +Soldier Statue|兵士像 +Pillar A (Asphalt)|柱A(アスファルト) +Pillar B (Metal)|柱B(金属) +Pillar C (Machine)|柱C(機械) +Pillar D (Decoration)|柱D(装飾) +Pillar E (Metal)|柱E(金属) +Pillar F (Brick)|柱F(レンガ) +Food Waste|生ゴミ +Warning Plate (Radioactivity Mark)|警告プレート(放射能マーク) +Pillar A (Asphalt)|柱A(アスファルト) +Pillar B (Metal)|柱B(金属) +Pillar C (Machine)|柱C(機械) +Pillar D (Decoration)|柱D(装飾) +Pillar E (Metal)|柱E(金属) +Pillar F (Brick)|柱F(レンガ) +Mysterious Liquid|謎の液体 +Warning Plate (Exclamation Mark)|警告プレート(!マーク) +Broken Pillar A (Asphalt)|折れた柱A(アスファルト) +Broken Pillar B (Metal)|折れた柱B(金属) +Broken Pillar C (Machine)|折れた柱C(機械) +Broken Pillar D (Decoration)|折れた柱D(装飾) +Broken Pillar E (Metal)|折れた柱E(金属) +Broken Pillar F (Brick)|折れた柱F(レンガ) +Fire Hydrant|消火栓 +Monument A|モニュメントA +Monument B|モニュメントB +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Monument A|モニュメントA +Monument B|モニュメントB +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Stele|巨大な石版 +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Huge Iron Monument|巨大プレート +Monument C|モニュメントC +Monument D|モニュメントD +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Large Machine|大型機械 +Large Machine|大型機械 +Large Machine|大型機械 +Monument C|モニュメントC +Control Panel|コントロールパネル +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Sphere Machinery|球体機械 +Large Machine|大型機械 +Large Machine|大型機械 +Large Machine|大型機械 +Wall A|壁A +Wall A|壁A +Wall A|壁A +Decorative Pillar A|装飾柱A +Arch A|門A +Arch A|門A +Arch A|門A +Decorative Pillar B|装飾柱B +Wall A|壁A +Wall A|壁A +Wall A|壁A +Decorative Pillar A|装飾柱A +Arch A|門A +Arch A|門A +Arch A|門A +Decorative Pillar B|装飾柱B +Wall A|壁A +Wall A|壁A +Wall A|壁A +Decorative Pillar A|装飾柱A +Arch A|門A +Arch A|門A +Arch A|門A +Decorative Pillar B|装飾柱B +Wall B (Topside)|壁B(上面) +Wall B (Topside)|壁B(上面) +Wall B (Topside)|壁B(上面) +Spire|尖塔 +Clock Tower|時計塔 +Clock Tower|時計塔 +Clock Tower|時計塔 +Wall A Ceiling|壁A天井 +Wall B (Topside)|壁B(上面) +Wall B (Topside)|壁B(上面) +Wall B (Topside)|壁B(上面) +Spire|尖塔 +Clock Tower|時計塔 +Clock Tower|時計塔 +Clock Tower|時計塔 +Decorative Pillar A (Front)|装飾柱A(手前) +Wall B (Topside)|壁B(上面) +Wall B (Topside)|壁B(上面) +Wall B (Topside)|壁B(上面) +Spire|尖塔 +Clock Tower|時計塔 +Clock Tower|時計塔 +Clock Tower|時計塔 +Decorative Pillar B (Front)|装飾柱B(手前) +Wall B|壁B +Wall B|壁B +Wall B|壁B +Spire|尖塔 +Arch B|門B +Arch B|門B +Arch B|門B +Iron Fence B|鉄柵B +Wall B|壁B +Wall B|壁B +Wall B|壁B +Spire|尖塔 +Arch B|門B +Arch B|門B +Arch B|門B +Gate|門扉 +Wall B|壁B +Wall B|壁B +Wall B|壁B +Spire|尖塔 +Arch B|門B +Arch B|門B +Arch B|門B +Gate|門扉 +Rooftop Railing|屋上用手すり +Rooftop Railing|屋上用手すり +Rooftop Railing|屋上用手すり +Iron Fence A|鉄柵A +Tank|戦車 +Tank|戦車 +Helicopter|ヘリコプター +Helicopter|ヘリコプター +Rooftop Railing|屋上用手すり +Round Clock|丸時計 +Rooftop Railing|屋上用手すり +Iron Fence A|鉄柵A +Tank|戦車 +Tank|戦車 +Helicopter|ヘリコプター +Helicopter|ヘリコプター +Rooftop Railing|屋上用手すり +Rooftop Railing|屋上用手すり +Rooftop Railing|屋上用手すり +Iron Fence A|鉄柵A +Rooftop Billboard B|屋上看板B +Rooftop Billboard B|屋上看板B +Food Cart|屋台 +Food Cart|屋台 +Convenience Store|コンビニエンスストア +Convenience Store|コンビニエンスストア +Convenience Store|コンビニエンスストア +Steel Tower|鉄塔 +Rooftop Billboard A|屋上看板A +Roof|屋根 +Roof|屋根 +Roof|屋根 +Convenience Store|コンビニエンスストア +Convenience Store|コンビニエンスストア +Convenience Store|コンビニエンスストア +Steel Tower|鉄塔 +Water Storage Tank|貯水タンク +Roof|屋根 +Roof|屋根 +Roof|屋根 +Bus Waiting Area|待合所 +Bus Waiting Area|待合所 +Station Kiosk|駅の売店 +Steel Tower|鉄塔 +Water Storage Tank|貯水タンク +Roof|屋根 +Roof|屋根 +Roof|屋根 +Bus Waiting Area|待合所 +Bus Waiting Area|待合所 +Station Kiosk|駅の売店 +Roof Detail|屋根飾り +Roof|屋根 +Roof|屋根 +Roof|屋根 +Roof|屋根 diff --git a/img/tilesets/World_A1.png b/img/tilesets/World_A1.png new file mode 100644 index 0000000..3d3332c Binary files /dev/null and b/img/tilesets/World_A1.png differ diff --git a/img/tilesets/World_A1.txt b/img/tilesets/World_A1.txt new file mode 100644 index 0000000..9055912 --- /dev/null +++ b/img/tilesets/World_A1.txt @@ -0,0 +1,16 @@ +Sea|海 +Deep Sea|深い海 +Rock Shoal|岩礁 +Icebergs|氷山 +Poison Swamp|毒の沼 +Dead Trees|枯れ木 +Lava|溶岩 +Lava Bubbles|溶岩の泡 +Pond|池 +Boulder|岩 +Frozen Sea|凍った海 +Whirlpool|渦 +Land's End|大地の境界 +Endless Waterfall|下界に落ちる滝 +Cloud (Land's End)|雲(大地の境界) +Cloud|雲 diff --git a/img/tilesets/World_A2.png b/img/tilesets/World_A2.png new file mode 100644 index 0000000..8bf35c2 Binary files /dev/null and b/img/tilesets/World_A2.png differ diff --git a/img/tilesets/World_A2.txt b/img/tilesets/World_A2.txt new file mode 100644 index 0000000..f76096a --- /dev/null +++ b/img/tilesets/World_A2.txt @@ -0,0 +1,32 @@ +Grassland A|草原A +Grassland A (Dark)|草原A(濃) +Grassland B|草原B +Grassland B (Dark)|草原B(濃) +Forest|森 +Forest (Conifer)|森(針葉樹) +Hill (Grass)|丘(草) +Mountain (Dirt)|山(土) +Wasteland A|荒れ地A +Wasteland B|荒れ地B +Dirt Field A|土肌A +Dirt Field B|土肌B +Forest (Dead Trees)|森(枯れ木) +Road (Dirt)|道(土) +Hill (Dirt)|丘(土) +Mountain (Rock)|山(岩) +Desert A|砂漠A +Desert B|砂漠B +Rocky Land A|岩地A +Rocky Land B (Lava)|岩地B(溶岩) +Forest (Palm Trees)|森(ヤシの木) +Road (Paved)|道(舗装) +Hill (Sandstone)|丘(砂岩) +Mountain (Sandstone)|山(砂岩) +Snowfield|雪原 +Hill (Snow)|丘(雪) +Clouds|雲 +Large Clouds|大きな雲 +Forest (Snow)|森(雪) +Pit|穴 +Hill (Rock)|丘(岩) +Mountain (Snow)|山(雪) diff --git a/img/tilesets/World_B.png b/img/tilesets/World_B.png new file mode 100644 index 0000000..efe1b8f Binary files /dev/null and b/img/tilesets/World_B.png differ diff --git a/img/tilesets/World_B.txt b/img/tilesets/World_B.txt new file mode 100644 index 0000000..c0d8e43 --- /dev/null +++ b/img/tilesets/World_B.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Sign|立て札 +Pier (H)|桟橋(横) +Pier (V)|桟橋(縦) +Pond|池 +Oasis|オアシス +Pond (Ice)|池(氷) +Beanstalk|豆の木 +Tent|テント +Igloo|氷の家 +Pyramid|ピラミッド +Giant Tree|大樹 +Giant Tree (Snow)|大樹(雪) +Dirt|土砂 +Avalanche|雪崩 +Beanstalk|豆の木 +Cave A|洞窟A +Cave B|洞窟B +Cave (Collapsed)|洞窟(土砂崩れ) +Mine|坑道 +Tunnel|トンネル +Tunnel (Blocked)|トンネル(通行止め) +Shrine|ほこら +Shrine (Snow)|ほこら(雪) +Crater|クレーター +Trail|山道 +Rock Mountain|岩山 +Rock Mountain|岩山 +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Snow)|岩山(雪) +Rock Mountain (Snow)|岩山(雪) +Volcano Crater (Lava)|火口(溶岩) +Volcano Crater (Lava)|火口(溶岩) +Rock Mountain|岩山 +Rock Mountain|岩山 +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Snow)|岩山(雪) +Rock Mountain (Snow)|岩山(雪) +Volcano Crater|火口 +Volcano Crater|火口 +Rock Mountain|岩山 +Rock Mountain|岩山 +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Snow)|岩山(雪) +Rock Mountain (Snow)|岩山(雪) +Volcano|火山 +Volcano|火山 +Rock Mountain|岩山 +Rock Mountain|岩山 +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Sandstone)|岩山(砂岩) +Rock Mountain (Snow)|岩山(雪) +Rock Mountain (Snow)|岩山(雪) +Town A|町A +Town A|町A +Town B|町B +Town B|町B +Village A|村A +Village A|村A +Village B|村B +House (Town)|家(町) +Town C|町C +Town D|町D +Village C|村C +Village D|村D +Town E (Desert)|町E(砂漠) +Town E (Desert)|町E(砂漠) +Town F (Desert)|町F(砂漠) +House (Village)|家(村) +Town A (Snow)|町A(雪) +Town A (Snow)|町A(雪) +Town B (Snow)|町B(雪) +Town B (Snow)|町B(雪) +Town G (Desert)|町G(砂漠) +Town G (Desert)|町G(砂漠) +Large Tent|大きなテント +House (Desert)|家(砂漠) +Town C (Snow)|町C(雪) +Town D (Snow)|町D(雪) +Village C (Snow)|村C(雪) +Village D (Snow)|村D(雪) +Village A (Snow)|村A(雪) +Village A (Snow)|村A(雪) +Village B (Snow)|村B(雪) +House (Snow)|家(雪) +Fortress City |城塞都市 +Fortress City |城塞都市 +Fortress City (Snow)|城塞都市(雪) +Fortress City (Snow)|城塞都市(雪) +Large Mansion|大きな屋敷 +Large Mansion|大きな屋敷 +School of Magic|魔法学校 +School of Magic|魔法学校 +Fortress City |城塞都市 +Fortress City |城塞都市 +Fortress City (Snow)|城塞都市(雪) +Fortress City (Snow)|城塞都市(雪) +Large Mansion|大きな屋敷 +Large Mansion|大きな屋敷 +School of Magic|魔法学校 +School of Magic|魔法学校 +Bridge (H)|橋(横) +Bridge (V)|橋(縦) +Collapsed Bridge (H)|崩れた橋(横) +Collapsed Bridge (V)|崩れた橋(縦) +Snow Bridge (H)|雪の橋(横) +Snow Bridge (V)|雪の橋(縦) +Collapsed Snow Bridge (H)|崩れた雪の橋(横) +Collapsed Snow Bridge (V)|崩れた雪の橋(縦) +Tower A|塔A +Tower A (Ruins)|塔A(廃墟) +Tower B|塔B +Tower C|塔C +Tower A (Snow)|塔A(雪) +Tower D|塔D +Temple A|神殿A +Temple A (Snow)|神殿A(雪) +Tower A|塔A +Tower A (Ruins)|塔A(廃墟) +Tower B|塔B +Tower C|塔C +Tower A (Snow)|塔A(雪) +Tower D (Ruins)|塔D(廃墟) +Temple B|神殿B +Temple C|神殿C +Castle A|城A +Castle A|城A +Castle B|城B +Castle B|城B +Fort A|砦A +Fort A|砦A +Fort B|砦B +Fort B|砦B +Castle A|城A +Castle A|城A +Castle B|城B +Castle B|城B +Fort A|砦A +Fort A|砦A +Fort B|砦B +Fort B|砦B +Castle C|城C +Castle C|城C +Castle D|城D +Castle D|城D +Castle (Ruins)|城(廃墟) +Castle (Ruins)|城(廃墟) +Fort (Ruins)|砦(廃墟) +Fort (Ruins)|砦(廃墟) +Castle C|城C +Castle C|城C +Castle D|城D +Castle D|城D +Castle (Ruins)|城(廃墟) +Castle (Ruins)|城(廃墟) +Fort (Ruins)|砦(廃墟) +Fort (Ruins)|砦(廃墟) +Castle A, B (Snow)|城A・B(雪) +Castle A, B (Snow)|城A・B(雪) +Castle C, D (Snow)|城C・D(雪) +Castle C, D (Snow)|城C・D(雪) +Fort (Snow)|砦(雪) +Fort (Snow)|砦(雪) +Castle (Ruins, Snow)|城(廃墟・雪) +Castle (Ruins, Snow)|城(廃墟・雪) +Castle A, B (Snow)|城A・B(雪) +Castle A, B (Snow)|城A・B(雪) +Castle C, D (Snow)|城C・D(雪) +Castle C, D (Snow)|城C・D(雪) +Fort (Snow)|砦(雪) +Fort (Snow)|砦(雪) +Castle (Ruins, Snow)|城(廃墟・雪) +Castle (Ruins, Snow)|城(廃墟・雪) +Castle (Walled)|城(城壁) +Castle (Walled)|城(城壁) +Castle (Walled)|城(城壁) +Demon Castle|魔王城 +Demon Castle|魔王城 +Cursed Castle|呪われた城 +Cursed Castle|呪われた城 +Town C (Ruins)|町C(廃墟) +Castle (Walled)|城(城壁) +Castle (Walled)|城(城壁) +Castle (Walled)|城(城壁) +Demon Castle|魔王城 +Demon Castle|魔王城 +Cursed Castle|呪われた城 +Cursed Castle|呪われた城 +Town F (Ruins)|町F(廃墟) +Castle (Walled)|城(城壁) +Castle (Walled)|城(城壁) +Castle (Walled)|城(城壁) +Town A (Ruins)|町A(廃墟) +Town A (Ruins)|町A(廃墟) +Village A (Ruins)|村A(廃墟) +Village A (Ruins)|村A(廃墟) +House (Ruins)|家(廃墟) +Castle Wall (Ruins A)|城壁(廃墟A) +Castle Wall (Ruins B)|城壁(廃墟B) +Castle Wall (Ruins C)|城壁(廃墟C) +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall (Gate)|城壁(城門) +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Barricades|バリケード +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Castle Wall|城壁 +Lookout Post|やぐら +Floating Continent (Giant Tree)|浮遊大陸(大樹) +Floating Continent (Giant Tree)|浮遊大陸(大樹) +Floating Continent|浮遊大陸 +Floating Continent|浮遊大陸 +Floating Continent (Cloud)|浮遊大陸(雲) +Floating Continent (Cloud)|浮遊大陸(雲) +Cloud Land|雲の大地 +Cloud Land|雲の大地 +Floating Continent (Castle)|浮遊大陸(城) +Floating Continent (Castle)|浮遊大陸(城) +Floating Continent|浮遊大陸 +Floating Continent|浮遊大陸 +Floating Continent (Cloud)|浮遊大陸(雲) +Floating Continent (Cloud)|浮遊大陸(雲) +Cloud Land|雲の大地 +Cloud Land|雲の大地 +Floating Continent (Temple)|浮遊大陸(神殿) +Floating Continent (Temple)|浮遊大陸(神殿) +Floating Continent (Shadow)|浮遊大陸(影) +Floating Continent (Shadow)|浮遊大陸(影) +Cloud Land (Temple)|雲の大地(神殿) +Cloud Land (Temple)|雲の大地(神殿) +Cloud Land (Castle)|雲の大地(城) +Cloud Land (Castle)|雲の大地(城) diff --git a/img/tilesets/World_C.png b/img/tilesets/World_C.png new file mode 100644 index 0000000..46ef185 Binary files /dev/null and b/img/tilesets/World_C.png differ diff --git a/img/tilesets/World_C.txt b/img/tilesets/World_C.txt new file mode 100644 index 0000000..9bf4074 --- /dev/null +++ b/img/tilesets/World_C.txt @@ -0,0 +1,256 @@ +Transparent|透明 +Signboard A|看板A +Signboard B|看板B +Signboard C|看板C +Iron Bridge (H)|鉄橋(横) +Iron Bridge (V)|鉄橋(縦) +Reservoir A|貯水池A +Reservoir B|貯水池B +Hut|小屋 +Shanty|掘っ立て小屋 +Signboard D|看板D +Stele A|石碑A +Stele B|石碑B +Windmill|風車 +Parabolic Antenna|パラボラアンテナ +Heliport|ヘリポート +Entrance A (Open)|入口A(開) +Entrance A (Closed)|入口A(閉) +Entrance B (Open)|入口B(開) +Entrance B (Closed)|入口B(閉) +Entrance C (Open)|入口C(開) +Entrance C (Closed)|入口C(閉) +Entrance D (Closed)|入口D(閉) +Entrance E (Closed)|入口E(閉) +Road|道路 +Road|道路 +Road Closed|通行止め +Rocky Mountain|岩山 +Rocky Mountain|岩山 +Mountain|山 +Mountain|山 +Coniferous Tree A|針葉樹A +Road|道路 +Road|道路 +Road|道路 +Rocky Mountain|岩山 +Rocky Mountain|岩山 +Mountain|山 +Mountain|山 +Coniferous Tree B|針葉樹B +Road|道路 +Road|道路 +Road|道路 +Rocky Mountain|岩山 +Rocky Mountain|岩山 +Mountain|山 +Mountain|山 +Broadleaf Tree|広葉樹 +Road|道路 +Road|道路 +Road|道路 +Rocky Mountain|岩山 +Rocky Mountain|岩山 +Mountain|山 +Mountain|山 +Broken Buildings|壊れたビル街 +Town A|町A +Town B|町B +Slum A|スラム街A +Slum B|スラム街B +Mansion A|邸宅A +Mansion A|邸宅A +Gate A|ゲートA +Gate B|ゲートB +Shopping Area A|商店街A +Shopping Area B|商店街B +Buildings A|ビル街A +Buildings B|ビル街B +Mansion B|邸宅B +Mansion B|邸宅B +Gate C|ゲートC +Gate D|ゲートD +Residential Street|住宅街 +Residential Street|住宅街 +Slum|スラム街 +Slum|スラム街 +School|学校 +School|学校 +Hospital|病院 +Hospital|病院 +Residential Street|住宅街 +Residential Street|住宅街 +Slum|スラム街 +Slum|スラム街 +School|学校 +School|学校 +Hospital|病院 +Hospital|病院 +City A|街A +City A|街A +City B|街B +City B|街B +Residence A|屋敷A +Residence A|屋敷A +Residence B|屋敷B +Residence B|屋敷B +City A|街A +City A|街A +City B|街B +City B|街B +Residence A|屋敷A +Residence A|屋敷A +Residence B|屋敷B +Residence B|屋敷B +Bridge A (V)|橋A(縦) +Bridge A (H)|橋A(横) +Broken Bridge A (V)|壊れた橋A(縦) +Broken Bridge A (H)|壊れた橋A(横) +Bridge B (V)|橋B(縦) +Bridge B (H)|橋B(横) +Broken Bridge B (V)|壊れた橋(縦) +Broken Bridge B (H)|壊れた橋(横) +Building A|ビルA +Building B|ビルB +Building C|ビルC +Building D|ビルD +Apartment|マンション +Apartment Complex|マンション群 +Collapsed Building A|崩壊したビルA +Collapsed Building B|崩壊したビルB +Building A|ビルA +Building B|ビルB +Building C|ビルC +Building D|ビルD +Apartment|マンション +Apartment Complex|マンション群 +Collapsed Building A|崩壊したビルA +Collapsed Building B|崩壊したビルB +Large Town A|大きな町A +Large Town A|大きな町A +Entertainment District A|歓楽街A +Entertainment District A|歓楽街A +Police Station|警察署 +Police Station|警察署 +Crater A|クレーターA +Crater A|クレーターA +Large Town A|大きな町A +Large Town A|大きな町A +Entertainment District A|歓楽街A +Entertainment District A|歓楽街A +Police Station|警察署 +Police Station|警察署 +Crater A|クレーターA +Crater A|クレーターA +Large Town B|大きな町B +Large Town B|大きな町B +Entertainment District B|歓楽街B +Entertainment District B|歓楽街B +Museum|博物館 +Museum|博物館 +Crater B|クレーターB +Crater B|クレーターB +Large Town B|大きな町B +Large Town B|大きな町B +Entertainment District B|歓楽街B +Entertainment District B|歓楽街B +Museum|博物館 +Museum|博物館 +Crater B|クレーターB +Crater B|クレーターB +Warehouse A|倉庫A +Warehouse A|倉庫A +Factory|工場 +Factory|工場 +Warehouse B|倉庫B +Gantry Crane|ガントリークレーン +Park|公園 +Crater C|クレーターC +Warehouse A|倉庫A +Warehouse A|倉庫A +Factory|工場 +Factory|工場 +Warehouse B|倉庫B +Gantry Crane|ガントリークレーン +Statue A|像A +Statue B|像B +Fuel Tank|燃料タンク +Fuel Tank|燃料タンク +Construction Site|工事現場 +Construction Site|工事現場 +Watchtower|監視塔 +Steel Tower|鉄塔 +Tower A|タワーA +Tower B|タワーB +Fuel Tank|燃料タンク +Fuel Tank|燃料タンク +Construction Site|工事現場 +Construction Site|工事現場 +Watchtower|監視塔 +Steel Tower|鉄塔 +Tower A|タワーA +Tower B|タワーB +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall (Gate)|外壁(門) +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall (Gate)|外壁(門) +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Outer Wall|外壁 +Theme Park|テーマパーク +Theme Park|テーマパーク +Port|港湾 +Port|港湾 +Military Base|軍事基地 +Military Base|軍事基地 +Dome|ドーム +Dome|ドーム +Theme Park|テーマパーク +Theme Park|テーマパーク +Port|港湾 +Port|港湾 +Military Base|軍事基地 +Military Base|軍事基地 +Dome|ドーム +Dome|ドーム +Lighthouse|灯台 +Broken Lighthouse|壊れた灯台 +Temple|寺院 +Church|教会 +Cemetery A|墓地A +Cemetery B|墓地B +Prison|刑務所 +Prison|刑務所 diff --git a/img/titles1/Book.png b/img/titles1/Book.png new file mode 100644 index 0000000..282f3e5 Binary files /dev/null and b/img/titles1/Book.png differ diff --git a/img/titles1/Castle.png b/img/titles1/Castle.png new file mode 100644 index 0000000..d83496b Binary files /dev/null and b/img/titles1/Castle.png differ diff --git a/img/titles1/CrossedSwords.png b/img/titles1/CrossedSwords.png new file mode 100644 index 0000000..efb52d1 Binary files /dev/null and b/img/titles1/CrossedSwords.png differ diff --git a/img/titles1/Crystal.png b/img/titles1/Crystal.png new file mode 100644 index 0000000..59e1555 Binary files /dev/null and b/img/titles1/Crystal.png differ diff --git a/img/titles1/DemonCastle.png b/img/titles1/DemonCastle.png new file mode 100644 index 0000000..4edc302 Binary files /dev/null and b/img/titles1/DemonCastle.png differ diff --git a/img/titles1/Devil.png b/img/titles1/Devil.png new file mode 100644 index 0000000..6fa0d24 Binary files /dev/null and b/img/titles1/Devil.png differ diff --git a/img/titles1/Dragon.png b/img/titles1/Dragon.png new file mode 100644 index 0000000..570dcb0 Binary files /dev/null and b/img/titles1/Dragon.png differ diff --git a/img/titles1/Fountain.png b/img/titles1/Fountain.png new file mode 100644 index 0000000..4b0ac80 Binary files /dev/null and b/img/titles1/Fountain.png differ diff --git a/img/titles1/Gates.png b/img/titles1/Gates.png new file mode 100644 index 0000000..036b69a Binary files /dev/null and b/img/titles1/Gates.png differ diff --git a/img/titles1/Hexagram.png b/img/titles1/Hexagram.png new file mode 100644 index 0000000..9b5a09e Binary files /dev/null and b/img/titles1/Hexagram.png differ diff --git a/img/titles1/Island.png b/img/titles1/Island.png new file mode 100644 index 0000000..6b1880e Binary files /dev/null and b/img/titles1/Island.png differ diff --git a/img/titles1/Night.png b/img/titles1/Night.png new file mode 100644 index 0000000..dfb74f7 Binary files /dev/null and b/img/titles1/Night.png differ diff --git a/img/titles1/Plain.png b/img/titles1/Plain.png new file mode 100644 index 0000000..8732dfd Binary files /dev/null and b/img/titles1/Plain.png differ diff --git a/img/titles1/Sword.png b/img/titles1/Sword.png new file mode 100644 index 0000000..a7eb6e4 Binary files /dev/null and b/img/titles1/Sword.png differ diff --git a/img/titles1/Tower1.png b/img/titles1/Tower1.png new file mode 100644 index 0000000..35a36c3 Binary files /dev/null and b/img/titles1/Tower1.png differ diff --git a/img/titles1/Tower2.png b/img/titles1/Tower2.png new file mode 100644 index 0000000..3c1b409 Binary files /dev/null and b/img/titles1/Tower2.png differ diff --git a/img/titles1/Universe.png b/img/titles1/Universe.png new file mode 100644 index 0000000..38891b0 Binary files /dev/null and b/img/titles1/Universe.png differ diff --git a/img/titles1/Volcano.png b/img/titles1/Volcano.png new file mode 100644 index 0000000..e20b820 Binary files /dev/null and b/img/titles1/Volcano.png differ diff --git a/img/titles1/World.png b/img/titles1/World.png new file mode 100644 index 0000000..6d834fd Binary files /dev/null and b/img/titles1/World.png differ diff --git a/img/titles1/WorldMap.png b/img/titles1/WorldMap.png new file mode 100644 index 0000000..021042f Binary files /dev/null and b/img/titles1/WorldMap.png differ diff --git a/img/titles2/Floral.png b/img/titles2/Floral.png new file mode 100644 index 0000000..11535bf Binary files /dev/null and b/img/titles2/Floral.png differ diff --git a/img/titles2/Medieval.png b/img/titles2/Medieval.png new file mode 100644 index 0000000..4910bd5 Binary files /dev/null and b/img/titles2/Medieval.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..ae5f431 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + 异常生物见闻录 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/jsconfig.json b/js/jsconfig.json new file mode 100644 index 0000000..d07b7d9 --- /dev/null +++ b/js/jsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es6", + }, + "include": [ + "lunalite-pixi-mv.d.ts", + "lunalite-pixi-mz.d.ts", + "./*", + "./plugins_dev/*.js", + "plugins_dev/*.js", + "rmmv.d.ts", + "rmmv-pixi.d.ts" + ], + "exclude": [ + "plugins_dev/*" + ] +} \ No newline at end of file diff --git a/js/libs/fpsmeter.js b/js/libs/fpsmeter.js new file mode 100644 index 0000000..481da37 --- /dev/null +++ b/js/libs/fpsmeter.js @@ -0,0 +1,15 @@ +/*! FPSMeter 0.3.1 - 9th May 2013 | https://github.com/Darsain/fpsmeter */ +(function(m,j){function s(a,e){for(var g in e)try{a.style[g]=e[g]}catch(j){}return a}function H(a){return null==a?String(a):"object"===typeof a||"function"===typeof a?Object.prototype.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase()||"object":typeof a}function R(a,e){if("array"!==H(e))return-1;if(e.indexOf)return e.indexOf(a);for(var g=0,j=e.length;gd.interval?(x=M(k),m()):(x=setTimeout(k,d.interval),P=M(m))}function G(a){a=a||window.event;a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.returnValue= +!1,a.cancelBubble=!0);b.toggle()}function U(){d.toggleOn&&S(f.container,d.toggleOn,G,1);a.removeChild(f.container)}function V(){f.container&&U();h=D.theme[d.theme];y=h.compiledHeatmaps||[];if(!y.length&&h.heatmaps.length){for(p=0;p=m?m*(1+j):m+j-m*j;0===l?g="#000":(t=2*m-l,k=(l-t)/l,g*=6,n=Math.floor(g), +v=g-n,v*=l*k,0===n||6===n?(n=l,k=t+v,l=t):1===n?(n=l-v,k=l,l=t):2===n?(n=t,k=l,l=t+v):3===n?(n=t,k=l-v):4===n?(n=t+v,k=t):(n=l,k=t,l-=v),g="#"+N(n)+N(k)+N(l));b[e]=g}}h.compiledHeatmaps=y}f.container=s(document.createElement("div"),h.container);f.count=f.container.appendChild(s(document.createElement("div"),h.count));f.legend=f.container.appendChild(s(document.createElement("div"),h.legend));f.graph=d.graph?f.container.appendChild(s(document.createElement("div"),h.graph)):0;w.length=0;for(var q in f)f[q]&& +h[q].heatOn&&w.push({name:q,el:f[q]});u.length=0;if(f.graph){f.graph.style.width=d.history*h.column.width+(d.history-1)*h.column.spacing+"px";for(c=0;c=e.video.duration}function s(e){var n=this;n.video.readyState>=n.video.HAVE_FUTURE_DATA?(n.hasAudio||(n.driver.currentTime=n.video.currentTime+e*n.video.playbackRate/1e3,n.video.loop&&u(n)&&(n.driver.currentTime=0)),o(n.video,n.driver.currentTime)):n.video.networkState!==n.video.NETWORK_IDLE||n.video.buffered.length||n.video.load(),n.video.ended&&(delete n.video[g],n.video.pause(!0))}function c(){var e=this,n=e[b];return e.webkitDisplayingFullscreen?void e[E]():("data:"!==n.driver.src&&n.driver.src!==e.src&&(o(e,0,!0),n.driver.src=e.src),void(e.paused&&(n.paused=!1,e.buffered.length||e.load(),n.driver.play(),n.updater.start(),n.hasAudio||(d(e,"play"),n.video.readyState>=n.video.HAVE_ENOUGH_DATA&&d(e,"playing")))))}function v(e){var n=this,r=n[b];r.driver.pause(),r.updater.stop(),n.webkitDisplayingFullscreen&&n[T](),r.paused&&!e||(r.paused=!0,r.hasAudio||d(n,"pause"),n.ended&&(n[g]=!0,d(n,"ended")))}function p(e,r){var i=e[b]={};i.paused=!0,i.hasAudio=r,i.video=e,i.updater=n(s.bind(i)),r?i.driver=a(e):(e.addEventListener("canplay",function(){e.paused||d(e,"playing")}),i.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){i.driver.paused=!0},play:function(){i.driver.paused=!1,u(i)&&o(e,0)},get ended(){return u(i)}}),e.addEventListener("emptied",function(){var n=!i.driver.src||"data:"===i.driver.src;i.driver.src&&i.driver.src!==e.src&&(o(e,0,!0),i.driver.src=e.src,n?i.driver.play():i.updater.stop())},!1),e.addEventListener("webkitbeginfullscreen",function(){e.paused?r&&!i.driver.buffered.length&&i.driver.load():(e.pause(),e[E]())}),r&&(e.addEventListener("webkitendfullscreen",function(){i.driver.currentTime=e.currentTime}),e.addEventListener("seeking",function(){A.indexOf(100*e.currentTime|0)<0&&(i.driver.currentTime=e.currentTime)}))}function l(e){var n=e[b];e[E]=e.play,e[T]=e.pause,e.play=c,e.pause=v,i(e,"paused",n.driver),i(e,"muted",n.driver,!0),i(e,"playbackRate",n.driver,!0),i(e,"ended",n.driver),i(e,"loop",n.driver,!0),r(e,"seeking"),r(e,"seeked"),r(e,"timeupdate",g,!1),r(e,"ended",g,!1)}function f(e,n,r){void 0===n&&(n=!0),void 0===r&&(r=!0),r&&!h||e[b]||(p(e,n),l(e),e.classList.add("IIV"),!n&&e.autoplay&&e.play(),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments"))}var m,y="undefined"==typeof Symbol?function(e){return"@"+(e||"@")+Math.random()}:Symbol,h="object-fit"in document.head.style&&/iPhone|iPod/i.test(navigator.userAgent)&&!matchMedia("(-webkit-video-playable-inline)").matches,b=y(),g=y(),E=y("nativeplay"),T=y("nativepause"),A=[],k=0;return f.isWhitelisted=h,f}(); \ No newline at end of file diff --git a/js/libs/lz-string.js b/js/libs/lz-string.js new file mode 100644 index 0000000..971371d --- /dev/null +++ b/js/libs/lz-string.js @@ -0,0 +1 @@ +var LZString={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_f:String.fromCharCode,compressToBase64:function(e){if(e==null)return"";var t="";var n,r,i,s,o,u,a;var f=0;e=LZString.compress(e);while(f>8;r=e.charCodeAt(f/2)&255;if(f/2+1>8;else i=NaN}else{n=e.charCodeAt((f-1)/2)&255;if((f+1)/2>8;i=e.charCodeAt((f+1)/2)&255}else r=i=NaN}f+=3;s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+LZString._keyStr.charAt(s)+LZString._keyStr.charAt(o)+LZString._keyStr.charAt(u)+LZString._keyStr.charAt(a)}return t},decompressFromBase64:function(e){if(e==null)return"";var t="",n=0,r,i,s,o,u,a,f,l,c=0,h=LZString._f;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(c>4;s=(a&15)<<4|f>>2;o=(f&3)<<6|l;if(n%2==0){r=i<<8;if(f!=64){t+=h(r|s)}if(l!=64){r=o<<8}}else{t=t+h(r|i);if(f!=64){r=s<<8}if(l!=64){t+=h(r|o)}}n+=3}return LZString.decompress(t)},compressToUTF16:function(e){if(e==null)return"";var t="",n,r,i,s=0,o=LZString._f;e=LZString.compress(e);for(n=0;n>1)+32);i=(r&1)<<14;break;case 1:t+=o(i+(r>>2)+32);i=(r&3)<<13;break;case 2:t+=o(i+(r>>3)+32);i=(r&7)<<12;break;case 3:t+=o(i+(r>>4)+32);i=(r&15)<<11;break;case 4:t+=o(i+(r>>5)+32);i=(r&31)<<10;break;case 5:t+=o(i+(r>>6)+32);i=(r&63)<<9;break;case 6:t+=o(i+(r>>7)+32);i=(r&127)<<8;break;case 7:t+=o(i+(r>>8)+32);i=(r&255)<<7;break;case 8:t+=o(i+(r>>9)+32);i=(r&511)<<6;break;case 9:t+=o(i+(r>>10)+32);i=(r&1023)<<5;break;case 10:t+=o(i+(r>>11)+32);i=(r&2047)<<4;break;case 11:t+=o(i+(r>>12)+32);i=(r&4095)<<3;break;case 12:t+=o(i+(r>>13)+32);i=(r&8191)<<2;break;case 13:t+=o(i+(r>>14)+32);i=(r&16383)<<1;break;case 14:t+=o(i+(r>>15)+32,(r&32767)+32);s=0;break}}return t+o(i+32)},decompressFromUTF16:function(e){if(e==null)return"";var t="",n,r,i=0,s=0,o=LZString._f;while(s>14);n=(r&16383)<<2;break;case 2:t+=o(n|r>>13);n=(r&8191)<<3;break;case 3:t+=o(n|r>>12);n=(r&4095)<<4;break;case 4:t+=o(n|r>>11);n=(r&2047)<<5;break;case 5:t+=o(n|r>>10);n=(r&1023)<<6;break;case 6:t+=o(n|r>>9);n=(r&511)<<7;break;case 7:t+=o(n|r>>8);n=(r&255)<<8;break;case 8:t+=o(n|r>>7);n=(r&127)<<9;break;case 9:t+=o(n|r>>6);n=(r&63)<<10;break;case 10:t+=o(n|r>>5);n=(r&31)<<11;break;case 11:t+=o(n|r>>4);n=(r&15)<<12;break;case 12:t+=o(n|r>>3);n=(r&7)<<13;break;case 13:t+=o(n|r>>2);n=(r&3)<<14;break;case 14:t+=o(n|r>>1);n=(r&1)<<15;break;case 15:t+=o(n|r);i=0;break}s++}return LZString.decompress(t)},compressToUint8Array:function(e){var t=LZString.compress(e);var n=new Uint8Array(t.length*2);for(var r=0,i=t.length;r>>8;n[r*2+1]=s%256}return n},decompressFromUint8Array:function(e){if(e===null||e===undefined){return LZString.decompress(e)}else{var t=new Array(e.length/2);for(var n=0,r=t.length;n>1}}else{n=1;for(t=0;t>1}}a--;if(a==0){a=Math.pow(2,l);l++}delete i[u]}else{n=r[u];for(t=0;t>1}}a--;if(a==0){a=Math.pow(2,l);l++}r[o]=f++;u=String(s)}}if(u!==""){if(Object.prototype.hasOwnProperty.call(i,u)){if(u.charCodeAt(0)<256){for(t=0;t>1}}else{n=1;for(t=0;t>1}}a--;if(a==0){a=Math.pow(2,l);l++}delete i[u]}else{n=r[u];for(t=0;t>1}}a--;if(a==0){a=Math.pow(2,l);l++}}n=2;for(t=0;t>1}while(true){h=h<<1;if(p==15){c+=v(h);break}else p++}return c},decompress:function(e){if(e==null)return"";if(e=="")return null;var t=[],n,r=4,i=4,s=3,o="",u="",a,f,l,c,h,p,d,v=LZString._f,m={string:e,val:e.charCodeAt(0),position:32768,index:1};for(a=0;a<3;a+=1){t[a]=a}l=0;h=Math.pow(2,2);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}switch(n=l){case 0:l=0;h=Math.pow(2,8);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}d=v(l);break;case 1:l=0;h=Math.pow(2,16);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}d=v(l);break;case 2:return""}t[3]=d;f=u=d;while(true){if(m.index>m.string.length){return""}l=0;h=Math.pow(2,s);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}switch(d=l){case 0:l=0;h=Math.pow(2,8);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}t[i++]=v(l);d=i-1;r--;break;case 1:l=0;h=Math.pow(2,16);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}t[i++]=v(l);d=i-1;r--;break;case 2:return u}if(r==0){r=Math.pow(2,s);s++}if(t[d]){o=t[d]}else{if(d===i){o=f+f.charAt(0)}else{return null}}u+=o;t[i++]=f+o.charAt(0);r--;f=o;if(r==0){r=Math.pow(2,s);s++}}}};if(typeof module!=="undefined"&&module!=null){module.exports=LZString} diff --git a/js/libs/pixi-picture.js b/js/libs/pixi-picture.js new file mode 100644 index 0000000..6eb8ee6 --- /dev/null +++ b/js/libs/pixi-picture.js @@ -0,0 +1,428 @@ +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + var shaderLib = [ + { + vertUniforms: "", + vertCode: "vTextureCoord = aTextureCoord;", + fragUniforms: "uniform vec4 uTextureClamp;", + fragCode: "vec2 textureCoord = clamp(vTextureCoord, uTextureClamp.xy, uTextureClamp.zw);" + }, + { + vertUniforms: "uniform mat3 uTransform;", + vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;", + fragUniforms: "", + fragCode: "vec2 textureCoord = vTextureCoord;" + }, + { + vertUniforms: "uniform mat3 uTransform;", + vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;", + fragUniforms: "uniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;", + fragCode: "vec2 textureCoord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;" + + "\ntextureCoord = (uMapCoord * vec3(textureCoord, 1.0)).xy;" + + "\ntextureCoord = clamp(textureCoord, uClampFrame.xy, uClampFrame.zw);" + } + ]; + var PictureShader = (function (_super) { + __extends(PictureShader, _super); + function PictureShader(gl, vert, frag, tilingMode) { + var lib = shaderLib[tilingMode]; + _super.call(this, gl, vert.replace(/%SPRITE_UNIFORMS%/gi, lib.vertUniforms) + .replace(/%SPRITE_CODE%/gi, lib.vertCode), frag.replace(/%SPRITE_UNIFORMS%/gi, lib.fragUniforms) + .replace(/%SPRITE_CODE%/gi, lib.fragCode)); + this.bind(); + this.tilingMode = tilingMode; + this.tempQuad = new PIXI.Quad(gl); + this.tempQuad.initVao(this); + this.uniforms.uColor = new Float32Array([1, 1, 1, 1]); + this.uniforms.uSampler = [0, 1]; + } + PictureShader.blendVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\nuniform mat3 mapMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n vMapCoord = (mapMatrix * vec3(aVertexPosition, 1.0)).xy;\n}\n"; + return PictureShader; + }(PIXI.Shader)); + extras.PictureShader = PictureShader; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + var overlayFrag = "\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cs2 = Cs * 2.0 - 1.0;\n vec3 screen = Cb + Cs2 - Cb * Cs2;\n vec3 B;\n if (Cb.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cb.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cb.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n"; + var HardLightShader = (function (_super) { + __extends(HardLightShader, _super); + function HardLightShader(gl, tilingMode) { + _super.call(this, gl, extras.PictureShader.blendVert, overlayFrag, tilingMode); + } + return HardLightShader; + }(extras.PictureShader)); + extras.HardLightShader = HardLightShader; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + function mapFilterBlendModesToPixi(gl, array) { + if (array === void 0) { array = []; } + array[PIXI.BLEND_MODES.OVERLAY] = [new extras.OverlayShader(gl, 0), new extras.OverlayShader(gl, 1), new extras.OverlayShader(gl, 2)]; + array[PIXI.BLEND_MODES.HARD_LIGHT] = [new extras.HardLightShader(gl, 0), new extras.HardLightShader(gl, 1), new extras.HardLightShader(gl, 2)]; + return array; + } + extras.mapFilterBlendModesToPixi = mapFilterBlendModesToPixi; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + var normalFrag = "\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n\n vec4 sample = texture2D(uSampler[0], textureCoord);\n gl_FragColor = sample * uColor;\n}\n"; + var normalVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n}\n"; + var NormalShader = (function (_super) { + __extends(NormalShader, _super); + function NormalShader(gl, tilingMode) { + _super.call(this, gl, normalVert, normalFrag, tilingMode); + } + return NormalShader; + }(extras.PictureShader)); + extras.NormalShader = NormalShader; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + var overlayFrag = "\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cb2 = Cb * 2.0 - 1.0;\n vec3 screen = Cb2 + Cs - Cb2 * Cs;\n vec3 B;\n if (Cs.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cs.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cs.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n"; + var OverlayShader = (function (_super) { + __extends(OverlayShader, _super); + function OverlayShader(gl, tilingMode) { + _super.call(this, gl, extras.PictureShader.blendVert, overlayFrag, tilingMode); + } + return OverlayShader; + }(extras.PictureShader)); + extras.OverlayShader = OverlayShader; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + function nextPow2(v) { + v += (v === 0) ? 1 : 0; + --v; + v |= v >>> 1; + v |= v >>> 2; + v |= v >>> 4; + v |= v >>> 8; + v |= v >>> 16; + return v + 1; + } + var PictureRenderer = (function (_super) { + __extends(PictureRenderer, _super); + function PictureRenderer(renderer) { + _super.call(this, renderer); + } + PictureRenderer.prototype.onContextChange = function () { + var gl = this.renderer.gl; + this.drawModes = extras.mapFilterBlendModesToPixi(gl); + this.normalShader = [new extras.NormalShader(gl, 0), new extras.NormalShader(gl, 1), new extras.NormalShader(gl, 2)]; + this._tempClamp = new Float32Array(4); + this._tempColor = new Float32Array(4); + this._tempRect = new PIXI.Rectangle(); + this._tempRect2 = new PIXI.Rectangle(); + this._tempRect3 = new PIXI.Rectangle(); + this._tempMatrix = new PIXI.Matrix(); + this._tempMatrix2 = new PIXI.Matrix(); + this._bigBuf = new Uint8Array(1 << 20); + this._renderTexture = new PIXI.BaseRenderTexture(1024, 1024); + }; + PictureRenderer.prototype.start = function () { + }; + PictureRenderer.prototype.flush = function () { + }; + PictureRenderer.prototype._getRenderTexture = function (minWidth, minHeight) { + if (this._renderTexture.width < minWidth || + this._renderTexture.height < minHeight) { + minHeight = nextPow2(minWidth); + minHeight = nextPow2(minHeight); + this._renderTexture.resize(minWidth, minHeight); + } + return this._renderTexture; + }; + PictureRenderer.prototype._getBuf = function (size) { + var buf = this._bigBuf; + if (buf.length < size) { + size = nextPow2(size); + buf = new Uint8Array(size); + this._bigBuf = buf; + } + return buf; + }; + PictureRenderer.prototype.render = function (sprite) { + if (!sprite.texture.valid) { + return; + } + var tilingMode = 0; + if (sprite.tileTransform) { + tilingMode = this._isSimpleSprite(sprite) ? 1 : 2; + } + var blendShader = this.drawModes[sprite.blendMode]; + if (blendShader) { + this._renderBlend(sprite, blendShader[tilingMode]); + } + else { + this._renderNormal(sprite, this.normalShader[tilingMode]); + } + }; + PictureRenderer.prototype._renderNormal = function (sprite, shader) { + var renderer = this.renderer; + renderer.bindShader(shader); + renderer.state.setBlendMode(sprite.blendMode); + this._renderInner(sprite, shader); + }; + PictureRenderer.prototype._renderBlend = function (sprite, shader) { + var renderer = this.renderer; + var spriteBounds = sprite.getBounds(); + var renderTarget = renderer._activeRenderTarget; + var matrix = renderTarget.projectionMatrix; + var flipX = matrix.a < 0; + var flipY = matrix.d < 0; + var resolution = renderTarget.resolution; + var screen = this._tempRect; + var fr = renderTarget.sourceFrame || renderTarget.destinationFrame; + screen.x = 0; + screen.y = 0; + screen.width = fr.width; + screen.height = fr.height; + var bounds = this._tempRect2; + var fbw = fr.width * resolution, fbh = fr.height * resolution; + bounds.x = (spriteBounds.x + matrix.tx / matrix.a) * resolution + fbw / 2; + bounds.y = (spriteBounds.y + matrix.ty / matrix.d) * resolution + fbh / 2; + bounds.width = spriteBounds.width * resolution; + bounds.height = spriteBounds.height * resolution; + if (flipX) { + bounds.y = fbw - bounds.width - bounds.x; + } + if (flipY) { + bounds.y = fbh - bounds.height - bounds.y; + } + var screenBounds = this._tempRect3; + var x_1 = Math.floor(Math.max(screen.x, bounds.x)); + var x_2 = Math.ceil(Math.min(screen.x + screen.width, bounds.x + bounds.width)); + var y_1 = Math.floor(Math.max(screen.y, bounds.y)); + var y_2 = Math.ceil(Math.min(screen.y + screen.height, bounds.y + bounds.height)); + var pixelsWidth = x_2 - x_1; + var pixelsHeight = y_2 - y_1; + if (pixelsWidth <= 0 || pixelsHeight <= 0) { + return; + } + var rt = this._getRenderTexture(pixelsWidth, pixelsHeight); + renderer.bindTexture(rt, 1, true); + var gl = renderer.gl; + if (renderer.renderingToScreen && renderTarget.root) { + var buf = this._getBuf(pixelsWidth * pixelsHeight * 4); + gl.readPixels(x_1, y_1, pixelsWidth, pixelsHeight, gl.RGBA, gl.UNSIGNED_BYTE, this._bigBuf); + gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, pixelsWidth, pixelsHeight, gl.RGBA, gl.UNSIGNED_BYTE, this._bigBuf); + } + else { + gl.copyTexSubImage2D(gl.TEXTURE_2D, 0, 0, 0, x_1, y_1, pixelsWidth, pixelsHeight); + } + renderer.bindShader(shader); + renderer.state.setBlendMode(PIXI.BLEND_MODES.NORMAL); + if (shader.uniforms.mapMatrix) { + var mapMatrix = this._tempMatrix; + mapMatrix.a = bounds.width / rt.width / spriteBounds.width; + if (flipX) { + mapMatrix.a = -mapMatrix.a; + mapMatrix.tx = (bounds.x - x_1) / rt.width - (spriteBounds.x + spriteBounds.width) * mapMatrix.a; + } + else { + mapMatrix.tx = (bounds.x - x_1) / rt.width - spriteBounds.x * mapMatrix.a; + } + mapMatrix.d = bounds.height / rt.height / spriteBounds.height; + if (flipY) { + mapMatrix.d = -mapMatrix.d; + mapMatrix.ty = (bounds.y - y_1) / rt.height - (spriteBounds.y + spriteBounds.height) * mapMatrix.d; + } + else { + mapMatrix.ty = (bounds.y - y_1) / rt.height - spriteBounds.y * mapMatrix.d; + } + shader.uniforms.mapMatrix = mapMatrix.toArray(true); + } + this._renderInner(sprite, shader); + }; + PictureRenderer.prototype._renderInner = function (sprite, shader) { + var renderer = this.renderer; + if (shader.tilingMode > 0) { + this._renderWithShader(sprite, shader.tilingMode === 1, shader); + } + else { + this._renderSprite(sprite, shader); + } + }; + PictureRenderer.prototype._renderWithShader = function (ts, isSimple, shader) { + var quad = shader.tempQuad; + var renderer = this.renderer; + renderer.bindVao(quad.vao); + var vertices = quad.vertices; + var _width = ts._width; + var _height = ts._height; + var _anchorX = ts._anchor._x; + var _anchorY = ts._anchor._y; + var w0 = _width * (1 - _anchorX); + var w1 = _width * -_anchorX; + var h0 = _height * (1 - _anchorY); + var h1 = _height * -_anchorY; + var wt = ts.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + vertices[0] = (a * w1) + (c * h1) + tx; + vertices[1] = (d * h1) + (b * w1) + ty; + vertices[2] = (a * w0) + (c * h1) + tx; + vertices[3] = (d * h1) + (b * w0) + ty; + vertices[4] = (a * w0) + (c * h0) + tx; + vertices[5] = (d * h0) + (b * w0) + ty; + vertices[6] = (a * w1) + (c * h0) + tx; + vertices[7] = (d * h0) + (b * w1) + ty; + vertices = quad.uvs; + vertices[0] = vertices[6] = -ts.anchor.x; + vertices[1] = vertices[3] = -ts.anchor.y; + vertices[2] = vertices[4] = 1.0 - ts.anchor.x; + vertices[5] = vertices[7] = 1.0 - ts.anchor.y; + quad.upload(); + var tex = ts._texture; + var lt = ts.tileTransform.localTransform; + var uv = ts.uvTransform; + var mapCoord = uv.mapCoord; + var uClampFrame = uv.uClampFrame; + var uClampOffset = uv.uClampOffset; + var w = tex.width; + var h = tex.height; + var W = _width; + var H = _height; + var tempMat = this._tempMatrix2; + tempMat.set(lt.a * w / W, lt.b * w / H, lt.c * h / W, lt.d * h / H, lt.tx / W, lt.ty / H); + tempMat.invert(); + if (isSimple) { + tempMat.append(mapCoord); + } + else { + shader.uniforms.uMapCoord = mapCoord.toArray(true); + shader.uniforms.uClampFrame = uClampFrame; + shader.uniforms.uClampOffset = uClampOffset; + } + shader.uniforms.uTransform = tempMat.toArray(true); + var color = this._tempColor; + var alpha = ts.worldAlpha; + PIXI.utils.hex2rgb(ts.tint, color); + color[0] *= alpha; + color[1] *= alpha; + color[2] *= alpha; + color[3] = alpha; + shader.uniforms.uColor = color; + renderer.bindTexture(tex, 0, true); + quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0); + }; + PictureRenderer.prototype._renderSprite = function (sprite, shader) { + var renderer = this.renderer; + var quad = shader.tempQuad; + renderer.bindVao(quad.vao); + var uvs = sprite.texture._uvs; + var vertices = quad.vertices; + var vd = sprite.vertexData; + for (var i = 0; i < 8; i++) { + quad.vertices[i] = vd[i]; + } + quad.uvs[0] = uvs.x0; + quad.uvs[1] = uvs.y0; + quad.uvs[2] = uvs.x1; + quad.uvs[3] = uvs.y1; + quad.uvs[4] = uvs.x2; + quad.uvs[5] = uvs.y2; + quad.uvs[6] = uvs.x3; + quad.uvs[7] = uvs.y3; + quad.upload(); + var frame = sprite.texture.frame; + var base = sprite.texture.baseTexture; + var clamp = this._tempClamp; + var eps = 0.5 / base.resolution; + clamp[0] = (frame.x + eps) / base.width; + clamp[1] = (frame.y + eps) / base.height; + clamp[2] = (frame.x + frame.width - eps) / base.width; + clamp[3] = (frame.y + frame.height - eps) / base.height; + shader.uniforms.uTextureClamp = clamp; + var color = this._tempColor; + PIXI.utils.hex2rgb(sprite.tint, color); + var alpha = sprite.worldAlpha; + color[0] *= alpha; + color[1] *= alpha; + color[2] *= alpha; + color[3] = alpha; + shader.uniforms.uColor = color; + renderer.bindTexture(base, 0, true); + quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0); + }; + PictureRenderer.prototype._isSimpleSprite = function (ts) { + var renderer = this.renderer; + var tex = ts._texture; + var baseTex = tex.baseTexture; + var isSimple = baseTex.isPowerOfTwo && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height; + if (isSimple) { + if (!baseTex._glTextures[renderer.CONTEXT_UID]) { + if (baseTex.wrapMode === PIXI.WRAP_MODES.CLAMP) { + baseTex.wrapMode = PIXI.WRAP_MODES.REPEAT; + } + } + else { + isSimple = baseTex.wrapMode !== PIXI.WRAP_MODES.CLAMP; + } + } + return isSimple; + }; + return PictureRenderer; + }(PIXI.ObjectRenderer)); + extras.PictureRenderer = PictureRenderer; + PIXI.WebGLRenderer.registerPlugin('picture', PictureRenderer); + PIXI.CanvasRenderer.registerPlugin('picture', PIXI.CanvasSpriteRenderer); + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + var PictureSprite = (function (_super) { + __extends(PictureSprite, _super); + function PictureSprite(texture) { + _super.call(this, texture); + this.pluginName = 'picture'; + } + return PictureSprite; + }(PIXI.Sprite)); + extras.PictureSprite = PictureSprite; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var extras; + (function (extras) { + var PictureTilingSprite = (function (_super) { + __extends(PictureTilingSprite, _super); + function PictureTilingSprite(texture) { + _super.call(this, texture); + this.pluginName = 'picture'; + } + return PictureTilingSprite; + }(extras.TilingSprite)); + extras.PictureTilingSprite = PictureTilingSprite; + })(extras = PIXI.extras || (PIXI.extras = {})); +})(PIXI || (PIXI = {})); +//# sourceMappingURL=pixi-picture.js.map \ No newline at end of file diff --git a/js/libs/pixi-tilemap.js b/js/libs/pixi-tilemap.js new file mode 100644 index 0000000..c6cc109 --- /dev/null +++ b/js/libs/pixi-tilemap.js @@ -0,0 +1,887 @@ +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var CanvasTileRenderer = (function () { + function CanvasTileRenderer(renderer) { + this.tileAnim = [0, 0]; + this.dontUseTransform = false; + this.renderer = renderer; + this.tileAnim = [0, 0]; + } + return CanvasTileRenderer; + }()); + tilemap.CanvasTileRenderer = CanvasTileRenderer; + PIXI.CanvasRenderer.registerPlugin('tilemap', CanvasTileRenderer); + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var CompositeRectTileLayer = (function (_super) { + __extends(CompositeRectTileLayer, _super); + function CompositeRectTileLayer(zIndex, bitmaps, useSquare, texPerChild) { + var _this = _super.call(this) || this; + _this.shadowColor = new Float32Array([0.0, 0.0, 0.0, 0.5]); + _this.modificationMarker = 0; + _this._globalMat = null; + _this._tempScale = null; + _this.initialize.apply(_this, arguments); + return _this; + } + CompositeRectTileLayer.prototype.updateTransform = function () { + _super.prototype.displayObjectUpdateTransform.call(this); + }; + CompositeRectTileLayer.prototype.initialize = function (zIndex, bitmaps, useSquare, texPerChild) { + this.z = this.zIndex = zIndex; + this.useSquare = useSquare; + this.texPerChild = texPerChild || 16; + if (bitmaps) { + this.setBitmaps(bitmaps); + } + }; + CompositeRectTileLayer.prototype.setBitmaps = function (bitmaps) { + var texPerChild = this.texPerChild; + var len1 = this.children.length; + var len2 = Math.ceil(bitmaps.length / texPerChild); + var i; + for (i = 0; i < len1; i++) { + this.children[i].textures = bitmaps.slice(i * texPerChild, (i + 1) * texPerChild); + } + for (i = len1; i < len2; i++) { + this.addChild(new tilemap.RectTileLayer(this.zIndex, bitmaps.slice(i * texPerChild, (i + 1) * texPerChild))); + } + }; + CompositeRectTileLayer.prototype.clear = function () { + for (var i = 0; i < this.children.length; i++) + this.children[i].clear(); + this.modificationMarker = 0; + }; + CompositeRectTileLayer.prototype.addRect = function (num, u, v, x, y, tileWidth, tileHeight) { + if (this.children[num] && this.children[num].textures) + this.children[num].addRect(0, u, v, x, y, tileWidth, tileHeight); + }; + CompositeRectTileLayer.prototype.addFrame = function (texture_, x, y, animX, animY) { + var texture; + var layer = null, ind = 0; + var children = this.children; + if (typeof texture_ === "number") { + var childIndex = texture_ / this.texPerChild >> 0; + layer = children[childIndex]; + if (!layer) { + layer = children[0]; + if (!layer) { + return false; + } + ind = 0; + } + else { + ind = texture_ % this.texPerChild; + } + texture = layer.textures[ind]; + } + else if (typeof texture_ === "string") { + texture = PIXI.Texture.fromImage(texture_); + } + else { + texture = texture_; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + var tex = child.textures; + for (var j = 0; j < tex.length; j++) { + if (tex[j].baseTexture == texture.baseTexture) { + layer = child; + ind = j; + break; + } + } + if (layer) { + break; + } + } + if (!layer) { + for (i = 0; i < children.length; i++) { + var child = children[i]; + if (child.textures.length < this.texPerChild) { + layer = child; + ind = child.textures.length; + child.textures.push(texture); + break; + } + } + if (!layer) { + children.push(layer = new tilemap.RectTileLayer(this.zIndex, texture)); + ind = 0; + } + } + } + layer.addRect(ind, texture.frame.x, texture.frame.y, x, y, texture.frame.width, texture.frame.height, animX, animY); + return true; + }; + ; + CompositeRectTileLayer.prototype.renderCanvas = function (renderer) { + if (!renderer.plugins.tilemap.dontUseTransform) { + var wt = this.worldTransform; + renderer.context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * renderer.resolution, wt.ty * renderer.resolution); + } + var layers = this.children; + for (var i = 0; i < layers.length; i++) + layers[i].renderCanvas(renderer); + }; + ; + CompositeRectTileLayer.prototype.renderWebGL = function (renderer) { + var gl = renderer.gl; + var shader = renderer.plugins.tilemap.getShader(this.useSquare); + renderer.setObjectRenderer(renderer.plugins.tilemap); + renderer.bindShader(shader); + this._globalMat = this._globalMat || new PIXI.Matrix(); + renderer._activeRenderTarget.projectionMatrix.copy(this._globalMat).append(this.worldTransform); + shader.uniforms.projectionMatrix = this._globalMat.toArray(true); + shader.uniforms.shadowColor = this.shadowColor; + if (this.useSquare) { + var tempScale = this._tempScale = (this._tempScale || [0, 0]); + tempScale[0] = this._globalMat.a >= 0 ? 1 : -1; + tempScale[1] = this._globalMat.d < 0 ? 1 : -1; + var ps = shader.uniforms.pointScale = tempScale; + shader.uniforms.projectionScale = Math.abs(this.worldTransform.a) * renderer.resolution; + } + var af = shader.uniforms.animationFrame = renderer.plugins.tilemap.tileAnim; + var layers = this.children; + for (var i = 0; i < layers.length; i++) + layers[i].renderWebGL(renderer, this.useSquare); + }; + CompositeRectTileLayer.prototype.isModified = function (anim) { + var layers = this.children; + if (this.modificationMarker != layers.length) { + return true; + } + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + if (layer.modificationMarker != layer.pointsBuf.length || + anim && layer.hasAnim) { + return true; + } + } + return false; + }; + CompositeRectTileLayer.prototype.clearModify = function () { + var layers = this.children; + this.modificationMarker = layers.length; + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + layer.modificationMarker = layer.pointsBuf.length; + } + }; + return CompositeRectTileLayer; + }(PIXI.Container)); + tilemap.CompositeRectTileLayer = CompositeRectTileLayer; + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var GraphicsLayer = (function (_super) { + __extends(GraphicsLayer, _super); + function GraphicsLayer(zIndex) { + var _this = _super.call(this) || this; + _this.z = _this.zIndex = zIndex; + return _this; + } + GraphicsLayer.prototype.renderCanvas = function (renderer) { + var wt = null; + if (renderer.plugins.tilemap.dontUseTransform) { + wt = this.transform.worldTransform; + this.transform.worldTransform = PIXI.Matrix.IDENTITY; + } + renderer.plugins.graphics.render(this); + if (renderer.plugins.tilemap.dontUseTransform) { + this.transform.worldTransform = wt; + } + renderer.context.globalAlpha = 1.0; + }; + GraphicsLayer.prototype.renderWebGL = function (renderer) { + if (!this._webGL[renderer.CONTEXT_UID]) + this.dirty = true; + _super.prototype.renderWebGL.call(this, renderer); + }; + GraphicsLayer.prototype.isModified = function (anim) { + return false; + }; + GraphicsLayer.prototype.clearModify = function () { + }; + return GraphicsLayer; + }(PIXI.Graphics)); + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var RectTileLayer = (function (_super) { + __extends(RectTileLayer, _super); + function RectTileLayer(zIndex, texture) { + var _this = _super.call(this) || this; + _this.z = 0; + _this.zIndex = 0; + _this.pointsBuf = []; + _this._tempSize = new Float32Array([0, 0]); + _this._tempTexSize = 1; + _this.modificationMarker = 0; + _this.hasAnim = false; + _this.vbId = 0; + _this.vbBuffer = null; + _this.vbArray = null; + _this.vbInts = null; + _this.initialize(zIndex, texture); + return _this; + } + RectTileLayer.prototype.initialize = function (zIndex, textures) { + if (!textures) { + textures = []; + } + else if (!(textures instanceof Array) && textures.baseTexture) { + textures = [textures]; + } + this.textures = textures; + this.z = this.zIndex = zIndex; + this.visible = false; + }; + RectTileLayer.prototype.clear = function () { + this.pointsBuf.length = 0; + this.modificationMarker = 0; + this.hasAnim = false; + }; + RectTileLayer.prototype.renderCanvas = function (renderer) { + if (this.textures.length === 0) + return; + var points = this.pointsBuf; + renderer.context.fillStyle = '#000000'; + for (var i = 0, n = points.length; i < n; i += 9) { + var x1 = points[i], y1 = points[i + 1]; + var x2 = points[i + 2], y2 = points[i + 3]; + var w = points[i + 4]; + var h = points[i + 5]; + x1 += points[i + 6] * renderer.plugins.tilemap.tileAnim[0]; + y1 += points[i + 7] * renderer.plugins.tilemap.tileAnim[1]; + var textureId = points[i + 8]; + if (textureId >= 0) { + renderer.context.drawImage(this.textures[textureId].baseTexture.source, x1, y1, w, h, x2, y2, w, h); + } + else { + renderer.context.globalAlpha = 0.5; + renderer.context.fillRect(x2, y2, w, h); + renderer.context.globalAlpha = 1; + } + } + }; + RectTileLayer.prototype.addRect = function (textureId, u, v, x, y, tileWidth, tileHeight, animX, animY) { + if (animX === void 0) { animX = 0; } + if (animY === void 0) { animY = 0; } + var pb = this.pointsBuf; + this.hasAnim = this.hasAnim || animX > 0 || animY > 0; + if (tileWidth == tileHeight) { + pb.push(u); + pb.push(v); + pb.push(x); + pb.push(y); + pb.push(tileWidth); + pb.push(tileHeight); + pb.push(animX | 0); + pb.push(animY | 0); + pb.push(textureId); + } + else { + var i; + if (tileWidth % tileHeight === 0) { + for (i = 0; i < tileWidth / tileHeight; i++) { + pb.push(u + i * tileHeight); + pb.push(v); + pb.push(x + i * tileHeight); + pb.push(y); + pb.push(tileHeight); + pb.push(tileHeight); + pb.push(animX | 0); + pb.push(animY | 0); + pb.push(textureId); + } + } + else if (tileHeight % tileWidth === 0) { + for (i = 0; i < tileHeight / tileWidth; i++) { + pb.push(u); + pb.push(v + i * tileWidth); + pb.push(x); + pb.push(y + i * tileWidth); + pb.push(tileWidth); + pb.push(tileWidth); + pb.push(animX | 0); + pb.push(animY | 0); + pb.push(textureId); + } + } + else { + pb.push(u); + pb.push(v); + pb.push(x); + pb.push(y); + pb.push(tileWidth); + pb.push(tileHeight); + pb.push(animX | 0); + pb.push(animY | 0); + pb.push(textureId); + } + } + }; + ; + RectTileLayer.prototype.renderWebGL = function (renderer, useSquare) { + if (useSquare === void 0) { useSquare = false; } + var points = this.pointsBuf; + if (points.length === 0) + return; + var rectsCount = points.length / 9; + var tile = renderer.plugins.tilemap; + var gl = renderer.gl; + if (!useSquare) { + tile.checkIndexBuffer(rectsCount); + } + var shader = tile.getShader(useSquare); + var textures = this.textures; + if (textures.length === 0) + return; + var len = textures.length; + if (this._tempTexSize < shader.maxTextures) { + this._tempTexSize = shader.maxTextures; + this._tempSize = new Float32Array(2 * shader.maxTextures); + } + for (var i = 0; i < len; i++) { + if (!textures[i] || !textures[i].valid) + return; + var texture = textures[i].baseTexture; + } + tile.bindTextures(renderer, shader, textures); + var vb = tile.getVb(this.vbId); + if (!vb) { + vb = tile.createVb(useSquare); + this.vbId = vb.id; + this.vbBuffer = null; + this.modificationMarker = 0; + } + var vao = vb.vao; + renderer.bindVao(vao); + var vertexBuf = vb.vb; + vertexBuf.bind(); + var vertices = rectsCount * shader.vertPerQuad; + if (vertices === 0) + return; + if (this.modificationMarker != vertices) { + this.modificationMarker = vertices; + var vs = shader.stride * vertices; + if (!this.vbBuffer || this.vbBuffer.byteLength < vs) { + var bk = shader.stride; + while (bk < vs) { + bk *= 2; + } + this.vbBuffer = new ArrayBuffer(bk); + this.vbArray = new Float32Array(this.vbBuffer); + this.vbInts = new Uint32Array(this.vbBuffer); + vertexBuf.upload(this.vbBuffer, 0, true); + } + var arr = this.vbArray, ints = this.vbInts; + var sz = 0; + var textureId, shiftU, shiftV; + if (useSquare) { + for (i = 0; i < points.length; i += 9) { + textureId = (points[i + 8] >> 2); + shiftU = 1024 * (points[i + 8] & 1); + shiftV = 1024 * ((points[i + 8] >> 1) & 1); + arr[sz++] = points[i + 2]; + arr[sz++] = points[i + 3]; + arr[sz++] = points[i + 0] + shiftU; + arr[sz++] = points[i + 1] + shiftV; + arr[sz++] = points[i + 4]; + arr[sz++] = points[i + 6]; + arr[sz++] = points[i + 7]; + arr[sz++] = textureId; + } + } + else { + var tint = -1; + for (i = 0; i < points.length; i += 9) { + var eps = 0.5; + textureId = (points[i + 8] >> 2); + shiftU = 1024 * (points[i + 8] & 1); + shiftV = 1024 * ((points[i + 8] >> 1) & 1); + var x = points[i + 2], y = points[i + 3]; + var w = points[i + 4], h = points[i + 5]; + var u = points[i] + shiftU, v = points[i + 1] + shiftV; + var animX = points[i + 6], animY = points[i + 7]; + arr[sz++] = x; + arr[sz++] = y; + arr[sz++] = u; + arr[sz++] = v; + arr[sz++] = u + eps; + arr[sz++] = v + eps; + arr[sz++] = u + w - eps; + arr[sz++] = v + h - eps; + arr[sz++] = animX; + arr[sz++] = animY; + arr[sz++] = textureId; + arr[sz++] = x + w; + arr[sz++] = y; + arr[sz++] = u + w; + arr[sz++] = v; + arr[sz++] = u + eps; + arr[sz++] = v + eps; + arr[sz++] = u + w - eps; + arr[sz++] = v + h - eps; + arr[sz++] = animX; + arr[sz++] = animY; + arr[sz++] = textureId; + arr[sz++] = x + w; + arr[sz++] = y + h; + arr[sz++] = u + w; + arr[sz++] = v + h; + arr[sz++] = u + eps; + arr[sz++] = v + eps; + arr[sz++] = u + w - eps; + arr[sz++] = v + h - eps; + arr[sz++] = animX; + arr[sz++] = animY; + arr[sz++] = textureId; + arr[sz++] = x; + arr[sz++] = y + h; + arr[sz++] = u; + arr[sz++] = v + h; + arr[sz++] = u + eps; + arr[sz++] = v + eps; + arr[sz++] = u + w - eps; + arr[sz++] = v + h - eps; + arr[sz++] = animX; + arr[sz++] = animY; + arr[sz++] = textureId; + } + } + vertexBuf.upload(arr, 0, true); + } + if (useSquare) + gl.drawArrays(gl.POINTS, 0, vertices); + else + gl.drawElements(gl.TRIANGLES, rectsCount * 6, gl.UNSIGNED_SHORT, 0); + }; + return RectTileLayer; + }(PIXI.Container)); + tilemap.RectTileLayer = RectTileLayer; + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var rectShaderFrag = "varying vec2 vTextureCoord;\nvarying vec4 vFrame;\nvarying float vTextureId;\nuniform vec4 shadowColor;\nuniform sampler2D uSamplers[%count%];\nuniform vec2 uSamplerSize[%count%];\n\nvoid main(void){\n vec2 textureCoord = clamp(vTextureCoord, vFrame.xy, vFrame.zw);\n float textureId = floor(vTextureId + 0.5);\n\n vec4 color;\n %forloop%\n gl_FragColor = color;\n}"; + var rectShaderVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aFrame;\nattribute vec2 aAnim;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform vec2 animationFrame;\n\nvarying vec2 vTextureCoord;\nvarying float vTextureId;\nvarying vec4 vFrame;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vec2 anim = aAnim * animationFrame;\n vTextureCoord = aTextureCoord + anim;\n vFrame = aFrame + vec4(anim, anim);\n vTextureId = aTextureId;\n}\n"; + var TilemapShader = (function (_super) { + __extends(TilemapShader, _super); + function TilemapShader(gl, maxTextures, shaderVert, shaderFrag) { + var _this = _super.call(this, gl, shaderVert, shaderFrag) || this; + _this.maxTextures = 0; + _this.maxTextures = maxTextures; + tilemap.shaderGenerator.fillSamplers(_this, _this.maxTextures); + return _this; + } + return TilemapShader; + }(PIXI.Shader)); + tilemap.TilemapShader = TilemapShader; + var RectTileShader = (function (_super) { + __extends(RectTileShader, _super); + function RectTileShader(gl, maxTextures) { + var _this = _super.call(this, gl, maxTextures, rectShaderVert, tilemap.shaderGenerator.generateFragmentSrc(maxTextures, rectShaderFrag)) || this; + _this.vertSize = 11; + _this.vertPerQuad = 4; + _this.stride = _this.vertSize * 4; + tilemap.shaderGenerator.fillSamplers(_this, _this.maxTextures); + return _this; + } + RectTileShader.prototype.createVao = function (renderer, vb) { + var gl = renderer.gl; + return renderer.createVao() + .addIndex(this.indexBuffer) + .addAttribute(vb, this.attributes.aVertexPosition, gl.FLOAT, false, this.stride, 0) + .addAttribute(vb, this.attributes.aTextureCoord, gl.FLOAT, false, this.stride, 2 * 4) + .addAttribute(vb, this.attributes.aFrame, gl.FLOAT, false, this.stride, 4 * 4) + .addAttribute(vb, this.attributes.aAnim, gl.FLOAT, false, this.stride, 8 * 4) + .addAttribute(vb, this.attributes.aTextureId, gl.FLOAT, false, this.stride, 10 * 4); + }; + return RectTileShader; + }(TilemapShader)); + tilemap.RectTileShader = RectTileShader; + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var shaderGenerator; + (function (shaderGenerator) { + function fillSamplers(shader, maxTextures) { + var sampleValues = []; + for (var i = 0; i < maxTextures; i++) { + sampleValues[i] = i; + } + shader.bind(); + shader.uniforms.uSamplers = sampleValues; + var samplerSize = []; + for (i = 0; i < maxTextures; i++) { + samplerSize.push(1.0 / 2048); + samplerSize.push(1.0 / 2048); + } + shader.uniforms.uSamplerSize = samplerSize; + } + shaderGenerator.fillSamplers = fillSamplers; + function generateFragmentSrc(maxTextures, fragmentSrc) { + return fragmentSrc.replace(/%count%/gi, maxTextures + "") + .replace(/%forloop%/gi, this.generateSampleSrc(maxTextures)); + } + shaderGenerator.generateFragmentSrc = generateFragmentSrc; + function generateSampleSrc(maxTextures) { + var src = ''; + src += '\n'; + src += '\n'; + src += 'if(vTextureId <= -1.0) {'; + src += '\n\tcolor = shadowColor;'; + src += '\n}'; + for (var i = 0; i < maxTextures; i++) { + src += '\nelse '; + if (i < maxTextures - 1) { + src += 'if(textureId == ' + i + '.0)'; + } + src += '\n{'; + src += '\n\tcolor = texture2D(uSamplers[' + i + '], textureCoord * uSamplerSize[' + i + ']);'; + src += '\n}'; + } + src += '\n'; + src += '\n'; + return src; + } + shaderGenerator.generateSampleSrc = generateSampleSrc; + })(shaderGenerator = tilemap.shaderGenerator || (tilemap.shaderGenerator = {})); + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var squareShaderVert = "\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec2 aAnim;\nattribute float aTextureId;\nattribute float aSize;\n\nuniform mat3 projectionMatrix;\nuniform vec2 samplerSize;\nuniform vec2 animationFrame;\nuniform float projectionScale;\n\nvarying vec2 vTextureCoord;\nvarying float vSize;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition + aSize * 0.5, 1.0)).xy, 0.0, 1.0);\n gl_PointSize = aSize * projectionScale;\n vTextureCoord = aTextureCoord + aAnim * animationFrame;\n vTextureId = aTextureId;\n vSize = aSize;\n}\n"; + var squareShaderFrag = "\nvarying vec2 vTextureCoord;\nvarying float vSize;\nvarying float vTextureId;\n\nuniform vec4 shadowColor;\nuniform sampler2D uSamplers[%count%];\nuniform vec2 uSamplerSize[%count%];\nuniform vec2 pointScale;\n\nvoid main(void){\n float margin = 0.5 / vSize;\n vec2 pointCoord = (gl_PointCoord - 0.5) * pointScale + 0.5;\n vec2 clamped = vec2(clamp(pointCoord.x, margin, 1.0 - margin), clamp(pointCoord.y, margin, 1.0 - margin));\n vec2 textureCoord = pointCoord * vSize + vTextureCoord;\n float textureId = vTextureId;\n vec4 color;\n %forloop%\n gl_FragColor = color;\n}\n\n"; + var SquareTileShader = (function (_super) { + __extends(SquareTileShader, _super); + function SquareTileShader(gl, maxTextures) { + var _this = _super.call(this, gl, maxTextures, squareShaderVert, tilemap.shaderGenerator.generateFragmentSrc(maxTextures, squareShaderFrag)) || this; + _this.vertSize = 8; + _this.vertPerQuad = 1; + _this.stride = _this.vertSize * 4; + _this.maxTextures = maxTextures; + tilemap.shaderGenerator.fillSamplers(_this, _this.maxTextures); + return _this; + } + SquareTileShader.prototype.createVao = function (renderer, vb) { + var gl = renderer.gl; + return renderer.createVao() + .addIndex(this.indexBuffer) + .addAttribute(vb, this.attributes.aVertexPosition, gl.FLOAT, false, this.stride, 0) + .addAttribute(vb, this.attributes.aTextureCoord, gl.FLOAT, false, this.stride, 2 * 4) + .addAttribute(vb, this.attributes.aSize, gl.FLOAT, false, this.stride, 4 * 4) + .addAttribute(vb, this.attributes.aAnim, gl.FLOAT, false, this.stride, 5 * 4) + .addAttribute(vb, this.attributes.aTextureId, gl.FLOAT, false, this.stride, 7 * 4); + }; + ; + return SquareTileShader; + }(tilemap.TilemapShader)); + tilemap.SquareTileShader = SquareTileShader; + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap) { + var glCore = PIXI.glCore; + function _hackSubImage(tex, sprite, clearBuffer, clearWidth, clearHeight) { + var gl = tex.gl; + var baseTex = sprite.texture.baseTexture; + if (clearBuffer && clearWidth > 0 && clearHeight > 0) { + gl.texSubImage2D(gl.TEXTURE_2D, 0, sprite.position.x, sprite.position.y, clearWidth, clearHeight, tex.format, tex.type, clearBuffer); + } + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1); + gl.texSubImage2D(gl.TEXTURE_2D, 0, sprite.position.x, sprite.position.y, tex.format, tex.type, baseTex.source); + } + var TileRenderer = (function (_super) { + __extends(TileRenderer, _super); + function TileRenderer(renderer) { + var _this = _super.call(this, renderer) || this; + _this.vbs = {}; + _this.indices = new Uint16Array(0); + _this.lastTimeCheck = 0; + _this.tileAnim = [0, 0]; + _this.maxTextures = 4; + _this.texLoc = []; + return _this; + } + TileRenderer.prototype.onContextChange = function () { + var gl = this.renderer.gl; + var maxTextures = this.maxTextures; + this.rectShader = new tilemap.RectTileShader(gl, maxTextures); + this.squareShader = new tilemap.SquareTileShader(gl, maxTextures); + this.checkIndexBuffer(2000); + this.rectShader.indexBuffer = this.indexBuffer; + this.squareShader.indexBuffer = this.indexBuffer; + this.vbs = {}; + this.glTextures = []; + this.boundSprites = []; + this.initBounds(); + }; + TileRenderer.prototype.initBounds = function () { + var gl = this.renderer.gl; + var tempCanvas = document.createElement('canvas'); + tempCanvas.width = 2048; + tempCanvas.height = 2048; + for (var i = 0; i < this.maxTextures; i++) { + var rt = PIXI.RenderTexture.create(2048, 2048); + rt.baseTexture.premultipliedAlpha = true; + rt.baseTexture.scaleMode = TileRenderer.SCALE_MODE; + rt.baseTexture.wrapMode = PIXI.WRAP_MODES.CLAMP; + this.renderer.textureManager.updateTexture(rt); + this.glTextures.push(rt); + var bs = []; + for (var j = 0; j < 4; j++) { + var spr = new PIXI.Sprite(); + spr.position.x = 1024 * (j & 1); + spr.position.y = 1024 * (j >> 1); + bs.push(spr); + } + this.boundSprites.push(bs); + } + }; + TileRenderer.prototype.bindTextures = function (renderer, shader, textures) { + var bounds = this.boundSprites; + var glts = this.glTextures; + var len = textures.length; + var maxTextures = this.maxTextures; + if (len > 4 * maxTextures) { + return; + } + var doClear = TileRenderer.DO_CLEAR; + if (doClear && !this._clearBuffer) { + this._clearBuffer = new Uint8Array(1024 * 1024 * 4); + } + var i; + for (i = 0; i < len; i++) { + var texture = textures[i]; + if (!texture || !textures[i].valid) + continue; + var bs = bounds[i >> 2][i & 3]; + if (!bs.texture || + bs.texture.baseTexture !== texture.baseTexture) { + bs.texture = texture; + var glt = glts[i >> 2]; + renderer.bindTexture(glt, 0, true); + if (doClear) { + _hackSubImage(glt.baseTexture._glTextures[renderer.CONTEXT_UID], bs, this._clearBuffer, 1024, 1024); + } + else { + _hackSubImage(glt.baseTexture._glTextures[renderer.CONTEXT_UID], bs); + } + } + } + this.texLoc.length = 0; + for (i = 0; i < maxTextures; i++) { + this.texLoc.push(renderer.bindTexture(glts[i], i, true)); + } + shader.uniforms.uSamplers = this.texLoc; + }; + TileRenderer.prototype.checkLeaks = function () { + var now = Date.now(); + var old = now - 10000; + if (this.lastTimeCheck < old || + this.lastTimeCheck > now) { + this.lastTimeCheck = now; + var vbs = this.vbs; + for (var key in vbs) { + if (vbs[key].lastTimeAccess < old) { + this.removeVb(key); + } + } + } + }; + ; + TileRenderer.prototype.start = function () { + this.renderer.state.setBlendMode(PIXI.BLEND_MODES.NORMAL); + }; + TileRenderer.prototype.getVb = function (id) { + this.checkLeaks(); + var vb = this.vbs[id]; + if (vb) { + vb.lastAccessTime = Date.now(); + return vb; + } + return null; + }; + TileRenderer.prototype.createVb = function (useSquare) { + var id = ++TileRenderer.vbAutoincrement; + var shader = this.getShader(useSquare); + var gl = this.renderer.gl; + var vb = PIXI.glCore.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW); + var stuff = { + id: id, + vb: vb, + vao: shader.createVao(this.renderer, vb), + lastTimeAccess: Date.now(), + useSquare: useSquare, + shader: shader + }; + this.vbs[id] = stuff; + return stuff; + }; + TileRenderer.prototype.removeVb = function (id) { + if (this.vbs[id]) { + this.vbs[id].vb.destroy(); + this.vbs[id].vao.destroy(); + delete this.vbs[id]; + } + }; + TileRenderer.prototype.checkIndexBuffer = function (size) { + var totalIndices = size * 6; + var indices = this.indices; + if (totalIndices <= indices.length) { + return; + } + var len = indices.length || totalIndices; + while (len < totalIndices) { + len <<= 1; + } + indices = new Uint16Array(len); + this.indices = indices; + for (var i = 0, j = 0; i + 5 < indices.length; i += 6, j += 4) { + indices[i + 0] = j + 0; + indices[i + 1] = j + 1; + indices[i + 2] = j + 2; + indices[i + 3] = j + 0; + indices[i + 4] = j + 2; + indices[i + 5] = j + 3; + } + if (this.indexBuffer) { + this.indexBuffer.upload(indices); + } + else { + var gl = this.renderer.gl; + this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW); + } + }; + TileRenderer.prototype.getShader = function (useSquare) { + return useSquare ? this.squareShader : this.rectShader; + }; + TileRenderer.prototype.destroy = function () { + _super.prototype.destroy.call(this); + this.rectShader.destroy(); + this.squareShader.destroy(); + this.rectShader = null; + this.squareShader = null; + }; + ; + return TileRenderer; + }(PIXI.ObjectRenderer)); + TileRenderer.vbAutoincrement = 0; + TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.LINEAR; + TileRenderer.DO_CLEAR = false; + tilemap.TileRenderer = TileRenderer; + PIXI.WebGLRenderer.registerPlugin('tilemap', TileRenderer); + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +var PIXI; +(function (PIXI) { + var tilemap; + (function (tilemap_1) { + var ZLayer = (function (_super) { + __extends(ZLayer, _super); + function ZLayer(tilemap, zIndex) { + var _this = _super.call(this) || this; + _this._lastAnimationFrame = -1; + _this.tilemap = tilemap; + _this.z = zIndex; + return _this; + } + ZLayer.prototype.clear = function () { + var layers = this.children; + for (var i = 0; i < layers.length; i++) + layers[i].clear(); + this._previousLayers = 0; + }; + ZLayer.prototype.cacheIfDirty = function () { + var tilemap = this.tilemap; + var layers = this.children; + var modified = this._previousLayers != layers.length; + this._previousLayers = layers.length; + var buf = this.canvasBuffer; + var tempRender = this._tempRender; + if (!buf) { + buf = this.canvasBuffer = document.createElement('canvas'); + tempRender = this._tempRender = new PIXI.CanvasRenderer(100, 100, { view: buf }); + tempRender.context = tempRender.rootContext; + tempRender.plugins.tilemap.dontUseTransform = true; + } + if (buf.width != tilemap._layerWidth || + buf.height != tilemap._layerHeight) { + buf.width = tilemap._layerWidth; + buf.height = tilemap._layerHeight; + modified = true; + } + var i; + if (!modified) { + for (i = 0; i < layers.length; i++) { + if (layers[i].isModified(this._lastAnimationFrame != tilemap.animationFrame)) { + modified = true; + break; + } + } + } + this._lastAnimationFrame = tilemap.animationFrame; + if (modified) { + if (tilemap._hackRenderer) { + tilemap._hackRenderer(tempRender); + } + tempRender.context.clearRect(0, 0, buf.width, buf.height); + for (i = 0; i < layers.length; i++) { + layers[i].clearModify(); + layers[i].renderCanvas(tempRender); + } + } + this.layerTransform = this.worldTransform; + for (i = 0; i < layers.length; i++) { + this.layerTransform = layers[i].worldTransform; + break; + } + }; + ; + ZLayer.prototype.renderCanvas = function (renderer) { + this.cacheIfDirty(); + var wt = this.layerTransform; + renderer.context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * renderer.resolution, wt.ty * renderer.resolution); + var tilemap = this.tilemap; + renderer.context.drawImage(this.canvasBuffer, 0, 0); + }; + ; + return ZLayer; + }(PIXI.Container)); + tilemap_1.ZLayer = ZLayer; + })(tilemap = PIXI.tilemap || (PIXI.tilemap = {})); +})(PIXI || (PIXI = {})); +//# sourceMappingURL=pixi-tilemap.js.map \ No newline at end of file diff --git a/js/libs/pixi.js b/js/libs/pixi.js new file mode 100644 index 0000000..4d0e32c --- /dev/null +++ b/js/libs/pixi.js @@ -0,0 +1,40318 @@ +/*! + * pixi.js - v4.5.4 + * Compiled Wed, 23 Aug 2017 10:08:43 UTC + * + * pixi.js is licensed under the MIT License. + * http://www.opensource.org/licenses/mit-license + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.PIXI = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= data.byteLength) + { + gl.bufferSubData(this.type, offset, data); + } + else + { + gl.bufferData(this.type, data, this.drawType); + } + + this.data = data; +}; +/** + * Binds the buffer + * + */ +Buffer.prototype.bind = function() +{ + var gl = this.gl; + gl.bindBuffer(this.type, this.buffer); +}; + +Buffer.createVertexBuffer = function(gl, data, drawType) +{ + return new Buffer(gl, gl.ARRAY_BUFFER, data, drawType); +}; + +Buffer.createIndexBuffer = function(gl, data, drawType) +{ + return new Buffer(gl, gl.ELEMENT_ARRAY_BUFFER, data, drawType); +}; + +Buffer.create = function(gl, type, data, drawType) +{ + return new Buffer(gl, type, data, drawType); +}; + +/** + * Destroys the buffer + * + */ +Buffer.prototype.destroy = function(){ + this.gl.deleteBuffer(this.buffer); +}; + +module.exports = Buffer; + +},{}],2:[function(require,module,exports){ + +var Texture = require('./GLTexture'); + +/** + * Helper class to create a webGL Framebuffer + * + * @class + * @memberof PIXI.glCore + * @param gl {WebGLRenderingContext} The current WebGL rendering context + * @param width {Number} the width of the drawing area of the frame buffer + * @param height {Number} the height of the drawing area of the frame buffer + */ +var Framebuffer = function(gl, width, height) +{ + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + /** + * The frame buffer + * + * @member {WebGLFramebuffer} + */ + this.framebuffer = gl.createFramebuffer(); + + /** + * The stencil buffer + * + * @member {WebGLRenderbuffer} + */ + this.stencil = null; + + /** + * The stencil buffer + * + * @member {PIXI.glCore.GLTexture} + */ + this.texture = null; + + /** + * The width of the drawing area of the buffer + * + * @member {Number} + */ + this.width = width || 100; + /** + * The height of the drawing area of the buffer + * + * @member {Number} + */ + this.height = height || 100; +}; + +/** + * Adds a texture to the frame buffer + * @param texture {PIXI.glCore.GLTexture} + */ +Framebuffer.prototype.enableTexture = function(texture) +{ + var gl = this.gl; + + this.texture = texture || new Texture(gl); + + this.texture.bind(); + + //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); + + this.bind(); + + gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture.texture, 0); +}; + +/** + * Initialises the stencil buffer + */ +Framebuffer.prototype.enableStencil = function() +{ + if(this.stencil)return; + + var gl = this.gl; + + this.stencil = gl.createRenderbuffer(); + + gl.bindRenderbuffer(gl.RENDERBUFFER, this.stencil); + + // TODO.. this is depth AND stencil? + gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, this.stencil); + gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, this.width , this.height ); + + +}; + +/** + * Erases the drawing area and fills it with a colour + * @param r {Number} the red value of the clearing colour + * @param g {Number} the green value of the clearing colour + * @param b {Number} the blue value of the clearing colour + * @param a {Number} the alpha value of the clearing colour + */ +Framebuffer.prototype.clear = function( r, g, b, a ) +{ + var gl = this.gl; + + gl.clearColor(r, g, b, a); + this.bind(); + gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); +}; + +/** + * Binds the frame buffer to the WebGL context + */ +Framebuffer.prototype.bind = function() +{ + var gl = this.gl; + gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer ); +}; + +/** + * Unbinds the frame buffer to the WebGL context + */ +Framebuffer.prototype.unbind = function() +{ + var gl = this.gl; + gl.bindFramebuffer(gl.FRAMEBUFFER, null ); +}; +/** + * Resizes the drawing area of the buffer to the given width and height + * @param width {Number} the new width + * @param height {Number} the new height + */ +Framebuffer.prototype.resize = function(width, height) +{ + var gl = this.gl; + + this.width = width; + this.height = height; + + if ( this.texture ) + { + this.texture.uploadData(null, width, height); + } + + if ( this.stencil ) + { + // update the stencil buffer width and height + gl.bindRenderbuffer(gl.RENDERBUFFER, this.stencil); + gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height); + } +}; + +/** + * Destroys this buffer + */ +Framebuffer.prototype.destroy = function() +{ + var gl = this.gl; + + //TODO + if(this.texture) + { + this.texture.destroy(); + } + + gl.deleteFramebuffer(this.framebuffer); + + this.gl = null; + + this.stencil = null; + this.texture = null; +}; + +/** + * Creates a frame buffer with a texture containing the given data + * @static + * @param gl {WebGLRenderingContext} The current WebGL rendering context + * @param width {Number} the width of the drawing area of the frame buffer + * @param height {Number} the height of the drawing area of the frame buffer + * @param data {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} an array of data + */ +Framebuffer.createRGBA = function(gl, width, height, data) +{ + var texture = Texture.fromData(gl, null, width, height); + texture.enableNearestScaling(); + texture.enableWrapClamp(); + + //now create the framebuffer object and attach the texture to it. + var fbo = new Framebuffer(gl, width, height); + fbo.enableTexture(texture); + //fbo.enableStencil(); // get this back on soon! + + fbo.unbind(); + + return fbo; +}; + +/** + * Creates a frame buffer with a texture containing the given data + * @static + * @param gl {WebGLRenderingContext} The current WebGL rendering context + * @param width {Number} the width of the drawing area of the frame buffer + * @param height {Number} the height of the drawing area of the frame buffer + * @param data {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} an array of data + */ +Framebuffer.createFloat32 = function(gl, width, height, data) +{ + // create a new texture.. + var texture = new Texture.fromData(gl, data, width, height); + texture.enableNearestScaling(); + texture.enableWrapClamp(); + + //now create the framebuffer object and attach the texture to it. + var fbo = new Framebuffer(gl, width, height); + fbo.enableTexture(texture); + + fbo.unbind(); + + return fbo; +}; + +module.exports = Framebuffer; + +},{"./GLTexture":4}],3:[function(require,module,exports){ + +var compileProgram = require('./shader/compileProgram'), + extractAttributes = require('./shader/extractAttributes'), + extractUniforms = require('./shader/extractUniforms'), + setPrecision = require('./shader/setPrecision'), + generateUniformAccessObject = require('./shader/generateUniformAccessObject'); + +/** + * Helper class to create a webGL Shader + * + * @class + * @memberof PIXI.glCore + * @param gl {WebGLRenderingContext} + * @param vertexSrc {string|string[]} The vertex shader source as an array of strings. + * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings. + * @param precision {precision]} The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'. + * @param attributeLocations {object} A key value pair showing which location eact attribute should sit eg {position:0, uvs:1} + */ +var Shader = function(gl, vertexSrc, fragmentSrc, precision, attributeLocations) +{ + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + if(precision) + { + vertexSrc = setPrecision(vertexSrc, precision); + fragmentSrc = setPrecision(fragmentSrc, precision); + } + + /** + * The shader program + * + * @member {WebGLProgram} + */ + // First compile the program.. + this.program = compileProgram(gl, vertexSrc, fragmentSrc, attributeLocations); + + /** + * The attributes of the shader as an object containing the following properties + * { + * type, + * size, + * location, + * pointer + * } + * @member {Object} + */ + // next extract the attributes + this.attributes = extractAttributes(gl, this.program); + + this.uniformData = extractUniforms(gl, this.program); + + /** + * The uniforms of the shader as an object containing the following properties + * { + * gl, + * data + * } + * @member {Object} + */ + this.uniforms = generateUniformAccessObject( gl, this.uniformData ); + +}; +/** + * Uses this shader + */ +Shader.prototype.bind = function() +{ + this.gl.useProgram(this.program); +}; + +/** + * Destroys this shader + * TODO + */ +Shader.prototype.destroy = function() +{ + this.attributes = null; + this.uniformData = null; + this.uniforms = null; + + var gl = this.gl; + gl.deleteProgram(this.program); +}; + + +module.exports = Shader; + +},{"./shader/compileProgram":9,"./shader/extractAttributes":11,"./shader/extractUniforms":12,"./shader/generateUniformAccessObject":13,"./shader/setPrecision":17}],4:[function(require,module,exports){ + +/** + * Helper class to create a WebGL Texture + * + * @class + * @memberof PIXI.glCore + * @param gl {WebGLRenderingContext} The current WebGL context + * @param width {number} the width of the texture + * @param height {number} the height of the texture + * @param format {number} the pixel format of the texture. defaults to gl.RGBA + * @param type {number} the gl type of the texture. defaults to gl.UNSIGNED_BYTE + */ +var Texture = function(gl, width, height, format, type) +{ + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + + /** + * The WebGL texture + * + * @member {WebGLTexture} + */ + this.texture = gl.createTexture(); + + /** + * If mipmapping was used for this texture, enable and disable with enableMipmap() + * + * @member {Boolean} + */ + // some settings.. + this.mipmap = false; + + + /** + * Set to true to enable pre-multiplied alpha + * + * @member {Boolean} + */ + this.premultiplyAlpha = false; + + /** + * The width of texture + * + * @member {Number} + */ + this.width = width || -1; + /** + * The height of texture + * + * @member {Number} + */ + this.height = height || -1; + + /** + * The pixel format of the texture. defaults to gl.RGBA + * + * @member {Number} + */ + this.format = format || gl.RGBA; + + /** + * The gl type of the texture. defaults to gl.UNSIGNED_BYTE + * + * @member {Number} + */ + this.type = type || gl.UNSIGNED_BYTE; + + +}; + +/** + * Uploads this texture to the GPU + * @param source {HTMLImageElement|ImageData|HTMLVideoElement} the source image of the texture + */ +Texture.prototype.upload = function(source) +{ + this.bind(); + + var gl = this.gl; + + + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha); + + var newWidth = source.videoWidth || source.width; + var newHeight = source.videoHeight || source.height; + + if(newHeight !== this.height || newWidth !== this.width) + { + gl.texImage2D(gl.TEXTURE_2D, 0, this.format, this.format, this.type, source); + } + else + { + gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, this.format, this.type, source); + } + + // if the source is a video, we need to use the videoWidth / videoHeight properties as width / height will be incorrect. + this.width = newWidth; + this.height = newHeight; + +}; + +var FLOATING_POINT_AVAILABLE = false; + +/** + * Use a data source and uploads this texture to the GPU + * @param data {TypedArray} the data to upload to the texture + * @param width {number} the new width of the texture + * @param height {number} the new height of the texture + */ +Texture.prototype.uploadData = function(data, width, height) +{ + this.bind(); + + var gl = this.gl; + + + if(data instanceof Float32Array) + { + if(!FLOATING_POINT_AVAILABLE) + { + var ext = gl.getExtension("OES_texture_float"); + + if(ext) + { + FLOATING_POINT_AVAILABLE = true; + } + else + { + throw new Error('floating point textures not available'); + } + } + + this.type = gl.FLOAT; + } + else + { + // TODO support for other types + this.type = this.type || gl.UNSIGNED_BYTE; + } + + // what type of data? + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this.premultiplyAlpha); + + + if(width !== this.width || height !== this.height) + { + gl.texImage2D(gl.TEXTURE_2D, 0, this.format, width, height, 0, this.format, this.type, data || null); + } + else + { + gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, this.format, this.type, data || null); + } + + this.width = width; + this.height = height; + + +// texSubImage2D +}; + +/** + * Binds the texture + * @param location + */ +Texture.prototype.bind = function(location) +{ + var gl = this.gl; + + if(location !== undefined) + { + gl.activeTexture(gl.TEXTURE0 + location); + } + + gl.bindTexture(gl.TEXTURE_2D, this.texture); +}; + +/** + * Unbinds the texture + */ +Texture.prototype.unbind = function() +{ + var gl = this.gl; + gl.bindTexture(gl.TEXTURE_2D, null); +}; + +/** + * @param linear {Boolean} if we want to use linear filtering or nearest neighbour interpolation + */ +Texture.prototype.minFilter = function( linear ) +{ + var gl = this.gl; + + this.bind(); + + if(this.mipmap) + { + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, linear ? gl.LINEAR_MIPMAP_LINEAR : gl.NEAREST_MIPMAP_NEAREST); + } + else + { + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, linear ? gl.LINEAR : gl.NEAREST); + } +}; + +/** + * @param linear {Boolean} if we want to use linear filtering or nearest neighbour interpolation + */ +Texture.prototype.magFilter = function( linear ) +{ + var gl = this.gl; + + this.bind(); + + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, linear ? gl.LINEAR : gl.NEAREST); +}; + +/** + * Enables mipmapping + */ +Texture.prototype.enableMipmap = function() +{ + var gl = this.gl; + + this.bind(); + + this.mipmap = true; + + gl.generateMipmap(gl.TEXTURE_2D); +}; + +/** + * Enables linear filtering + */ +Texture.prototype.enableLinearScaling = function() +{ + this.minFilter(true); + this.magFilter(true); +}; + +/** + * Enables nearest neighbour interpolation + */ +Texture.prototype.enableNearestScaling = function() +{ + this.minFilter(false); + this.magFilter(false); +}; + +/** + * Enables clamping on the texture so WebGL will not repeat it + */ +Texture.prototype.enableWrapClamp = function() +{ + var gl = this.gl; + + this.bind(); + + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); +}; + +/** + * Enable tiling on the texture + */ +Texture.prototype.enableWrapRepeat = function() +{ + var gl = this.gl; + + this.bind(); + + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT); +}; + +Texture.prototype.enableWrapMirrorRepeat = function() +{ + var gl = this.gl; + + this.bind(); + + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.MIRRORED_REPEAT); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.MIRRORED_REPEAT); +}; + + +/** + * Destroys this texture + */ +Texture.prototype.destroy = function() +{ + var gl = this.gl; + //TODO + gl.deleteTexture(this.texture); +}; + +/** + * @static + * @param gl {WebGLRenderingContext} The current WebGL context + * @param source {HTMLImageElement|ImageData} the source image of the texture + * @param premultiplyAlpha {Boolean} If we want to use pre-multiplied alpha + */ +Texture.fromSource = function(gl, source, premultiplyAlpha) +{ + var texture = new Texture(gl); + texture.premultiplyAlpha = premultiplyAlpha || false; + texture.upload(source); + + return texture; +}; + +/** + * @static + * @param gl {WebGLRenderingContext} The current WebGL context + * @param data {TypedArray} the data to upload to the texture + * @param width {number} the new width of the texture + * @param height {number} the new height of the texture + */ +Texture.fromData = function(gl, data, width, height) +{ + //console.log(data, width, height); + var texture = new Texture(gl); + texture.uploadData(data, width, height); + + return texture; +}; + + +module.exports = Texture; + +},{}],5:[function(require,module,exports){ + +// state object// +var setVertexAttribArrays = require( './setVertexAttribArrays' ); + +/** + * Helper class to work with WebGL VertexArrayObjects (vaos) + * Only works if WebGL extensions are enabled (they usually are) + * + * @class + * @memberof PIXI.glCore + * @param gl {WebGLRenderingContext} The current WebGL rendering context + */ +function VertexArrayObject(gl, state) +{ + this.nativeVaoExtension = null; + + if(!VertexArrayObject.FORCE_NATIVE) + { + this.nativeVaoExtension = gl.getExtension('OES_vertex_array_object') || + gl.getExtension('MOZ_OES_vertex_array_object') || + gl.getExtension('WEBKIT_OES_vertex_array_object'); + } + + this.nativeState = state; + + if(this.nativeVaoExtension) + { + this.nativeVao = this.nativeVaoExtension.createVertexArrayOES(); + + var maxAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); + + // VAO - overwrite the state.. + this.nativeState = { + tempAttribState: new Array(maxAttribs), + attribState: new Array(maxAttribs) + }; + } + + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + /** + * An array of attributes + * + * @member {Array} + */ + this.attributes = []; + + /** + * @member {PIXI.glCore.GLBuffer} + */ + this.indexBuffer = null; + + /** + * A boolean flag + * + * @member {Boolean} + */ + this.dirty = false; +} + +VertexArrayObject.prototype.constructor = VertexArrayObject; +module.exports = VertexArrayObject; + +/** +* Some devices behave a bit funny when using the newer extensions (im looking at you ipad 2!) +* If you find on older devices that things have gone a bit weird then set this to true. +*/ +/** + * Lets the VAO know if you should use the WebGL extension or the native methods. + * Some devices behave a bit funny when using the newer extensions (im looking at you ipad 2!) + * If you find on older devices that things have gone a bit weird then set this to true. + * @static + * @property {Boolean} FORCE_NATIVE + */ +VertexArrayObject.FORCE_NATIVE = false; + +/** + * Binds the buffer + */ +VertexArrayObject.prototype.bind = function() +{ + if(this.nativeVao) + { + this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao); + + if(this.dirty) + { + this.dirty = false; + this.activate(); + } + } + else + { + + this.activate(); + } + + return this; +}; + +/** + * Unbinds the buffer + */ +VertexArrayObject.prototype.unbind = function() +{ + if(this.nativeVao) + { + this.nativeVaoExtension.bindVertexArrayOES(null); + } + + return this; +}; + +/** + * Uses this vao + */ +VertexArrayObject.prototype.activate = function() +{ + + var gl = this.gl; + var lastBuffer = null; + + for (var i = 0; i < this.attributes.length; i++) + { + var attrib = this.attributes[i]; + + if(lastBuffer !== attrib.buffer) + { + attrib.buffer.bind(); + lastBuffer = attrib.buffer; + } + + gl.vertexAttribPointer(attrib.attribute.location, + attrib.attribute.size, + attrib.type || gl.FLOAT, + attrib.normalized || false, + attrib.stride || 0, + attrib.start || 0); + } + + setVertexAttribArrays(gl, this.attributes, this.nativeState); + + if(this.indexBuffer) + { + this.indexBuffer.bind(); + } + + return this; +}; + +/** + * + * @param buffer {PIXI.gl.GLBuffer} + * @param attribute {*} + * @param type {String} + * @param normalized {Boolean} + * @param stride {Number} + * @param start {Number} + */ +VertexArrayObject.prototype.addAttribute = function(buffer, attribute, type, normalized, stride, start) +{ + this.attributes.push({ + buffer: buffer, + attribute: attribute, + + location: attribute.location, + type: type || this.gl.FLOAT, + normalized: normalized || false, + stride: stride || 0, + start: start || 0 + }); + + this.dirty = true; + + return this; +}; + +/** + * + * @param buffer {PIXI.gl.GLBuffer} + */ +VertexArrayObject.prototype.addIndex = function(buffer/*, options*/) +{ + this.indexBuffer = buffer; + + this.dirty = true; + + return this; +}; + +/** + * Unbinds this vao and disables it + */ +VertexArrayObject.prototype.clear = function() +{ + // var gl = this.gl; + + // TODO - should this function unbind after clear? + // for now, no but lets see what happens in the real world! + if(this.nativeVao) + { + this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao); + } + + this.attributes.length = 0; + this.indexBuffer = null; + + return this; +}; + +/** + * @param type {Number} + * @param size {Number} + * @param start {Number} + */ +VertexArrayObject.prototype.draw = function(type, size, start) +{ + var gl = this.gl; + + if(this.indexBuffer) + { + gl.drawElements(type, size || this.indexBuffer.data.length, gl.UNSIGNED_SHORT, (start || 0) * 2 ); + } + else + { + // TODO need a better way to calculate size.. + gl.drawArrays(type, start, size || this.getSize()); + } + + return this; +}; + +/** + * Destroy this vao + */ +VertexArrayObject.prototype.destroy = function() +{ + // lose references + this.gl = null; + this.indexBuffer = null; + this.attributes = null; + this.nativeState = null; + + if(this.nativeVao) + { + this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao); + } + + this.nativeVaoExtension = null; + this.nativeVao = null; +}; + +VertexArrayObject.prototype.getSize = function() +{ + var attrib = this.attributes[0]; + return attrib.buffer.data.length / (( attrib.stride/4 ) || attrib.attribute.size); +}; + +},{"./setVertexAttribArrays":8}],6:[function(require,module,exports){ + +/** + * Helper class to create a webGL Context + * + * @class + * @memberof PIXI.glCore + * @param canvas {HTMLCanvasElement} the canvas element that we will get the context from + * @param options {Object} An options object that gets passed in to the canvas element containing the context attributes, + * see https://developer.mozilla.org/en/docs/Web/API/HTMLCanvasElement/getContext for the options available + * @return {WebGLRenderingContext} the WebGL context + */ +var createContext = function(canvas, options) +{ + var gl = canvas.getContext('webgl', options) || + canvas.getContext('experimental-webgl', options); + + if (!gl) + { + // fail, not able to get a context + throw new Error('This browser does not support webGL. Try using the canvas renderer'); + } + + return gl; +}; + +module.exports = createContext; + +},{}],7:[function(require,module,exports){ +var gl = { + createContext: require('./createContext'), + setVertexAttribArrays: require('./setVertexAttribArrays'), + GLBuffer: require('./GLBuffer'), + GLFramebuffer: require('./GLFramebuffer'), + GLShader: require('./GLShader'), + GLTexture: require('./GLTexture'), + VertexArrayObject: require('./VertexArrayObject'), + shader: require('./shader') +}; + +// Export for Node-compatible environments +if (typeof module !== 'undefined' && module.exports) +{ + // Export the module + module.exports = gl; +} + +// Add to the browser window pixi.gl +if (typeof window !== 'undefined') +{ + // add the window object + window.PIXI = window.PIXI || {}; + window.PIXI.glCore = gl; +} + +},{"./GLBuffer":1,"./GLFramebuffer":2,"./GLShader":3,"./GLTexture":4,"./VertexArrayObject":5,"./createContext":6,"./setVertexAttribArrays":8,"./shader":14}],8:[function(require,module,exports){ +// var GL_MAP = {}; + +/** + * @param gl {WebGLRenderingContext} The current WebGL context + * @param attribs {*} + * @param state {*} + */ +var setVertexAttribArrays = function (gl, attribs, state) +{ + var i; + if(state) + { + var tempAttribState = state.tempAttribState, + attribState = state.attribState; + + for (i = 0; i < tempAttribState.length; i++) + { + tempAttribState[i] = false; + } + + // set the new attribs + for (i = 0; i < attribs.length; i++) + { + tempAttribState[attribs[i].attribute.location] = true; + } + + for (i = 0; i < attribState.length; i++) + { + if (attribState[i] !== tempAttribState[i]) + { + attribState[i] = tempAttribState[i]; + + if (state.attribState[i]) + { + gl.enableVertexAttribArray(i); + } + else + { + gl.disableVertexAttribArray(i); + } + } + } + + } + else + { + for (i = 0; i < attribs.length; i++) + { + var attrib = attribs[i]; + gl.enableVertexAttribArray(attrib.attribute.location); + } + } +}; + +module.exports = setVertexAttribArrays; + +},{}],9:[function(require,module,exports){ + +/** + * @class + * @memberof PIXI.glCore.shader + * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram} + * @param vertexSrc {string|string[]} The vertex shader source as an array of strings. + * @param fragmentSrc {string|string[]} The fragment shader source as an array of strings. + * @param attributeLocations {Object} An attribute location map that lets you manually set the attribute locations + * @return {WebGLProgram} the shader program + */ +var compileProgram = function(gl, vertexSrc, fragmentSrc, attributeLocations) +{ + var glVertShader = compileShader(gl, gl.VERTEX_SHADER, vertexSrc); + var glFragShader = compileShader(gl, gl.FRAGMENT_SHADER, fragmentSrc); + + var program = gl.createProgram(); + + gl.attachShader(program, glVertShader); + gl.attachShader(program, glFragShader); + + // optionally, set the attributes manually for the program rather than letting WebGL decide.. + if(attributeLocations) + { + for(var i in attributeLocations) + { + gl.bindAttribLocation(program, attributeLocations[i], i); + } + } + + + gl.linkProgram(program); + + // if linking fails, then log and cleanup + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) + { + console.error('Pixi.js Error: Could not initialize shader.'); + console.error('gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS)); + console.error('gl.getError()', gl.getError()); + + // if there is a program info log, log it + if (gl.getProgramInfoLog(program) !== '') + { + console.warn('Pixi.js Warning: gl.getProgramInfoLog()', gl.getProgramInfoLog(program)); + } + + gl.deleteProgram(program); + program = null; + } + + // clean up some shaders + gl.deleteShader(glVertShader); + gl.deleteShader(glFragShader); + + return program; +}; + +/** + * @private + * @param gl {WebGLRenderingContext} The current WebGL context {WebGLProgram} + * @param type {Number} the type, can be either VERTEX_SHADER or FRAGMENT_SHADER + * @param vertexSrc {string|string[]} The vertex shader source as an array of strings. + * @return {WebGLShader} the shader + */ +var compileShader = function (gl, type, src) +{ + var shader = gl.createShader(type); + + gl.shaderSource(shader, src); + gl.compileShader(shader); + + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) + { + console.log(gl.getShaderInfoLog(shader)); + return null; + } + + return shader; +}; + +module.exports = compileProgram; + +},{}],10:[function(require,module,exports){ +/** + * @class + * @memberof PIXI.glCore.shader + * @param type {String} Type of value + * @param size {Number} + */ +var defaultValue = function(type, size) +{ + switch (type) + { + case 'float': + return 0; + + case 'vec2': + return new Float32Array(2 * size); + + case 'vec3': + return new Float32Array(3 * size); + + case 'vec4': + return new Float32Array(4 * size); + + case 'int': + case 'sampler2D': + return 0; + + case 'ivec2': + return new Int32Array(2 * size); + + case 'ivec3': + return new Int32Array(3 * size); + + case 'ivec4': + return new Int32Array(4 * size); + + case 'bool': + return false; + + case 'bvec2': + + return booleanArray( 2 * size); + + case 'bvec3': + return booleanArray(3 * size); + + case 'bvec4': + return booleanArray(4 * size); + + case 'mat2': + return new Float32Array([1, 0, + 0, 1]); + + case 'mat3': + return new Float32Array([1, 0, 0, + 0, 1, 0, + 0, 0, 1]); + + case 'mat4': + return new Float32Array([1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]); + } +}; + +var booleanArray = function(size) +{ + var array = new Array(size); + + for (var i = 0; i < array.length; i++) + { + array[i] = false; + } + + return array; +}; + +module.exports = defaultValue; + +},{}],11:[function(require,module,exports){ + +var mapType = require('./mapType'); +var mapSize = require('./mapSize'); + +/** + * Extracts the attributes + * @class + * @memberof PIXI.glCore.shader + * @param gl {WebGLRenderingContext} The current WebGL rendering context + * @param program {WebGLProgram} The shader program to get the attributes from + * @return attributes {Object} + */ +var extractAttributes = function(gl, program) +{ + var attributes = {}; + + var totalAttributes = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES); + + for (var i = 0; i < totalAttributes; i++) + { + var attribData = gl.getActiveAttrib(program, i); + var type = mapType(gl, attribData.type); + + attributes[attribData.name] = { + type:type, + size:mapSize(type), + location:gl.getAttribLocation(program, attribData.name), + //TODO - make an attribute object + pointer: pointer + }; + } + + return attributes; +}; + +var pointer = function(type, normalized, stride, start){ + // console.log(this.location) + gl.vertexAttribPointer(this.location,this.size, type || gl.FLOAT, normalized || false, stride || 0, start || 0); +}; + +module.exports = extractAttributes; + +},{"./mapSize":15,"./mapType":16}],12:[function(require,module,exports){ +var mapType = require('./mapType'); +var defaultValue = require('./defaultValue'); + +/** + * Extracts the uniforms + * @class + * @memberof PIXI.glCore.shader + * @param gl {WebGLRenderingContext} The current WebGL rendering context + * @param program {WebGLProgram} The shader program to get the uniforms from + * @return uniforms {Object} + */ +var extractUniforms = function(gl, program) +{ + var uniforms = {}; + + var totalUniforms = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS); + + for (var i = 0; i < totalUniforms; i++) + { + var uniformData = gl.getActiveUniform(program, i); + var name = uniformData.name.replace(/\[.*?\]/, ""); + var type = mapType(gl, uniformData.type ); + + uniforms[name] = { + type:type, + size:uniformData.size, + location:gl.getUniformLocation(program, name), + value:defaultValue(type, uniformData.size) + }; + } + + return uniforms; +}; + +module.exports = extractUniforms; + +},{"./defaultValue":10,"./mapType":16}],13:[function(require,module,exports){ +/** + * Extracts the attributes + * @class + * @memberof PIXI.glCore.shader + * @param gl {WebGLRenderingContext} The current WebGL rendering context + * @param uniforms {Array} @mat ? + * @return attributes {Object} + */ +var generateUniformAccessObject = function(gl, uniformData) +{ + // this is the object we will be sending back. + // an object hierachy will be created for structs + var uniforms = {data:{}}; + + uniforms.gl = gl; + + var uniformKeys= Object.keys(uniformData); + + for (var i = 0; i < uniformKeys.length; i++) + { + var fullName = uniformKeys[i]; + + var nameTokens = fullName.split('.'); + var name = nameTokens[nameTokens.length - 1]; + + + var uniformGroup = getUniformGroup(nameTokens, uniforms); + + var uniform = uniformData[fullName]; + uniformGroup.data[name] = uniform; + + uniformGroup.gl = gl; + + Object.defineProperty(uniformGroup, name, { + get: generateGetter(name), + set: generateSetter(name, uniform) + }); + } + + return uniforms; +}; + +var generateGetter = function(name) +{ + var template = getterTemplate.replace('%%', name); + return new Function(template); // jshint ignore:line +}; + +var generateSetter = function(name, uniform) +{ + var template = setterTemplate.replace(/%%/g, name); + var setTemplate; + + if(uniform.size === 1) + { + setTemplate = GLSL_TO_SINGLE_SETTERS[uniform.type]; + } + else + { + setTemplate = GLSL_TO_ARRAY_SETTERS[uniform.type]; + } + + if(setTemplate) + { + template += "\nthis.gl." + setTemplate + ";"; + } + + return new Function('value', template); // jshint ignore:line +}; + +var getUniformGroup = function(nameTokens, uniform) +{ + var cur = uniform; + + for (var i = 0; i < nameTokens.length - 1; i++) + { + var o = cur[nameTokens[i]] || {data:{}}; + cur[nameTokens[i]] = o; + cur = o; + } + + return cur; +}; + +var getterTemplate = [ + 'return this.data.%%.value;', +].join('\n'); + +var setterTemplate = [ + 'this.data.%%.value = value;', + 'var location = this.data.%%.location;' +].join('\n'); + + +var GLSL_TO_SINGLE_SETTERS = { + + 'float': 'uniform1f(location, value)', + + 'vec2': 'uniform2f(location, value[0], value[1])', + 'vec3': 'uniform3f(location, value[0], value[1], value[2])', + 'vec4': 'uniform4f(location, value[0], value[1], value[2], value[3])', + + 'int': 'uniform1i(location, value)', + 'ivec2': 'uniform2i(location, value[0], value[1])', + 'ivec3': 'uniform3i(location, value[0], value[1], value[2])', + 'ivec4': 'uniform4i(location, value[0], value[1], value[2], value[3])', + + 'bool': 'uniform1i(location, value)', + 'bvec2': 'uniform2i(location, value[0], value[1])', + 'bvec3': 'uniform3i(location, value[0], value[1], value[2])', + 'bvec4': 'uniform4i(location, value[0], value[1], value[2], value[3])', + + 'mat2': 'uniformMatrix2fv(location, false, value)', + 'mat3': 'uniformMatrix3fv(location, false, value)', + 'mat4': 'uniformMatrix4fv(location, false, value)', + + 'sampler2D':'uniform1i(location, value)' +}; + +var GLSL_TO_ARRAY_SETTERS = { + + 'float': 'uniform1fv(location, value)', + + 'vec2': 'uniform2fv(location, value)', + 'vec3': 'uniform3fv(location, value)', + 'vec4': 'uniform4fv(location, value)', + + 'int': 'uniform1iv(location, value)', + 'ivec2': 'uniform2iv(location, value)', + 'ivec3': 'uniform3iv(location, value)', + 'ivec4': 'uniform4iv(location, value)', + + 'bool': 'uniform1iv(location, value)', + 'bvec2': 'uniform2iv(location, value)', + 'bvec3': 'uniform3iv(location, value)', + 'bvec4': 'uniform4iv(location, value)', + + 'sampler2D':'uniform1iv(location, value)' +}; + +module.exports = generateUniformAccessObject; + +},{}],14:[function(require,module,exports){ +module.exports = { + compileProgram: require('./compileProgram'), + defaultValue: require('./defaultValue'), + extractAttributes: require('./extractAttributes'), + extractUniforms: require('./extractUniforms'), + generateUniformAccessObject: require('./generateUniformAccessObject'), + setPrecision: require('./setPrecision'), + mapSize: require('./mapSize'), + mapType: require('./mapType') +}; +},{"./compileProgram":9,"./defaultValue":10,"./extractAttributes":11,"./extractUniforms":12,"./generateUniformAccessObject":13,"./mapSize":15,"./mapType":16,"./setPrecision":17}],15:[function(require,module,exports){ +/** + * @class + * @memberof PIXI.glCore.shader + * @param type {String} + * @return {Number} + */ +var mapSize = function(type) +{ + return GLSL_TO_SIZE[type]; +}; + + +var GLSL_TO_SIZE = { + 'float': 1, + 'vec2': 2, + 'vec3': 3, + 'vec4': 4, + + 'int': 1, + 'ivec2': 2, + 'ivec3': 3, + 'ivec4': 4, + + 'bool': 1, + 'bvec2': 2, + 'bvec3': 3, + 'bvec4': 4, + + 'mat2': 4, + 'mat3': 9, + 'mat4': 16, + + 'sampler2D': 1 +}; + +module.exports = mapSize; + +},{}],16:[function(require,module,exports){ + + +var mapSize = function(gl, type) +{ + if(!GL_TABLE) + { + var typeNames = Object.keys(GL_TO_GLSL_TYPES); + + GL_TABLE = {}; + + for(var i = 0; i < typeNames.length; ++i) + { + var tn = typeNames[i]; + GL_TABLE[ gl[tn] ] = GL_TO_GLSL_TYPES[tn]; + } + } + + return GL_TABLE[type]; +}; + +var GL_TABLE = null; + +var GL_TO_GLSL_TYPES = { + 'FLOAT': 'float', + 'FLOAT_VEC2': 'vec2', + 'FLOAT_VEC3': 'vec3', + 'FLOAT_VEC4': 'vec4', + + 'INT': 'int', + 'INT_VEC2': 'ivec2', + 'INT_VEC3': 'ivec3', + 'INT_VEC4': 'ivec4', + + 'BOOL': 'bool', + 'BOOL_VEC2': 'bvec2', + 'BOOL_VEC3': 'bvec3', + 'BOOL_VEC4': 'bvec4', + + 'FLOAT_MAT2': 'mat2', + 'FLOAT_MAT3': 'mat3', + 'FLOAT_MAT4': 'mat4', + + 'SAMPLER_2D': 'sampler2D' +}; + +module.exports = mapSize; + +},{}],17:[function(require,module,exports){ +/** + * Sets the float precision on the shader. If the precision is already present this function will do nothing + * @param {string} src the shader source + * @param {string} precision The float precision of the shader. Options are 'lowp', 'mediump' or 'highp'. + * + * @return {string} modified shader source + */ +var setPrecision = function(src, precision) +{ + if(src.substring(0, 9) !== 'precision') + { + return 'precision ' + precision + ' float;\n' + src; + } + + return src; +}; + +module.exports = setPrecision; + +},{}],18:[function(require,module,exports){ +/** + * Bit twiddling hacks for JavaScript. + * + * Author: Mikola Lysenko + * + * Ported from Stanford bit twiddling hack library: + * http://graphics.stanford.edu/~seander/bithacks.html + */ + +"use strict"; "use restrict"; + +//Number of bits in an integer +var INT_BITS = 32; + +//Constants +exports.INT_BITS = INT_BITS; +exports.INT_MAX = 0x7fffffff; +exports.INT_MIN = -1<<(INT_BITS-1); + +//Returns -1, 0, +1 depending on sign of x +exports.sign = function(v) { + return (v > 0) - (v < 0); +} + +//Computes absolute value of integer +exports.abs = function(v) { + var mask = v >> (INT_BITS-1); + return (v ^ mask) - mask; +} + +//Computes minimum of integers x and y +exports.min = function(x, y) { + return y ^ ((x ^ y) & -(x < y)); +} + +//Computes maximum of integers x and y +exports.max = function(x, y) { + return x ^ ((x ^ y) & -(x < y)); +} + +//Checks if a number is a power of two +exports.isPow2 = function(v) { + return !(v & (v-1)) && (!!v); +} + +//Computes log base 2 of v +exports.log2 = function(v) { + var r, shift; + r = (v > 0xFFFF) << 4; v >>>= r; + shift = (v > 0xFF ) << 3; v >>>= shift; r |= shift; + shift = (v > 0xF ) << 2; v >>>= shift; r |= shift; + shift = (v > 0x3 ) << 1; v >>>= shift; r |= shift; + return r | (v >> 1); +} + +//Computes log base 10 of v +exports.log10 = function(v) { + return (v >= 1000000000) ? 9 : (v >= 100000000) ? 8 : (v >= 10000000) ? 7 : + (v >= 1000000) ? 6 : (v >= 100000) ? 5 : (v >= 10000) ? 4 : + (v >= 1000) ? 3 : (v >= 100) ? 2 : (v >= 10) ? 1 : 0; +} + +//Counts number of bits +exports.popCount = function(v) { + v = v - ((v >>> 1) & 0x55555555); + v = (v & 0x33333333) + ((v >>> 2) & 0x33333333); + return ((v + (v >>> 4) & 0xF0F0F0F) * 0x1010101) >>> 24; +} + +//Counts number of trailing zeros +function countTrailingZeros(v) { + var c = 32; + v &= -v; + if (v) c--; + if (v & 0x0000FFFF) c -= 16; + if (v & 0x00FF00FF) c -= 8; + if (v & 0x0F0F0F0F) c -= 4; + if (v & 0x33333333) c -= 2; + if (v & 0x55555555) c -= 1; + return c; +} +exports.countTrailingZeros = countTrailingZeros; + +//Rounds to next power of 2 +exports.nextPow2 = function(v) { + v += v === 0; + --v; + v |= v >>> 1; + v |= v >>> 2; + v |= v >>> 4; + v |= v >>> 8; + v |= v >>> 16; + return v + 1; +} + +//Rounds down to previous power of 2 +exports.prevPow2 = function(v) { + v |= v >>> 1; + v |= v >>> 2; + v |= v >>> 4; + v |= v >>> 8; + v |= v >>> 16; + return v - (v>>>1); +} + +//Computes parity of word +exports.parity = function(v) { + v ^= v >>> 16; + v ^= v >>> 8; + v ^= v >>> 4; + v &= 0xf; + return (0x6996 >>> v) & 1; +} + +var REVERSE_TABLE = new Array(256); + +(function(tab) { + for(var i=0; i<256; ++i) { + var v = i, r = i, s = 7; + for (v >>>= 1; v; v >>>= 1) { + r <<= 1; + r |= v & 1; + --s; + } + tab[i] = (r << s) & 0xff; + } +})(REVERSE_TABLE); + +//Reverse bits in a 32 bit word +exports.reverse = function(v) { + return (REVERSE_TABLE[ v & 0xff] << 24) | + (REVERSE_TABLE[(v >>> 8) & 0xff] << 16) | + (REVERSE_TABLE[(v >>> 16) & 0xff] << 8) | + REVERSE_TABLE[(v >>> 24) & 0xff]; +} + +//Interleave bits of 2 coordinates with 16 bits. Useful for fast quadtree codes +exports.interleave2 = function(x, y) { + x &= 0xFFFF; + x = (x | (x << 8)) & 0x00FF00FF; + x = (x | (x << 4)) & 0x0F0F0F0F; + x = (x | (x << 2)) & 0x33333333; + x = (x | (x << 1)) & 0x55555555; + + y &= 0xFFFF; + y = (y | (y << 8)) & 0x00FF00FF; + y = (y | (y << 4)) & 0x0F0F0F0F; + y = (y | (y << 2)) & 0x33333333; + y = (y | (y << 1)) & 0x55555555; + + return x | (y << 1); +} + +//Extracts the nth interleaved component +exports.deinterleave2 = function(v, n) { + v = (v >>> n) & 0x55555555; + v = (v | (v >>> 1)) & 0x33333333; + v = (v | (v >>> 2)) & 0x0F0F0F0F; + v = (v | (v >>> 4)) & 0x00FF00FF; + v = (v | (v >>> 16)) & 0x000FFFF; + return (v << 16) >> 16; +} + + +//Interleave bits of 3 coordinates, each with 10 bits. Useful for fast octree codes +exports.interleave3 = function(x, y, z) { + x &= 0x3FF; + x = (x | (x<<16)) & 4278190335; + x = (x | (x<<8)) & 251719695; + x = (x | (x<<4)) & 3272356035; + x = (x | (x<<2)) & 1227133513; + + y &= 0x3FF; + y = (y | (y<<16)) & 4278190335; + y = (y | (y<<8)) & 251719695; + y = (y | (y<<4)) & 3272356035; + y = (y | (y<<2)) & 1227133513; + x |= (y << 1); + + z &= 0x3FF; + z = (z | (z<<16)) & 4278190335; + z = (z | (z<<8)) & 251719695; + z = (z | (z<<4)) & 3272356035; + z = (z | (z<<2)) & 1227133513; + + return x | (z << 2); +} + +//Extracts nth interleaved component of a 3-tuple +exports.deinterleave3 = function(v, n) { + v = (v >>> n) & 1227133513; + v = (v | (v>>>2)) & 3272356035; + v = (v | (v>>>4)) & 251719695; + v = (v | (v>>>8)) & 4278190335; + v = (v | (v>>>16)) & 0x3FF; + return (v<<22)>>22; +} + +//Computes next combination in colexicographic order (this is mistakenly called nextPermutation on the bit twiddling hacks page) +exports.nextCombination = function(v) { + var t = v | (v - 1); + return (t + 1) | (((~t & -~t) - 1) >>> (countTrailingZeros(v) + 1)); +} + + +},{}],19:[function(require,module,exports){ +'use strict'; + +module.exports = earcut; + +function earcut(data, holeIndices, dim) { + + dim = dim || 2; + + var hasHoles = holeIndices && holeIndices.length, + outerLen = hasHoles ? holeIndices[0] * dim : data.length, + outerNode = linkedList(data, 0, outerLen, dim, true), + triangles = []; + + if (!outerNode) return triangles; + + var minX, minY, maxX, maxY, x, y, size; + + if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); + + // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox + if (data.length > 80 * dim) { + minX = maxX = data[0]; + minY = maxY = data[1]; + + for (var i = dim; i < outerLen; i += dim) { + x = data[i]; + y = data[i + 1]; + if (x < minX) minX = x; + if (y < minY) minY = y; + if (x > maxX) maxX = x; + if (y > maxY) maxY = y; + } + + // minX, minY and size are later used to transform coords into integers for z-order calculation + size = Math.max(maxX - minX, maxY - minY); + } + + earcutLinked(outerNode, triangles, dim, minX, minY, size); + + return triangles; +} + +// create a circular doubly linked list from polygon points in the specified winding order +function linkedList(data, start, end, dim, clockwise) { + var i, last; + + if (clockwise === (signedArea(data, start, end, dim) > 0)) { + for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last); + } else { + for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last); + } + + if (last && equals(last, last.next)) { + removeNode(last); + last = last.next; + } + + return last; +} + +// eliminate colinear or duplicate points +function filterPoints(start, end) { + if (!start) return start; + if (!end) end = start; + + var p = start, + again; + do { + again = false; + + if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { + removeNode(p); + p = end = p.prev; + if (p === p.next) return null; + again = true; + + } else { + p = p.next; + } + } while (again || p !== end); + + return end; +} + +// main ear slicing loop which triangulates a polygon (given as a linked list) +function earcutLinked(ear, triangles, dim, minX, minY, size, pass) { + if (!ear) return; + + // interlink polygon nodes in z-order + if (!pass && size) indexCurve(ear, minX, minY, size); + + var stop = ear, + prev, next; + + // iterate through ears, slicing them one by one + while (ear.prev !== ear.next) { + prev = ear.prev; + next = ear.next; + + if (size ? isEarHashed(ear, minX, minY, size) : isEar(ear)) { + // cut off the triangle + triangles.push(prev.i / dim); + triangles.push(ear.i / dim); + triangles.push(next.i / dim); + + removeNode(ear); + + // skipping the next vertice leads to less sliver triangles + ear = next.next; + stop = next.next; + + continue; + } + + ear = next; + + // if we looped through the whole remaining polygon and can't find any more ears + if (ear === stop) { + // try filtering points and slicing again + if (!pass) { + earcutLinked(filterPoints(ear), triangles, dim, minX, minY, size, 1); + + // if this didn't work, try curing all small self-intersections locally + } else if (pass === 1) { + ear = cureLocalIntersections(ear, triangles, dim); + earcutLinked(ear, triangles, dim, minX, minY, size, 2); + + // as a last resort, try splitting the remaining polygon into two + } else if (pass === 2) { + splitEarcut(ear, triangles, dim, minX, minY, size); + } + + break; + } + } +} + +// check whether a polygon node forms a valid ear with adjacent nodes +function isEar(ear) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) return false; // reflex, can't be an ear + + // now make sure we don't have other points inside the potential ear + var p = ear.next.next; + + while (p !== ear.prev) { + if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.next; + } + + return true; +} + +function isEarHashed(ear, minX, minY, size) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) return false; // reflex, can't be an ear + + // triangle bbox; min & max are calculated like this for speed + var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x), + minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y), + maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x), + maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y); + + // z-order range for the current triangle bbox; + var minZ = zOrder(minTX, minTY, minX, minY, size), + maxZ = zOrder(maxTX, maxTY, minX, minY, size); + + // first look for points inside the triangle in increasing z-order + var p = ear.nextZ; + + while (p && p.z <= maxZ) { + if (p !== ear.prev && p !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.nextZ; + } + + // then look for points in decreasing z-order + p = ear.prevZ; + + while (p && p.z >= minZ) { + if (p !== ear.prev && p !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.prevZ; + } + + return true; +} + +// go through all polygon nodes and cure small local self-intersections +function cureLocalIntersections(start, triangles, dim) { + var p = start; + do { + var a = p.prev, + b = p.next.next; + + if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) { + + triangles.push(a.i / dim); + triangles.push(p.i / dim); + triangles.push(b.i / dim); + + // remove two nodes involved + removeNode(p); + removeNode(p.next); + + p = start = b; + } + p = p.next; + } while (p !== start); + + return p; +} + +// try splitting polygon into two and triangulate them independently +function splitEarcut(start, triangles, dim, minX, minY, size) { + // look for a valid diagonal that divides the polygon into two + var a = start; + do { + var b = a.next.next; + while (b !== a.prev) { + if (a.i !== b.i && isValidDiagonal(a, b)) { + // split the polygon in two by the diagonal + var c = splitPolygon(a, b); + + // filter colinear points around the cuts + a = filterPoints(a, a.next); + c = filterPoints(c, c.next); + + // run earcut on each half + earcutLinked(a, triangles, dim, minX, minY, size); + earcutLinked(c, triangles, dim, minX, minY, size); + return; + } + b = b.next; + } + a = a.next; + } while (a !== start); +} + +// link every hole into the outer loop, producing a single-ring polygon without holes +function eliminateHoles(data, holeIndices, outerNode, dim) { + var queue = [], + i, len, start, end, list; + + for (i = 0, len = holeIndices.length; i < len; i++) { + start = holeIndices[i] * dim; + end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + list = linkedList(data, start, end, dim, false); + if (list === list.next) list.steiner = true; + queue.push(getLeftmost(list)); + } + + queue.sort(compareX); + + // process holes from left to right + for (i = 0; i < queue.length; i++) { + eliminateHole(queue[i], outerNode); + outerNode = filterPoints(outerNode, outerNode.next); + } + + return outerNode; +} + +function compareX(a, b) { + return a.x - b.x; +} + +// find a bridge between vertices that connects hole with an outer ring and and link it +function eliminateHole(hole, outerNode) { + outerNode = findHoleBridge(hole, outerNode); + if (outerNode) { + var b = splitPolygon(outerNode, hole); + filterPoints(b, b.next); + } +} + +// David Eberly's algorithm for finding a bridge between hole and outer polygon +function findHoleBridge(hole, outerNode) { + var p = outerNode, + hx = hole.x, + hy = hole.y, + qx = -Infinity, + m; + + // find a segment intersected by a ray from the hole's leftmost point to the left; + // segment's endpoint with lesser x will be potential connection point + do { + if (hy <= p.y && hy >= p.next.y) { + var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y); + if (x <= hx && x > qx) { + qx = x; + if (x === hx) { + if (hy === p.y) return p; + if (hy === p.next.y) return p.next; + } + m = p.x < p.next.x ? p : p.next; + } + } + p = p.next; + } while (p !== outerNode); + + if (!m) return null; + + if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint + + // look for points inside the triangle of hole point, segment intersection and endpoint; + // if there are no points found, we have a valid connection; + // otherwise choose the point of the minimum angle with the ray as connection point + + var stop = m, + mx = m.x, + my = m.y, + tanMin = Infinity, + tan; + + p = m.next; + + while (p !== stop) { + if (hx >= p.x && p.x >= mx && + pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { + + tan = Math.abs(hy - p.y) / (hx - p.x); // tangential + + if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) { + m = p; + tanMin = tan; + } + } + + p = p.next; + } + + return m; +} + +// interlink polygon nodes in z-order +function indexCurve(start, minX, minY, size) { + var p = start; + do { + if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, size); + p.prevZ = p.prev; + p.nextZ = p.next; + p = p.next; + } while (p !== start); + + p.prevZ.nextZ = null; + p.prevZ = null; + + sortLinked(p); +} + +// Simon Tatham's linked list merge sort algorithm +// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html +function sortLinked(list) { + var i, p, q, e, tail, numMerges, pSize, qSize, + inSize = 1; + + do { + p = list; + list = null; + tail = null; + numMerges = 0; + + while (p) { + numMerges++; + q = p; + pSize = 0; + for (i = 0; i < inSize; i++) { + pSize++; + q = q.nextZ; + if (!q) break; + } + + qSize = inSize; + + while (pSize > 0 || (qSize > 0 && q)) { + + if (pSize === 0) { + e = q; + q = q.nextZ; + qSize--; + } else if (qSize === 0 || !q) { + e = p; + p = p.nextZ; + pSize--; + } else if (p.z <= q.z) { + e = p; + p = p.nextZ; + pSize--; + } else { + e = q; + q = q.nextZ; + qSize--; + } + + if (tail) tail.nextZ = e; + else list = e; + + e.prevZ = tail; + tail = e; + } + + p = q; + } + + tail.nextZ = null; + inSize *= 2; + + } while (numMerges > 1); + + return list; +} + +// z-order of a point given coords and size of the data bounding box +function zOrder(x, y, minX, minY, size) { + // coords are transformed into non-negative 15-bit integer range + x = 32767 * (x - minX) / size; + y = 32767 * (y - minY) / size; + + x = (x | (x << 8)) & 0x00FF00FF; + x = (x | (x << 4)) & 0x0F0F0F0F; + x = (x | (x << 2)) & 0x33333333; + x = (x | (x << 1)) & 0x55555555; + + y = (y | (y << 8)) & 0x00FF00FF; + y = (y | (y << 4)) & 0x0F0F0F0F; + y = (y | (y << 2)) & 0x33333333; + y = (y | (y << 1)) & 0x55555555; + + return x | (y << 1); +} + +// find the leftmost node of a polygon ring +function getLeftmost(start) { + var p = start, + leftmost = start; + do { + if (p.x < leftmost.x) leftmost = p; + p = p.next; + } while (p !== start); + + return leftmost; +} + +// check if a point lies within a convex triangle +function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { + return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && + (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && + (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0; +} + +// check if a diagonal between two polygon nodes is valid (lies in polygon interior) +function isValidDiagonal(a, b) { + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && + locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b); +} + +// signed area of a triangle +function area(p, q, r) { + return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); +} + +// check if two points are equal +function equals(p1, p2) { + return p1.x === p2.x && p1.y === p2.y; +} + +// check if two segments intersect +function intersects(p1, q1, p2, q2) { + if ((equals(p1, q1) && equals(p2, q2)) || + (equals(p1, q2) && equals(p2, q1))) return true; + return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 && + area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0; +} + +// check if a polygon diagonal intersects any polygon segments +function intersectsPolygon(a, b) { + var p = a; + do { + if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && + intersects(p, p.next, a, b)) return true; + p = p.next; + } while (p !== a); + + return false; +} + +// check if a polygon diagonal is locally inside the polygon +function locallyInside(a, b) { + return area(a.prev, a, a.next) < 0 ? + area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : + area(a, b, a.prev) < 0 || area(a, a.next, b) < 0; +} + +// check if the middle point of a polygon diagonal is inside the polygon +function middleInside(a, b) { + var p = a, + inside = false, + px = (a.x + b.x) / 2, + py = (a.y + b.y) / 2; + do { + if (((p.y > py) !== (p.next.y > py)) && (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)) + inside = !inside; + p = p.next; + } while (p !== a); + + return inside; +} + +// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; +// if one belongs to the outer ring and another to a hole, it merges it into a single ring +function splitPolygon(a, b) { + var a2 = new Node(a.i, a.x, a.y), + b2 = new Node(b.i, b.x, b.y), + an = a.next, + bp = b.prev; + + a.next = b; + b.prev = a; + + a2.next = an; + an.prev = a2; + + b2.next = a2; + a2.prev = b2; + + bp.next = b2; + b2.prev = bp; + + return b2; +} + +// create a node and optionally link it with previous one (in a circular doubly linked list) +function insertNode(i, x, y, last) { + var p = new Node(i, x, y); + + if (!last) { + p.prev = p; + p.next = p; + + } else { + p.next = last.next; + p.prev = last; + last.next.prev = p; + last.next = p; + } + return p; +} + +function removeNode(p) { + p.next.prev = p.prev; + p.prev.next = p.next; + + if (p.prevZ) p.prevZ.nextZ = p.nextZ; + if (p.nextZ) p.nextZ.prevZ = p.prevZ; +} + +function Node(i, x, y) { + // vertice index in coordinates array + this.i = i; + + // vertex coordinates + this.x = x; + this.y = y; + + // previous and next vertice nodes in a polygon ring + this.prev = null; + this.next = null; + + // z-order curve value + this.z = null; + + // previous and next nodes in z-order + this.prevZ = null; + this.nextZ = null; + + // indicates whether this is a steiner point + this.steiner = false; +} + +// return a percentage difference between the polygon area and its triangulation area; +// used to verify correctness of triangulation +earcut.deviation = function (data, holeIndices, dim, triangles) { + var hasHoles = holeIndices && holeIndices.length; + var outerLen = hasHoles ? holeIndices[0] * dim : data.length; + + var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim)); + if (hasHoles) { + for (var i = 0, len = holeIndices.length; i < len; i++) { + var start = holeIndices[i] * dim; + var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + polygonArea -= Math.abs(signedArea(data, start, end, dim)); + } + } + + var trianglesArea = 0; + for (i = 0; i < triangles.length; i += 3) { + var a = triangles[i] * dim; + var b = triangles[i + 1] * dim; + var c = triangles[i + 2] * dim; + trianglesArea += Math.abs( + (data[a] - data[c]) * (data[b + 1] - data[a + 1]) - + (data[a] - data[b]) * (data[c + 1] - data[a + 1])); + } + + return polygonArea === 0 && trianglesArea === 0 ? 0 : + Math.abs((trianglesArea - polygonArea) / polygonArea); +}; + +function signedArea(data, start, end, dim) { + var sum = 0; + for (var i = start, j = end - dim; i < end; i += dim) { + sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]); + j = i; + } + return sum; +} + +// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts +earcut.flatten = function (data) { + var dim = data[0][0].length, + result = {vertices: [], holes: [], dimensions: dim}, + holeIndex = 0; + + for (var i = 0; i < data.length; i++) { + for (var j = 0; j < data[i].length; j++) { + for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]); + } + if (i > 0) { + holeIndex += data[i - 1].length; + result.holes.push(holeIndex); + } + } + return result; +}; + +},{}],20:[function(require,module,exports){ +'use strict'; + +var has = Object.prototype.hasOwnProperty + , prefix = '~'; + +/** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @api private + */ +function Events() {} + +// +// We try to not inherit from `Object.prototype`. In some engines creating an +// instance in this way is faster than calling `Object.create(null)` directly. +// If `Object.create(null)` is not supported we prefix the event names with a +// character to make sure that the built-in object properties are not +// overridden or used as an attack vector. +// +if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; +} + +/** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {Mixed} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @api private + */ +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} + +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @api public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} + +/** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @api public + */ +EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; +}; + +/** + * Return the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Boolean} exists Only check if there are listeners. + * @returns {Array|Boolean} + * @api public + */ +EventEmitter.prototype.listeners = function listeners(event, exists) { + var evt = prefix ? prefix + event : event + , available = this._events[evt]; + + if (exists) return !!available; + if (!available) return []; + if (available.fn) return [available.fn]; + + for (var i = 0, l = available.length, ee = new Array(l); i < l; i++) { + ee[i] = available[i].fn; + } + + return ee; +}; + +/** + * Calls each of the listeners registered for a given event. + * + * @param {String|Symbol} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @api public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; +}; + +/** + * Add a listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ +EventEmitter.prototype.on = function on(event, fn, context) { + var listener = new EE(fn, context || this) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; +}; + +/** + * Add a one-time listener for a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn The listener function. + * @param {Mixed} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @api public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + var listener = new EE(fn, context || this, true) + , evt = prefix ? prefix + event : event; + + if (!this._events[evt]) this._events[evt] = listener, this._eventsCount++; + else if (!this._events[evt].fn) this._events[evt].push(listener); + else this._events[evt] = [this._events[evt], listener]; + + return this; +}; + +/** + * Remove the listeners of a given event. + * + * @param {String|Symbol} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {Mixed} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @api public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn + && (!once || listeners.once) + && (!context || listeners.context === context) + ) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn + || (once && !listeners[i].once) + || (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + + return this; +}; + +/** + * Remove all listeners, or those of the specified event. + * + * @param {String|Symbol} [event] The event name. + * @returns {EventEmitter} `this`. + * @api public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) { + if (--this._eventsCount === 0) this._events = new Events(); + else delete this._events[evt]; + } + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; +}; + +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; + +// +// This function doesn't apply anymore. +// +EventEmitter.prototype.setMaxListeners = function setMaxListeners() { + return this; +}; + +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; + +// +// Allow `EventEmitter` to be imported as module namespace. +// +EventEmitter.EventEmitter = EventEmitter; + +// +// Expose the module. +// +if ('undefined' !== typeof module) { + module.exports = EventEmitter; +} + +},{}],21:[function(require,module,exports){ +/** + * isMobile.js v0.4.0 + * + * A simple library to detect Apple phones and tablets, + * Android phones and tablets, other mobile devices (like blackberry, mini-opera and windows phone), + * and any kind of seven inch device, via user agent sniffing. + * + * @author: Kai Mallea (kmallea@gmail.com) + * + * @license: http://creativecommons.org/publicdomain/zero/1.0/ + */ +(function (global) { + + var apple_phone = /iPhone/i, + apple_ipod = /iPod/i, + apple_tablet = /iPad/i, + android_phone = /(?=.*\bAndroid\b)(?=.*\bMobile\b)/i, // Match 'Android' AND 'Mobile' + android_tablet = /Android/i, + amazon_phone = /(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i, + amazon_tablet = /(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i, + windows_phone = /IEMobile/i, + windows_tablet = /(?=.*\bWindows\b)(?=.*\bARM\b)/i, // Match 'Windows' AND 'ARM' + other_blackberry = /BlackBerry/i, + other_blackberry_10 = /BB10/i, + other_opera = /Opera Mini/i, + other_chrome = /(CriOS|Chrome)(?=.*\bMobile\b)/i, + other_firefox = /(?=.*\bFirefox\b)(?=.*\bMobile\b)/i, // Match 'Firefox' AND 'Mobile' + seven_inch = new RegExp( + '(?:' + // Non-capturing group + + 'Nexus 7' + // Nexus 7 + + '|' + // OR + + 'BNTV250' + // B&N Nook Tablet 7 inch + + '|' + // OR + + 'Kindle Fire' + // Kindle Fire + + '|' + // OR + + 'Silk' + // Kindle Fire, Silk Accelerated + + '|' + // OR + + 'GT-P1000' + // Galaxy Tab 7 inch + + ')', // End non-capturing group + + 'i'); // Case-insensitive matching + + var match = function(regex, userAgent) { + return regex.test(userAgent); + }; + + var IsMobileClass = function(userAgent) { + var ua = userAgent || navigator.userAgent; + + // Facebook mobile app's integrated browser adds a bunch of strings that + // match everything. Strip it out if it exists. + var tmp = ua.split('[FBAN'); + if (typeof tmp[1] !== 'undefined') { + ua = tmp[0]; + } + + // Twitter mobile app's integrated browser on iPad adds a "Twitter for + // iPhone" string. Same probable happens on other tablet platforms. + // This will confuse detection so strip it out if it exists. + tmp = ua.split('Twitter'); + if (typeof tmp[1] !== 'undefined') { + ua = tmp[0]; + } + + this.apple = { + phone: match(apple_phone, ua), + ipod: match(apple_ipod, ua), + tablet: !match(apple_phone, ua) && match(apple_tablet, ua), + device: match(apple_phone, ua) || match(apple_ipod, ua) || match(apple_tablet, ua) + }; + this.amazon = { + phone: match(amazon_phone, ua), + tablet: !match(amazon_phone, ua) && match(amazon_tablet, ua), + device: match(amazon_phone, ua) || match(amazon_tablet, ua) + }; + this.android = { + phone: match(amazon_phone, ua) || match(android_phone, ua), + tablet: !match(amazon_phone, ua) && !match(android_phone, ua) && (match(amazon_tablet, ua) || match(android_tablet, ua)), + device: match(amazon_phone, ua) || match(amazon_tablet, ua) || match(android_phone, ua) || match(android_tablet, ua) + }; + this.windows = { + phone: match(windows_phone, ua), + tablet: match(windows_tablet, ua), + device: match(windows_phone, ua) || match(windows_tablet, ua) + }; + this.other = { + blackberry: match(other_blackberry, ua), + blackberry10: match(other_blackberry_10, ua), + opera: match(other_opera, ua), + firefox: match(other_firefox, ua), + chrome: match(other_chrome, ua), + device: match(other_blackberry, ua) || match(other_blackberry_10, ua) || match(other_opera, ua) || match(other_firefox, ua) || match(other_chrome, ua) + }; + this.seven_inch = match(seven_inch, ua); + this.any = this.apple.device || this.android.device || this.windows.device || this.other.device || this.seven_inch; + + // excludes 'other' devices and ipods, targeting touchscreen phones + this.phone = this.apple.phone || this.android.phone || this.windows.phone; + + // excludes 7 inch devices, classifying as phone or tablet is left to the user + this.tablet = this.apple.tablet || this.android.tablet || this.windows.tablet; + + if (typeof window === 'undefined') { + return this; + } + }; + + var instantiate = function() { + var IM = new IsMobileClass(); + IM.Class = IsMobileClass; + return IM; + }; + + if (typeof module !== 'undefined' && module.exports && typeof window === 'undefined') { + //node + module.exports = IsMobileClass; + } else if (typeof module !== 'undefined' && module.exports && typeof window !== 'undefined') { + //browserify + module.exports = instantiate(); + } else if (typeof define === 'function' && define.amd) { + //AMD + define('isMobile', [], global.isMobile = instantiate()); + } else { + global.isMobile = instantiate(); + } + +})(this); + +},{}],22:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, '__esModule', { + value: true +}); + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +var MiniSignalBinding = (function () { + function MiniSignalBinding(fn, once, thisArg) { + if (once === undefined) once = false; + + _classCallCheck(this, MiniSignalBinding); + + this._fn = fn; + this._once = once; + this._thisArg = thisArg; + this._next = this._prev = this._owner = null; + } + + _createClass(MiniSignalBinding, [{ + key: 'detach', + value: function detach() { + if (this._owner === null) return false; + this._owner.detach(this); + return true; + } + }]); + + return MiniSignalBinding; +})(); + +function _addMiniSignalBinding(self, node) { + if (!self._head) { + self._head = node; + self._tail = node; + } else { + self._tail._next = node; + node._prev = self._tail; + self._tail = node; + } + + node._owner = self; + + return node; +} + +var MiniSignal = (function () { + function MiniSignal() { + _classCallCheck(this, MiniSignal); + + this._head = this._tail = undefined; + } + + _createClass(MiniSignal, [{ + key: 'handlers', + value: function handlers() { + var exists = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; + + var node = this._head; + + if (exists) return !!node; + + var ee = []; + + while (node) { + ee.push(node); + node = node._next; + } + + return ee; + } + }, { + key: 'has', + value: function has(node) { + if (!(node instanceof MiniSignalBinding)) { + throw new Error('MiniSignal#has(): First arg must be a MiniSignalBinding object.'); + } + + return node._owner === this; + } + }, { + key: 'dispatch', + value: function dispatch() { + var node = this._head; + + if (!node) return false; + + while (node) { + if (node._once) this.detach(node); + node._fn.apply(node._thisArg, arguments); + node = node._next; + } + + return true; + } + }, { + key: 'add', + value: function add(fn) { + var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; + + if (typeof fn !== 'function') { + throw new Error('MiniSignal#add(): First arg must be a Function.'); + } + return _addMiniSignalBinding(this, new MiniSignalBinding(fn, false, thisArg)); + } + }, { + key: 'once', + value: function once(fn) { + var thisArg = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; + + if (typeof fn !== 'function') { + throw new Error('MiniSignal#once(): First arg must be a Function.'); + } + return _addMiniSignalBinding(this, new MiniSignalBinding(fn, true, thisArg)); + } + }, { + key: 'detach', + value: function detach(node) { + if (!(node instanceof MiniSignalBinding)) { + throw new Error('MiniSignal#detach(): First arg must be a MiniSignalBinding object.'); + } + if (node._owner !== this) return this; + + if (node._prev) node._prev._next = node._next; + if (node._next) node._next._prev = node._prev; + + if (node === this._head) { + this._head = node._next; + if (node._next === null) { + this._tail = null; + } + } else if (node === this._tail) { + this._tail = node._prev; + this._tail._next = null; + } + + node._owner = null; + return this; + } + }, { + key: 'detachAll', + value: function detachAll() { + var node = this._head; + if (!node) return this; + + this._head = this._tail = null; + + while (node) { + node._owner = null; + node = node._next; + } + return this; + } + }]); + + return MiniSignal; +})(); + +MiniSignal.MiniSignalBinding = MiniSignalBinding; + +exports['default'] = MiniSignal; +module.exports = exports['default']; + +},{}],23:[function(require,module,exports){ +'use strict'; +/* eslint-disable no-unused-vars */ +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (e) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (Object.getOwnPropertySymbols) { + symbols = Object.getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + +},{}],24:[function(require,module,exports){ +'use strict' + +module.exports = function parseURI (str, opts) { + opts = opts || {} + + var o = { + key: ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'], + q: { + name: 'queryKey', + parser: /(?:^|&)([^&=]*)=?([^&]*)/g + }, + parser: { + strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, + loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ + } + } + + var m = o.parser[opts.strictMode ? 'strict' : 'loose'].exec(str) + var uri = {} + var i = 14 + + while (i--) uri[o.key[i]] = m[i] || '' + + uri[o.q.name] = {} + uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { + if ($1) uri[o.q.name][$1] = $2 + }) + + return uri +} + +},{}],25:[function(require,module,exports){ +(function (process){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; + + +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + + +exports.basename = function(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPath(path)[3]; +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +}).call(this,require('_process')) + +},{"_process":26}],26:[function(require,module,exports){ +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],27:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],28:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],29:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +},{}],30:[function(require,module,exports){ +'use strict'; + +exports.decode = exports.parse = require('./decode'); +exports.encode = exports.stringify = require('./encode'); + +},{"./decode":28,"./encode":29}],31:[function(require,module,exports){ +'use strict' + +/** + * Remove a range of items from an array + * + * @function removeItems + * @param {Array<*>} arr The target array + * @param {number} startIdx The index to begin removing from (inclusive) + * @param {number} removeCount How many items to remove + */ +module.exports = function removeItems(arr, startIdx, removeCount) +{ + var i, length = arr.length + + if (startIdx >= length || removeCount === 0) { + return + } + + removeCount = (startIdx + removeCount > length ? length - startIdx : removeCount) + + var len = length - removeCount + + for (i = startIdx; i < len; ++i) { + arr[i] = arr[i + removeCount] + } + + arr.length = len +} + +},{}],32:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _miniSignals = require('mini-signals'); + +var _miniSignals2 = _interopRequireDefault(_miniSignals); + +var _parseUri = require('parse-uri'); + +var _parseUri2 = _interopRequireDefault(_parseUri); + +var _async = require('./async'); + +var async = _interopRequireWildcard(_async); + +var _Resource = require('./Resource'); + +var _Resource2 = _interopRequireDefault(_Resource); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +// some constants +var MAX_PROGRESS = 100; +var rgxExtractUrlHash = /(#[\w-]+)?$/; + +/** + * Manages the state and loading of multiple resources to load. + * + * @class + */ + +var Loader = function () { + /** + * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader. + * @param {number} [concurrency=10] - The number of resources to load concurrently. + */ + function Loader() { + var _this = this; + + var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + var concurrency = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; + + _classCallCheck(this, Loader); + + /** + * The base url for all resources loaded by this loader. + * + * @member {string} + */ + this.baseUrl = baseUrl; + + /** + * The progress percent of the loader going through the queue. + * + * @member {number} + */ + this.progress = 0; + + /** + * Loading state of the loader, true if it is currently loading resources. + * + * @member {boolean} + */ + this.loading = false; + + /** + * A querystring to append to every URL added to the loader. + * + * This should be a valid query string *without* the question-mark (`?`). The loader will + * also *not* escape values for you. Make sure to escape your parameters with + * [`encodeURIComponent`](https://mdn.io/encodeURIComponent) before assigning this property. + * + * @example + * const loader = new Loader(); + * + * loader.defaultQueryString = 'user=me&password=secret'; + * + * // This will request 'image.png?user=me&password=secret' + * loader.add('image.png').load(); + * + * loader.reset(); + * + * // This will request 'image.png?v=1&user=me&password=secret' + * loader.add('iamge.png?v=1').load(); + */ + this.defaultQueryString = ''; + + /** + * The middleware to run before loading each resource. + * + * @member {function[]} + */ + this._beforeMiddleware = []; + + /** + * The middleware to run after loading each resource. + * + * @member {function[]} + */ + this._afterMiddleware = []; + + /** + * The tracks the resources we are currently completing parsing for. + * + * @member {Resource[]} + */ + this._resourcesParsing = []; + + /** + * The `_loadResource` function bound with this object context. + * + * @private + * @member {function} + * @param {Resource} r - The resource to load + * @param {Function} d - The dequeue function + * @return {undefined} + */ + this._boundLoadResource = function (r, d) { + return _this._loadResource(r, d); + }; + + /** + * The resources waiting to be loaded. + * + * @private + * @member {Resource[]} + */ + this._queue = async.queue(this._boundLoadResource, concurrency); + + this._queue.pause(); + + /** + * All the resources for this loader keyed by name. + * + * @member {object} + */ + this.resources = {}; + + /** + * Dispatched once per loaded or errored resource. + * + * The callback looks like {@link Loader.OnProgressSignal}. + * + * @member {Signal} + */ + this.onProgress = new _miniSignals2.default(); + + /** + * Dispatched once per errored resource. + * + * The callback looks like {@link Loader.OnErrorSignal}. + * + * @member {Signal} + */ + this.onError = new _miniSignals2.default(); + + /** + * Dispatched once per loaded resource. + * + * The callback looks like {@link Loader.OnLoadSignal}. + * + * @member {Signal} + */ + this.onLoad = new _miniSignals2.default(); + + /** + * Dispatched when the loader begins to process the queue. + * + * The callback looks like {@link Loader.OnStartSignal}. + * + * @member {Signal} + */ + this.onStart = new _miniSignals2.default(); + + /** + * Dispatched when the queued resources all load. + * + * The callback looks like {@link Loader.OnCompleteSignal}. + * + * @member {Signal} + */ + this.onComplete = new _miniSignals2.default(); + + /** + * When the progress changes the loader and resource are disaptched. + * + * @memberof Loader + * @callback OnProgressSignal + * @param {Loader} loader - The loader the progress is advancing on. + * @param {Resource} resource - The resource that has completed or failed to cause the progress to advance. + */ + + /** + * When an error occurrs the loader and resource are disaptched. + * + * @memberof Loader + * @callback OnErrorSignal + * @param {Loader} loader - The loader the error happened in. + * @param {Resource} resource - The resource that caused the error. + */ + + /** + * When a load completes the loader and resource are disaptched. + * + * @memberof Loader + * @callback OnLoadSignal + * @param {Loader} loader - The loader that laoded the resource. + * @param {Resource} resource - The resource that has completed loading. + */ + + /** + * When the loader starts loading resources it dispatches this callback. + * + * @memberof Loader + * @callback OnStartSignal + * @param {Loader} loader - The loader that has started loading resources. + */ + + /** + * When the loader completes loading resources it dispatches this callback. + * + * @memberof Loader + * @callback OnCompleteSignal + * @param {Loader} loader - The loader that has finished loading resources. + */ + } + + /** + * Adds a resource (or multiple resources) to the loader queue. + * + * This function can take a wide variety of different parameters. The only thing that is always + * required the url to load. All the following will work: + * + * ```js + * loader + * // normal param syntax + * .add('key', 'http://...', function () {}) + * .add('http://...', function () {}) + * .add('http://...') + * + * // object syntax + * .add({ + * name: 'key2', + * url: 'http://...' + * }, function () {}) + * .add({ + * url: 'http://...' + * }, function () {}) + * .add({ + * name: 'key3', + * url: 'http://...' + * onComplete: function () {} + * }) + * .add({ + * url: 'https://...', + * onComplete: function () {}, + * crossOrigin: true + * }) + * + * // you can also pass an array of objects or urls or both + * .add([ + * { name: 'key4', url: 'http://...', onComplete: function () {} }, + * { url: 'http://...', onComplete: function () {} }, + * 'http://...' + * ]) + * + * // and you can use both params and options + * .add('key', 'http://...', { crossOrigin: true }, function () {}) + * .add('http://...', { crossOrigin: true }, function () {}); + * ``` + * + * @param {string} [name] - The name of the resource to load, if not passed the url is used. + * @param {string} [url] - The url for this resource, relative to the baseUrl of this loader. + * @param {object} [options] - The options for the load. + * @param {boolean} [options.crossOrigin] - Is this request cross-origin? Default is to determine automatically. + * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource be loaded? + * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How should + * the data being loaded be interpreted when using XHR? + * @param {object} [options.metadata] - Extra configuration for middleware and the Resource object. + * @param {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [options.metadata.loadElement=null] - The + * element to use for loading, instead of creating one. + * @param {boolean} [options.metadata.skipSource=false] - Skips adding source(s) to the load element. This + * is useful if you want to pass in a `loadElement` that you already added load sources to. + * @param {function} [cb] - Function to call when this specific resource completes loading. + * @return {Loader} Returns itself. + */ + + + Loader.prototype.add = function add(name, url, options, cb) { + // special case of an array of objects or urls + if (Array.isArray(name)) { + for (var i = 0; i < name.length; ++i) { + this.add(name[i]); + } + + return this; + } + + // if an object is passed instead of params + if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { + cb = url || name.callback || name.onComplete; + options = name; + url = name.url; + name = name.name || name.key || name.url; + } + + // case where no name is passed shift all args over by one. + if (typeof url !== 'string') { + cb = options; + options = url; + url = name; + } + + // now that we shifted make sure we have a proper url. + if (typeof url !== 'string') { + throw new Error('No url passed to add resource to loader.'); + } + + // options are optional so people might pass a function and no options + if (typeof options === 'function') { + cb = options; + options = null; + } + + // if loading already you can only add resources that have a parent. + if (this.loading && (!options || !options.parentResource)) { + throw new Error('Cannot add resources while the loader is running.'); + } + + // check if resource already exists. + if (this.resources[name]) { + throw new Error('Resource named "' + name + '" already exists.'); + } + + // add base url if this isn't an absolute url + url = this._prepareUrl(url); + + // create the store the resource + this.resources[name] = new _Resource2.default(name, url, options); + + if (typeof cb === 'function') { + this.resources[name].onAfterMiddleware.once(cb); + } + + // if actively loading, make sure to adjust progress chunks for that parent and its children + if (this.loading) { + var parent = options.parentResource; + var incompleteChildren = []; + + for (var _i = 0; _i < parent.children.length; ++_i) { + if (!parent.children[_i].isComplete) { + incompleteChildren.push(parent.children[_i]); + } + } + + var fullChunk = parent.progressChunk * (incompleteChildren.length + 1); // +1 for parent + var eachChunk = fullChunk / (incompleteChildren.length + 2); // +2 for parent & new child + + parent.children.push(this.resources[name]); + parent.progressChunk = eachChunk; + + for (var _i2 = 0; _i2 < incompleteChildren.length; ++_i2) { + incompleteChildren[_i2].progressChunk = eachChunk; + } + + this.resources[name].progressChunk = eachChunk; + } + + // add the resource to the queue + this._queue.push(this.resources[name]); + + return this; + }; + + /** + * Sets up a middleware function that will run *before* the + * resource is loaded. + * + * @method before + * @param {function} fn - The middleware function to register. + * @return {Loader} Returns itself. + */ + + + Loader.prototype.pre = function pre(fn) { + this._beforeMiddleware.push(fn); + + return this; + }; + + /** + * Sets up a middleware function that will run *after* the + * resource is loaded. + * + * @alias use + * @method after + * @param {function} fn - The middleware function to register. + * @return {Loader} Returns itself. + */ + + + Loader.prototype.use = function use(fn) { + this._afterMiddleware.push(fn); + + return this; + }; + + /** + * Resets the queue of the loader to prepare for a new load. + * + * @return {Loader} Returns itself. + */ + + + Loader.prototype.reset = function reset() { + this.progress = 0; + this.loading = false; + + this._queue.kill(); + this._queue.pause(); + + // abort all resource loads + for (var k in this.resources) { + var res = this.resources[k]; + + if (res._onLoadBinding) { + res._onLoadBinding.detach(); + } + + if (res.isLoading) { + res.abort(); + } + } + + this.resources = {}; + + return this; + }; + + /** + * Starts loading the queued resources. + * + * @param {function} [cb] - Optional callback that will be bound to the `complete` event. + * @return {Loader} Returns itself. + */ + + + Loader.prototype.load = function load(cb) { + // register complete callback if they pass one + if (typeof cb === 'function') { + this.onComplete.once(cb); + } + + // if the queue has already started we are done here + if (this.loading) { + return this; + } + + // distribute progress chunks + var chunk = 100 / this._queue._tasks.length; + + for (var i = 0; i < this._queue._tasks.length; ++i) { + this._queue._tasks[i].data.progressChunk = chunk; + } + + // update loading state + this.loading = true; + + // notify of start + this.onStart.dispatch(this); + + // start loading + this._queue.resume(); + + return this; + }; + + /** + * Prepares a url for usage based on the configuration of this object + * + * @private + * @param {string} url - The url to prepare. + * @return {string} The prepared url. + */ + + + Loader.prototype._prepareUrl = function _prepareUrl(url) { + var parsedUrl = (0, _parseUri2.default)(url, { strictMode: true }); + var result = void 0; + + // absolute url, just use it as is. + if (parsedUrl.protocol || !parsedUrl.path || url.indexOf('//') === 0) { + result = url; + } + // if baseUrl doesn't end in slash and url doesn't start with slash, then add a slash inbetween + else if (this.baseUrl.length && this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1 && url.charAt(0) !== '/') { + result = this.baseUrl + '/' + url; + } else { + result = this.baseUrl + url; + } + + // if we need to add a default querystring, there is a bit more work + if (this.defaultQueryString) { + var hash = rgxExtractUrlHash.exec(result)[0]; + + result = result.substr(0, result.length - hash.length); + + if (result.indexOf('?') !== -1) { + result += '&' + this.defaultQueryString; + } else { + result += '?' + this.defaultQueryString; + } + + result += hash; + } + + return result; + }; + + /** + * Loads a single resource. + * + * @private + * @param {Resource} resource - The resource to load. + * @param {function} dequeue - The function to call when we need to dequeue this item. + */ + + + Loader.prototype._loadResource = function _loadResource(resource, dequeue) { + var _this2 = this; + + resource._dequeue = dequeue; + + // run before middleware + async.eachSeries(this._beforeMiddleware, function (fn, next) { + fn.call(_this2, resource, function () { + // if the before middleware marks the resource as complete, + // break and don't process any more before middleware + next(resource.isComplete ? {} : null); + }); + }, function () { + if (resource.isComplete) { + _this2._onLoad(resource); + } else { + resource._onLoadBinding = resource.onComplete.once(_this2._onLoad, _this2); + resource.load(); + } + }, true); + }; + + /** + * Called once each resource has loaded. + * + * @private + */ + + + Loader.prototype._onComplete = function _onComplete() { + this.loading = false; + + this.onComplete.dispatch(this, this.resources); + }; + + /** + * Called each time a resources is loaded. + * + * @private + * @param {Resource} resource - The resource that was loaded + */ + + + Loader.prototype._onLoad = function _onLoad(resource) { + var _this3 = this; + + resource._onLoadBinding = null; + + // remove this resource from the async queue, and add it to our list of resources that are being parsed + this._resourcesParsing.push(resource); + resource._dequeue(); + + // run all the after middleware for this resource + async.eachSeries(this._afterMiddleware, function (fn, next) { + fn.call(_this3, resource, next); + }, function () { + resource.onAfterMiddleware.dispatch(resource); + + _this3.progress += resource.progressChunk; + _this3.onProgress.dispatch(_this3, resource); + + if (resource.error) { + _this3.onError.dispatch(resource.error, _this3, resource); + } else { + _this3.onLoad.dispatch(_this3, resource); + } + + _this3._resourcesParsing.splice(_this3._resourcesParsing.indexOf(resource), 1); + + // do completion check + if (_this3._queue.idle() && _this3._resourcesParsing.length === 0) { + _this3.progress = MAX_PROGRESS; + _this3._onComplete(); + } + }, true); + }; + + return Loader; +}(); + +exports.default = Loader; + +},{"./Resource":33,"./async":34,"mini-signals":22,"parse-uri":24}],33:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _parseUri = require('parse-uri'); + +var _parseUri2 = _interopRequireDefault(_parseUri); + +var _miniSignals = require('mini-signals'); + +var _miniSignals2 = _interopRequireDefault(_miniSignals); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +// tests is CORS is supported in XHR, if not we need to use XDR +var useXdr = !!(window.XDomainRequest && !('withCredentials' in new XMLHttpRequest())); +var tempAnchor = null; + +// some status constants +var STATUS_NONE = 0; +var STATUS_OK = 200; +var STATUS_EMPTY = 204; +var STATUS_IE_BUG_EMPTY = 1223; +var STATUS_TYPE_OK = 2; + +// noop +function _noop() {} /* empty */ + +/** + * Manages the state and loading of a resource and all child resources. + * + * @class + */ + +var Resource = function () { + /** + * Sets the load type to be used for a specific extension. + * + * @static + * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt" + * @param {Resource.LOAD_TYPE} loadType - The load type to set it to. + */ + Resource.setExtensionLoadType = function setExtensionLoadType(extname, loadType) { + setExtMap(Resource._loadTypeMap, extname, loadType); + }; + + /** + * Sets the load type to be used for a specific extension. + * + * @static + * @param {string} extname - The extension to set the type for, e.g. "png" or "fnt" + * @param {Resource.XHR_RESPONSE_TYPE} xhrType - The xhr type to set it to. + */ + + + Resource.setExtensionXhrType = function setExtensionXhrType(extname, xhrType) { + setExtMap(Resource._xhrTypeMap, extname, xhrType); + }; + + /** + * @param {string} name - The name of the resource to load. + * @param {string|string[]} url - The url for this resource, for audio/video loads you can pass + * an array of sources. + * @param {object} [options] - The options for the load. + * @param {string|boolean} [options.crossOrigin] - Is this request cross-origin? Default is to + * determine automatically. + * @param {Resource.LOAD_TYPE} [options.loadType=Resource.LOAD_TYPE.XHR] - How should this resource + * be loaded? + * @param {Resource.XHR_RESPONSE_TYPE} [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] - How + * should the data being loaded be interpreted when using XHR? + * @param {object} [options.metadata] - Extra configuration for middleware and the Resource object. + * @param {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [options.metadata.loadElement=null] - The + * element to use for loading, instead of creating one. + * @param {boolean} [options.metadata.skipSource=false] - Skips adding source(s) to the load element. This + * is useful if you want to pass in a `loadElement` that you already added load sources to. + */ + + + function Resource(name, url, options) { + _classCallCheck(this, Resource); + + if (typeof name !== 'string' || typeof url !== 'string') { + throw new Error('Both name and url are required for constructing a resource.'); + } + + options = options || {}; + + /** + * The state flags of this resource. + * + * @member {number} + */ + this._flags = 0; + + // set data url flag, needs to be set early for some _determineX checks to work. + this._setFlag(Resource.STATUS_FLAGS.DATA_URL, url.indexOf('data:') === 0); + + /** + * The name of this resource. + * + * @member {string} + * @readonly + */ + this.name = name; + + /** + * The url used to load this resource. + * + * @member {string} + * @readonly + */ + this.url = url; + + /** + * The extension used to load this resource. + * + * @member {string} + * @readonly + */ + this.extension = this._getExtension(); + + /** + * The data that was loaded by the resource. + * + * @member {any} + */ + this.data = null; + + /** + * Is this request cross-origin? If unset, determined automatically. + * + * @member {string} + */ + this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin; + + /** + * The method of loading to use for this resource. + * + * @member {Resource.LOAD_TYPE} + */ + this.loadType = options.loadType || this._determineLoadType(); + + /** + * The type used to load the resource via XHR. If unset, determined automatically. + * + * @member {string} + */ + this.xhrType = options.xhrType; + + /** + * Extra info for middleware, and controlling specifics about how the resource loads. + * + * Note that if you pass in a `loadElement`, the Resource class takes ownership of it. + * Meaning it will modify it as it sees fit. + * + * @member {object} + * @property {HTMLImageElement|HTMLAudioElement|HTMLVideoElement} [loadElement=null] - The + * element to use for loading, instead of creating one. + * @property {boolean} [skipSource=false] - Skips adding source(s) to the load element. This + * is useful if you want to pass in a `loadElement` that you already added load sources + * to. + */ + this.metadata = options.metadata || {}; + + /** + * The error that occurred while loading (if any). + * + * @member {Error} + * @readonly + */ + this.error = null; + + /** + * The XHR object that was used to load this resource. This is only set + * when `loadType` is `Resource.LOAD_TYPE.XHR`. + * + * @member {XMLHttpRequest} + * @readonly + */ + this.xhr = null; + + /** + * The child resources this resource owns. + * + * @member {Resource[]} + * @readonly + */ + this.children = []; + + /** + * The resource type. + * + * @member {Resource.TYPE} + * @readonly + */ + this.type = Resource.TYPE.UNKNOWN; + + /** + * The progress chunk owned by this resource. + * + * @member {number} + * @readonly + */ + this.progressChunk = 0; + + /** + * The `dequeue` method that will be used a storage place for the async queue dequeue method + * used privately by the loader. + * + * @private + * @member {function} + */ + this._dequeue = _noop; + + /** + * Used a storage place for the on load binding used privately by the loader. + * + * @private + * @member {function} + */ + this._onLoadBinding = null; + + /** + * The `complete` function bound to this resource's context. + * + * @private + * @member {function} + */ + this._boundComplete = this.complete.bind(this); + + /** + * The `_onError` function bound to this resource's context. + * + * @private + * @member {function} + */ + this._boundOnError = this._onError.bind(this); + + /** + * The `_onProgress` function bound to this resource's context. + * + * @private + * @member {function} + */ + this._boundOnProgress = this._onProgress.bind(this); + + // xhr callbacks + this._boundXhrOnError = this._xhrOnError.bind(this); + this._boundXhrOnAbort = this._xhrOnAbort.bind(this); + this._boundXhrOnLoad = this._xhrOnLoad.bind(this); + this._boundXdrOnTimeout = this._xdrOnTimeout.bind(this); + + /** + * Dispatched when the resource beings to load. + * + * The callback looks like {@link Resource.OnStartSignal}. + * + * @member {Signal} + */ + this.onStart = new _miniSignals2.default(); + + /** + * Dispatched each time progress of this resource load updates. + * Not all resources types and loader systems can support this event + * so sometimes it may not be available. If the resource + * is being loaded on a modern browser, using XHR, and the remote server + * properly sets Content-Length headers, then this will be available. + * + * The callback looks like {@link Resource.OnProgressSignal}. + * + * @member {Signal} + */ + this.onProgress = new _miniSignals2.default(); + + /** + * Dispatched once this resource has loaded, if there was an error it will + * be in the `error` property. + * + * The callback looks like {@link Resource.OnCompleteSignal}. + * + * @member {Signal} + */ + this.onComplete = new _miniSignals2.default(); + + /** + * Dispatched after this resource has had all the *after* middleware run on it. + * + * The callback looks like {@link Resource.OnCompleteSignal}. + * + * @member {Signal} + */ + this.onAfterMiddleware = new _miniSignals2.default(); + + /** + * When the resource starts to load. + * + * @memberof Resource + * @callback OnStartSignal + * @param {Resource} resource - The resource that the event happened on. + */ + + /** + * When the resource reports loading progress. + * + * @memberof Resource + * @callback OnProgressSignal + * @param {Resource} resource - The resource that the event happened on. + * @param {number} percentage - The progress of the load in the range [0, 1]. + */ + + /** + * When the resource finishes loading. + * + * @memberof Resource + * @callback OnCompleteSignal + * @param {Resource} resource - The resource that the event happened on. + */ + } + + /** + * Stores whether or not this url is a data url. + * + * @member {boolean} + * @readonly + */ + + + /** + * Marks the resource as complete. + * + */ + Resource.prototype.complete = function complete() { + // TODO: Clean this up in a wrapper or something...gross.... + if (this.data && this.data.removeEventListener) { + this.data.removeEventListener('error', this._boundOnError, false); + this.data.removeEventListener('load', this._boundComplete, false); + this.data.removeEventListener('progress', this._boundOnProgress, false); + this.data.removeEventListener('canplaythrough', this._boundComplete, false); + } + + if (this.xhr) { + if (this.xhr.removeEventListener) { + this.xhr.removeEventListener('error', this._boundXhrOnError, false); + this.xhr.removeEventListener('abort', this._boundXhrOnAbort, false); + this.xhr.removeEventListener('progress', this._boundOnProgress, false); + this.xhr.removeEventListener('load', this._boundXhrOnLoad, false); + } else { + this.xhr.onerror = null; + this.xhr.ontimeout = null; + this.xhr.onprogress = null; + this.xhr.onload = null; + } + } + + if (this.isComplete) { + throw new Error('Complete called again for an already completed resource.'); + } + + this._setFlag(Resource.STATUS_FLAGS.COMPLETE, true); + this._setFlag(Resource.STATUS_FLAGS.LOADING, false); + + this.onComplete.dispatch(this); + }; + + /** + * Aborts the loading of this resource, with an optional message. + * + * @param {string} message - The message to use for the error + */ + + + Resource.prototype.abort = function abort(message) { + // abort can be called multiple times, ignore subsequent calls. + if (this.error) { + return; + } + + // store error + this.error = new Error(message); + + // abort the actual loading + if (this.xhr) { + this.xhr.abort(); + } else if (this.xdr) { + this.xdr.abort(); + } else if (this.data) { + // single source + if (this.data.src) { + this.data.src = Resource.EMPTY_GIF; + } + // multi-source + else { + while (this.data.firstChild) { + this.data.removeChild(this.data.firstChild); + } + } + } + + // done now. + this.complete(); + }; + + /** + * Kicks off loading of this resource. This method is asynchronous. + * + * @param {function} [cb] - Optional callback to call once the resource is loaded. + */ + + + Resource.prototype.load = function load(cb) { + var _this = this; + + if (this.isLoading) { + return; + } + + if (this.isComplete) { + if (cb) { + setTimeout(function () { + return cb(_this); + }, 1); + } + + return; + } else if (cb) { + this.onComplete.once(cb); + } + + this._setFlag(Resource.STATUS_FLAGS.LOADING, true); + + this.onStart.dispatch(this); + + // if unset, determine the value + if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') { + this.crossOrigin = this._determineCrossOrigin(this.url); + } + + switch (this.loadType) { + case Resource.LOAD_TYPE.IMAGE: + this.type = Resource.TYPE.IMAGE; + this._loadElement('image'); + break; + + case Resource.LOAD_TYPE.AUDIO: + this.type = Resource.TYPE.AUDIO; + this._loadSourceElement('audio'); + break; + + case Resource.LOAD_TYPE.VIDEO: + this.type = Resource.TYPE.VIDEO; + this._loadSourceElement('video'); + break; + + case Resource.LOAD_TYPE.XHR: + /* falls through */ + default: + if (useXdr && this.crossOrigin) { + this._loadXdr(); + } else { + this._loadXhr(); + } + break; + } + }; + + /** + * Checks if the flag is set. + * + * @private + * @param {number} flag - The flag to check. + * @return {boolean} True if the flag is set. + */ + + + Resource.prototype._hasFlag = function _hasFlag(flag) { + return !!(this._flags & flag); + }; + + /** + * (Un)Sets the flag. + * + * @private + * @param {number} flag - The flag to (un)set. + * @param {boolean} value - Whether to set or (un)set the flag. + */ + + + Resource.prototype._setFlag = function _setFlag(flag, value) { + this._flags = value ? this._flags | flag : this._flags & ~flag; + }; + + /** + * Loads this resources using an element that has a single source, + * like an HTMLImageElement. + * + * @private + * @param {string} type - The type of element to use. + */ + + + Resource.prototype._loadElement = function _loadElement(type) { + if (this.metadata.loadElement) { + this.data = this.metadata.loadElement; + } else if (type === 'image' && typeof window.Image !== 'undefined') { + this.data = new Image(); + } else { + this.data = document.createElement(type); + } + + if (this.crossOrigin) { + this.data.crossOrigin = this.crossOrigin; + } + + if (!this.metadata.skipSource) { + this.data.src = this.url; + } + + this.data.addEventListener('error', this._boundOnError, false); + this.data.addEventListener('load', this._boundComplete, false); + this.data.addEventListener('progress', this._boundOnProgress, false); + }; + + /** + * Loads this resources using an element that has multiple sources, + * like an HTMLAudioElement or HTMLVideoElement. + * + * @private + * @param {string} type - The type of element to use. + */ + + + Resource.prototype._loadSourceElement = function _loadSourceElement(type) { + if (this.metadata.loadElement) { + this.data = this.metadata.loadElement; + } else if (type === 'audio' && typeof window.Audio !== 'undefined') { + this.data = new Audio(); + } else { + this.data = document.createElement(type); + } + + if (this.data === null) { + this.abort('Unsupported element: ' + type); + + return; + } + + if (!this.metadata.skipSource) { + // support for CocoonJS Canvas+ runtime, lacks document.createElement('source') + if (navigator.isCocoonJS) { + this.data.src = Array.isArray(this.url) ? this.url[0] : this.url; + } else if (Array.isArray(this.url)) { + for (var i = 0; i < this.url.length; ++i) { + this.data.appendChild(this._createSource(type, this.url[i])); + } + } else { + this.data.appendChild(this._createSource(type, this.url)); + } + } + + this.data.addEventListener('error', this._boundOnError, false); + this.data.addEventListener('load', this._boundComplete, false); + this.data.addEventListener('progress', this._boundOnProgress, false); + this.data.addEventListener('canplaythrough', this._boundComplete, false); + + this.data.load(); + }; + + /** + * Loads this resources using an XMLHttpRequest. + * + * @private + */ + + + Resource.prototype._loadXhr = function _loadXhr() { + // if unset, determine the value + if (typeof this.xhrType !== 'string') { + this.xhrType = this._determineXhrType(); + } + + var xhr = this.xhr = new XMLHttpRequest(); + + // set the request type and url + xhr.open('GET', this.url, true); + + // load json as text and parse it ourselves. We do this because some browsers + // *cough* safari *cough* can't deal with it. + if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON || this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) { + xhr.responseType = Resource.XHR_RESPONSE_TYPE.TEXT; + } else { + xhr.responseType = this.xhrType; + } + + xhr.addEventListener('error', this._boundXhrOnError, false); + xhr.addEventListener('abort', this._boundXhrOnAbort, false); + xhr.addEventListener('progress', this._boundOnProgress, false); + xhr.addEventListener('load', this._boundXhrOnLoad, false); + + xhr.send(); + }; + + /** + * Loads this resources using an XDomainRequest. This is here because we need to support IE9 (gross). + * + * @private + */ + + + Resource.prototype._loadXdr = function _loadXdr() { + // if unset, determine the value + if (typeof this.xhrType !== 'string') { + this.xhrType = this._determineXhrType(); + } + + var xdr = this.xhr = new XDomainRequest(); + + // XDomainRequest has a few quirks. Occasionally it will abort requests + // A way to avoid this is to make sure ALL callbacks are set even if not used + // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9 + xdr.timeout = 5000; + + xdr.onerror = this._boundXhrOnError; + xdr.ontimeout = this._boundXdrOnTimeout; + xdr.onprogress = this._boundOnProgress; + xdr.onload = this._boundXhrOnLoad; + + xdr.open('GET', this.url, true); + + // Note: The xdr.send() call is wrapped in a timeout to prevent an + // issue with the interface where some requests are lost if multiple + // XDomainRequests are being sent at the same time. + // Some info here: https://github.com/photonstorm/phaser/issues/1248 + setTimeout(function () { + return xdr.send(); + }, 1); + }; + + /** + * Creates a source used in loading via an element. + * + * @private + * @param {string} type - The element type (video or audio). + * @param {string} url - The source URL to load from. + * @param {string} [mime] - The mime type of the video + * @return {HTMLSourceElement} The source element. + */ + + + Resource.prototype._createSource = function _createSource(type, url, mime) { + if (!mime) { + mime = type + '/' + url.substr(url.lastIndexOf('.') + 1); + } + + var source = document.createElement('source'); + + source.src = url; + source.type = mime; + + return source; + }; + + /** + * Called if a load errors out. + * + * @param {Event} event - The error event from the element that emits it. + * @private + */ + + + Resource.prototype._onError = function _onError(event) { + this.abort('Failed to load element using: ' + event.target.nodeName); + }; + + /** + * Called if a load progress event fires for xhr/xdr. + * + * @private + * @param {XMLHttpRequestProgressEvent|Event} event - Progress event. + */ + + + Resource.prototype._onProgress = function _onProgress(event) { + if (event && event.lengthComputable) { + this.onProgress.dispatch(this, event.loaded / event.total); + } + }; + + /** + * Called if an error event fires for xhr/xdr. + * + * @private + * @param {XMLHttpRequestErrorEvent|Event} event - Error event. + */ + + + Resource.prototype._xhrOnError = function _xhrOnError() { + var xhr = this.xhr; + + this.abort(reqType(xhr) + ' Request failed. Status: ' + xhr.status + ', text: "' + xhr.statusText + '"'); + }; + + /** + * Called if an abort event fires for xhr. + * + * @private + * @param {XMLHttpRequestAbortEvent} event - Abort Event + */ + + + Resource.prototype._xhrOnAbort = function _xhrOnAbort() { + this.abort(reqType(this.xhr) + ' Request was aborted by the user.'); + }; + + /** + * Called if a timeout event fires for xdr. + * + * @private + * @param {Event} event - Timeout event. + */ + + + Resource.prototype._xdrOnTimeout = function _xdrOnTimeout() { + this.abort(reqType(this.xhr) + ' Request timed out.'); + }; + + /** + * Called when data successfully loads from an xhr/xdr request. + * + * @private + * @param {XMLHttpRequestLoadEvent|Event} event - Load event + */ + + + Resource.prototype._xhrOnLoad = function _xhrOnLoad() { + var xhr = this.xhr; + var text = ''; + var status = typeof xhr.status === 'undefined' ? STATUS_OK : xhr.status; // XDR has no `.status`, assume 200. + + // responseText is accessible only if responseType is '' or 'text' and on older browsers + if (xhr.responseType === '' || xhr.responseType === 'text' || typeof xhr.responseType === 'undefined') { + text = xhr.responseText; + } + + // status can be 0 when using the `file://` protocol so we also check if a response is set. + // If it has a response, we assume 200; otherwise a 0 status code with no contents is an aborted request. + if (status === STATUS_NONE && text.length > 0) { + status = STATUS_OK; + } + // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request + else if (status === STATUS_IE_BUG_EMPTY) { + status = STATUS_EMPTY; + } + + var statusType = status / 100 | 0; + + if (statusType === STATUS_TYPE_OK) { + // if text, just return it + if (this.xhrType === Resource.XHR_RESPONSE_TYPE.TEXT) { + this.data = text; + this.type = Resource.TYPE.TEXT; + } + // if json, parse into json object + else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.JSON) { + try { + this.data = JSON.parse(text); + this.type = Resource.TYPE.JSON; + } catch (e) { + this.abort('Error trying to parse loaded json: ' + e); + + return; + } + } + // if xml, parse into an xml document or div element + else if (this.xhrType === Resource.XHR_RESPONSE_TYPE.DOCUMENT) { + try { + if (window.DOMParser) { + var domparser = new DOMParser(); + + this.data = domparser.parseFromString(text, 'text/xml'); + } else { + var div = document.createElement('div'); + + div.innerHTML = text; + + this.data = div; + } + + this.type = Resource.TYPE.XML; + } catch (e) { + this.abort('Error trying to parse loaded xml: ' + e); + + return; + } + } + // other types just return the response + else { + this.data = xhr.response || text; + } + } else { + this.abort('[' + xhr.status + '] ' + xhr.statusText + ': ' + xhr.responseURL); + + return; + } + + this.complete(); + }; + + /** + * Sets the `crossOrigin` property for this resource based on if the url + * for this resource is cross-origin. If crossOrigin was manually set, this + * function does nothing. + * + * @private + * @param {string} url - The url to test. + * @param {object} [loc=window.location] - The location object to test against. + * @return {string} The crossOrigin value to use (or empty string for none). + */ + + + Resource.prototype._determineCrossOrigin = function _determineCrossOrigin(url, loc) { + // data: and javascript: urls are considered same-origin + if (url.indexOf('data:') === 0) { + return ''; + } + + // default is window.location + loc = loc || window.location; + + if (!tempAnchor) { + tempAnchor = document.createElement('a'); + } + + // let the browser determine the full href for the url of this resource and then + // parse with the node url lib, we can't use the properties of the anchor element + // because they don't work in IE9 :( + tempAnchor.href = url; + url = (0, _parseUri2.default)(tempAnchor.href, { strictMode: true }); + + var samePort = !url.port && loc.port === '' || url.port === loc.port; + var protocol = url.protocol ? url.protocol + ':' : ''; + + // if cross origin + if (url.host !== loc.hostname || !samePort || protocol !== loc.protocol) { + return 'anonymous'; + } + + return ''; + }; + + /** + * Determines the responseType of an XHR request based on the extension of the + * resource being loaded. + * + * @private + * @return {Resource.XHR_RESPONSE_TYPE} The responseType to use. + */ + + + Resource.prototype._determineXhrType = function _determineXhrType() { + return Resource._xhrTypeMap[this.extension] || Resource.XHR_RESPONSE_TYPE.TEXT; + }; + + /** + * Determines the loadType of a resource based on the extension of the + * resource being loaded. + * + * @private + * @return {Resource.LOAD_TYPE} The loadType to use. + */ + + + Resource.prototype._determineLoadType = function _determineLoadType() { + return Resource._loadTypeMap[this.extension] || Resource.LOAD_TYPE.XHR; + }; + + /** + * Extracts the extension (sans '.') of the file being loaded by the resource. + * + * @private + * @return {string} The extension. + */ + + + Resource.prototype._getExtension = function _getExtension() { + var url = this.url; + var ext = ''; + + if (this.isDataUrl) { + var slashIndex = url.indexOf('/'); + + ext = url.substring(slashIndex + 1, url.indexOf(';', slashIndex)); + } else { + var queryStart = url.indexOf('?'); + + if (queryStart !== -1) { + url = url.substring(0, queryStart); + } + + ext = url.substring(url.lastIndexOf('.') + 1); + } + + return ext.toLowerCase(); + }; + + /** + * Determines the mime type of an XHR request based on the responseType of + * resource being loaded. + * + * @private + * @param {Resource.XHR_RESPONSE_TYPE} type - The type to get a mime type for. + * @return {string} The mime type to use. + */ + + + Resource.prototype._getMimeFromXhrType = function _getMimeFromXhrType(type) { + switch (type) { + case Resource.XHR_RESPONSE_TYPE.BUFFER: + return 'application/octet-binary'; + + case Resource.XHR_RESPONSE_TYPE.BLOB: + return 'application/blob'; + + case Resource.XHR_RESPONSE_TYPE.DOCUMENT: + return 'application/xml'; + + case Resource.XHR_RESPONSE_TYPE.JSON: + return 'application/json'; + + case Resource.XHR_RESPONSE_TYPE.DEFAULT: + case Resource.XHR_RESPONSE_TYPE.TEXT: + /* falls through */ + default: + return 'text/plain'; + + } + }; + + _createClass(Resource, [{ + key: 'isDataUrl', + get: function get() { + return this._hasFlag(Resource.STATUS_FLAGS.DATA_URL); + } + + /** + * Describes if this resource has finished loading. Is true when the resource has completely + * loaded. + * + * @member {boolean} + * @readonly + */ + + }, { + key: 'isComplete', + get: function get() { + return this._hasFlag(Resource.STATUS_FLAGS.COMPLETE); + } + + /** + * Describes if this resource is currently loading. Is true when the resource starts loading, + * and is false again when complete. + * + * @member {boolean} + * @readonly + */ + + }, { + key: 'isLoading', + get: function get() { + return this._hasFlag(Resource.STATUS_FLAGS.LOADING); + } + }]); + + return Resource; +}(); + +/** + * The types of resources a resource could represent. + * + * @static + * @readonly + * @enum {number} + */ + + +exports.default = Resource; +Resource.STATUS_FLAGS = { + NONE: 0, + DATA_URL: 1 << 0, + COMPLETE: 1 << 1, + LOADING: 1 << 2 +}; + +/** + * The types of resources a resource could represent. + * + * @static + * @readonly + * @enum {number} + */ +Resource.TYPE = { + UNKNOWN: 0, + JSON: 1, + XML: 2, + IMAGE: 3, + AUDIO: 4, + VIDEO: 5, + TEXT: 6 +}; + +/** + * The types of loading a resource can use. + * + * @static + * @readonly + * @enum {number} + */ +Resource.LOAD_TYPE = { + /** Uses XMLHttpRequest to load the resource. */ + XHR: 1, + /** Uses an `Image` object to load the resource. */ + IMAGE: 2, + /** Uses an `Audio` object to load the resource. */ + AUDIO: 3, + /** Uses a `Video` object to load the resource. */ + VIDEO: 4 +}; + +/** + * The XHR ready states, used internally. + * + * @static + * @readonly + * @enum {string} + */ +Resource.XHR_RESPONSE_TYPE = { + /** string */ + DEFAULT: 'text', + /** ArrayBuffer */ + BUFFER: 'arraybuffer', + /** Blob */ + BLOB: 'blob', + /** Document */ + DOCUMENT: 'document', + /** Object */ + JSON: 'json', + /** String */ + TEXT: 'text' +}; + +Resource._loadTypeMap = { + // images + gif: Resource.LOAD_TYPE.IMAGE, + png: Resource.LOAD_TYPE.IMAGE, + bmp: Resource.LOAD_TYPE.IMAGE, + jpg: Resource.LOAD_TYPE.IMAGE, + jpeg: Resource.LOAD_TYPE.IMAGE, + tif: Resource.LOAD_TYPE.IMAGE, + tiff: Resource.LOAD_TYPE.IMAGE, + webp: Resource.LOAD_TYPE.IMAGE, + tga: Resource.LOAD_TYPE.IMAGE, + svg: Resource.LOAD_TYPE.IMAGE, + 'svg+xml': Resource.LOAD_TYPE.IMAGE, // for SVG data urls + + // audio + mp3: Resource.LOAD_TYPE.AUDIO, + ogg: Resource.LOAD_TYPE.AUDIO, + wav: Resource.LOAD_TYPE.AUDIO, + + // videos + mp4: Resource.LOAD_TYPE.VIDEO, + webm: Resource.LOAD_TYPE.VIDEO +}; + +Resource._xhrTypeMap = { + // xml + xhtml: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + html: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + htm: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + xml: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + tmx: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + svg: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + + // This was added to handle Tiled Tileset XML, but .tsx is also a TypeScript React Component. + // Since it is way less likely for people to be loading TypeScript files instead of Tiled files, + // this should probably be fine. + tsx: Resource.XHR_RESPONSE_TYPE.DOCUMENT, + + // images + gif: Resource.XHR_RESPONSE_TYPE.BLOB, + png: Resource.XHR_RESPONSE_TYPE.BLOB, + bmp: Resource.XHR_RESPONSE_TYPE.BLOB, + jpg: Resource.XHR_RESPONSE_TYPE.BLOB, + jpeg: Resource.XHR_RESPONSE_TYPE.BLOB, + tif: Resource.XHR_RESPONSE_TYPE.BLOB, + tiff: Resource.XHR_RESPONSE_TYPE.BLOB, + webp: Resource.XHR_RESPONSE_TYPE.BLOB, + tga: Resource.XHR_RESPONSE_TYPE.BLOB, + + // json + json: Resource.XHR_RESPONSE_TYPE.JSON, + + // text + text: Resource.XHR_RESPONSE_TYPE.TEXT, + txt: Resource.XHR_RESPONSE_TYPE.TEXT, + + // fonts + ttf: Resource.XHR_RESPONSE_TYPE.BUFFER, + otf: Resource.XHR_RESPONSE_TYPE.BUFFER +}; + +// We can't set the `src` attribute to empty string, so on abort we set it to this 1px transparent gif +Resource.EMPTY_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='; + +/** + * Quick helper to set a value on one of the extension maps. Ensures there is no + * dot at the start of the extension. + * + * @ignore + * @param {object} map - The map to set on. + * @param {string} extname - The extension (or key) to set. + * @param {number} val - The value to set. + */ +function setExtMap(map, extname, val) { + if (extname && extname.indexOf('.') === 0) { + extname = extname.substring(1); + } + + if (!extname) { + return; + } + + map[extname] = val; +} + +/** + * Quick helper to get string xhr type. + * + * @ignore + * @param {XMLHttpRequest|XDomainRequest} xhr - The request to check. + * @return {string} The type. + */ +function reqType(xhr) { + return xhr.toString().replace('object ', ''); +} + +},{"mini-signals":22,"parse-uri":24}],34:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.eachSeries = eachSeries; +exports.queue = queue; +/** + * Smaller version of the async library constructs. + * + */ +function _noop() {} /* empty */ + +/** + * Iterates an array in series. + * + * @param {Array.<*>} array - Array to iterate. + * @param {function} iterator - Function to call for each element. + * @param {function} callback - Function to call when done, or on error. + * @param {boolean} [deferNext=false] - Break synchronous each loop by calling next with a setTimeout of 1. + */ +function eachSeries(array, iterator, callback, deferNext) { + var i = 0; + var len = array.length; + + (function next(err) { + if (err || i === len) { + if (callback) { + callback(err); + } + + return; + } + + if (deferNext) { + setTimeout(function () { + iterator(array[i++], next); + }, 1); + } else { + iterator(array[i++], next); + } + })(); +} + +/** + * Ensures a function is only called once. + * + * @param {function} fn - The function to wrap. + * @return {function} The wrapping function. + */ +function onlyOnce(fn) { + return function onceWrapper() { + if (fn === null) { + throw new Error('Callback was already called.'); + } + + var callFn = fn; + + fn = null; + callFn.apply(this, arguments); + }; +} + +/** + * Async queue implementation, + * + * @param {function} worker - The worker function to call for each task. + * @param {number} concurrency - How many workers to run in parrallel. + * @return {*} The async queue object. + */ +function queue(worker, concurrency) { + if (concurrency == null) { + // eslint-disable-line no-eq-null,eqeqeq + concurrency = 1; + } else if (concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + + var workers = 0; + var q = { + _tasks: [], + concurrency: concurrency, + saturated: _noop, + unsaturated: _noop, + buffer: concurrency / 4, + empty: _noop, + drain: _noop, + error: _noop, + started: false, + paused: false, + push: function push(data, callback) { + _insert(data, false, callback); + }, + kill: function kill() { + workers = 0; + q.drain = _noop; + q.started = false; + q._tasks = []; + }, + unshift: function unshift(data, callback) { + _insert(data, true, callback); + }, + process: function process() { + while (!q.paused && workers < q.concurrency && q._tasks.length) { + var task = q._tasks.shift(); + + if (q._tasks.length === 0) { + q.empty(); + } + + workers += 1; + + if (workers === q.concurrency) { + q.saturated(); + } + + worker(task.data, onlyOnce(_next(task))); + } + }, + length: function length() { + return q._tasks.length; + }, + running: function running() { + return workers; + }, + idle: function idle() { + return q._tasks.length + workers === 0; + }, + pause: function pause() { + if (q.paused === true) { + return; + } + + q.paused = true; + }, + resume: function resume() { + if (q.paused === false) { + return; + } + + q.paused = false; + + // Need to call q.process once per concurrent + // worker to preserve full concurrency after pause + for (var w = 1; w <= q.concurrency; w++) { + q.process(); + } + } + }; + + function _insert(data, insertAtFront, callback) { + if (callback != null && typeof callback !== 'function') { + // eslint-disable-line no-eq-null,eqeqeq + throw new Error('task callback must be a function'); + } + + q.started = true; + + if (data == null && q.idle()) { + // eslint-disable-line no-eq-null,eqeqeq + // call drain immediately if there are no tasks + setTimeout(function () { + return q.drain(); + }, 1); + + return; + } + + var item = { + data: data, + callback: typeof callback === 'function' ? callback : _noop + }; + + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + + setTimeout(function () { + return q.process(); + }, 1); + } + + function _next(task) { + return function next() { + workers -= 1; + + task.callback.apply(task, arguments); + + if (arguments[0] != null) { + // eslint-disable-line no-eq-null,eqeqeq + q.error(arguments[0], task.data); + } + + if (workers <= q.concurrency - q.buffer) { + q.unsaturated(); + } + + if (q.idle()) { + q.drain(); + } + + q.process(); + }; + } + + return q; +} + +},{}],35:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.encodeBinary = encodeBinary; +var _keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + +function encodeBinary(input) { + var output = ''; + var inx = 0; + + while (inx < input.length) { + // Fill byte buffer array + var bytebuffer = [0, 0, 0]; + var encodedCharIndexes = [0, 0, 0, 0]; + + for (var jnx = 0; jnx < bytebuffer.length; ++jnx) { + if (inx < input.length) { + // throw away high-order byte, as documented at: + // https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data + bytebuffer[jnx] = input.charCodeAt(inx++) & 0xff; + } else { + bytebuffer[jnx] = 0; + } + } + + // Get each encoded character, 6 bits at a time + // index 1: first 6 bits + encodedCharIndexes[0] = bytebuffer[0] >> 2; + + // index 2: second 6 bits (2 least significant bits from input byte 1 + 4 most significant bits from byte 2) + encodedCharIndexes[1] = (bytebuffer[0] & 0x3) << 4 | bytebuffer[1] >> 4; + + // index 3: third 6 bits (4 least significant bits from input byte 2 + 2 most significant bits from byte 3) + encodedCharIndexes[2] = (bytebuffer[1] & 0x0f) << 2 | bytebuffer[2] >> 6; + + // index 3: forth 6 bits (6 least significant bits from input byte 3) + encodedCharIndexes[3] = bytebuffer[2] & 0x3f; + + // Determine whether padding happened, and adjust accordingly + var paddingBytes = inx - (input.length - 1); + + switch (paddingBytes) { + case 2: + // Set last 2 characters to padding char + encodedCharIndexes[3] = 64; + encodedCharIndexes[2] = 64; + break; + + case 1: + // Set last character to padding char + encodedCharIndexes[3] = 64; + break; + + default: + break; // No padding - proceed + } + + // Now we will grab each appropriate character out of our keystring + // based on our index array and append it to the output string + for (var _jnx = 0; _jnx < encodedCharIndexes.length; ++_jnx) { + output += _keyStr.charAt(encodedCharIndexes[_jnx]); + } + } + + return output; +} + +},{}],36:[function(require,module,exports){ +'use strict'; + +// import Loader from './Loader'; +// import Resource from './Resource'; +// import * as async from './async'; +// import * as b64 from './b64'; + +/* eslint-disable no-undef */ + +var Loader = require('./Loader').default; +var Resource = require('./Resource').default; +var async = require('./async'); +var b64 = require('./b64'); + +Loader.Resource = Resource; +Loader.async = async; +Loader.base64 = b64; + +// export manually, and also as default +module.exports = Loader; +// export default Loader; +module.exports.default = Loader; + +},{"./Loader":32,"./Resource":33,"./async":34,"./b64":35}],37:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.blobMiddlewareFactory = blobMiddlewareFactory; + +var _Resource = require('../../Resource'); + +var _Resource2 = _interopRequireDefault(_Resource); + +var _b = require('../../b64'); + +var _b2 = _interopRequireDefault(_b); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Url = window.URL || window.webkitURL; + +// a middleware for transforming XHR loaded Blobs into more useful objects +function blobMiddlewareFactory() { + return function blobMiddleware(resource, next) { + if (!resource.data) { + next(); + + return; + } + + // if this was an XHR load of a blob + if (resource.xhr && resource.xhrType === _Resource2.default.XHR_RESPONSE_TYPE.BLOB) { + // if there is no blob support we probably got a binary string back + if (!window.Blob || typeof resource.data === 'string') { + var type = resource.xhr.getResponseHeader('content-type'); + + // this is an image, convert the binary string into a data url + if (type && type.indexOf('image') === 0) { + resource.data = new Image(); + resource.data.src = 'data:' + type + ';base64,' + _b2.default.encodeBinary(resource.xhr.responseText); + + resource.type = _Resource2.default.TYPE.IMAGE; + + // wait until the image loads and then callback + resource.data.onload = function () { + resource.data.onload = null; + + next(); + }; + + // next will be called on load + return; + } + } + // if content type says this is an image, then we should transform the blob into an Image object + else if (resource.data.type.indexOf('image') === 0) { + var _ret = function () { + var src = Url.createObjectURL(resource.data); + + resource.blob = resource.data; + resource.data = new Image(); + resource.data.src = src; + + resource.type = _Resource2.default.TYPE.IMAGE; + + // cleanup the no longer used blob after the image loads + // TODO: Is this correct? Will the image be invalid after revoking? + resource.data.onload = function () { + Url.revokeObjectURL(src); + resource.data.onload = null; + + next(); + }; + + // next will be called on load. + return { + v: void 0 + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + } + + next(); + }; +} + +},{"../../Resource":33,"../../b64":35}],38:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var punycode = require('punycode'); +var util = require('./util'); + +exports.parse = urlParse; +exports.resolve = urlResolve; +exports.resolveObject = urlResolveObject; +exports.format = urlFormat; + +exports.Url = Url; + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }, + querystring = require('querystring'); + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} + +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + return this; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + this.hostname = punycode.toASCII(this.hostname); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; +}; + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); +} + +Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + util.isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; +}; + +},{"./util":39,"punycode":27,"querystring":30}],39:[function(require,module,exports){ +'use strict'; + +module.exports = { + isString: function(arg) { + return typeof(arg) === 'string'; + }, + isObject: function(arg) { + return typeof(arg) === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } +}; + +},{}],40:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _ismobilejs = require('ismobilejs'); + +var _ismobilejs2 = _interopRequireDefault(_ismobilejs); + +var _accessibleTarget = require('./accessibleTarget'); + +var _accessibleTarget2 = _interopRequireDefault(_accessibleTarget); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +// add some extra variables to the container.. +core.utils.mixins.delayMixin(core.DisplayObject.prototype, _accessibleTarget2.default); + +var KEY_CODE_TAB = 9; + +var DIV_TOUCH_SIZE = 100; +var DIV_TOUCH_POS_X = 0; +var DIV_TOUCH_POS_Y = 0; +var DIV_TOUCH_ZINDEX = 2; + +var DIV_HOOK_SIZE = 1; +var DIV_HOOK_POS_X = -1000; +var DIV_HOOK_POS_Y = -1000; +var DIV_HOOK_ZINDEX = 2; + +/** + * The Accessibility manager recreates the ability to tab and have content read by screen + * readers. This is very important as it can possibly help people with disabilities access pixi + * content. + * + * Much like interaction any DisplayObject can be made accessible. This manager will map the + * events as if the mouse was being used, minimizing the effort required to implement. + * + * An instance of this class is automatically created by default, and can be found at renderer.plugins.accessibility + * + * @class + * @memberof PIXI.accessibility + */ + +var AccessibilityManager = function () { + /** + * @param {PIXI.CanvasRenderer|PIXI.WebGLRenderer} renderer - A reference to the current renderer + */ + function AccessibilityManager(renderer) { + _classCallCheck(this, AccessibilityManager); + + if ((_ismobilejs2.default.tablet || _ismobilejs2.default.phone) && !navigator.isCocoonJS) { + this.createTouchHook(); + } + + // first we create a div that will sit over the PixiJS element. This is where the div overlays will go. + var div = document.createElement('div'); + + div.style.width = DIV_TOUCH_SIZE + 'px'; + div.style.height = DIV_TOUCH_SIZE + 'px'; + div.style.position = 'absolute'; + div.style.top = DIV_TOUCH_POS_X + 'px'; + div.style.left = DIV_TOUCH_POS_Y + 'px'; + div.style.zIndex = DIV_TOUCH_ZINDEX; + + /** + * This is the dom element that will sit over the PixiJS element. This is where the div overlays will go. + * + * @type {HTMLElement} + * @private + */ + this.div = div; + + /** + * A simple pool for storing divs. + * + * @type {*} + * @private + */ + this.pool = []; + + /** + * This is a tick used to check if an object is no longer being rendered. + * + * @type {Number} + * @private + */ + this.renderId = 0; + + /** + * Setting this to true will visually show the divs. + * + * @type {boolean} + */ + this.debug = false; + + /** + * The renderer this accessibility manager works for. + * + * @member {PIXI.SystemRenderer} + */ + this.renderer = renderer; + + /** + * The array of currently active accessible items. + * + * @member {Array<*>} + * @private + */ + this.children = []; + + /** + * pre-bind the functions + * + * @private + */ + this._onKeyDown = this._onKeyDown.bind(this); + this._onMouseMove = this._onMouseMove.bind(this); + + /** + * stores the state of the manager. If there are no accessible objects or the mouse is moving, this will be false. + * + * @member {Array<*>} + * @private + */ + this.isActive = false; + this.isMobileAccessabillity = false; + + // let listen for tab.. once pressed we can fire up and show the accessibility layer + window.addEventListener('keydown', this._onKeyDown, false); + } + + /** + * Creates the touch hooks. + * + */ + + + AccessibilityManager.prototype.createTouchHook = function createTouchHook() { + var _this = this; + + var hookDiv = document.createElement('button'); + + hookDiv.style.width = DIV_HOOK_SIZE + 'px'; + hookDiv.style.height = DIV_HOOK_SIZE + 'px'; + hookDiv.style.position = 'absolute'; + hookDiv.style.top = DIV_HOOK_POS_X + 'px'; + hookDiv.style.left = DIV_HOOK_POS_Y + 'px'; + hookDiv.style.zIndex = DIV_HOOK_ZINDEX; + hookDiv.style.backgroundColor = '#FF0000'; + hookDiv.title = 'HOOK DIV'; + + hookDiv.addEventListener('focus', function () { + _this.isMobileAccessabillity = true; + _this.activate(); + document.body.removeChild(hookDiv); + }); + + document.body.appendChild(hookDiv); + }; + + /** + * Activating will cause the Accessibility layer to be shown. This is called when a user + * preses the tab key. + * + * @private + */ + + + AccessibilityManager.prototype.activate = function activate() { + if (this.isActive) { + return; + } + + this.isActive = true; + + window.document.addEventListener('mousemove', this._onMouseMove, true); + window.removeEventListener('keydown', this._onKeyDown, false); + + this.renderer.on('postrender', this.update, this); + + if (this.renderer.view.parentNode) { + this.renderer.view.parentNode.appendChild(this.div); + } + }; + + /** + * Deactivating will cause the Accessibility layer to be hidden. This is called when a user moves + * the mouse. + * + * @private + */ + + + AccessibilityManager.prototype.deactivate = function deactivate() { + if (!this.isActive || this.isMobileAccessabillity) { + return; + } + + this.isActive = false; + + window.document.removeEventListener('mousemove', this._onMouseMove); + window.addEventListener('keydown', this._onKeyDown, false); + + this.renderer.off('postrender', this.update); + + if (this.div.parentNode) { + this.div.parentNode.removeChild(this.div); + } + }; + + /** + * This recursive function will run through the scene graph and add any new accessible objects to the DOM layer. + * + * @private + * @param {PIXI.Container} displayObject - The DisplayObject to check. + */ + + + AccessibilityManager.prototype.updateAccessibleObjects = function updateAccessibleObjects(displayObject) { + if (!displayObject.visible) { + return; + } + + if (displayObject.accessible && displayObject.interactive) { + if (!displayObject._accessibleActive) { + this.addChild(displayObject); + } + + displayObject.renderId = this.renderId; + } + + var children = displayObject.children; + + for (var i = children.length - 1; i >= 0; i--) { + this.updateAccessibleObjects(children[i]); + } + }; + + /** + * Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects. + * + * @private + */ + + + AccessibilityManager.prototype.update = function update() { + if (!this.renderer.renderingToScreen) { + return; + } + + // update children... + this.updateAccessibleObjects(this.renderer._lastObjectRendered); + + var rect = this.renderer.view.getBoundingClientRect(); + var sx = rect.width / this.renderer.width; + var sy = rect.height / this.renderer.height; + + var div = this.div; + + div.style.left = rect.left + 'px'; + div.style.top = rect.top + 'px'; + div.style.width = this.renderer.width + 'px'; + div.style.height = this.renderer.height + 'px'; + + for (var i = 0; i < this.children.length; i++) { + var child = this.children[i]; + + if (child.renderId !== this.renderId) { + child._accessibleActive = false; + + core.utils.removeItems(this.children, i, 1); + this.div.removeChild(child._accessibleDiv); + this.pool.push(child._accessibleDiv); + child._accessibleDiv = null; + + i--; + + if (this.children.length === 0) { + this.deactivate(); + } + } else { + // map div to display.. + div = child._accessibleDiv; + var hitArea = child.hitArea; + var wt = child.worldTransform; + + if (child.hitArea) { + div.style.left = (wt.tx + hitArea.x * wt.a) * sx + 'px'; + div.style.top = (wt.ty + hitArea.y * wt.d) * sy + 'px'; + + div.style.width = hitArea.width * wt.a * sx + 'px'; + div.style.height = hitArea.height * wt.d * sy + 'px'; + } else { + hitArea = child.getBounds(); + + this.capHitArea(hitArea); + + div.style.left = hitArea.x * sx + 'px'; + div.style.top = hitArea.y * sy + 'px'; + + div.style.width = hitArea.width * sx + 'px'; + div.style.height = hitArea.height * sy + 'px'; + } + } + } + + // increment the render id.. + this.renderId++; + }; + + /** + * TODO: docs. + * + * @param {Rectangle} hitArea - TODO docs + */ + + + AccessibilityManager.prototype.capHitArea = function capHitArea(hitArea) { + if (hitArea.x < 0) { + hitArea.width += hitArea.x; + hitArea.x = 0; + } + + if (hitArea.y < 0) { + hitArea.height += hitArea.y; + hitArea.y = 0; + } + + if (hitArea.x + hitArea.width > this.renderer.width) { + hitArea.width = this.renderer.width - hitArea.x; + } + + if (hitArea.y + hitArea.height > this.renderer.height) { + hitArea.height = this.renderer.height - hitArea.y; + } + }; + + /** + * Adds a DisplayObject to the accessibility manager + * + * @private + * @param {DisplayObject} displayObject - The child to make accessible. + */ + + + AccessibilityManager.prototype.addChild = function addChild(displayObject) { + // this.activate(); + + var div = this.pool.pop(); + + if (!div) { + div = document.createElement('button'); + + div.style.width = DIV_TOUCH_SIZE + 'px'; + div.style.height = DIV_TOUCH_SIZE + 'px'; + div.style.backgroundColor = this.debug ? 'rgba(255,0,0,0.5)' : 'transparent'; + div.style.position = 'absolute'; + div.style.zIndex = DIV_TOUCH_ZINDEX; + div.style.borderStyle = 'none'; + + div.addEventListener('click', this._onClick.bind(this)); + div.addEventListener('focus', this._onFocus.bind(this)); + div.addEventListener('focusout', this._onFocusOut.bind(this)); + } + + if (displayObject.accessibleTitle) { + div.title = displayObject.accessibleTitle; + } else if (!displayObject.accessibleTitle && !displayObject.accessibleHint) { + div.title = 'displayObject ' + this.tabIndex; + } + + if (displayObject.accessibleHint) { + div.setAttribute('aria-label', displayObject.accessibleHint); + } + + // + + displayObject._accessibleActive = true; + displayObject._accessibleDiv = div; + div.displayObject = displayObject; + + this.children.push(displayObject); + this.div.appendChild(displayObject._accessibleDiv); + displayObject._accessibleDiv.tabIndex = displayObject.tabIndex; + }; + + /** + * Maps the div button press to pixi's InteractionManager (click) + * + * @private + * @param {MouseEvent} e - The click event. + */ + + + AccessibilityManager.prototype._onClick = function _onClick(e) { + var interactionManager = this.renderer.plugins.interaction; + + interactionManager.dispatchEvent(e.target.displayObject, 'click', interactionManager.eventData); + }; + + /** + * Maps the div focus events to pixi's InteractionManager (mouseover) + * + * @private + * @param {FocusEvent} e - The focus event. + */ + + + AccessibilityManager.prototype._onFocus = function _onFocus(e) { + var interactionManager = this.renderer.plugins.interaction; + + interactionManager.dispatchEvent(e.target.displayObject, 'mouseover', interactionManager.eventData); + }; + + /** + * Maps the div focus events to pixi's InteractionManager (mouseout) + * + * @private + * @param {FocusEvent} e - The focusout event. + */ + + + AccessibilityManager.prototype._onFocusOut = function _onFocusOut(e) { + var interactionManager = this.renderer.plugins.interaction; + + interactionManager.dispatchEvent(e.target.displayObject, 'mouseout', interactionManager.eventData); + }; + + /** + * Is called when a key is pressed + * + * @private + * @param {KeyboardEvent} e - The keydown event. + */ + + + AccessibilityManager.prototype._onKeyDown = function _onKeyDown(e) { + if (e.keyCode !== KEY_CODE_TAB) { + return; + } + + this.activate(); + }; + + /** + * Is called when the mouse moves across the renderer element + * + * @private + */ + + + AccessibilityManager.prototype._onMouseMove = function _onMouseMove() { + this.deactivate(); + }; + + /** + * Destroys the accessibility manager + * + */ + + + AccessibilityManager.prototype.destroy = function destroy() { + this.div = null; + + for (var i = 0; i < this.children.length; i++) { + this.children[i].div = null; + } + + window.document.removeEventListener('mousemove', this._onMouseMove); + window.removeEventListener('keydown', this._onKeyDown); + + this.pool = null; + this.children = null; + this.renderer = null; + }; + + return AccessibilityManager; +}(); + +exports.default = AccessibilityManager; + + +core.WebGLRenderer.registerPlugin('accessibility', AccessibilityManager); +core.CanvasRenderer.registerPlugin('accessibility', AccessibilityManager); + +},{"../core":65,"./accessibleTarget":41,"ismobilejs":21}],41:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +/** + * Default property values of accessible objects + * used by {@link PIXI.accessibility.AccessibilityManager}. + * + * @function accessibleTarget + * @memberof PIXI.accessibility + * @example + * function MyObject() {} + * + * Object.assign( + * MyObject.prototype, + * PIXI.accessibility.accessibleTarget + * ); + */ +exports.default = { + /** + * Flag for if the object is accessible. If true AccessibilityManager will overlay a + * shadow div with attributes set + * + * @member {boolean} + */ + accessible: false, + + /** + * Sets the title attribute of the shadow div + * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]' + * + * @member {string} + */ + accessibleTitle: null, + + /** + * Sets the aria-label attribute of the shadow div + * + * @member {string} + */ + accessibleHint: null, + + /** + * @todo Needs docs. + */ + tabIndex: 0, + + /** + * @todo Needs docs. + */ + _accessibleActive: false, + + /** + * @todo Needs docs. + */ + _accessibleDiv: false +}; + +},{}],42:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _accessibleTarget = require('./accessibleTarget'); + +Object.defineProperty(exports, 'accessibleTarget', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_accessibleTarget).default; + } +}); + +var _AccessibilityManager = require('./AccessibilityManager'); + +Object.defineProperty(exports, 'AccessibilityManager', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_AccessibilityManager).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./AccessibilityManager":40,"./accessibleTarget":41}],43:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _autoDetectRenderer = require('./autoDetectRenderer'); + +var _Container = require('./display/Container'); + +var _Container2 = _interopRequireDefault(_Container); + +var _ticker = require('./ticker'); + +var _settings = require('./settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _const = require('./const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Convenience class to create a new PIXI application. + * This class automatically creates the renderer, ticker + * and root container. + * + * @example + * // Create the application + * const app = new PIXI.Application(); + * + * // Add the view to the DOM + * document.body.appendChild(app.view); + * + * // ex, add display objects + * app.stage.addChild(PIXI.Sprite.fromImage('something.png')); + * + * @class + * @memberof PIXI + */ +var Application = function () { + // eslint-disable-next-line valid-jsdoc + /** + * @param {object} [options] - The optional renderer parameters + * @param {boolean} [options.autoStart=true] - automatically starts the rendering after the construction. + * Note that setting this parameter to false does NOT stop the shared ticker even if you set + * options.sharedTicker to true in case that it is already started. Stop it by your own. + * @param {number} [options.width=800] - the width of the renderers view + * @param {number} [options.height=600] - the height of the renderers view + * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional + * @param {boolean} [options.transparent=false] - If the render view is transparent, default false + * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment) + * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you + * need to call toDataUrl on the webgl context + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2 + * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present + * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area + * (shown if not transparent). + * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or + * not before the new render pass. + * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering, + * stopping pixel interpolation. + * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native. + * FXAA is faster, but may not always look as great **webgl only** + * @param {boolean} [options.legacy=false] - `true` to ensure compatibility with older / less advanced devices. + * If you experience unexplained flickering try setting this to true. **webgl only** + * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to "high-performance" + * for devices with dual graphics card **webgl only** + * @param {boolean} [options.sharedTicker=false] - `true` to use PIXI.ticker.shared, `false` to create new ticker. + * @param {boolean} [options.sharedLoader=false] - `true` to use PIXI.loaders.shared, `false` to create new Loader. + */ + function Application(options, arg2, arg3, arg4, arg5) { + _classCallCheck(this, Application); + + // Support for constructor(width, height, options, noWebGL, useSharedTicker) + if (typeof options === 'number') { + options = Object.assign({ + width: options, + height: arg2 || _settings2.default.RENDER_OPTIONS.height, + forceCanvas: !!arg4, + sharedTicker: !!arg5 + }, arg3); + } + + /** + * The default options, so we mixin functionality later. + * @member {object} + * @protected + */ + this._options = options = Object.assign({ + autoStart: true, + sharedTicker: false, + forceCanvas: false, + sharedLoader: false + }, options); + + /** + * WebGL renderer if available, otherwise CanvasRenderer + * @member {PIXI.WebGLRenderer|PIXI.CanvasRenderer} + */ + this.renderer = (0, _autoDetectRenderer.autoDetectRenderer)(options); + + /** + * The root display container that's rendered. + * @member {PIXI.Container} + */ + this.stage = new _Container2.default(); + + /** + * Internal reference to the ticker + * @member {PIXI.ticker.Ticker} + * @private + */ + this._ticker = null; + + /** + * Ticker for doing render updates. + * @member {PIXI.ticker.Ticker} + * @default PIXI.ticker.shared + */ + this.ticker = options.sharedTicker ? _ticker.shared : new _ticker.Ticker(); + + // Start the rendering + if (options.autoStart) { + this.start(); + } + } + + /** + * Render the current stage. + */ + Application.prototype.render = function render() { + this.renderer.render(this.stage); + }; + + /** + * Convenience method for stopping the render. + */ + + + Application.prototype.stop = function stop() { + this._ticker.stop(); + }; + + /** + * Convenience method for starting the render. + */ + + + Application.prototype.start = function start() { + this._ticker.start(); + }; + + /** + * Reference to the renderer's canvas element. + * @member {HTMLCanvasElement} + * @readonly + */ + + + /** + * Destroy and don't use after this. + * @param {Boolean} [removeView=false] Automatically remove canvas from DOM. + */ + Application.prototype.destroy = function destroy(removeView) { + var oldTicker = this._ticker; + + this.ticker = null; + + oldTicker.destroy(); + + this.stage.destroy(); + this.stage = null; + + this.renderer.destroy(removeView); + this.renderer = null; + + this._options = null; + }; + + _createClass(Application, [{ + key: 'ticker', + set: function set(ticker) // eslint-disable-line require-jsdoc + { + if (this._ticker) { + this._ticker.remove(this.render, this); + } + this._ticker = ticker; + if (ticker) { + ticker.add(this.render, this, _const.UPDATE_PRIORITY.LOW); + } + }, + get: function get() // eslint-disable-line require-jsdoc + { + return this._ticker; + } + }, { + key: 'view', + get: function get() { + return this.renderer.view; + } + + /** + * Reference to the renderer's screen rectangle. Its safe to use as filterArea or hitArea for whole screen + * @member {PIXI.Rectangle} + * @readonly + */ + + }, { + key: 'screen', + get: function get() { + return this.renderer.screen; + } + }]); + + return Application; +}(); + +exports.default = Application; + +},{"./autoDetectRenderer":45,"./const":46,"./display/Container":48,"./settings":101,"./ticker":120}],44:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _pixiGlCore = require('pixi-gl-core'); + +var _settings = require('./settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function checkPrecision(src, def) { + if (src instanceof Array) { + if (src[0].substring(0, 9) !== 'precision') { + var copy = src.slice(0); + + copy.unshift('precision ' + def + ' float;'); + + return copy; + } + } else if (src.substring(0, 9) !== 'precision') { + return 'precision ' + def + ' float;\n' + src; + } + + return src; +} + +/** + * Wrapper class, webGL Shader for Pixi. + * Adds precision string if vertexSrc or fragmentSrc have no mention of it. + * + * @class + * @extends GLShader + * @memberof PIXI + */ + +var Shader = function (_GLShader) { + _inherits(Shader, _GLShader); + + /** + * + * @param {WebGLRenderingContext} gl - The current WebGL rendering context + * @param {string|string[]} vertexSrc - The vertex shader source as an array of strings. + * @param {string|string[]} fragmentSrc - The fragment shader source as an array of strings. + */ + function Shader(gl, vertexSrc, fragmentSrc) { + _classCallCheck(this, Shader); + + return _possibleConstructorReturn(this, _GLShader.call(this, gl, checkPrecision(vertexSrc, _settings2.default.PRECISION_VERTEX), checkPrecision(fragmentSrc, _settings2.default.PRECISION_FRAGMENT))); + } + + return Shader; +}(_pixiGlCore.GLShader); + +exports.default = Shader; + +},{"./settings":101,"pixi-gl-core":7}],45:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.autoDetectRenderer = autoDetectRenderer; + +var _utils = require('./utils'); + +var utils = _interopRequireWildcard(_utils); + +var _CanvasRenderer = require('./renderers/canvas/CanvasRenderer'); + +var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); + +var _WebGLRenderer = require('./renderers/webgl/WebGLRenderer'); + +var _WebGLRenderer2 = _interopRequireDefault(_WebGLRenderer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +// eslint-disable-next-line valid-jsdoc +/** + * This helper function will automatically detect which renderer you should be using. + * WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by + * the browser then this function will return a canvas renderer + * + * @memberof PIXI + * @function autoDetectRenderer + * @param {object} [options] - The optional renderer parameters + * @param {number} [options.width=800] - the width of the renderers view + * @param {number} [options.height=600] - the height of the renderers view + * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional + * @param {boolean} [options.transparent=false] - If the render view is transparent, default false + * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment) + * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, enable this if you + * need to call toDataUrl on the webgl context + * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area + * (shown if not transparent). + * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or + * not before the new render pass. + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer, retina would be 2 + * @param {boolean} [options.forceCanvas=false] - prevents selection of WebGL renderer, even if such is present + * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering, + * stopping pixel interpolation. + * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native. + * FXAA is faster, but may not always look as great **webgl only** + * @param {boolean} [options.legacy=false] - `true` to ensure compatibility with older / less advanced devices. + * If you experience unexplained flickering try setting this to true. **webgl only** + * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to "high-performance" + * for devices with dual graphics card **webgl only** + * @return {PIXI.WebGLRenderer|PIXI.CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer + */ +function autoDetectRenderer(options, arg1, arg2, arg3) { + // Backward-compatible support for noWebGL option + var forceCanvas = options && options.forceCanvas; + + if (arg3 !== undefined) { + forceCanvas = arg3; + } + + if (!forceCanvas && utils.isWebGLSupported()) { + return new _WebGLRenderer2.default(options, arg1, arg2); + } + + return new _CanvasRenderer2.default(options, arg1, arg2); +} + +},{"./renderers/canvas/CanvasRenderer":77,"./renderers/webgl/WebGLRenderer":84,"./utils":124}],46:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +/** + * String of the current PIXI version. + * + * @static + * @constant + * @memberof PIXI + * @name VERSION + * @type {string} + */ +var VERSION = exports.VERSION = '4.5.4'; + +/** + * Two Pi. + * + * @static + * @constant + * @memberof PIXI + * @type {number} + */ +var PI_2 = exports.PI_2 = Math.PI * 2; + +/** + * Conversion factor for converting radians to degrees. + * + * @static + * @constant + * @memberof PIXI + * @type {number} + */ +var RAD_TO_DEG = exports.RAD_TO_DEG = 180 / Math.PI; + +/** + * Conversion factor for converting degrees to radians. + * + * @static + * @constant + * @memberof PIXI + * @type {number} + */ +var DEG_TO_RAD = exports.DEG_TO_RAD = Math.PI / 180; + +/** + * Constant to identify the Renderer Type. + * + * @static + * @constant + * @memberof PIXI + * @name RENDERER_TYPE + * @type {object} + * @property {number} UNKNOWN - Unknown render type. + * @property {number} WEBGL - WebGL render type. + * @property {number} CANVAS - Canvas render type. + */ +var RENDERER_TYPE = exports.RENDERER_TYPE = { + UNKNOWN: 0, + WEBGL: 1, + CANVAS: 2 +}; + +/** + * Various blend modes supported by PIXI. + * + * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. + * Anything else will silently act like NORMAL. + * + * @static + * @constant + * @memberof PIXI + * @name BLEND_MODES + * @type {object} + * @property {number} NORMAL + * @property {number} ADD + * @property {number} MULTIPLY + * @property {number} SCREEN + * @property {number} OVERLAY + * @property {number} DARKEN + * @property {number} LIGHTEN + * @property {number} COLOR_DODGE + * @property {number} COLOR_BURN + * @property {number} HARD_LIGHT + * @property {number} SOFT_LIGHT + * @property {number} DIFFERENCE + * @property {number} EXCLUSION + * @property {number} HUE + * @property {number} SATURATION + * @property {number} COLOR + * @property {number} LUMINOSITY + */ +var BLEND_MODES = exports.BLEND_MODES = { + NORMAL: 0, + ADD: 1, + MULTIPLY: 2, + SCREEN: 3, + OVERLAY: 4, + DARKEN: 5, + LIGHTEN: 6, + COLOR_DODGE: 7, + COLOR_BURN: 8, + HARD_LIGHT: 9, + SOFT_LIGHT: 10, + DIFFERENCE: 11, + EXCLUSION: 12, + HUE: 13, + SATURATION: 14, + COLOR: 15, + LUMINOSITY: 16, + NORMAL_NPM: 17, + ADD_NPM: 18, + SCREEN_NPM: 19 +}; + +/** + * Various webgl draw modes. These can be used to specify which GL drawMode to use + * under certain situations and renderers. + * + * @static + * @constant + * @memberof PIXI + * @name DRAW_MODES + * @type {object} + * @property {number} POINTS + * @property {number} LINES + * @property {number} LINE_LOOP + * @property {number} LINE_STRIP + * @property {number} TRIANGLES + * @property {number} TRIANGLE_STRIP + * @property {number} TRIANGLE_FAN + */ +var DRAW_MODES = exports.DRAW_MODES = { + POINTS: 0, + LINES: 1, + LINE_LOOP: 2, + LINE_STRIP: 3, + TRIANGLES: 4, + TRIANGLE_STRIP: 5, + TRIANGLE_FAN: 6 +}; + +/** + * The scale modes that are supported by pixi. + * + * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations. + * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability. + * + * @static + * @constant + * @memberof PIXI + * @name SCALE_MODES + * @type {object} + * @property {number} LINEAR Smooth scaling + * @property {number} NEAREST Pixelating scaling + */ +var SCALE_MODES = exports.SCALE_MODES = { + LINEAR: 0, + NEAREST: 1 +}; + +/** + * The wrap modes that are supported by pixi. + * + * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wraping mode of future operations. + * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability. + * If the texture is non power of two then clamp will be used regardless as webGL can + * only use REPEAT if the texture is po2. + * + * This property only affects WebGL. + * + * @static + * @constant + * @name WRAP_MODES + * @memberof PIXI + * @type {object} + * @property {number} CLAMP - The textures uvs are clamped + * @property {number} REPEAT - The texture uvs tile and repeat + * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring + */ +var WRAP_MODES = exports.WRAP_MODES = { + CLAMP: 0, + REPEAT: 1, + MIRRORED_REPEAT: 2 +}; + +/** + * The gc modes that are supported by pixi. + * + * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO + * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not + * used for a specified period of time they will be removed from the GPU. They will of course + * be uploaded again when they are required. This is a silent behind the scenes process that + * should ensure that the GPU does not get filled up. + * + * Handy for mobile devices! + * This property only affects WebGL. + * + * @static + * @constant + * @name GC_MODES + * @memberof PIXI + * @type {object} + * @property {number} AUTO - Garbage collection will happen periodically automatically + * @property {number} MANUAL - Garbage collection will need to be called manually + */ +var GC_MODES = exports.GC_MODES = { + AUTO: 0, + MANUAL: 1 +}; + +/** + * Regexp for image type by extension. + * + * @static + * @constant + * @memberof PIXI + * @type {RegExp|string} + * @example `image.png` + */ +var URL_FILE_EXTENSION = exports.URL_FILE_EXTENSION = /\.(\w{3,4})(?:$|\?|#)/i; + +/** + * Regexp for data URI. + * Based on: {@link https://github.com/ragingwind/data-uri-regex} + * + * @static + * @constant + * @name DATA_URI + * @memberof PIXI + * @type {RegExp|string} + * @example data:image/png;base64 + */ +var DATA_URI = exports.DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i; + +/** + * Regexp for SVG size. + * + * @static + * @constant + * @name SVG_SIZE + * @memberof PIXI + * @type {RegExp|string} + * @example <svg width="100" height="100"></svg> + */ +var SVG_SIZE = exports.SVG_SIZE = /]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i; // eslint-disable-line max-len + +/** + * Constants that identify shapes, mainly to prevent `instanceof` calls. + * + * @static + * @constant + * @name SHAPES + * @memberof PIXI + * @type {object} + * @property {number} POLY Polygon + * @property {number} RECT Rectangle + * @property {number} CIRC Circle + * @property {number} ELIP Ellipse + * @property {number} RREC Rounded Rectangle + */ +var SHAPES = exports.SHAPES = { + POLY: 0, + RECT: 1, + CIRC: 2, + ELIP: 3, + RREC: 4 +}; + +/** + * Constants that specify float precision in shaders. + * + * @static + * @constant + * @name PRECISION + * @memberof PIXI + * @type {object} + * @property {string} LOW='lowp' + * @property {string} MEDIUM='mediump' + * @property {string} HIGH='highp' + */ +var PRECISION = exports.PRECISION = { + LOW: 'lowp', + MEDIUM: 'mediump', + HIGH: 'highp' +}; + +/** + * Constants that specify the transform type. + * + * @static + * @constant + * @name TRANSFORM_MODE + * @memberof PIXI + * @type {object} + * @property {number} STATIC + * @property {number} DYNAMIC + */ +var TRANSFORM_MODE = exports.TRANSFORM_MODE = { + STATIC: 0, + DYNAMIC: 1 +}; + +/** + * Constants that define the type of gradient on text. + * + * @static + * @constant + * @name TEXT_GRADIENT + * @memberof PIXI + * @type {object} + * @property {number} LINEAR_VERTICAL Vertical gradient + * @property {number} LINEAR_HORIZONTAL Linear gradient + */ +var TEXT_GRADIENT = exports.TEXT_GRADIENT = { + LINEAR_VERTICAL: 0, + LINEAR_HORIZONTAL: 1 +}; + +/** + * Represents the update priorities used by internal PIXI classes when registered with + * the {@link PIXI.ticker.Ticker} object. Higher priority items are updated first and lower + * priority items, such as render, should go later. + * + * @static + * @constant + * @name UPDATE_PRIORITY + * @memberof PIXI + * @type {object} + * @property {number} INTERACTION=50 Highest priority, used for {@link PIXI.interaction.InteractionManager} + * @property {number} HIGH=25 High priority updating, {@link PIXI.VideoBaseTexture} and {@link PIXI.extras.AnimatedSprite} + * @property {number} NORMAL=0 Default priority for ticker events, see {@link PIXI.ticker.Ticker#add}. + * @property {number} LOW=-25 Low priority used for {@link PIXI.Application} rendering. + * @property {number} UTILITY=-50 Lowest priority used for {@link PIXI.prepare.BasePrepare} utility. + */ +var UPDATE_PRIORITY = exports.UPDATE_PRIORITY = { + INTERACTION: 50, + HIGH: 25, + NORMAL: 0, + LOW: -25, + UTILITY: -50 +}; + +},{}],47:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _math = require('../math'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * 'Builder' pattern for bounds rectangles + * Axis-Aligned Bounding Box + * It is not a shape! Its mutable thing, no 'EMPTY' or that kind of problems + * + * @class + * @memberof PIXI + */ +var Bounds = function () { + /** + * + */ + function Bounds() { + _classCallCheck(this, Bounds); + + /** + * @member {number} + * @default 0 + */ + this.minX = Infinity; + + /** + * @member {number} + * @default 0 + */ + this.minY = Infinity; + + /** + * @member {number} + * @default 0 + */ + this.maxX = -Infinity; + + /** + * @member {number} + * @default 0 + */ + this.maxY = -Infinity; + + this.rect = null; + } + + /** + * Checks if bounds are empty. + * + * @return {boolean} True if empty. + */ + + + Bounds.prototype.isEmpty = function isEmpty() { + return this.minX > this.maxX || this.minY > this.maxY; + }; + + /** + * Clears the bounds and resets. + * + */ + + + Bounds.prototype.clear = function clear() { + this.updateID++; + + this.minX = Infinity; + this.minY = Infinity; + this.maxX = -Infinity; + this.maxY = -Infinity; + }; + + /** + * Can return Rectangle.EMPTY constant, either construct new rectangle, either use your rectangle + * It is not guaranteed that it will return tempRect + * + * @param {PIXI.Rectangle} rect - temporary object will be used if AABB is not empty + * @returns {PIXI.Rectangle} A rectangle of the bounds + */ + + + Bounds.prototype.getRectangle = function getRectangle(rect) { + if (this.minX > this.maxX || this.minY > this.maxY) { + return _math.Rectangle.EMPTY; + } + + rect = rect || new _math.Rectangle(0, 0, 1, 1); + + rect.x = this.minX; + rect.y = this.minY; + rect.width = this.maxX - this.minX; + rect.height = this.maxY - this.minY; + + return rect; + }; + + /** + * This function should be inlined when its possible. + * + * @param {PIXI.Point} point - The point to add. + */ + + + Bounds.prototype.addPoint = function addPoint(point) { + this.minX = Math.min(this.minX, point.x); + this.maxX = Math.max(this.maxX, point.x); + this.minY = Math.min(this.minY, point.y); + this.maxY = Math.max(this.maxY, point.y); + }; + + /** + * Adds a quad, not transformed + * + * @param {Float32Array} vertices - The verts to add. + */ + + + Bounds.prototype.addQuad = function addQuad(vertices) { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + var x = vertices[0]; + var y = vertices[1]; + + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = vertices[2]; + y = vertices[3]; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = vertices[4]; + y = vertices[5]; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = vertices[6]; + y = vertices[7]; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Adds sprite frame, transformed. + * + * @param {PIXI.TransformBase} transform - TODO + * @param {number} x0 - TODO + * @param {number} y0 - TODO + * @param {number} x1 - TODO + * @param {number} y1 - TODO + */ + + + Bounds.prototype.addFrame = function addFrame(transform, x0, y0, x1, y1) { + var matrix = transform.worldTransform; + var a = matrix.a; + var b = matrix.b; + var c = matrix.c; + var d = matrix.d; + var tx = matrix.tx; + var ty = matrix.ty; + + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + var x = a * x0 + c * y0 + tx; + var y = b * x0 + d * y0 + ty; + + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = a * x1 + c * y0 + tx; + y = b * x1 + d * y0 + ty; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = a * x0 + c * y1 + tx; + y = b * x0 + d * y1 + ty; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + x = a * x1 + c * y1 + tx; + y = b * x1 + d * y1 + ty; + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Add an array of vertices + * + * @param {PIXI.TransformBase} transform - TODO + * @param {Float32Array} vertices - TODO + * @param {number} beginOffset - TODO + * @param {number} endOffset - TODO + */ + + + Bounds.prototype.addVertices = function addVertices(transform, vertices, beginOffset, endOffset) { + var matrix = transform.worldTransform; + var a = matrix.a; + var b = matrix.b; + var c = matrix.c; + var d = matrix.d; + var tx = matrix.tx; + var ty = matrix.ty; + + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + for (var i = beginOffset; i < endOffset; i += 2) { + var rawX = vertices[i]; + var rawY = vertices[i + 1]; + var x = a * rawX + c * rawY + tx; + var y = d * rawY + b * rawX + ty; + + minX = x < minX ? x : minX; + minY = y < minY ? y : minY; + maxX = x > maxX ? x : maxX; + maxY = y > maxY ? y : maxY; + } + + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + }; + + /** + * Adds other Bounds + * + * @param {PIXI.Bounds} bounds - TODO + */ + + + Bounds.prototype.addBounds = function addBounds(bounds) { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + this.minX = bounds.minX < minX ? bounds.minX : minX; + this.minY = bounds.minY < minY ? bounds.minY : minY; + this.maxX = bounds.maxX > maxX ? bounds.maxX : maxX; + this.maxY = bounds.maxY > maxY ? bounds.maxY : maxY; + }; + + /** + * Adds other Bounds, masked with Bounds + * + * @param {PIXI.Bounds} bounds - TODO + * @param {PIXI.Bounds} mask - TODO + */ + + + Bounds.prototype.addBoundsMask = function addBoundsMask(bounds, mask) { + var _minX = bounds.minX > mask.minX ? bounds.minX : mask.minX; + var _minY = bounds.minY > mask.minY ? bounds.minY : mask.minY; + var _maxX = bounds.maxX < mask.maxX ? bounds.maxX : mask.maxX; + var _maxY = bounds.maxY < mask.maxY ? bounds.maxY : mask.maxY; + + if (_minX <= _maxX && _minY <= _maxY) { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + this.minX = _minX < minX ? _minX : minX; + this.minY = _minY < minY ? _minY : minY; + this.maxX = _maxX > maxX ? _maxX : maxX; + this.maxY = _maxY > maxY ? _maxY : maxY; + } + }; + + /** + * Adds other Bounds, masked with Rectangle + * + * @param {PIXI.Bounds} bounds - TODO + * @param {PIXI.Rectangle} area - TODO + */ + + + Bounds.prototype.addBoundsArea = function addBoundsArea(bounds, area) { + var _minX = bounds.minX > area.x ? bounds.minX : area.x; + var _minY = bounds.minY > area.y ? bounds.minY : area.y; + var _maxX = bounds.maxX < area.x + area.width ? bounds.maxX : area.x + area.width; + var _maxY = bounds.maxY < area.y + area.height ? bounds.maxY : area.y + area.height; + + if (_minX <= _maxX && _minY <= _maxY) { + var minX = this.minX; + var minY = this.minY; + var maxX = this.maxX; + var maxY = this.maxY; + + this.minX = _minX < minX ? _minX : minX; + this.minY = _minY < minY ? _minY : minY; + this.maxX = _maxX > maxX ? _maxX : maxX; + this.maxY = _maxY > maxY ? _maxY : maxY; + } + }; + + return Bounds; +}(); + +exports.default = Bounds; + +},{"../math":70}],48:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _utils = require('../utils'); + +var _DisplayObject2 = require('./DisplayObject'); + +var _DisplayObject3 = _interopRequireDefault(_DisplayObject2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A Container represents a collection of display objects. + * It is the base class of all display objects that act as a container for other objects. + * + *```js + * let container = new PIXI.Container(); + * container.addChild(sprite); + * ``` + * + * @class + * @extends PIXI.DisplayObject + * @memberof PIXI + */ +var Container = function (_DisplayObject) { + _inherits(Container, _DisplayObject); + + /** + * + */ + function Container() { + _classCallCheck(this, Container); + + /** + * The array of children of this container. + * + * @member {PIXI.DisplayObject[]} + * @readonly + */ + var _this = _possibleConstructorReturn(this, _DisplayObject.call(this)); + + _this.children = []; + return _this; + } + + /** + * Overridable method that can be used by Container subclasses whenever the children array is modified + * + * @private + */ + + + Container.prototype.onChildrenChange = function onChildrenChange() {} + /* empty */ + + + /** + * Adds one or more children to the container. + * + * Multiple items can be added like so: `myContainer.addChild(thingOne, thingTwo, thingThree)` + * + * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to add to the container + * @return {PIXI.DisplayObject} The first child that was added. + */ + ; + + Container.prototype.addChild = function addChild(child) { + var argumentsLength = arguments.length; + + // if there is only one argument we can bypass looping through the them + if (argumentsLength > 1) { + // loop through the arguments property and add all children + // use it the right way (.length and [i]) so that this function can still be optimised by JS runtimes + for (var i = 0; i < argumentsLength; i++) { + this.addChild(arguments[i]); + } + } else { + // if the child has a parent then lets remove it as PixiJS objects can only exist in one place + if (child.parent) { + child.parent.removeChild(child); + } + + child.parent = this; + // ensure child transform will be recalculated + child.transform._parentID = -1; + + this.children.push(child); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(this.children.length - 1); + child.emit('added', this); + } + + return child; + }; + + /** + * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown + * + * @param {PIXI.DisplayObject} child - The child to add + * @param {number} index - The index to place the child in + * @return {PIXI.DisplayObject} The child that was added. + */ + + + Container.prototype.addChildAt = function addChildAt(child, index) { + if (index < 0 || index > this.children.length) { + throw new Error(child + 'addChildAt: The index ' + index + ' supplied is out of bounds ' + this.children.length); + } + + if (child.parent) { + child.parent.removeChild(child); + } + + child.parent = this; + // ensure child transform will be recalculated + child.transform._parentID = -1; + + this.children.splice(index, 0, child); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(index); + child.emit('added', this); + + return child; + }; + + /** + * Swaps the position of 2 Display Objects within this container. + * + * @param {PIXI.DisplayObject} child - First display object to swap + * @param {PIXI.DisplayObject} child2 - Second display object to swap + */ + + + Container.prototype.swapChildren = function swapChildren(child, child2) { + if (child === child2) { + return; + } + + var index1 = this.getChildIndex(child); + var index2 = this.getChildIndex(child2); + + this.children[index1] = child2; + this.children[index2] = child; + this.onChildrenChange(index1 < index2 ? index1 : index2); + }; + + /** + * Returns the index position of a child DisplayObject instance + * + * @param {PIXI.DisplayObject} child - The DisplayObject instance to identify + * @return {number} The index position of the child display object to identify + */ + + + Container.prototype.getChildIndex = function getChildIndex(child) { + var index = this.children.indexOf(child); + + if (index === -1) { + throw new Error('The supplied DisplayObject must be a child of the caller'); + } + + return index; + }; + + /** + * Changes the position of an existing child in the display object container + * + * @param {PIXI.DisplayObject} child - The child DisplayObject instance for which you want to change the index number + * @param {number} index - The resulting index number for the child display object + */ + + + Container.prototype.setChildIndex = function setChildIndex(child, index) { + if (index < 0 || index >= this.children.length) { + throw new Error('The supplied index is out of bounds'); + } + + var currentIndex = this.getChildIndex(child); + + (0, _utils.removeItems)(this.children, currentIndex, 1); // remove from old position + this.children.splice(index, 0, child); // add at new position + + this.onChildrenChange(index); + }; + + /** + * Returns the child at the specified index + * + * @param {number} index - The index to get the child at + * @return {PIXI.DisplayObject} The child at the given index, if any. + */ + + + Container.prototype.getChildAt = function getChildAt(index) { + if (index < 0 || index >= this.children.length) { + throw new Error('getChildAt: Index (' + index + ') does not exist.'); + } + + return this.children[index]; + }; + + /** + * Removes one or more children from the container. + * + * @param {...PIXI.DisplayObject} child - The DisplayObject(s) to remove + * @return {PIXI.DisplayObject} The first child that was removed. + */ + + + Container.prototype.removeChild = function removeChild(child) { + var argumentsLength = arguments.length; + + // if there is only one argument we can bypass looping through the them + if (argumentsLength > 1) { + // loop through the arguments property and add all children + // use it the right way (.length and [i]) so that this function can still be optimised by JS runtimes + for (var i = 0; i < argumentsLength; i++) { + this.removeChild(arguments[i]); + } + } else { + var index = this.children.indexOf(child); + + if (index === -1) return null; + + child.parent = null; + // ensure child transform will be recalculated + child.transform._parentID = -1; + (0, _utils.removeItems)(this.children, index, 1); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(index); + child.emit('removed', this); + } + + return child; + }; + + /** + * Removes a child from the specified index position. + * + * @param {number} index - The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed. + */ + + + Container.prototype.removeChildAt = function removeChildAt(index) { + var child = this.getChildAt(index); + + // ensure child transform will be recalculated.. + child.parent = null; + child.transform._parentID = -1; + (0, _utils.removeItems)(this.children, index, 1); + + // ensure bounds will be recalculated + this._boundsID++; + + // TODO - lets either do all callbacks or all events.. not both! + this.onChildrenChange(index); + child.emit('removed', this); + + return child; + }; + + /** + * Removes all children from this container that are within the begin and end indexes. + * + * @param {number} [beginIndex=0] - The beginning position. + * @param {number} [endIndex=this.children.length] - The ending position. Default value is size of the container. + * @returns {DisplayObject[]} List of removed children + */ + + + Container.prototype.removeChildren = function removeChildren() { + var beginIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var endIndex = arguments[1]; + + var begin = beginIndex; + var end = typeof endIndex === 'number' ? endIndex : this.children.length; + var range = end - begin; + var removed = void 0; + + if (range > 0 && range <= end) { + removed = this.children.splice(begin, range); + + for (var i = 0; i < removed.length; ++i) { + removed[i].parent = null; + if (removed[i].transform) { + removed[i].transform._parentID = -1; + } + } + + this._boundsID++; + + this.onChildrenChange(beginIndex); + + for (var _i = 0; _i < removed.length; ++_i) { + removed[_i].emit('removed', this); + } + + return removed; + } else if (range === 0 && this.children.length === 0) { + return []; + } + + throw new RangeError('removeChildren: numeric values are outside the acceptable range.'); + }; + + /** + * Updates the transform on all children of this container for rendering + */ + + + Container.prototype.updateTransform = function updateTransform() { + this._boundsID++; + + this.transform.updateTransform(this.parent.transform); + + // TODO: check render flags, how to process stuff here + this.worldAlpha = this.alpha * this.parent.worldAlpha; + + for (var i = 0, j = this.children.length; i < j; ++i) { + var child = this.children[i]; + + if (child.visible) { + child.updateTransform(); + } + } + }; + + /** + * Recalculates the bounds of the container. + * + */ + + + Container.prototype.calculateBounds = function calculateBounds() { + this._bounds.clear(); + + this._calculateBounds(); + + for (var i = 0; i < this.children.length; i++) { + var child = this.children[i]; + + if (!child.visible || !child.renderable) { + continue; + } + + child.calculateBounds(); + + // TODO: filter+mask, need to mask both somehow + if (child._mask) { + child._mask.calculateBounds(); + this._bounds.addBoundsMask(child._bounds, child._mask._bounds); + } else if (child.filterArea) { + this._bounds.addBoundsArea(child._bounds, child.filterArea); + } else { + this._bounds.addBounds(child._bounds); + } + } + + this._lastBoundsID = this._boundsID; + }; + + /** + * Recalculates the bounds of the object. Override this to + * calculate the bounds of the specific object (not including children). + * + */ + + + Container.prototype._calculateBounds = function _calculateBounds() {} + // FILL IN// + + + /** + * Renders the object using the WebGL renderer + * + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + ; + + Container.prototype.renderWebGL = function renderWebGL(renderer) { + // if the object is not visible or the alpha is 0 then no need to render this element + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) { + return; + } + + // do a quick check to see if this element has a mask or a filter. + if (this._mask || this._filters) { + this.renderAdvancedWebGL(renderer); + } else { + this._renderWebGL(renderer); + + // simple render children! + for (var i = 0, j = this.children.length; i < j; ++i) { + this.children[i].renderWebGL(renderer); + } + } + }; + + /** + * Render the object using the WebGL renderer and advanced features. + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(renderer) { + renderer.flush(); + + var filters = this._filters; + var mask = this._mask; + + // push filter first as we need to ensure the stencil buffer is correct for any masking + if (filters) { + if (!this._enabledFilters) { + this._enabledFilters = []; + } + + this._enabledFilters.length = 0; + + for (var i = 0; i < filters.length; i++) { + if (filters[i].enabled) { + this._enabledFilters.push(filters[i]); + } + } + + if (this._enabledFilters.length) { + renderer.filterManager.pushFilter(this, this._enabledFilters); + } + } + + if (mask) { + renderer.maskManager.pushMask(this, this._mask); + } + + // add this object to the batch, only rendered if it has a texture. + this._renderWebGL(renderer); + + // now loop through the children and make sure they get rendered + for (var _i2 = 0, j = this.children.length; _i2 < j; _i2++) { + this.children[_i2].renderWebGL(renderer); + } + + renderer.flush(); + + if (mask) { + renderer.maskManager.popMask(this, this._mask); + } + + if (filters && this._enabledFilters && this._enabledFilters.length) { + renderer.filterManager.popFilter(); + } + }; + + /** + * To be overridden by the subclasses. + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + Container.prototype._renderWebGL = function _renderWebGL(renderer) // eslint-disable-line no-unused-vars + {} + // this is where content itself gets rendered... + + + /** + * To be overridden by the subclass + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ + ; + + Container.prototype._renderCanvas = function _renderCanvas(renderer) // eslint-disable-line no-unused-vars + {} + // this is where content itself gets rendered... + + + /** + * Renders the object using the Canvas renderer + * + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ + ; + + Container.prototype.renderCanvas = function renderCanvas(renderer) { + // if not visible or the alpha is 0 then no need to render this + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) { + return; + } + + if (this._mask) { + renderer.maskManager.pushMask(this._mask); + } + + this._renderCanvas(renderer); + for (var i = 0, j = this.children.length; i < j; ++i) { + this.children[i].renderCanvas(renderer); + } + + if (this._mask) { + renderer.maskManager.popMask(renderer); + } + }; + + /** + * Removes all internal references and listeners as well as removes children from the display list. + * Do not use a Container after calling `destroy`. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + + + Container.prototype.destroy = function destroy(options) { + _DisplayObject.prototype.destroy.call(this); + + var destroyChildren = typeof options === 'boolean' ? options : options && options.children; + + var oldChildren = this.removeChildren(0, this.children.length); + + if (destroyChildren) { + for (var i = 0; i < oldChildren.length; ++i) { + oldChildren[i].destroy(options); + } + } + }; + + /** + * The width of the Container, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + + _createClass(Container, [{ + key: 'width', + get: function get() { + return this.scale.x * this.getLocalBounds().width; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + var width = this.getLocalBounds().width; + + if (width !== 0) { + this.scale.x = value / width; + } else { + this.scale.x = 1; + } + + this._width = value; + } + + /** + * The height of the Container, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + return this.scale.y * this.getLocalBounds().height; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + var height = this.getLocalBounds().height; + + if (height !== 0) { + this.scale.y = value / height; + } else { + this.scale.y = 1; + } + + this._height = value; + } + }]); + + return Container; +}(_DisplayObject3.default); + +// performance increase to avoid using call.. (10x faster) + + +exports.default = Container; +Container.prototype.containerUpdateTransform = Container.prototype.updateTransform; + +},{"../utils":124,"./DisplayObject":49}],49:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +var _const = require('../const'); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _TransformStatic = require('./TransformStatic'); + +var _TransformStatic2 = _interopRequireDefault(_TransformStatic); + +var _Transform = require('./Transform'); + +var _Transform2 = _interopRequireDefault(_Transform); + +var _Bounds = require('./Bounds'); + +var _Bounds2 = _interopRequireDefault(_Bounds); + +var _math = require('../math'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +// _tempDisplayObjectParent = new DisplayObject(); + +/** + * The base class for all objects that are rendered on the screen. + * This is an abstract class and should not be used on its own rather it should be extended. + * + * @class + * @extends EventEmitter + * @memberof PIXI + */ +var DisplayObject = function (_EventEmitter) { + _inherits(DisplayObject, _EventEmitter); + + /** + * + */ + function DisplayObject() { + _classCallCheck(this, DisplayObject); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + var TransformClass = _settings2.default.TRANSFORM_MODE === _const.TRANSFORM_MODE.STATIC ? _TransformStatic2.default : _Transform2.default; + + _this.tempDisplayObjectParent = null; + + // TODO: need to create Transform from factory + /** + * World transform and local transform of this object. + * This will become read-only later, please do not assign anything there unless you know what are you doing + * + * @member {PIXI.TransformBase} + */ + _this.transform = new TransformClass(); + + /** + * The opacity of the object. + * + * @member {number} + */ + _this.alpha = 1; + + /** + * The visibility of the object. If false the object will not be drawn, and + * the updateTransform function will not be called. + * + * Only affects recursive calls from parent. You can ask for bounds or call updateTransform manually + * + * @member {boolean} + */ + _this.visible = true; + + /** + * Can this object be rendered, if false the object will not be drawn but the updateTransform + * methods will still be called. + * + * Only affects recursive calls from parent. You can ask for bounds manually + * + * @member {boolean} + */ + _this.renderable = true; + + /** + * The display object container that contains this display object. + * + * @member {PIXI.Container} + * @readonly + */ + _this.parent = null; + + /** + * The multiplied alpha of the displayObject + * + * @member {number} + * @readonly + */ + _this.worldAlpha = 1; + + /** + * The area the filter is applied to. This is used as more of an optimisation + * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle + * + * Also works as an interaction mask + * + * @member {PIXI.Rectangle} + */ + _this.filterArea = null; + + _this._filters = null; + _this._enabledFilters = null; + + /** + * The bounds object, this is used to calculate and store the bounds of the displayObject + * + * @member {PIXI.Rectangle} + * @private + */ + _this._bounds = new _Bounds2.default(); + _this._boundsID = 0; + _this._lastBoundsID = -1; + _this._boundsRect = null; + _this._localBoundsRect = null; + + /** + * The original, cached mask of the object + * + * @member {PIXI.Graphics|PIXI.Sprite} + * @private + */ + _this._mask = null; + + /** + * If the object has been destroyed via destroy(). If true, it should not be used. + * + * @member {boolean} + * @private + * @readonly + */ + _this._destroyed = false; + + /** + * Fired when this DisplayObject is added to a Container. + * + * @event PIXI.DisplayObject#added + * @param {PIXI.Container} container - The container added to. + */ + + /** + * Fired when this DisplayObject is removed from a Container. + * + * @event PIXI.DisplayObject#removed + * @param {PIXI.Container} container - The container removed from. + */ + return _this; + } + + /** + * @private + * @member {PIXI.DisplayObject} + */ + + + /** + * Updates the object transform for rendering + * + * TODO - Optimization pass! + */ + DisplayObject.prototype.updateTransform = function updateTransform() { + this.transform.updateTransform(this.parent.transform); + // multiply the alphas.. + this.worldAlpha = this.alpha * this.parent.worldAlpha; + + this._bounds.updateID++; + }; + + /** + * recursively updates transform of all objects from the root to this one + * internal function for toLocal() + */ + + + DisplayObject.prototype._recursivePostUpdateTransform = function _recursivePostUpdateTransform() { + if (this.parent) { + this.parent._recursivePostUpdateTransform(); + this.transform.updateTransform(this.parent.transform); + } else { + this.transform.updateTransform(this._tempDisplayObjectParent.transform); + } + }; + + /** + * Retrieves the bounds of the displayObject as a rectangle object. + * + * @param {boolean} skipUpdate - setting to true will stop the transforms of the scene graph from + * being updated. This means the calculation returned MAY be out of date BUT will give you a + * nice performance boost + * @param {PIXI.Rectangle} rect - Optional rectangle to store the result of the bounds calculation + * @return {PIXI.Rectangle} the rectangular bounding area + */ + + + DisplayObject.prototype.getBounds = function getBounds(skipUpdate, rect) { + if (!skipUpdate) { + if (!this.parent) { + this.parent = this._tempDisplayObjectParent; + this.updateTransform(); + this.parent = null; + } else { + this._recursivePostUpdateTransform(); + this.updateTransform(); + } + } + + if (this._boundsID !== this._lastBoundsID) { + this.calculateBounds(); + } + + if (!rect) { + if (!this._boundsRect) { + this._boundsRect = new _math.Rectangle(); + } + + rect = this._boundsRect; + } + + return this._bounds.getRectangle(rect); + }; + + /** + * Retrieves the local bounds of the displayObject as a rectangle object + * + * @param {PIXI.Rectangle} [rect] - Optional rectangle to store the result of the bounds calculation + * @return {PIXI.Rectangle} the rectangular bounding area + */ + + + DisplayObject.prototype.getLocalBounds = function getLocalBounds(rect) { + var transformRef = this.transform; + var parentRef = this.parent; + + this.parent = null; + this.transform = this._tempDisplayObjectParent.transform; + + if (!rect) { + if (!this._localBoundsRect) { + this._localBoundsRect = new _math.Rectangle(); + } + + rect = this._localBoundsRect; + } + + var bounds = this.getBounds(false, rect); + + this.parent = parentRef; + this.transform = transformRef; + + return bounds; + }; + + /** + * Calculates the global position of the display object + * + * @param {PIXI.Point} position - The world origin to calculate from + * @param {PIXI.Point} [point] - A Point object in which to store the value, optional + * (otherwise will create a new Point) + * @param {boolean} [skipUpdate=false] - Should we skip the update transform. + * @return {PIXI.Point} A point object representing the position of this object + */ + + + DisplayObject.prototype.toGlobal = function toGlobal(position, point) { + var skipUpdate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!skipUpdate) { + this._recursivePostUpdateTransform(); + + // this parent check is for just in case the item is a root object. + // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly + // this is mainly to avoid a parent check in the main loop. Every little helps for performance :) + if (!this.parent) { + this.parent = this._tempDisplayObjectParent; + this.displayObjectUpdateTransform(); + this.parent = null; + } else { + this.displayObjectUpdateTransform(); + } + } + + // don't need to update the lot + return this.worldTransform.apply(position, point); + }; + + /** + * Calculates the local position of the display object relative to another point + * + * @param {PIXI.Point} position - The world origin to calculate from + * @param {PIXI.DisplayObject} [from] - The DisplayObject to calculate the global position from + * @param {PIXI.Point} [point] - A Point object in which to store the value, optional + * (otherwise will create a new Point) + * @param {boolean} [skipUpdate=false] - Should we skip the update transform + * @return {PIXI.Point} A point object representing the position of this object + */ + + + DisplayObject.prototype.toLocal = function toLocal(position, from, point, skipUpdate) { + if (from) { + position = from.toGlobal(position, point, skipUpdate); + } + + if (!skipUpdate) { + this._recursivePostUpdateTransform(); + + // this parent check is for just in case the item is a root object. + // If it is we need to give it a temporary parent so that displayObjectUpdateTransform works correctly + // this is mainly to avoid a parent check in the main loop. Every little helps for performance :) + if (!this.parent) { + this.parent = this._tempDisplayObjectParent; + this.displayObjectUpdateTransform(); + this.parent = null; + } else { + this.displayObjectUpdateTransform(); + } + } + + // simply apply the matrix.. + return this.worldTransform.applyInverse(position, point); + }; + + /** + * Renders the object using the WebGL renderer + * + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + DisplayObject.prototype.renderWebGL = function renderWebGL(renderer) // eslint-disable-line no-unused-vars + {} + // OVERWRITE; + + + /** + * Renders the object using the Canvas renderer + * + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ + ; + + DisplayObject.prototype.renderCanvas = function renderCanvas(renderer) // eslint-disable-line no-unused-vars + {} + // OVERWRITE; + + + /** + * Set the parent Container of this DisplayObject + * + * @param {PIXI.Container} container - The Container to add this DisplayObject to + * @return {PIXI.Container} The Container that this DisplayObject was added to + */ + ; + + DisplayObject.prototype.setParent = function setParent(container) { + if (!container || !container.addChild) { + throw new Error('setParent: Argument must be a Container'); + } + + container.addChild(this); + + return container; + }; + + /** + * Convenience function to set the position, scale, skew and pivot at once. + * + * @param {number} [x=0] - The X position + * @param {number} [y=0] - The Y position + * @param {number} [scaleX=1] - The X scale value + * @param {number} [scaleY=1] - The Y scale value + * @param {number} [rotation=0] - The rotation + * @param {number} [skewX=0] - The X skew value + * @param {number} [skewY=0] - The Y skew value + * @param {number} [pivotX=0] - The X pivot value + * @param {number} [pivotY=0] - The Y pivot value + * @return {PIXI.DisplayObject} The DisplayObject instance + */ + + + DisplayObject.prototype.setTransform = function setTransform() { + var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var scaleX = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var scaleY = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + var rotation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var skewX = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; + var skewY = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; + var pivotX = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0; + var pivotY = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 0; + + this.position.x = x; + this.position.y = y; + this.scale.x = !scaleX ? 1 : scaleX; + this.scale.y = !scaleY ? 1 : scaleY; + this.rotation = rotation; + this.skew.x = skewX; + this.skew.y = skewY; + this.pivot.x = pivotX; + this.pivot.y = pivotY; + + return this; + }; + + /** + * Base destroy method for generic display objects. This will automatically + * remove the display object from its parent Container as well as remove + * all current event listeners and internal references. Do not use a DisplayObject + * after calling `destroy`. + * + */ + + + DisplayObject.prototype.destroy = function destroy() { + this.removeAllListeners(); + if (this.parent) { + this.parent.removeChild(this); + } + this.transform = null; + + this.parent = null; + + this._bounds = null; + this._currentBounds = null; + this._mask = null; + + this.filterArea = null; + + this.interactive = false; + this.interactiveChildren = false; + + this._destroyed = true; + }; + + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * An alias to position.x + * + * @member {number} + */ + + + _createClass(DisplayObject, [{ + key: '_tempDisplayObjectParent', + get: function get() { + if (this.tempDisplayObjectParent === null) { + this.tempDisplayObjectParent = new DisplayObject(); + } + + return this.tempDisplayObjectParent; + } + }, { + key: 'x', + get: function get() { + return this.position.x; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.position.x = value; + } + + /** + * The position of the displayObject on the y axis relative to the local coordinates of the parent. + * An alias to position.y + * + * @member {number} + */ + + }, { + key: 'y', + get: function get() { + return this.position.y; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.position.y = value; + } + + /** + * Current transform of the object based on world (parent) factors + * + * @member {PIXI.Matrix} + * @readonly + */ + + }, { + key: 'worldTransform', + get: function get() { + return this.transform.worldTransform; + } + + /** + * Current transform of the object based on local factors: position, scale, other stuff + * + * @member {PIXI.Matrix} + * @readonly + */ + + }, { + key: 'localTransform', + get: function get() { + return this.transform.localTransform; + } + + /** + * The coordinate of the object relative to the local coordinates of the parent. + * Assignment by value since pixi-v4. + * + * @member {PIXI.Point|PIXI.ObservablePoint} + */ + + }, { + key: 'position', + get: function get() { + return this.transform.position; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.position.copy(value); + } + + /** + * The scale factor of the object. + * Assignment by value since pixi-v4. + * + * @member {PIXI.Point|PIXI.ObservablePoint} + */ + + }, { + key: 'scale', + get: function get() { + return this.transform.scale; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.scale.copy(value); + } + + /** + * The pivot point of the displayObject that it rotates around + * Assignment by value since pixi-v4. + * + * @member {PIXI.Point|PIXI.ObservablePoint} + */ + + }, { + key: 'pivot', + get: function get() { + return this.transform.pivot; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.pivot.copy(value); + } + + /** + * The skew factor for the object in radians. + * Assignment by value since pixi-v4. + * + * @member {PIXI.ObservablePoint} + */ + + }, { + key: 'skew', + get: function get() { + return this.transform.skew; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.skew.copy(value); + } + + /** + * The rotation of the object in radians. + * + * @member {number} + */ + + }, { + key: 'rotation', + get: function get() { + return this.transform.rotation; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.transform.rotation = value; + } + + /** + * Indicates if the object is globally visible. + * + * @member {boolean} + * @readonly + */ + + }, { + key: 'worldVisible', + get: function get() { + var item = this; + + do { + if (!item.visible) { + return false; + } + + item = item.parent; + } while (item); + + return true; + } + + /** + * Sets a mask for the displayObject. A mask is an object that limits the visibility of an + * object to the shape of the mask applied to it. In PIXI a regular mask must be a + * PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it + * utilises shape clipping. To remove a mask, set this property to null. + * + * @todo For the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask. + * + * @member {PIXI.Graphics|PIXI.Sprite} + */ + + }, { + key: 'mask', + get: function get() { + return this._mask; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (this._mask) { + this._mask.renderable = true; + } + + this._mask = value; + + if (this._mask) { + this._mask.renderable = false; + } + } + + /** + * Sets the filters for the displayObject. + * * IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. + * To remove filters simply set this property to 'null' + * + * @member {PIXI.Filter[]} + */ + + }, { + key: 'filters', + get: function get() { + return this._filters && this._filters.slice(); + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._filters = value && value.slice(); + } + }]); + + return DisplayObject; +}(_eventemitter2.default); + +// performance increase to avoid using call.. (10x faster) + + +exports.default = DisplayObject; +DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform; + +},{"../const":46,"../math":70,"../settings":101,"./Bounds":47,"./Transform":50,"./TransformStatic":52,"eventemitter3":20}],50:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _math = require('../math'); + +var _TransformBase2 = require('./TransformBase'); + +var _TransformBase3 = _interopRequireDefault(_TransformBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Generic class to deal with traditional 2D matrix transforms + * local transformation is calculated from position,scale,skew and rotation + * + * @class + * @extends PIXI.TransformBase + * @memberof PIXI + */ +var Transform = function (_TransformBase) { + _inherits(Transform, _TransformBase); + + /** + * + */ + function Transform() { + _classCallCheck(this, Transform); + + /** + * The coordinate of the object relative to the local coordinates of the parent. + * + * @member {PIXI.Point} + */ + var _this = _possibleConstructorReturn(this, _TransformBase.call(this)); + + _this.position = new _math.Point(0, 0); + + /** + * The scale factor of the object. + * + * @member {PIXI.Point} + */ + _this.scale = new _math.Point(1, 1); + + /** + * The skew amount, on the x and y axis. + * + * @member {PIXI.ObservablePoint} + */ + _this.skew = new _math.ObservablePoint(_this.updateSkew, _this, 0, 0); + + /** + * The pivot point of the displayObject that it rotates around + * + * @member {PIXI.Point} + */ + _this.pivot = new _math.Point(0, 0); + + /** + * The rotation value of the object, in radians + * + * @member {Number} + * @private + */ + _this._rotation = 0; + + _this._cx = 1; // cos rotation + skewY; + _this._sx = 0; // sin rotation + skewY; + _this._cy = 0; // cos rotation + Math.PI/2 - skewX; + _this._sy = 1; // sin rotation + Math.PI/2 - skewX; + return _this; + } + + /** + * Updates the skew values when the skew or rotation changes. + * + * @private + */ + + + Transform.prototype.updateSkew = function updateSkew() { + this._cx = Math.cos(this._rotation + this.skew._y); + this._sx = Math.sin(this._rotation + this.skew._y); + this._cy = -Math.sin(this._rotation - this.skew._x); // cos, added PI/2 + this._sy = Math.cos(this._rotation - this.skew._x); // sin, added PI/2 + }; + + /** + * Updates only local matrix + */ + + + Transform.prototype.updateLocalTransform = function updateLocalTransform() { + var lt = this.localTransform; + + lt.a = this._cx * this.scale.x; + lt.b = this._sx * this.scale.x; + lt.c = this._cy * this.scale.y; + lt.d = this._sy * this.scale.y; + + lt.tx = this.position.x - (this.pivot.x * lt.a + this.pivot.y * lt.c); + lt.ty = this.position.y - (this.pivot.x * lt.b + this.pivot.y * lt.d); + }; + + /** + * Updates the values of the object and applies the parent's transform. + * + * @param {PIXI.Transform} parentTransform - The transform of the parent of this object + */ + + + Transform.prototype.updateTransform = function updateTransform(parentTransform) { + var lt = this.localTransform; + + lt.a = this._cx * this.scale.x; + lt.b = this._sx * this.scale.x; + lt.c = this._cy * this.scale.y; + lt.d = this._sy * this.scale.y; + + lt.tx = this.position.x - (this.pivot.x * lt.a + this.pivot.y * lt.c); + lt.ty = this.position.y - (this.pivot.x * lt.b + this.pivot.y * lt.d); + + // concat the parent matrix with the objects transform. + var pt = parentTransform.worldTransform; + var wt = this.worldTransform; + + wt.a = lt.a * pt.a + lt.b * pt.c; + wt.b = lt.a * pt.b + lt.b * pt.d; + wt.c = lt.c * pt.a + lt.d * pt.c; + wt.d = lt.c * pt.b + lt.d * pt.d; + wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx; + wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty; + + this._worldID++; + }; + + /** + * Decomposes a matrix and sets the transforms properties based on it. + * + * @param {PIXI.Matrix} matrix - The matrix to decompose + */ + + + Transform.prototype.setFromMatrix = function setFromMatrix(matrix) { + matrix.decompose(this); + }; + + /** + * The rotation of the object in radians. + * + * @member {number} + */ + + + _createClass(Transform, [{ + key: 'rotation', + get: function get() { + return this._rotation; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._rotation = value; + this.updateSkew(); + } + }]); + + return Transform; +}(_TransformBase3.default); + +exports.default = Transform; + +},{"../math":70,"./TransformBase":51}],51:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _math = require('../math'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Generic class to deal with traditional 2D matrix transforms + * + * @class + * @memberof PIXI + */ +var TransformBase = function () { + /** + * + */ + function TransformBase() { + _classCallCheck(this, TransformBase); + + /** + * The global matrix transform. It can be swapped temporarily by some functions like getLocalBounds() + * + * @member {PIXI.Matrix} + */ + this.worldTransform = new _math.Matrix(); + + /** + * The local matrix transform + * + * @member {PIXI.Matrix} + */ + this.localTransform = new _math.Matrix(); + + this._worldID = 0; + this._parentID = 0; + } + + /** + * TransformBase does not have decomposition, so this function wont do anything + */ + + + TransformBase.prototype.updateLocalTransform = function updateLocalTransform() {} + // empty + + + /** + * Updates the values of the object and applies the parent's transform. + * + * @param {PIXI.TransformBase} parentTransform - The transform of the parent of this object + */ + ; + + TransformBase.prototype.updateTransform = function updateTransform(parentTransform) { + var pt = parentTransform.worldTransform; + var wt = this.worldTransform; + var lt = this.localTransform; + + // concat the parent matrix with the objects transform. + wt.a = lt.a * pt.a + lt.b * pt.c; + wt.b = lt.a * pt.b + lt.b * pt.d; + wt.c = lt.c * pt.a + lt.d * pt.c; + wt.d = lt.c * pt.b + lt.d * pt.d; + wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx; + wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty; + + this._worldID++; + }; + + return TransformBase; +}(); + +/** + * Updates the values of the object and applies the parent's transform. + * @param parentTransform {PIXI.Transform} The transform of the parent of this object + * + */ + + +exports.default = TransformBase; +TransformBase.prototype.updateWorldTransform = TransformBase.prototype.updateTransform; + +TransformBase.IDENTITY = new TransformBase(); + +},{"../math":70}],52:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _math = require('../math'); + +var _TransformBase2 = require('./TransformBase'); + +var _TransformBase3 = _interopRequireDefault(_TransformBase2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Transform that takes care about its versions + * + * @class + * @extends PIXI.TransformBase + * @memberof PIXI + */ +var TransformStatic = function (_TransformBase) { + _inherits(TransformStatic, _TransformBase); + + /** + * + */ + function TransformStatic() { + _classCallCheck(this, TransformStatic); + + /** + * The coordinate of the object relative to the local coordinates of the parent. + * + * @member {PIXI.ObservablePoint} + */ + var _this = _possibleConstructorReturn(this, _TransformBase.call(this)); + + _this.position = new _math.ObservablePoint(_this.onChange, _this, 0, 0); + + /** + * The scale factor of the object. + * + * @member {PIXI.ObservablePoint} + */ + _this.scale = new _math.ObservablePoint(_this.onChange, _this, 1, 1); + + /** + * The pivot point of the displayObject that it rotates around + * + * @member {PIXI.ObservablePoint} + */ + _this.pivot = new _math.ObservablePoint(_this.onChange, _this, 0, 0); + + /** + * The skew amount, on the x and y axis. + * + * @member {PIXI.ObservablePoint} + */ + _this.skew = new _math.ObservablePoint(_this.updateSkew, _this, 0, 0); + + _this._rotation = 0; + + _this._cx = 1; // cos rotation + skewY; + _this._sx = 0; // sin rotation + skewY; + _this._cy = 0; // cos rotation + Math.PI/2 - skewX; + _this._sy = 1; // sin rotation + Math.PI/2 - skewX; + + _this._localID = 0; + _this._currentLocalID = 0; + return _this; + } + + /** + * Called when a value changes. + * + * @private + */ + + + TransformStatic.prototype.onChange = function onChange() { + this._localID++; + }; + + /** + * Called when skew or rotation changes + * + * @private + */ + + + TransformStatic.prototype.updateSkew = function updateSkew() { + this._cx = Math.cos(this._rotation + this.skew._y); + this._sx = Math.sin(this._rotation + this.skew._y); + this._cy = -Math.sin(this._rotation - this.skew._x); // cos, added PI/2 + this._sy = Math.cos(this._rotation - this.skew._x); // sin, added PI/2 + + this._localID++; + }; + + /** + * Updates only local matrix + */ + + + TransformStatic.prototype.updateLocalTransform = function updateLocalTransform() { + var lt = this.localTransform; + + if (this._localID !== this._currentLocalID) { + // get the matrix values of the displayobject based on its transform properties.. + lt.a = this._cx * this.scale._x; + lt.b = this._sx * this.scale._x; + lt.c = this._cy * this.scale._y; + lt.d = this._sy * this.scale._y; + + lt.tx = this.position._x - (this.pivot._x * lt.a + this.pivot._y * lt.c); + lt.ty = this.position._y - (this.pivot._x * lt.b + this.pivot._y * lt.d); + this._currentLocalID = this._localID; + + // force an update.. + this._parentID = -1; + } + }; + + /** + * Updates the values of the object and applies the parent's transform. + * + * @param {PIXI.Transform} parentTransform - The transform of the parent of this object + */ + + + TransformStatic.prototype.updateTransform = function updateTransform(parentTransform) { + var lt = this.localTransform; + + if (this._localID !== this._currentLocalID) { + // get the matrix values of the displayobject based on its transform properties.. + lt.a = this._cx * this.scale._x; + lt.b = this._sx * this.scale._x; + lt.c = this._cy * this.scale._y; + lt.d = this._sy * this.scale._y; + + lt.tx = this.position._x - (this.pivot._x * lt.a + this.pivot._y * lt.c); + lt.ty = this.position._y - (this.pivot._x * lt.b + this.pivot._y * lt.d); + this._currentLocalID = this._localID; + + // force an update.. + this._parentID = -1; + } + + if (this._parentID !== parentTransform._worldID) { + // concat the parent matrix with the objects transform. + var pt = parentTransform.worldTransform; + var wt = this.worldTransform; + + wt.a = lt.a * pt.a + lt.b * pt.c; + wt.b = lt.a * pt.b + lt.b * pt.d; + wt.c = lt.c * pt.a + lt.d * pt.c; + wt.d = lt.c * pt.b + lt.d * pt.d; + wt.tx = lt.tx * pt.a + lt.ty * pt.c + pt.tx; + wt.ty = lt.tx * pt.b + lt.ty * pt.d + pt.ty; + + this._parentID = parentTransform._worldID; + + // update the id of the transform.. + this._worldID++; + } + }; + + /** + * Decomposes a matrix and sets the transforms properties based on it. + * + * @param {PIXI.Matrix} matrix - The matrix to decompose + */ + + + TransformStatic.prototype.setFromMatrix = function setFromMatrix(matrix) { + matrix.decompose(this); + this._localID++; + }; + + /** + * The rotation of the object in radians. + * + * @member {number} + */ + + + _createClass(TransformStatic, [{ + key: 'rotation', + get: function get() { + return this._rotation; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._rotation = value; + this.updateSkew(); + } + }]); + + return TransformStatic; +}(_TransformBase3.default); + +exports.default = TransformStatic; + +},{"../math":70,"./TransformBase":51}],53:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Container2 = require('../display/Container'); + +var _Container3 = _interopRequireDefault(_Container2); + +var _RenderTexture = require('../textures/RenderTexture'); + +var _RenderTexture2 = _interopRequireDefault(_RenderTexture); + +var _Texture = require('../textures/Texture'); + +var _Texture2 = _interopRequireDefault(_Texture); + +var _GraphicsData = require('./GraphicsData'); + +var _GraphicsData2 = _interopRequireDefault(_GraphicsData); + +var _Sprite = require('../sprites/Sprite'); + +var _Sprite2 = _interopRequireDefault(_Sprite); + +var _math = require('../math'); + +var _utils = require('../utils'); + +var _const = require('../const'); + +var _Bounds = require('../display/Bounds'); + +var _Bounds2 = _interopRequireDefault(_Bounds); + +var _bezierCurveTo2 = require('./utils/bezierCurveTo'); + +var _bezierCurveTo3 = _interopRequireDefault(_bezierCurveTo2); + +var _CanvasRenderer = require('../renderers/canvas/CanvasRenderer'); + +var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var canvasRenderer = void 0; +var tempMatrix = new _math.Matrix(); +var tempPoint = new _math.Point(); +var tempColor1 = new Float32Array(4); +var tempColor2 = new Float32Array(4); + +/** + * The Graphics class contains methods used to draw primitive shapes such as lines, circles and + * rectangles to the display, and to color and fill them. + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + +var Graphics = function (_Container) { + _inherits(Graphics, _Container); + + /** + * + * @param {boolean} [nativeLines=false] - If true the lines will be draw using LINES instead of TRIANGLE_STRIP + */ + function Graphics() { + var nativeLines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + _classCallCheck(this, Graphics); + + /** + * The alpha value used when filling the Graphics object. + * + * @member {number} + * @default 1 + */ + var _this = _possibleConstructorReturn(this, _Container.call(this)); + + _this.fillAlpha = 1; + + /** + * The width (thickness) of any lines drawn. + * + * @member {number} + * @default 0 + */ + _this.lineWidth = 0; + + /** + * If true the lines will be draw using LINES instead of TRIANGLE_STRIP + * + * @member {boolean} + */ + _this.nativeLines = nativeLines; + + /** + * The color of any lines drawn. + * + * @member {string} + * @default 0 + */ + _this.lineColor = 0; + + /** + * Graphics data + * + * @member {PIXI.GraphicsData[]} + * @private + */ + _this.graphicsData = []; + + /** + * The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to + * reset the tint. + * + * @member {number} + * @default 0xFFFFFF + */ + _this.tint = 0xFFFFFF; + + /** + * The previous tint applied to the graphic shape. Used to compare to the current tint and + * check if theres change. + * + * @member {number} + * @private + * @default 0xFFFFFF + */ + _this._prevTint = 0xFFFFFF; + + /** + * The blend mode to be applied to the graphic shape. Apply a value of + * `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL; + * @see PIXI.BLEND_MODES + */ + _this.blendMode = _const.BLEND_MODES.NORMAL; + + /** + * Current path + * + * @member {PIXI.GraphicsData} + * @private + */ + _this.currentPath = null; + + /** + * Array containing some WebGL-related properties used by the WebGL renderer. + * + * @member {object} + * @private + */ + // TODO - _webgl should use a prototype object, not a random undocumented object... + _this._webGL = {}; + + /** + * Whether this shape is being used as a mask. + * + * @member {boolean} + */ + _this.isMask = false; + + /** + * The bounds' padding used for bounds calculation. + * + * @member {number} + */ + _this.boundsPadding = 0; + + /** + * A cache of the local bounds to prevent recalculation. + * + * @member {PIXI.Rectangle} + * @private + */ + _this._localBounds = new _Bounds2.default(); + + /** + * Used to detect if the graphics object has changed. If this is set to true then the graphics + * object will be recalculated. + * + * @member {boolean} + * @private + */ + _this.dirty = 0; + + /** + * Used to detect if we need to do a fast rect check using the id compare method + * @type {Number} + */ + _this.fastRectDirty = -1; + + /** + * Used to detect if we clear the graphics webGL data + * @type {Number} + */ + _this.clearDirty = 0; + + /** + * Used to detect if we we need to recalculate local bounds + * @type {Number} + */ + _this.boundsDirty = -1; + + /** + * Used to detect if the cached sprite object needs to be updated. + * + * @member {boolean} + * @private + */ + _this.cachedSpriteDirty = false; + + _this._spriteRect = null; + _this._fastRect = false; + + /** + * When cacheAsBitmap is set to true the graphics object will be rendered as if it was a sprite. + * This is useful if your graphics element does not change often, as it will speed up the rendering + * of the object in exchange for taking up texture memory. It is also useful if you need the graphics + * object to be anti-aliased, because it will be rendered using canvas. This is not recommended if + * you are constantly redrawing the graphics element. + * + * @name cacheAsBitmap + * @member {boolean} + * @memberof PIXI.Graphics# + * @default false + */ + return _this; + } + + /** + * Creates a new Graphics object with the same values as this one. + * Note that the only the properties of the object are cloned, not its transform (position,scale,etc) + * + * @return {PIXI.Graphics} A clone of the graphics object + */ + + + Graphics.prototype.clone = function clone() { + var clone = new Graphics(); + + clone.renderable = this.renderable; + clone.fillAlpha = this.fillAlpha; + clone.lineWidth = this.lineWidth; + clone.lineColor = this.lineColor; + clone.tint = this.tint; + clone.blendMode = this.blendMode; + clone.isMask = this.isMask; + clone.boundsPadding = this.boundsPadding; + clone.dirty = 0; + clone.cachedSpriteDirty = this.cachedSpriteDirty; + + // copy graphics data + for (var i = 0; i < this.graphicsData.length; ++i) { + clone.graphicsData.push(this.graphicsData[i].clone()); + } + + clone.currentPath = clone.graphicsData[clone.graphicsData.length - 1]; + + clone.updateLocalBounds(); + + return clone; + }; + + /** + * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() + * method or the drawCircle() method. + * + * @param {number} [lineWidth=0] - width of the line to draw, will update the objects stored style + * @param {number} [color=0] - color of the line to draw, will update the objects stored style + * @param {number} [alpha=1] - alpha of the line to draw, will update the objects stored style + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.lineStyle = function lineStyle() { + var lineWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var alpha = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + + this.lineWidth = lineWidth; + this.lineColor = color; + this.lineAlpha = alpha; + + if (this.currentPath) { + if (this.currentPath.shape.points.length) { + // halfway through a line? start a new one! + var shape = new _math.Polygon(this.currentPath.shape.points.slice(-2)); + + shape.closed = false; + + this.drawShape(shape); + } else { + // otherwise its empty so lets just set the line properties + this.currentPath.lineWidth = this.lineWidth; + this.currentPath.lineColor = this.lineColor; + this.currentPath.lineAlpha = this.lineAlpha; + } + } + + return this; + }; + + /** + * Moves the current drawing position to x, y. + * + * @param {number} x - the X coordinate to move to + * @param {number} y - the Y coordinate to move to + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.moveTo = function moveTo(x, y) { + var shape = new _math.Polygon([x, y]); + + shape.closed = false; + this.drawShape(shape); + + return this; + }; + + /** + * Draws a line using the current line style from the current drawing position to (x, y); + * The current drawing position is then set to (x, y). + * + * @param {number} x - the X coordinate to draw to + * @param {number} y - the Y coordinate to draw to + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.lineTo = function lineTo(x, y) { + this.currentPath.shape.points.push(x, y); + this.dirty++; + + return this; + }; + + /** + * Calculate the points for a quadratic bezier curve and then draws it. + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.quadraticCurveTo = function quadraticCurveTo(cpX, cpY, toX, toY) { + if (this.currentPath) { + if (this.currentPath.shape.points.length === 0) { + this.currentPath.shape.points = [0, 0]; + } + } else { + this.moveTo(0, 0); + } + + var n = 20; + var points = this.currentPath.shape.points; + var xa = 0; + var ya = 0; + + if (points.length === 0) { + this.moveTo(0, 0); + } + + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + + for (var i = 1; i <= n; ++i) { + var j = i / n; + + xa = fromX + (cpX - fromX) * j; + ya = fromY + (cpY - fromY) * j; + + points.push(xa + (cpX + (toX - cpX) * j - xa) * j, ya + (cpY + (toY - cpY) * j - ya) * j); + } + + this.dirty++; + + return this; + }; + + /** + * Calculate the points for a bezier curve and then draws it. + * + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} cpX2 - Second Control point x + * @param {number} cpY2 - Second Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.bezierCurveTo = function bezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY) { + if (this.currentPath) { + if (this.currentPath.shape.points.length === 0) { + this.currentPath.shape.points = [0, 0]; + } + } else { + this.moveTo(0, 0); + } + + var points = this.currentPath.shape.points; + + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + + points.length -= 2; + + (0, _bezierCurveTo3.default)(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY, points); + + this.dirty++; + + return this; + }; + + /** + * The arcTo() method creates an arc/curve between two tangents on the canvas. + * + * "borrowed" from https://code.google.com/p/fxcanvas/ - thanks google! + * + * @param {number} x1 - The x-coordinate of the beginning of the arc + * @param {number} y1 - The y-coordinate of the beginning of the arc + * @param {number} x2 - The x-coordinate of the end of the arc + * @param {number} y2 - The y-coordinate of the end of the arc + * @param {number} radius - The radius of the arc + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.arcTo = function arcTo(x1, y1, x2, y2, radius) { + if (this.currentPath) { + if (this.currentPath.shape.points.length === 0) { + this.currentPath.shape.points.push(x1, y1); + } + } else { + this.moveTo(x1, y1); + } + + var points = this.currentPath.shape.points; + var fromX = points[points.length - 2]; + var fromY = points[points.length - 1]; + var a1 = fromY - y1; + var b1 = fromX - x1; + var a2 = y2 - y1; + var b2 = x2 - x1; + var mm = Math.abs(a1 * b2 - b1 * a2); + + if (mm < 1.0e-8 || radius === 0) { + if (points[points.length - 2] !== x1 || points[points.length - 1] !== y1) { + points.push(x1, y1); + } + } else { + var dd = a1 * a1 + b1 * b1; + var cc = a2 * a2 + b2 * b2; + var tt = a1 * a2 + b1 * b2; + var k1 = radius * Math.sqrt(dd) / mm; + var k2 = radius * Math.sqrt(cc) / mm; + var j1 = k1 * tt / dd; + var j2 = k2 * tt / cc; + var cx = k1 * b2 + k2 * b1; + var cy = k1 * a2 + k2 * a1; + var px = b1 * (k2 + j1); + var py = a1 * (k2 + j1); + var qx = b2 * (k1 + j2); + var qy = a2 * (k1 + j2); + var startAngle = Math.atan2(py - cy, px - cx); + var endAngle = Math.atan2(qy - cy, qx - cx); + + this.arc(cx + x1, cy + y1, radius, startAngle, endAngle, b1 * a2 > b2 * a1); + } + + this.dirty++; + + return this; + }; + + /** + * The arc method creates an arc/curve (used to create circles, or parts of circles). + * + * @param {number} cx - The x-coordinate of the center of the circle + * @param {number} cy - The y-coordinate of the center of the circle + * @param {number} radius - The radius of the circle + * @param {number} startAngle - The starting angle, in radians (0 is at the 3 o'clock position + * of the arc's circle) + * @param {number} endAngle - The ending angle, in radians + * @param {boolean} [anticlockwise=false] - Specifies whether the drawing should be + * counter-clockwise or clockwise. False is default, and indicates clockwise, while true + * indicates counter-clockwise. + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.arc = function arc(cx, cy, radius, startAngle, endAngle) { + var anticlockwise = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; + + if (startAngle === endAngle) { + return this; + } + + if (!anticlockwise && endAngle <= startAngle) { + endAngle += Math.PI * 2; + } else if (anticlockwise && startAngle <= endAngle) { + startAngle += Math.PI * 2; + } + + var sweep = endAngle - startAngle; + var segs = Math.ceil(Math.abs(sweep) / (Math.PI * 2)) * 40; + + if (sweep === 0) { + return this; + } + + var startX = cx + Math.cos(startAngle) * radius; + var startY = cy + Math.sin(startAngle) * radius; + + // If the currentPath exists, take its points. Otherwise call `moveTo` to start a path. + var points = this.currentPath ? this.currentPath.shape.points : null; + + if (points) { + if (points[points.length - 2] !== startX || points[points.length - 1] !== startY) { + points.push(startX, startY); + } + } else { + this.moveTo(startX, startY); + points = this.currentPath.shape.points; + } + + var theta = sweep / (segs * 2); + var theta2 = theta * 2; + + var cTheta = Math.cos(theta); + var sTheta = Math.sin(theta); + + var segMinus = segs - 1; + + var remainder = segMinus % 1 / segMinus; + + for (var i = 0; i <= segMinus; ++i) { + var real = i + remainder * i; + + var angle = theta + startAngle + theta2 * real; + + var c = Math.cos(angle); + var s = -Math.sin(angle); + + points.push((cTheta * c + sTheta * s) * radius + cx, (cTheta * -s + sTheta * c) * radius + cy); + } + + this.dirty++; + + return this; + }; + + /** + * Specifies a simple one-color fill that subsequent calls to other Graphics methods + * (such as lineTo() or drawCircle()) use when drawing. + * + * @param {number} [color=0] - the color of the fill + * @param {number} [alpha=1] - the alpha of the fill + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.beginFill = function beginFill() { + var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + + this.filling = true; + this.fillColor = color; + this.fillAlpha = alpha; + + if (this.currentPath) { + if (this.currentPath.shape.points.length <= 2) { + this.currentPath.fill = this.filling; + this.currentPath.fillColor = this.fillColor; + this.currentPath.fillAlpha = this.fillAlpha; + } + } + + return this; + }; + + /** + * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method. + * + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.endFill = function endFill() { + this.filling = false; + this.fillColor = null; + this.fillAlpha = 1; + + return this; + }; + + /** + * + * @param {number} x - The X coord of the top-left of the rectangle + * @param {number} y - The Y coord of the top-left of the rectangle + * @param {number} width - The width of the rectangle + * @param {number} height - The height of the rectangle + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.drawRect = function drawRect(x, y, width, height) { + this.drawShape(new _math.Rectangle(x, y, width, height)); + + return this; + }; + + /** + * + * @param {number} x - The X coord of the top-left of the rectangle + * @param {number} y - The Y coord of the top-left of the rectangle + * @param {number} width - The width of the rectangle + * @param {number} height - The height of the rectangle + * @param {number} radius - Radius of the rectangle corners + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.drawRoundedRect = function drawRoundedRect(x, y, width, height, radius) { + this.drawShape(new _math.RoundedRectangle(x, y, width, height, radius)); + + return this; + }; + + /** + * Draws a circle. + * + * @param {number} x - The X coordinate of the center of the circle + * @param {number} y - The Y coordinate of the center of the circle + * @param {number} radius - The radius of the circle + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.drawCircle = function drawCircle(x, y, radius) { + this.drawShape(new _math.Circle(x, y, radius)); + + return this; + }; + + /** + * Draws an ellipse. + * + * @param {number} x - The X coordinate of the center of the ellipse + * @param {number} y - The Y coordinate of the center of the ellipse + * @param {number} width - The half width of the ellipse + * @param {number} height - The half height of the ellipse + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.drawEllipse = function drawEllipse(x, y, width, height) { + this.drawShape(new _math.Ellipse(x, y, width, height)); + + return this; + }; + + /** + * Draws a polygon using the given path. + * + * @param {number[]|PIXI.Point[]|PIXI.Polygon} path - The path data used to construct the polygon. + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.drawPolygon = function drawPolygon(path) { + // prevents an argument assignment deopt + // see section 3.1: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments + var points = path; + + var closed = true; + + if (points instanceof _math.Polygon) { + closed = points.closed; + points = points.points; + } + + if (!Array.isArray(points)) { + // prevents an argument leak deopt + // see section 3.2: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments + points = new Array(arguments.length); + + for (var i = 0; i < points.length; ++i) { + points[i] = arguments[i]; // eslint-disable-line prefer-rest-params + } + } + + var shape = new _math.Polygon(points); + + shape.closed = closed; + + this.drawShape(shape); + + return this; + }; + + /** + * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings. + * + * @return {PIXI.Graphics} This Graphics object. Good for chaining method calls + */ + + + Graphics.prototype.clear = function clear() { + if (this.lineWidth || this.filling || this.graphicsData.length > 0) { + this.lineWidth = 0; + this.filling = false; + + this.boundsDirty = -1; + this.dirty++; + this.clearDirty++; + this.graphicsData.length = 0; + } + + this.currentPath = null; + this._spriteRect = null; + + return this; + }; + + /** + * True if graphics consists of one rectangle, and thus, can be drawn like a Sprite and + * masked with gl.scissor. + * + * @returns {boolean} True if only 1 rect. + */ + + + Graphics.prototype.isFastRect = function isFastRect() { + return this.graphicsData.length === 1 && this.graphicsData[0].shape.type === _const.SHAPES.RECT && !this.graphicsData[0].lineWidth; + }; + + /** + * Renders the object using the WebGL renderer + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + Graphics.prototype._renderWebGL = function _renderWebGL(renderer) { + // if the sprite is not visible or the alpha is 0 then no need to render this element + if (this.dirty !== this.fastRectDirty) { + this.fastRectDirty = this.dirty; + this._fastRect = this.isFastRect(); + } + + // TODO this check can be moved to dirty? + if (this._fastRect) { + this._renderSpriteRect(renderer); + } else { + renderer.setObjectRenderer(renderer.plugins.graphics); + renderer.plugins.graphics.render(this); + } + }; + + /** + * Renders a sprite rectangle. + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + Graphics.prototype._renderSpriteRect = function _renderSpriteRect(renderer) { + var rect = this.graphicsData[0].shape; + + if (!this._spriteRect) { + this._spriteRect = new _Sprite2.default(new _Texture2.default(_Texture2.default.WHITE)); + } + + var sprite = this._spriteRect; + + if (this.tint === 0xffffff) { + sprite.tint = this.graphicsData[0].fillColor; + } else { + var t1 = tempColor1; + var t2 = tempColor2; + + (0, _utils.hex2rgb)(this.graphicsData[0].fillColor, t1); + (0, _utils.hex2rgb)(this.tint, t2); + + t1[0] *= t2[0]; + t1[1] *= t2[1]; + t1[2] *= t2[2]; + + sprite.tint = (0, _utils.rgb2hex)(t1); + } + sprite.alpha = this.graphicsData[0].fillAlpha; + sprite.worldAlpha = this.worldAlpha * sprite.alpha; + sprite.blendMode = this.blendMode; + + sprite._texture._frame.width = rect.width; + sprite._texture._frame.height = rect.height; + + sprite.transform.worldTransform = this.transform.worldTransform; + + sprite.anchor.set(-rect.x / rect.width, -rect.y / rect.height); + sprite._onAnchorUpdate(); + + sprite._renderWebGL(renderer); + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ + + + Graphics.prototype._renderCanvas = function _renderCanvas(renderer) { + if (this.isMask === true) { + return; + } + + renderer.plugins.graphics.render(this); + }; + + /** + * Retrieves the bounds of the graphic shape as a rectangle object + * + * @private + */ + + + Graphics.prototype._calculateBounds = function _calculateBounds() { + if (this.boundsDirty !== this.dirty) { + this.boundsDirty = this.dirty; + this.updateLocalBounds(); + + this.cachedSpriteDirty = true; + } + + var lb = this._localBounds; + + this._bounds.addFrame(this.transform, lb.minX, lb.minY, lb.maxX, lb.maxY); + }; + + /** + * Tests if a point is inside this graphics object + * + * @param {PIXI.Point} point - the point to test + * @return {boolean} the result of the test + */ + + + Graphics.prototype.containsPoint = function containsPoint(point) { + this.worldTransform.applyInverse(point, tempPoint); + + var graphicsData = this.graphicsData; + + for (var i = 0; i < graphicsData.length; ++i) { + var data = graphicsData[i]; + + if (!data.fill) { + continue; + } + + // only deal with fills.. + if (data.shape) { + if (data.shape.contains(tempPoint.x, tempPoint.y)) { + if (data.holes) { + for (var _i = 0; _i < data.holes.length; _i++) { + var hole = data.holes[_i]; + + if (hole.contains(tempPoint.x, tempPoint.y)) { + return false; + } + } + } + + return true; + } + } + } + + return false; + }; + + /** + * Update the bounds of the object + * + */ + + + Graphics.prototype.updateLocalBounds = function updateLocalBounds() { + var minX = Infinity; + var maxX = -Infinity; + + var minY = Infinity; + var maxY = -Infinity; + + if (this.graphicsData.length) { + var shape = 0; + var x = 0; + var y = 0; + var w = 0; + var h = 0; + + for (var i = 0; i < this.graphicsData.length; i++) { + var data = this.graphicsData[i]; + var type = data.type; + var lineWidth = data.lineWidth; + + shape = data.shape; + + if (type === _const.SHAPES.RECT || type === _const.SHAPES.RREC) { + x = shape.x - lineWidth / 2; + y = shape.y - lineWidth / 2; + w = shape.width + lineWidth; + h = shape.height + lineWidth; + + minX = x < minX ? x : minX; + maxX = x + w > maxX ? x + w : maxX; + + minY = y < minY ? y : minY; + maxY = y + h > maxY ? y + h : maxY; + } else if (type === _const.SHAPES.CIRC) { + x = shape.x; + y = shape.y; + w = shape.radius + lineWidth / 2; + h = shape.radius + lineWidth / 2; + + minX = x - w < minX ? x - w : minX; + maxX = x + w > maxX ? x + w : maxX; + + minY = y - h < minY ? y - h : minY; + maxY = y + h > maxY ? y + h : maxY; + } else if (type === _const.SHAPES.ELIP) { + x = shape.x; + y = shape.y; + w = shape.width + lineWidth / 2; + h = shape.height + lineWidth / 2; + + minX = x - w < minX ? x - w : minX; + maxX = x + w > maxX ? x + w : maxX; + + minY = y - h < minY ? y - h : minY; + maxY = y + h > maxY ? y + h : maxY; + } else { + // POLY + var points = shape.points; + var x2 = 0; + var y2 = 0; + var dx = 0; + var dy = 0; + var rw = 0; + var rh = 0; + var cx = 0; + var cy = 0; + + for (var j = 0; j + 2 < points.length; j += 2) { + x = points[j]; + y = points[j + 1]; + x2 = points[j + 2]; + y2 = points[j + 3]; + dx = Math.abs(x2 - x); + dy = Math.abs(y2 - y); + h = lineWidth; + w = Math.sqrt(dx * dx + dy * dy); + + if (w < 1e-9) { + continue; + } + + rw = (h / w * dy + dx) / 2; + rh = (h / w * dx + dy) / 2; + cx = (x2 + x) / 2; + cy = (y2 + y) / 2; + + minX = cx - rw < minX ? cx - rw : minX; + maxX = cx + rw > maxX ? cx + rw : maxX; + + minY = cy - rh < minY ? cy - rh : minY; + maxY = cy + rh > maxY ? cy + rh : maxY; + } + } + } + } else { + minX = 0; + maxX = 0; + minY = 0; + maxY = 0; + } + + var padding = this.boundsPadding; + + this._localBounds.minX = minX - padding; + this._localBounds.maxX = maxX + padding; + + this._localBounds.minY = minY - padding; + this._localBounds.maxY = maxY + padding; + }; + + /** + * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. + * + * @param {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} shape - The shape object to draw. + * @return {PIXI.GraphicsData} The generated GraphicsData object. + */ + + + Graphics.prototype.drawShape = function drawShape(shape) { + if (this.currentPath) { + // check current path! + if (this.currentPath.shape.points.length <= 2) { + this.graphicsData.pop(); + } + } + + this.currentPath = null; + + var data = new _GraphicsData2.default(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.filling, this.nativeLines, shape); + + this.graphicsData.push(data); + + if (data.type === _const.SHAPES.POLY) { + data.shape.closed = data.shape.closed || this.filling; + this.currentPath = data; + } + + this.dirty++; + + return data; + }; + + /** + * Generates a canvas texture. + * + * @param {number} scaleMode - The scale mode of the texture. + * @param {number} resolution - The resolution of the texture. + * @return {PIXI.Texture} The new texture. + */ + + + Graphics.prototype.generateCanvasTexture = function generateCanvasTexture(scaleMode) { + var resolution = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + + var bounds = this.getLocalBounds(); + + var canvasBuffer = _RenderTexture2.default.create(bounds.width, bounds.height, scaleMode, resolution); + + if (!canvasRenderer) { + canvasRenderer = new _CanvasRenderer2.default(); + } + + this.transform.updateLocalTransform(); + this.transform.localTransform.copy(tempMatrix); + + tempMatrix.invert(); + + tempMatrix.tx -= bounds.x; + tempMatrix.ty -= bounds.y; + + canvasRenderer.render(this, canvasBuffer, true, tempMatrix); + + var texture = _Texture2.default.fromCanvas(canvasBuffer.baseTexture._canvasRenderTarget.canvas, scaleMode, 'graphics'); + + texture.baseTexture.resolution = resolution; + texture.baseTexture.update(); + + return texture; + }; + + /** + * Closes the current path. + * + * @return {PIXI.Graphics} Returns itself. + */ + + + Graphics.prototype.closePath = function closePath() { + // ok so close path assumes next one is a hole! + var currentPath = this.currentPath; + + if (currentPath && currentPath.shape) { + currentPath.shape.close(); + } + + return this; + }; + + /** + * Adds a hole in the current path. + * + * @return {PIXI.Graphics} Returns itself. + */ + + + Graphics.prototype.addHole = function addHole() { + // this is a hole! + var hole = this.graphicsData.pop(); + + this.currentPath = this.graphicsData[this.graphicsData.length - 1]; + + this.currentPath.addHole(hole.shape); + this.currentPath = null; + + return this; + }; + + /** + * Destroys the Graphics object. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all + * options have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have + * their destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + + + Graphics.prototype.destroy = function destroy(options) { + _Container.prototype.destroy.call(this, options); + + // destroy each of the GraphicsData objects + for (var i = 0; i < this.graphicsData.length; ++i) { + this.graphicsData[i].destroy(); + } + + // for each webgl data entry, destroy the WebGLGraphicsData + for (var id in this._webgl) { + for (var j = 0; j < this._webgl[id].data.length; ++j) { + this._webgl[id].data[j].destroy(); + } + } + + if (this._spriteRect) { + this._spriteRect.destroy(); + } + + this.graphicsData = null; + + this.currentPath = null; + this._webgl = null; + this._localBounds = null; + }; + + return Graphics; +}(_Container3.default); + +exports.default = Graphics; + + +Graphics._SPRITE_TEXTURE = null; + +},{"../const":46,"../display/Bounds":47,"../display/Container":48,"../math":70,"../renderers/canvas/CanvasRenderer":77,"../sprites/Sprite":102,"../textures/RenderTexture":113,"../textures/Texture":115,"../utils":124,"./GraphicsData":54,"./utils/bezierCurveTo":56}],54:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A GraphicsData object. + * + * @class + * @memberof PIXI + */ +var GraphicsData = function () { + /** + * + * @param {number} lineWidth - the width of the line to draw + * @param {number} lineColor - the color of the line to draw + * @param {number} lineAlpha - the alpha of the line to draw + * @param {number} fillColor - the color of the fill + * @param {number} fillAlpha - the alpha of the fill + * @param {boolean} fill - whether or not the shape is filled with a colour + * @param {boolean} nativeLines - the method for drawing lines + * @param {PIXI.Circle|PIXI.Rectangle|PIXI.Ellipse|PIXI.Polygon} shape - The shape object to draw. + */ + function GraphicsData(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, nativeLines, shape) { + _classCallCheck(this, GraphicsData); + + /** + * @member {number} the width of the line to draw + */ + this.lineWidth = lineWidth; + /** + * @member {boolean} if true the liens will be draw using LINES instead of TRIANGLE_STRIP + */ + this.nativeLines = nativeLines; + + /** + * @member {number} the color of the line to draw + */ + this.lineColor = lineColor; + + /** + * @member {number} the alpha of the line to draw + */ + this.lineAlpha = lineAlpha; + + /** + * @member {number} cached tint of the line to draw + */ + this._lineTint = lineColor; + + /** + * @member {number} the color of the fill + */ + this.fillColor = fillColor; + + /** + * @member {number} the alpha of the fill + */ + this.fillAlpha = fillAlpha; + + /** + * @member {number} cached tint of the fill + */ + this._fillTint = fillColor; + + /** + * @member {boolean} whether or not the shape is filled with a colour + */ + this.fill = fill; + + this.holes = []; + + /** + * @member {PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.Rectangle|PIXI.RoundedRectangle} The shape object to draw. + */ + this.shape = shape; + + /** + * @member {number} The type of the shape, see the Const.Shapes file for all the existing types, + */ + this.type = shape.type; + } + + /** + * Creates a new GraphicsData object with the same values as this one. + * + * @return {PIXI.GraphicsData} Cloned GraphicsData object + */ + + + GraphicsData.prototype.clone = function clone() { + return new GraphicsData(this.lineWidth, this.lineColor, this.lineAlpha, this.fillColor, this.fillAlpha, this.fill, this.nativeLines, this.shape); + }; + + /** + * Adds a hole to the shape. + * + * @param {PIXI.Rectangle|PIXI.Circle} shape - The shape of the hole. + */ + + + GraphicsData.prototype.addHole = function addHole(shape) { + this.holes.push(shape); + }; + + /** + * Destroys the Graphics data. + */ + + + GraphicsData.prototype.destroy = function destroy() { + this.shape = null; + this.holes = null; + }; + + return GraphicsData; +}(); + +exports.default = GraphicsData; + +},{}],55:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _CanvasRenderer = require('../../renderers/canvas/CanvasRenderer'); + +var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); + +var _const = require('../../const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @author Mat Groves + * + * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ + * for creating the original PixiJS version! + * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they + * now share 4 bytes on the vertex buffer + * + * Heavily inspired by LibGDX's CanvasGraphicsRenderer: + * https://github.com/libgdx/libgdx/blob/1.0.0/gdx/src/com/badlogic/gdx/graphics/glutils/ShapeRenderer.java + */ + +/** + * Renderer dedicated to drawing and batching graphics objects. + * + * @class + * @private + * @memberof PIXI + */ +var CanvasGraphicsRenderer = function () { + /** + * @param {PIXI.CanvasRenderer} renderer - The current PIXI renderer. + */ + function CanvasGraphicsRenderer(renderer) { + _classCallCheck(this, CanvasGraphicsRenderer); + + this.renderer = renderer; + } + + /** + * Renders a Graphics object to a canvas. + * + * @param {PIXI.Graphics} graphics - the actual graphics object to render + */ + + + CanvasGraphicsRenderer.prototype.render = function render(graphics) { + var renderer = this.renderer; + var context = renderer.context; + var worldAlpha = graphics.worldAlpha; + var transform = graphics.transform.worldTransform; + var resolution = renderer.resolution; + + // if the tint has changed, set the graphics object to dirty. + if (this._prevTint !== this.tint) { + this.dirty = true; + } + + context.setTransform(transform.a * resolution, transform.b * resolution, transform.c * resolution, transform.d * resolution, transform.tx * resolution, transform.ty * resolution); + + if (graphics.dirty) { + this.updateGraphicsTint(graphics); + graphics.dirty = false; + } + + renderer.setBlendMode(graphics.blendMode); + + for (var i = 0; i < graphics.graphicsData.length; i++) { + var data = graphics.graphicsData[i]; + var shape = data.shape; + + var fillColor = data._fillTint; + var lineColor = data._lineTint; + + context.lineWidth = data.lineWidth; + + if (data.type === _const.SHAPES.POLY) { + context.beginPath(); + + this.renderPolygon(shape.points, shape.closed, context); + + for (var j = 0; j < data.holes.length; j++) { + this.renderPolygon(data.holes[j].points, true, context); + } + + if (data.fill) { + context.globalAlpha = data.fillAlpha * worldAlpha; + context.fillStyle = '#' + ('00000' + (fillColor | 0).toString(16)).substr(-6); + context.fill(); + } + if (data.lineWidth) { + context.globalAlpha = data.lineAlpha * worldAlpha; + context.strokeStyle = '#' + ('00000' + (lineColor | 0).toString(16)).substr(-6); + context.stroke(); + } + } else if (data.type === _const.SHAPES.RECT) { + if (data.fillColor || data.fillColor === 0) { + context.globalAlpha = data.fillAlpha * worldAlpha; + context.fillStyle = '#' + ('00000' + (fillColor | 0).toString(16)).substr(-6); + context.fillRect(shape.x, shape.y, shape.width, shape.height); + } + if (data.lineWidth) { + context.globalAlpha = data.lineAlpha * worldAlpha; + context.strokeStyle = '#' + ('00000' + (lineColor | 0).toString(16)).substr(-6); + context.strokeRect(shape.x, shape.y, shape.width, shape.height); + } + } else if (data.type === _const.SHAPES.CIRC) { + // TODO - need to be Undefined! + context.beginPath(); + context.arc(shape.x, shape.y, shape.radius, 0, 2 * Math.PI); + context.closePath(); + + if (data.fill) { + context.globalAlpha = data.fillAlpha * worldAlpha; + context.fillStyle = '#' + ('00000' + (fillColor | 0).toString(16)).substr(-6); + context.fill(); + } + if (data.lineWidth) { + context.globalAlpha = data.lineAlpha * worldAlpha; + context.strokeStyle = '#' + ('00000' + (lineColor | 0).toString(16)).substr(-6); + context.stroke(); + } + } else if (data.type === _const.SHAPES.ELIP) { + // ellipse code taken from: http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + + var w = shape.width * 2; + var h = shape.height * 2; + + var x = shape.x - w / 2; + var y = shape.y - h / 2; + + context.beginPath(); + + var kappa = 0.5522848; + var ox = w / 2 * kappa; // control point offset horizontal + var oy = h / 2 * kappa; // control point offset vertical + var xe = x + w; // x-end + var ye = y + h; // y-end + var xm = x + w / 2; // x-middle + var ym = y + h / 2; // y-middle + + context.moveTo(x, ym); + context.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + context.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + context.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + + context.closePath(); + + if (data.fill) { + context.globalAlpha = data.fillAlpha * worldAlpha; + context.fillStyle = '#' + ('00000' + (fillColor | 0).toString(16)).substr(-6); + context.fill(); + } + if (data.lineWidth) { + context.globalAlpha = data.lineAlpha * worldAlpha; + context.strokeStyle = '#' + ('00000' + (lineColor | 0).toString(16)).substr(-6); + context.stroke(); + } + } else if (data.type === _const.SHAPES.RREC) { + var rx = shape.x; + var ry = shape.y; + var width = shape.width; + var height = shape.height; + var radius = shape.radius; + + var maxRadius = Math.min(width, height) / 2 | 0; + + radius = radius > maxRadius ? maxRadius : radius; + + context.beginPath(); + context.moveTo(rx, ry + radius); + context.lineTo(rx, ry + height - radius); + context.quadraticCurveTo(rx, ry + height, rx + radius, ry + height); + context.lineTo(rx + width - radius, ry + height); + context.quadraticCurveTo(rx + width, ry + height, rx + width, ry + height - radius); + context.lineTo(rx + width, ry + radius); + context.quadraticCurveTo(rx + width, ry, rx + width - radius, ry); + context.lineTo(rx + radius, ry); + context.quadraticCurveTo(rx, ry, rx, ry + radius); + context.closePath(); + + if (data.fillColor || data.fillColor === 0) { + context.globalAlpha = data.fillAlpha * worldAlpha; + context.fillStyle = '#' + ('00000' + (fillColor | 0).toString(16)).substr(-6); + context.fill(); + } + + if (data.lineWidth) { + context.globalAlpha = data.lineAlpha * worldAlpha; + context.strokeStyle = '#' + ('00000' + (lineColor | 0).toString(16)).substr(-6); + context.stroke(); + } + } + } + }; + + /** + * Updates the tint of a graphics object + * + * @private + * @param {PIXI.Graphics} graphics - the graphics that will have its tint updated + */ + + + CanvasGraphicsRenderer.prototype.updateGraphicsTint = function updateGraphicsTint(graphics) { + graphics._prevTint = graphics.tint; + + var tintR = (graphics.tint >> 16 & 0xFF) / 255; + var tintG = (graphics.tint >> 8 & 0xFF) / 255; + var tintB = (graphics.tint & 0xFF) / 255; + + for (var i = 0; i < graphics.graphicsData.length; ++i) { + var data = graphics.graphicsData[i]; + + var fillColor = data.fillColor | 0; + var lineColor = data.lineColor | 0; + + // super inline cos im an optimization NAZI :) + data._fillTint = ((fillColor >> 16 & 0xFF) / 255 * tintR * 255 << 16) + ((fillColor >> 8 & 0xFF) / 255 * tintG * 255 << 8) + (fillColor & 0xFF) / 255 * tintB * 255; + + data._lineTint = ((lineColor >> 16 & 0xFF) / 255 * tintR * 255 << 16) + ((lineColor >> 8 & 0xFF) / 255 * tintG * 255 << 8) + (lineColor & 0xFF) / 255 * tintB * 255; + } + }; + + /** + * Renders a polygon. + * + * @param {PIXI.Point[]} points - The points to render + * @param {boolean} close - Should the polygon be closed + * @param {CanvasRenderingContext2D} context - The rendering context to use + */ + + + CanvasGraphicsRenderer.prototype.renderPolygon = function renderPolygon(points, close, context) { + context.moveTo(points[0], points[1]); + + for (var j = 1; j < points.length / 2; ++j) { + context.lineTo(points[j * 2], points[j * 2 + 1]); + } + + if (close) { + context.closePath(); + } + }; + + /** + * destroy graphics object + * + */ + + + CanvasGraphicsRenderer.prototype.destroy = function destroy() { + this.renderer = null; + }; + + return CanvasGraphicsRenderer; +}(); + +exports.default = CanvasGraphicsRenderer; + + +_CanvasRenderer2.default.registerPlugin('graphics', CanvasGraphicsRenderer); + +},{"../../const":46,"../../renderers/canvas/CanvasRenderer":77}],56:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.default = bezierCurveTo; +/** + * Calculate the points for a bezier curve and then draws it. + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @param {number} fromX - Starting point x + * @param {number} fromY - Starting point y + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} cpX2 - Second Control point x + * @param {number} cpY2 - Second Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @param {number[]} [path=[]] - Path array to push points into + * @return {number[]} Array of points of the curve + */ +function bezierCurveTo(fromX, fromY, cpX, cpY, cpX2, cpY2, toX, toY) { + var path = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : []; + + var n = 20; + var dt = 0; + var dt2 = 0; + var dt3 = 0; + var t2 = 0; + var t3 = 0; + + path.push(fromX, fromY); + + for (var i = 1, j = 0; i <= n; ++i) { + j = i / n; + + dt = 1 - j; + dt2 = dt * dt; + dt3 = dt2 * dt; + + t2 = j * j; + t3 = t2 * j; + + path.push(dt3 * fromX + 3 * dt2 * j * cpX + 3 * dt * t2 * cpX2 + t3 * toX, dt3 * fromY + 3 * dt2 * j * cpY + 3 * dt * t2 * cpY2 + t3 * toY); + } + + return path; +} + +},{}],57:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../../utils'); + +var _const = require('../../const'); + +var _ObjectRenderer2 = require('../../renderers/webgl/utils/ObjectRenderer'); + +var _ObjectRenderer3 = _interopRequireDefault(_ObjectRenderer2); + +var _WebGLRenderer = require('../../renderers/webgl/WebGLRenderer'); + +var _WebGLRenderer2 = _interopRequireDefault(_WebGLRenderer); + +var _WebGLGraphicsData = require('./WebGLGraphicsData'); + +var _WebGLGraphicsData2 = _interopRequireDefault(_WebGLGraphicsData); + +var _PrimitiveShader = require('./shaders/PrimitiveShader'); + +var _PrimitiveShader2 = _interopRequireDefault(_PrimitiveShader); + +var _buildPoly = require('./utils/buildPoly'); + +var _buildPoly2 = _interopRequireDefault(_buildPoly); + +var _buildRectangle = require('./utils/buildRectangle'); + +var _buildRectangle2 = _interopRequireDefault(_buildRectangle); + +var _buildRoundedRectangle = require('./utils/buildRoundedRectangle'); + +var _buildRoundedRectangle2 = _interopRequireDefault(_buildRoundedRectangle); + +var _buildCircle = require('./utils/buildCircle'); + +var _buildCircle2 = _interopRequireDefault(_buildCircle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Renders the graphics object. + * + * @class + * @memberof PIXI + * @extends PIXI.ObjectRenderer + */ +var GraphicsRenderer = function (_ObjectRenderer) { + _inherits(GraphicsRenderer, _ObjectRenderer); + + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this object renderer works for. + */ + function GraphicsRenderer(renderer) { + _classCallCheck(this, GraphicsRenderer); + + var _this = _possibleConstructorReturn(this, _ObjectRenderer.call(this, renderer)); + + _this.graphicsDataPool = []; + + _this.primitiveShader = null; + + _this.gl = renderer.gl; + + // easy access! + _this.CONTEXT_UID = 0; + return _this; + } + + /** + * Called when there is a WebGL context change + * + * @private + * + */ + + + GraphicsRenderer.prototype.onContextChange = function onContextChange() { + this.gl = this.renderer.gl; + this.CONTEXT_UID = this.renderer.CONTEXT_UID; + this.primitiveShader = new _PrimitiveShader2.default(this.gl); + }; + + /** + * Destroys this renderer. + * + */ + + + GraphicsRenderer.prototype.destroy = function destroy() { + _ObjectRenderer3.default.prototype.destroy.call(this); + + for (var i = 0; i < this.graphicsDataPool.length; ++i) { + this.graphicsDataPool[i].destroy(); + } + + this.graphicsDataPool = null; + }; + + /** + * Renders a graphics object. + * + * @param {PIXI.Graphics} graphics - The graphics object to render. + */ + + + GraphicsRenderer.prototype.render = function render(graphics) { + var renderer = this.renderer; + var gl = renderer.gl; + + var webGLData = void 0; + var webGL = graphics._webGL[this.CONTEXT_UID]; + + if (!webGL || graphics.dirty !== webGL.dirty) { + this.updateGraphics(graphics); + + webGL = graphics._webGL[this.CONTEXT_UID]; + } + + // This could be speeded up for sure! + var shader = this.primitiveShader; + + renderer.bindShader(shader); + renderer.state.setBlendMode(graphics.blendMode); + + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + var shaderTemp = webGLData.shader; + + renderer.bindShader(shaderTemp); + shaderTemp.uniforms.translationMatrix = graphics.transform.worldTransform.toArray(true); + shaderTemp.uniforms.tint = (0, _utils.hex2rgb)(graphics.tint); + shaderTemp.uniforms.alpha = graphics.worldAlpha; + + renderer.bindVao(webGLData.vao); + + if (webGLData.nativeLines) { + gl.drawArrays(gl.LINES, 0, webGLData.points.length / 6); + } else { + webGLData.vao.draw(gl.TRIANGLE_STRIP, webGLData.indices.length); + } + } + }; + + /** + * Updates the graphics object + * + * @private + * @param {PIXI.Graphics} graphics - The graphics object to update + */ + + + GraphicsRenderer.prototype.updateGraphics = function updateGraphics(graphics) { + var gl = this.renderer.gl; + + // get the contexts graphics object + var webGL = graphics._webGL[this.CONTEXT_UID]; + + // if the graphics object does not exist in the webGL context time to create it! + if (!webGL) { + webGL = graphics._webGL[this.CONTEXT_UID] = { lastIndex: 0, data: [], gl: gl, clearDirty: -1, dirty: -1 }; + } + + // flag the graphics as not dirty as we are about to update it... + webGL.dirty = graphics.dirty; + + // if the user cleared the graphics object we will need to clear every object + if (graphics.clearDirty !== webGL.clearDirty) { + webGL.clearDirty = graphics.clearDirty; + + // loop through and return all the webGLDatas to the object pool so than can be reused later on + for (var i = 0; i < webGL.data.length; i++) { + this.graphicsDataPool.push(webGL.data[i]); + } + + // clear the array and reset the index.. + webGL.data.length = 0; + webGL.lastIndex = 0; + } + + var webGLData = void 0; + var webGLDataNativeLines = void 0; + + // loop through the graphics datas and construct each one.. + // if the object is a complex fill then the new stencil buffer technique will be used + // other wise graphics objects will be pushed into a batch.. + for (var _i = webGL.lastIndex; _i < graphics.graphicsData.length; _i++) { + var data = graphics.graphicsData[_i]; + + // TODO - this can be simplified + webGLData = this.getWebGLData(webGL, 0); + + if (data.nativeLines && data.lineWidth) { + webGLDataNativeLines = this.getWebGLData(webGL, 0, true); + webGL.lastIndex++; + } + + if (data.type === _const.SHAPES.POLY) { + (0, _buildPoly2.default)(data, webGLData, webGLDataNativeLines); + } + if (data.type === _const.SHAPES.RECT) { + (0, _buildRectangle2.default)(data, webGLData, webGLDataNativeLines); + } else if (data.type === _const.SHAPES.CIRC || data.type === _const.SHAPES.ELIP) { + (0, _buildCircle2.default)(data, webGLData, webGLDataNativeLines); + } else if (data.type === _const.SHAPES.RREC) { + (0, _buildRoundedRectangle2.default)(data, webGLData, webGLDataNativeLines); + } + + webGL.lastIndex++; + } + + this.renderer.bindVao(null); + + // upload all the dirty data... + for (var _i2 = 0; _i2 < webGL.data.length; _i2++) { + webGLData = webGL.data[_i2]; + + if (webGLData.dirty) { + webGLData.upload(); + } + } + }; + + /** + * + * @private + * @param {WebGLRenderingContext} gl - the current WebGL drawing context + * @param {number} type - TODO @Alvin + * @param {number} nativeLines - indicate whether the webGLData use for nativeLines. + * @return {*} TODO + */ + + + GraphicsRenderer.prototype.getWebGLData = function getWebGLData(gl, type, nativeLines) { + var webGLData = gl.data[gl.data.length - 1]; + + if (!webGLData || webGLData.nativeLines !== nativeLines || webGLData.points.length > 320000) { + webGLData = this.graphicsDataPool.pop() || new _WebGLGraphicsData2.default(this.renderer.gl, this.primitiveShader, this.renderer.state.attribsState); + webGLData.nativeLines = nativeLines; + webGLData.reset(type); + gl.data.push(webGLData); + } + + webGLData.dirty = true; + + return webGLData; + }; + + return GraphicsRenderer; +}(_ObjectRenderer3.default); + +exports.default = GraphicsRenderer; + + +_WebGLRenderer2.default.registerPlugin('graphics', GraphicsRenderer); + +},{"../../const":46,"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../utils":124,"./WebGLGraphicsData":58,"./shaders/PrimitiveShader":59,"./utils/buildCircle":60,"./utils/buildPoly":62,"./utils/buildRectangle":63,"./utils/buildRoundedRectangle":64}],58:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * An object containing WebGL specific properties to be used by the WebGL renderer + * + * @class + * @private + * @memberof PIXI + */ +var WebGLGraphicsData = function () { + /** + * @param {WebGLRenderingContext} gl - The current WebGL drawing context + * @param {PIXI.Shader} shader - The shader + * @param {object} attribsState - The state for the VAO + */ + function WebGLGraphicsData(gl, shader, attribsState) { + _classCallCheck(this, WebGLGraphicsData); + + /** + * The current WebGL drawing context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + // TODO does this need to be split before uploading?? + /** + * An array of color components (r,g,b) + * @member {number[]} + */ + this.color = [0, 0, 0]; // color split! + + /** + * An array of points to draw + * @member {PIXI.Point[]} + */ + this.points = []; + + /** + * The indices of the vertices + * @member {number[]} + */ + this.indices = []; + /** + * The main buffer + * @member {WebGLBuffer} + */ + this.buffer = _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl); + + /** + * The index buffer + * @member {WebGLBuffer} + */ + this.indexBuffer = _pixiGlCore2.default.GLBuffer.createIndexBuffer(gl); + + /** + * Whether this graphics is dirty or not + * @member {boolean} + */ + this.dirty = true; + + /** + * Whether this graphics is nativeLines or not + * @member {boolean} + */ + this.nativeLines = false; + + this.glPoints = null; + this.glIndices = null; + + /** + * + * @member {PIXI.Shader} + */ + this.shader = shader; + + this.vao = new _pixiGlCore2.default.VertexArrayObject(gl, attribsState).addIndex(this.indexBuffer).addAttribute(this.buffer, shader.attributes.aVertexPosition, gl.FLOAT, false, 4 * 6, 0).addAttribute(this.buffer, shader.attributes.aColor, gl.FLOAT, false, 4 * 6, 2 * 4); + } + + /** + * Resets the vertices and the indices + */ + + + WebGLGraphicsData.prototype.reset = function reset() { + this.points.length = 0; + this.indices.length = 0; + }; + + /** + * Binds the buffers and uploads the data + */ + + + WebGLGraphicsData.prototype.upload = function upload() { + this.glPoints = new Float32Array(this.points); + this.buffer.upload(this.glPoints); + + this.glIndices = new Uint16Array(this.indices); + this.indexBuffer.upload(this.glIndices); + + this.dirty = false; + }; + + /** + * Empties all the data + */ + + + WebGLGraphicsData.prototype.destroy = function destroy() { + this.color = null; + this.points = null; + this.indices = null; + + this.vao.destroy(); + this.buffer.destroy(); + this.indexBuffer.destroy(); + + this.gl = null; + + this.buffer = null; + this.indexBuffer = null; + + this.glPoints = null; + this.glIndices = null; + }; + + return WebGLGraphicsData; +}(); + +exports.default = WebGLGraphicsData; + +},{"pixi-gl-core":7}],59:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Shader2 = require('../../../Shader'); + +var _Shader3 = _interopRequireDefault(_Shader2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * This shader is used to draw simple primitive shapes for {@link PIXI.Graphics}. + * + * @class + * @memberof PIXI + * @extends PIXI.Shader + */ +var PrimitiveShader = function (_Shader) { + _inherits(PrimitiveShader, _Shader); + + /** + * @param {WebGLRenderingContext} gl - The webgl shader manager this shader works for. + */ + function PrimitiveShader(gl) { + _classCallCheck(this, PrimitiveShader); + + return _possibleConstructorReturn(this, _Shader.call(this, gl, + // vertex shader + ['attribute vec2 aVertexPosition;', 'attribute vec4 aColor;', 'uniform mat3 translationMatrix;', 'uniform mat3 projectionMatrix;', 'uniform float alpha;', 'uniform vec3 tint;', 'varying vec4 vColor;', 'void main(void){', ' gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);', ' vColor = aColor * vec4(tint * alpha, alpha);', '}'].join('\n'), + // fragment shader + ['varying vec4 vColor;', 'void main(void){', ' gl_FragColor = vColor;', '}'].join('\n'))); + } + + return PrimitiveShader; +}(_Shader3.default); + +exports.default = PrimitiveShader; + +},{"../../../Shader":44}],60:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = buildCircle; + +var _buildLine = require('./buildLine'); + +var _buildLine2 = _interopRequireDefault(_buildLine); + +var _const = require('../../../const'); + +var _utils = require('../../../utils'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Builds a circle to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object to draw + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines + */ +function buildCircle(graphicsData, webGLData, webGLDataNativeLines) { + // need to convert points to a nice regular data + var circleData = graphicsData.shape; + var x = circleData.x; + var y = circleData.y; + var width = void 0; + var height = void 0; + + // TODO - bit hacky?? + if (graphicsData.type === _const.SHAPES.CIRC) { + width = circleData.radius; + height = circleData.radius; + } else { + width = circleData.width; + height = circleData.height; + } + + if (width === 0 || height === 0) { + return; + } + + var totalSegs = Math.floor(30 * Math.sqrt(circleData.radius)) || Math.floor(15 * Math.sqrt(circleData.width + circleData.height)); + + var seg = Math.PI * 2 / totalSegs; + + if (graphicsData.fill) { + var color = (0, _utils.hex2rgb)(graphicsData.fillColor); + var alpha = graphicsData.fillAlpha; + + var r = color[0] * alpha; + var g = color[1] * alpha; + var b = color[2] * alpha; + + var verts = webGLData.points; + var indices = webGLData.indices; + + var vecPos = verts.length / 6; + + indices.push(vecPos); + + for (var i = 0; i < totalSegs + 1; i++) { + verts.push(x, y, r, g, b, alpha); + + verts.push(x + Math.sin(seg * i) * width, y + Math.cos(seg * i) * height, r, g, b, alpha); + + indices.push(vecPos++, vecPos++); + } + + indices.push(vecPos - 1); + } + + if (graphicsData.lineWidth) { + var tempPoints = graphicsData.points; + + graphicsData.points = []; + + for (var _i = 0; _i < totalSegs + 1; _i++) { + graphicsData.points.push(x + Math.sin(seg * _i) * width, y + Math.cos(seg * _i) * height); + } + + (0, _buildLine2.default)(graphicsData, webGLData, webGLDataNativeLines); + + graphicsData.points = tempPoints; + } +} + +},{"../../../const":46,"../../../utils":124,"./buildLine":61}],61:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +exports.default = function (graphicsData, webGLData, webGLDataNativeLines) { + if (graphicsData.nativeLines) { + buildNativeLine(graphicsData, webGLDataNativeLines); + } else { + buildLine(graphicsData, webGLData); + } +}; + +var _math = require('../../../math'); + +var _utils = require('../../../utils'); + +/** + * Builds a line to draw using the poligon method. + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + */ +function buildLine(graphicsData, webGLData) { + // TODO OPTIMISE! + var points = graphicsData.points; + + if (points.length === 0) { + return; + } + // if the line width is an odd number add 0.5 to align to a whole pixel + // commenting this out fixes #711 and #1620 + // if (graphicsData.lineWidth%2) + // { + // for (i = 0; i < points.length; i++) + // { + // points[i] += 0.5; + // } + // } + + // get first and last point.. figure out the middle! + var firstPoint = new _math.Point(points[0], points[1]); + var lastPoint = new _math.Point(points[points.length - 2], points[points.length - 1]); + + // if the first point is the last point - gonna have issues :) + if (firstPoint.x === lastPoint.x && firstPoint.y === lastPoint.y) { + // need to clone as we are going to slightly modify the shape.. + points = points.slice(); + + points.pop(); + points.pop(); + + lastPoint = new _math.Point(points[points.length - 2], points[points.length - 1]); + + var midPointX = lastPoint.x + (firstPoint.x - lastPoint.x) * 0.5; + var midPointY = lastPoint.y + (firstPoint.y - lastPoint.y) * 0.5; + + points.unshift(midPointX, midPointY); + points.push(midPointX, midPointY); + } + + var verts = webGLData.points; + var indices = webGLData.indices; + var length = points.length / 2; + var indexCount = points.length; + var indexStart = verts.length / 6; + + // DRAW the Line + var width = graphicsData.lineWidth / 2; + + // sort color + var color = (0, _utils.hex2rgb)(graphicsData.lineColor); + var alpha = graphicsData.lineAlpha; + var r = color[0] * alpha; + var g = color[1] * alpha; + var b = color[2] * alpha; + + var p1x = points[0]; + var p1y = points[1]; + var p2x = points[2]; + var p2y = points[3]; + var p3x = 0; + var p3y = 0; + + var perpx = -(p1y - p2y); + var perpy = p1x - p2x; + var perp2x = 0; + var perp2y = 0; + var perp3x = 0; + var perp3y = 0; + + var dist = Math.sqrt(perpx * perpx + perpy * perpy); + + perpx /= dist; + perpy /= dist; + perpx *= width; + perpy *= width; + + // start + verts.push(p1x - perpx, p1y - perpy, r, g, b, alpha); + + verts.push(p1x + perpx, p1y + perpy, r, g, b, alpha); + + for (var i = 1; i < length - 1; ++i) { + p1x = points[(i - 1) * 2]; + p1y = points[(i - 1) * 2 + 1]; + + p2x = points[i * 2]; + p2y = points[i * 2 + 1]; + + p3x = points[(i + 1) * 2]; + p3y = points[(i + 1) * 2 + 1]; + + perpx = -(p1y - p2y); + perpy = p1x - p2x; + + dist = Math.sqrt(perpx * perpx + perpy * perpy); + perpx /= dist; + perpy /= dist; + perpx *= width; + perpy *= width; + + perp2x = -(p2y - p3y); + perp2y = p2x - p3x; + + dist = Math.sqrt(perp2x * perp2x + perp2y * perp2y); + perp2x /= dist; + perp2y /= dist; + perp2x *= width; + perp2y *= width; + + var a1 = -perpy + p1y - (-perpy + p2y); + var b1 = -perpx + p2x - (-perpx + p1x); + var c1 = (-perpx + p1x) * (-perpy + p2y) - (-perpx + p2x) * (-perpy + p1y); + var a2 = -perp2y + p3y - (-perp2y + p2y); + var b2 = -perp2x + p2x - (-perp2x + p3x); + var c2 = (-perp2x + p3x) * (-perp2y + p2y) - (-perp2x + p2x) * (-perp2y + p3y); + + var denom = a1 * b2 - a2 * b1; + + if (Math.abs(denom) < 0.1) { + denom += 10.1; + verts.push(p2x - perpx, p2y - perpy, r, g, b, alpha); + + verts.push(p2x + perpx, p2y + perpy, r, g, b, alpha); + + continue; + } + + var px = (b1 * c2 - b2 * c1) / denom; + var py = (a2 * c1 - a1 * c2) / denom; + var pdist = (px - p2x) * (px - p2x) + (py - p2y) * (py - p2y); + + if (pdist > 196 * width * width) { + perp3x = perpx - perp2x; + perp3y = perpy - perp2y; + + dist = Math.sqrt(perp3x * perp3x + perp3y * perp3y); + perp3x /= dist; + perp3y /= dist; + perp3x *= width; + perp3y *= width; + + verts.push(p2x - perp3x, p2y - perp3y); + verts.push(r, g, b, alpha); + + verts.push(p2x + perp3x, p2y + perp3y); + verts.push(r, g, b, alpha); + + verts.push(p2x - perp3x, p2y - perp3y); + verts.push(r, g, b, alpha); + + indexCount++; + } else { + verts.push(px, py); + verts.push(r, g, b, alpha); + + verts.push(p2x - (px - p2x), p2y - (py - p2y)); + verts.push(r, g, b, alpha); + } + } + + p1x = points[(length - 2) * 2]; + p1y = points[(length - 2) * 2 + 1]; + + p2x = points[(length - 1) * 2]; + p2y = points[(length - 1) * 2 + 1]; + + perpx = -(p1y - p2y); + perpy = p1x - p2x; + + dist = Math.sqrt(perpx * perpx + perpy * perpy); + perpx /= dist; + perpy /= dist; + perpx *= width; + perpy *= width; + + verts.push(p2x - perpx, p2y - perpy); + verts.push(r, g, b, alpha); + + verts.push(p2x + perpx, p2y + perpy); + verts.push(r, g, b, alpha); + + indices.push(indexStart); + + for (var _i = 0; _i < indexCount; ++_i) { + indices.push(indexStart++); + } + + indices.push(indexStart - 1); +} + +/** + * Builds a line to draw using the gl.drawArrays(gl.LINES) method + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + */ + + +/** + * Builds a line to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines + */ +function buildNativeLine(graphicsData, webGLData) { + var i = 0; + var points = graphicsData.points; + + if (points.length === 0) return; + + var verts = webGLData.points; + var length = points.length / 2; + + // sort color + var color = (0, _utils.hex2rgb)(graphicsData.lineColor); + var alpha = graphicsData.lineAlpha; + var r = color[0] * alpha; + var g = color[1] * alpha; + var b = color[2] * alpha; + + for (i = 1; i < length; i++) { + var p1x = points[(i - 1) * 2]; + var p1y = points[(i - 1) * 2 + 1]; + + var p2x = points[i * 2]; + var p2y = points[i * 2 + 1]; + + verts.push(p1x, p1y); + verts.push(r, g, b, alpha); + + verts.push(p2x, p2y); + verts.push(r, g, b, alpha); + } +} + +},{"../../../math":70,"../../../utils":124}],62:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = buildPoly; + +var _buildLine = require('./buildLine'); + +var _buildLine2 = _interopRequireDefault(_buildLine); + +var _utils = require('../../../utils'); + +var _earcut = require('earcut'); + +var _earcut2 = _interopRequireDefault(_earcut); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Builds a polygon to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines + */ +function buildPoly(graphicsData, webGLData, webGLDataNativeLines) { + graphicsData.points = graphicsData.shape.points.slice(); + + var points = graphicsData.points; + + if (graphicsData.fill && points.length >= 6) { + var holeArray = []; + // Process holes.. + var holes = graphicsData.holes; + + for (var i = 0; i < holes.length; i++) { + var hole = holes[i]; + + holeArray.push(points.length / 2); + + points = points.concat(hole.points); + } + + // get first and last point.. figure out the middle! + var verts = webGLData.points; + var indices = webGLData.indices; + + var length = points.length / 2; + + // sort color + var color = (0, _utils.hex2rgb)(graphicsData.fillColor); + var alpha = graphicsData.fillAlpha; + var r = color[0] * alpha; + var g = color[1] * alpha; + var b = color[2] * alpha; + + var triangles = (0, _earcut2.default)(points, holeArray, 2); + + if (!triangles) { + return; + } + + var vertPos = verts.length / 6; + + for (var _i = 0; _i < triangles.length; _i += 3) { + indices.push(triangles[_i] + vertPos); + indices.push(triangles[_i] + vertPos); + indices.push(triangles[_i + 1] + vertPos); + indices.push(triangles[_i + 2] + vertPos); + indices.push(triangles[_i + 2] + vertPos); + } + + for (var _i2 = 0; _i2 < length; _i2++) { + verts.push(points[_i2 * 2], points[_i2 * 2 + 1], r, g, b, alpha); + } + } + + if (graphicsData.lineWidth > 0) { + (0, _buildLine2.default)(graphicsData, webGLData, webGLDataNativeLines); + } +} + +},{"../../../utils":124,"./buildLine":61,"earcut":19}],63:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = buildRectangle; + +var _buildLine = require('./buildLine'); + +var _buildLine2 = _interopRequireDefault(_buildLine); + +var _utils = require('../../../utils'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Builds a rectangle to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines + */ +function buildRectangle(graphicsData, webGLData, webGLDataNativeLines) { + // --- // + // need to convert points to a nice regular data + // + var rectData = graphicsData.shape; + var x = rectData.x; + var y = rectData.y; + var width = rectData.width; + var height = rectData.height; + + if (graphicsData.fill) { + var color = (0, _utils.hex2rgb)(graphicsData.fillColor); + var alpha = graphicsData.fillAlpha; + + var r = color[0] * alpha; + var g = color[1] * alpha; + var b = color[2] * alpha; + + var verts = webGLData.points; + var indices = webGLData.indices; + + var vertPos = verts.length / 6; + + // start + verts.push(x, y); + verts.push(r, g, b, alpha); + + verts.push(x + width, y); + verts.push(r, g, b, alpha); + + verts.push(x, y + height); + verts.push(r, g, b, alpha); + + verts.push(x + width, y + height); + verts.push(r, g, b, alpha); + + // insert 2 dead triangles.. + indices.push(vertPos, vertPos, vertPos + 1, vertPos + 2, vertPos + 3, vertPos + 3); + } + + if (graphicsData.lineWidth) { + var tempPoints = graphicsData.points; + + graphicsData.points = [x, y, x + width, y, x + width, y + height, x, y + height, x, y]; + + (0, _buildLine2.default)(graphicsData, webGLData, webGLDataNativeLines); + + graphicsData.points = tempPoints; + } +} + +},{"../../../utils":124,"./buildLine":61}],64:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = buildRoundedRectangle; + +var _earcut = require('earcut'); + +var _earcut2 = _interopRequireDefault(_earcut); + +var _buildLine = require('./buildLine'); + +var _buildLine2 = _interopRequireDefault(_buildLine); + +var _utils = require('../../../utils'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Builds a rounded rectangle to draw + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {PIXI.WebGLGraphicsData} graphicsData - The graphics object containing all the necessary properties + * @param {object} webGLData - an object containing all the webGL-specific information to create this shape + * @param {object} webGLDataNativeLines - an object containing all the webGL-specific information to create nativeLines + */ +function buildRoundedRectangle(graphicsData, webGLData, webGLDataNativeLines) { + var rrectData = graphicsData.shape; + var x = rrectData.x; + var y = rrectData.y; + var width = rrectData.width; + var height = rrectData.height; + + var radius = rrectData.radius; + + var recPoints = []; + + recPoints.push(x, y + radius); + quadraticBezierCurve(x, y + height - radius, x, y + height, x + radius, y + height, recPoints); + quadraticBezierCurve(x + width - radius, y + height, x + width, y + height, x + width, y + height - radius, recPoints); + quadraticBezierCurve(x + width, y + radius, x + width, y, x + width - radius, y, recPoints); + quadraticBezierCurve(x + radius, y, x, y, x, y + radius + 0.0000000001, recPoints); + + // this tiny number deals with the issue that occurs when points overlap and earcut fails to triangulate the item. + // TODO - fix this properly, this is not very elegant.. but it works for now. + + if (graphicsData.fill) { + var color = (0, _utils.hex2rgb)(graphicsData.fillColor); + var alpha = graphicsData.fillAlpha; + + var r = color[0] * alpha; + var g = color[1] * alpha; + var b = color[2] * alpha; + + var verts = webGLData.points; + var indices = webGLData.indices; + + var vecPos = verts.length / 6; + + var triangles = (0, _earcut2.default)(recPoints, null, 2); + + for (var i = 0, j = triangles.length; i < j; i += 3) { + indices.push(triangles[i] + vecPos); + indices.push(triangles[i] + vecPos); + indices.push(triangles[i + 1] + vecPos); + indices.push(triangles[i + 2] + vecPos); + indices.push(triangles[i + 2] + vecPos); + } + + for (var _i = 0, _j = recPoints.length; _i < _j; _i++) { + verts.push(recPoints[_i], recPoints[++_i], r, g, b, alpha); + } + } + + if (graphicsData.lineWidth) { + var tempPoints = graphicsData.points; + + graphicsData.points = recPoints; + + (0, _buildLine2.default)(graphicsData, webGLData, webGLDataNativeLines); + + graphicsData.points = tempPoints; + } +} + +/** + * Calculate a single point for a quadratic bezier curve. + * Utility function used by quadraticBezierCurve. + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {number} n1 - first number + * @param {number} n2 - second number + * @param {number} perc - percentage + * @return {number} the result + * + */ +function getPt(n1, n2, perc) { + var diff = n2 - n1; + + return n1 + diff * perc; +} + +/** + * Calculate the points for a quadratic bezier curve. (helper function..) + * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c + * + * Ignored from docs since it is not directly exposed. + * + * @ignore + * @private + * @param {number} fromX - Origin point x + * @param {number} fromY - Origin point x + * @param {number} cpX - Control point x + * @param {number} cpY - Control point y + * @param {number} toX - Destination point x + * @param {number} toY - Destination point y + * @param {number[]} [out=[]] - The output array to add points into. If not passed, a new array is created. + * @return {number[]} an array of points + */ +function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY) { + var out = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : []; + + var n = 20; + var points = out; + + var xa = 0; + var ya = 0; + var xb = 0; + var yb = 0; + var x = 0; + var y = 0; + + for (var i = 0, j = 0; i <= n; ++i) { + j = i / n; + + // The Green Line + xa = getPt(fromX, cpX, j); + ya = getPt(fromY, cpY, j); + xb = getPt(cpX, toX, j); + yb = getPt(cpY, toY, j); + + // The Black Dot + x = getPt(xa, xb, j); + y = getPt(ya, yb, j); + + points.push(x, y); + } + + return points; +} + +},{"../../../utils":124,"./buildLine":61,"earcut":19}],65:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.autoDetectRenderer = exports.Application = exports.Filter = exports.SpriteMaskFilter = exports.Quad = exports.RenderTarget = exports.ObjectRenderer = exports.WebGLManager = exports.Shader = exports.CanvasRenderTarget = exports.TextureUvs = exports.VideoBaseTexture = exports.BaseRenderTexture = exports.RenderTexture = exports.BaseTexture = exports.Texture = exports.Spritesheet = exports.CanvasGraphicsRenderer = exports.GraphicsRenderer = exports.GraphicsData = exports.Graphics = exports.TextMetrics = exports.TextStyle = exports.Text = exports.SpriteRenderer = exports.CanvasTinter = exports.CanvasSpriteRenderer = exports.Sprite = exports.TransformBase = exports.TransformStatic = exports.Transform = exports.Container = exports.DisplayObject = exports.Bounds = exports.glCore = exports.WebGLRenderer = exports.CanvasRenderer = exports.ticker = exports.utils = exports.settings = undefined; + +var _const = require('./const'); + +Object.keys(_const).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _const[key]; + } + }); +}); + +var _math = require('./math'); + +Object.keys(_math).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _math[key]; + } + }); +}); + +var _pixiGlCore = require('pixi-gl-core'); + +Object.defineProperty(exports, 'glCore', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_pixiGlCore).default; + } +}); + +var _Bounds = require('./display/Bounds'); + +Object.defineProperty(exports, 'Bounds', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Bounds).default; + } +}); + +var _DisplayObject = require('./display/DisplayObject'); + +Object.defineProperty(exports, 'DisplayObject', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_DisplayObject).default; + } +}); + +var _Container = require('./display/Container'); + +Object.defineProperty(exports, 'Container', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Container).default; + } +}); + +var _Transform = require('./display/Transform'); + +Object.defineProperty(exports, 'Transform', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Transform).default; + } +}); + +var _TransformStatic = require('./display/TransformStatic'); + +Object.defineProperty(exports, 'TransformStatic', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TransformStatic).default; + } +}); + +var _TransformBase = require('./display/TransformBase'); + +Object.defineProperty(exports, 'TransformBase', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TransformBase).default; + } +}); + +var _Sprite = require('./sprites/Sprite'); + +Object.defineProperty(exports, 'Sprite', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Sprite).default; + } +}); + +var _CanvasSpriteRenderer = require('./sprites/canvas/CanvasSpriteRenderer'); + +Object.defineProperty(exports, 'CanvasSpriteRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasSpriteRenderer).default; + } +}); + +var _CanvasTinter = require('./sprites/canvas/CanvasTinter'); + +Object.defineProperty(exports, 'CanvasTinter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasTinter).default; + } +}); + +var _SpriteRenderer = require('./sprites/webgl/SpriteRenderer'); + +Object.defineProperty(exports, 'SpriteRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_SpriteRenderer).default; + } +}); + +var _Text = require('./text/Text'); + +Object.defineProperty(exports, 'Text', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Text).default; + } +}); + +var _TextStyle = require('./text/TextStyle'); + +Object.defineProperty(exports, 'TextStyle', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TextStyle).default; + } +}); + +var _TextMetrics = require('./text/TextMetrics'); + +Object.defineProperty(exports, 'TextMetrics', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TextMetrics).default; + } +}); + +var _Graphics = require('./graphics/Graphics'); + +Object.defineProperty(exports, 'Graphics', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Graphics).default; + } +}); + +var _GraphicsData = require('./graphics/GraphicsData'); + +Object.defineProperty(exports, 'GraphicsData', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_GraphicsData).default; + } +}); + +var _GraphicsRenderer = require('./graphics/webgl/GraphicsRenderer'); + +Object.defineProperty(exports, 'GraphicsRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_GraphicsRenderer).default; + } +}); + +var _CanvasGraphicsRenderer = require('./graphics/canvas/CanvasGraphicsRenderer'); + +Object.defineProperty(exports, 'CanvasGraphicsRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasGraphicsRenderer).default; + } +}); + +var _Spritesheet = require('./textures/Spritesheet'); + +Object.defineProperty(exports, 'Spritesheet', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Spritesheet).default; + } +}); + +var _Texture = require('./textures/Texture'); + +Object.defineProperty(exports, 'Texture', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Texture).default; + } +}); + +var _BaseTexture = require('./textures/BaseTexture'); + +Object.defineProperty(exports, 'BaseTexture', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BaseTexture).default; + } +}); + +var _RenderTexture = require('./textures/RenderTexture'); + +Object.defineProperty(exports, 'RenderTexture', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_RenderTexture).default; + } +}); + +var _BaseRenderTexture = require('./textures/BaseRenderTexture'); + +Object.defineProperty(exports, 'BaseRenderTexture', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BaseRenderTexture).default; + } +}); + +var _VideoBaseTexture = require('./textures/VideoBaseTexture'); + +Object.defineProperty(exports, 'VideoBaseTexture', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_VideoBaseTexture).default; + } +}); + +var _TextureUvs = require('./textures/TextureUvs'); + +Object.defineProperty(exports, 'TextureUvs', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TextureUvs).default; + } +}); + +var _CanvasRenderTarget = require('./renderers/canvas/utils/CanvasRenderTarget'); + +Object.defineProperty(exports, 'CanvasRenderTarget', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasRenderTarget).default; + } +}); + +var _Shader = require('./Shader'); + +Object.defineProperty(exports, 'Shader', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Shader).default; + } +}); + +var _WebGLManager = require('./renderers/webgl/managers/WebGLManager'); + +Object.defineProperty(exports, 'WebGLManager', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_WebGLManager).default; + } +}); + +var _ObjectRenderer = require('./renderers/webgl/utils/ObjectRenderer'); + +Object.defineProperty(exports, 'ObjectRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_ObjectRenderer).default; + } +}); + +var _RenderTarget = require('./renderers/webgl/utils/RenderTarget'); + +Object.defineProperty(exports, 'RenderTarget', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_RenderTarget).default; + } +}); + +var _Quad = require('./renderers/webgl/utils/Quad'); + +Object.defineProperty(exports, 'Quad', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Quad).default; + } +}); + +var _SpriteMaskFilter = require('./renderers/webgl/filters/spriteMask/SpriteMaskFilter'); + +Object.defineProperty(exports, 'SpriteMaskFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_SpriteMaskFilter).default; + } +}); + +var _Filter = require('./renderers/webgl/filters/Filter'); + +Object.defineProperty(exports, 'Filter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Filter).default; + } +}); + +var _Application = require('./Application'); + +Object.defineProperty(exports, 'Application', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Application).default; + } +}); + +var _autoDetectRenderer = require('./autoDetectRenderer'); + +Object.defineProperty(exports, 'autoDetectRenderer', { + enumerable: true, + get: function get() { + return _autoDetectRenderer.autoDetectRenderer; + } +}); + +var _utils = require('./utils'); + +var utils = _interopRequireWildcard(_utils); + +var _ticker = require('./ticker'); + +var ticker = _interopRequireWildcard(_ticker); + +var _settings = require('./settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _CanvasRenderer = require('./renderers/canvas/CanvasRenderer'); + +var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); + +var _WebGLRenderer = require('./renderers/webgl/WebGLRenderer'); + +var _WebGLRenderer2 = _interopRequireDefault(_WebGLRenderer); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.settings = _settings2.default; +exports.utils = utils; +exports.ticker = ticker; +exports.CanvasRenderer = _CanvasRenderer2.default; +exports.WebGLRenderer = _WebGLRenderer2.default; /** + * @namespace PIXI + */ + +},{"./Application":43,"./Shader":44,"./autoDetectRenderer":45,"./const":46,"./display/Bounds":47,"./display/Container":48,"./display/DisplayObject":49,"./display/Transform":50,"./display/TransformBase":51,"./display/TransformStatic":52,"./graphics/Graphics":53,"./graphics/GraphicsData":54,"./graphics/canvas/CanvasGraphicsRenderer":55,"./graphics/webgl/GraphicsRenderer":57,"./math":70,"./renderers/canvas/CanvasRenderer":77,"./renderers/canvas/utils/CanvasRenderTarget":79,"./renderers/webgl/WebGLRenderer":84,"./renderers/webgl/filters/Filter":86,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":89,"./renderers/webgl/managers/WebGLManager":93,"./renderers/webgl/utils/ObjectRenderer":94,"./renderers/webgl/utils/Quad":95,"./renderers/webgl/utils/RenderTarget":96,"./settings":101,"./sprites/Sprite":102,"./sprites/canvas/CanvasSpriteRenderer":103,"./sprites/canvas/CanvasTinter":104,"./sprites/webgl/SpriteRenderer":106,"./text/Text":108,"./text/TextMetrics":109,"./text/TextStyle":110,"./textures/BaseRenderTexture":111,"./textures/BaseTexture":112,"./textures/RenderTexture":113,"./textures/Spritesheet":114,"./textures/Texture":115,"./textures/TextureUvs":116,"./textures/VideoBaseTexture":117,"./ticker":120,"./utils":124,"pixi-gl-core":7}],66:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Matrix = require('./Matrix'); + +var _Matrix2 = _interopRequireDefault(_Matrix); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ux = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1]; // Your friendly neighbour https://en.wikipedia.org/wiki/Dihedral_group of order 16 + +var uy = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1]; +var vx = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1]; +var vy = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1]; +var tempMatrices = []; + +var mul = []; + +function signum(x) { + if (x < 0) { + return -1; + } + if (x > 0) { + return 1; + } + + return 0; +} + +function init() { + for (var i = 0; i < 16; i++) { + var row = []; + + mul.push(row); + + for (var j = 0; j < 16; j++) { + var _ux = signum(ux[i] * ux[j] + vx[i] * uy[j]); + var _uy = signum(uy[i] * ux[j] + vy[i] * uy[j]); + var _vx = signum(ux[i] * vx[j] + vx[i] * vy[j]); + var _vy = signum(uy[i] * vx[j] + vy[i] * vy[j]); + + for (var k = 0; k < 16; k++) { + if (ux[k] === _ux && uy[k] === _uy && vx[k] === _vx && vy[k] === _vy) { + row.push(k); + break; + } + } + } + } + + for (var _i = 0; _i < 16; _i++) { + var mat = new _Matrix2.default(); + + mat.set(ux[_i], uy[_i], vx[_i], vy[_i], 0, 0); + tempMatrices.push(mat); + } +} + +init(); + +/** + * Implements Dihedral Group D_8, see [group D4]{@link http://mathworld.wolfram.com/DihedralGroupD4.html}, + * D8 is the same but with diagonals. Used for texture rotations. + * + * Vector xX(i), xY(i) is U-axis of sprite with rotation i + * Vector yY(i), yY(i) is V-axis of sprite with rotation i + * Rotations: 0 grad (0), 90 grad (2), 180 grad (4), 270 grad (6) + * Mirrors: vertical (8), main diagonal (10), horizontal (12), reverse diagonal (14) + * This is the small part of gameofbombs.com portal system. It works. + * + * @author Ivan @ivanpopelyshev + * @class + * @memberof PIXI + */ +var GroupD8 = { + E: 0, + SE: 1, + S: 2, + SW: 3, + W: 4, + NW: 5, + N: 6, + NE: 7, + MIRROR_VERTICAL: 8, + MIRROR_HORIZONTAL: 12, + uX: function uX(ind) { + return ux[ind]; + }, + uY: function uY(ind) { + return uy[ind]; + }, + vX: function vX(ind) { + return vx[ind]; + }, + vY: function vY(ind) { + return vy[ind]; + }, + inv: function inv(rotation) { + if (rotation & 8) { + return rotation & 15; + } + + return -rotation & 7; + }, + add: function add(rotationSecond, rotationFirst) { + return mul[rotationSecond][rotationFirst]; + }, + sub: function sub(rotationSecond, rotationFirst) { + return mul[rotationSecond][GroupD8.inv(rotationFirst)]; + }, + + /** + * Adds 180 degrees to rotation. Commutative operation. + * + * @memberof PIXI.GroupD8 + * @param {number} rotation - The number to rotate. + * @returns {number} rotated number + */ + rotate180: function rotate180(rotation) { + return rotation ^ 4; + }, + + /** + * I dont know why sometimes width and heights needs to be swapped. We'll fix it later. + * + * @memberof PIXI.GroupD8 + * @param {number} rotation - The number to check. + * @returns {boolean} Whether or not the width/height should be swapped. + */ + isSwapWidthHeight: function isSwapWidthHeight(rotation) { + return (rotation & 3) === 2; + }, + + /** + * @memberof PIXI.GroupD8 + * @param {number} dx - TODO + * @param {number} dy - TODO + * + * @return {number} TODO + */ + byDirection: function byDirection(dx, dy) { + if (Math.abs(dx) * 2 <= Math.abs(dy)) { + if (dy >= 0) { + return GroupD8.S; + } + + return GroupD8.N; + } else if (Math.abs(dy) * 2 <= Math.abs(dx)) { + if (dx > 0) { + return GroupD8.E; + } + + return GroupD8.W; + } else if (dy > 0) { + if (dx > 0) { + return GroupD8.SE; + } + + return GroupD8.SW; + } else if (dx > 0) { + return GroupD8.NE; + } + + return GroupD8.NW; + }, + + /** + * Helps sprite to compensate texture packer rotation. + * + * @memberof PIXI.GroupD8 + * @param {PIXI.Matrix} matrix - sprite world matrix + * @param {number} rotation - The rotation factor to use. + * @param {number} tx - sprite anchoring + * @param {number} ty - sprite anchoring + */ + matrixAppendRotationInv: function matrixAppendRotationInv(matrix, rotation) { + var tx = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var ty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + // Packer used "rotation", we use "inv(rotation)" + var mat = tempMatrices[GroupD8.inv(rotation)]; + + mat.tx = tx; + mat.ty = ty; + matrix.append(mat); + } +}; + +exports.default = GroupD8; + +},{"./Matrix":67}],67:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _Point = require('./Point'); + +var _Point2 = _interopRequireDefault(_Point); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The PixiJS Matrix class as an object, which makes it a lot faster, + * here is a representation of it : + * | a | b | tx| + * | c | d | ty| + * | 0 | 0 | 1 | + * + * @class + * @memberof PIXI + */ +var Matrix = function () { + /** + * @param {number} [a=1] - x scale + * @param {number} [b=0] - y skew + * @param {number} [c=0] - x skew + * @param {number} [d=1] - y scale + * @param {number} [tx=0] - x translation + * @param {number} [ty=0] - y translation + */ + function Matrix() { + var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var c = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var d = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + var tx = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var ty = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; + + _classCallCheck(this, Matrix); + + /** + * @member {number} + * @default 1 + */ + this.a = a; + + /** + * @member {number} + * @default 0 + */ + this.b = b; + + /** + * @member {number} + * @default 0 + */ + this.c = c; + + /** + * @member {number} + * @default 1 + */ + this.d = d; + + /** + * @member {number} + * @default 0 + */ + this.tx = tx; + + /** + * @member {number} + * @default 0 + */ + this.ty = ty; + + this.array = null; + } + + /** + * Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows: + * + * a = array[0] + * b = array[1] + * c = array[3] + * d = array[4] + * tx = array[2] + * ty = array[5] + * + * @param {number[]} array - The array that the matrix will be populated from. + */ + + + Matrix.prototype.fromArray = function fromArray(array) { + this.a = array[0]; + this.b = array[1]; + this.c = array[3]; + this.d = array[4]; + this.tx = array[2]; + this.ty = array[5]; + }; + + /** + * sets the matrix properties + * + * @param {number} a - Matrix component + * @param {number} b - Matrix component + * @param {number} c - Matrix component + * @param {number} d - Matrix component + * @param {number} tx - Matrix component + * @param {number} ty - Matrix component + * + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.set = function set(a, b, c, d, tx, ty) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + this.tx = tx; + this.ty = ty; + + return this; + }; + + /** + * Creates an array from the current Matrix object. + * + * @param {boolean} transpose - Whether we need to transpose the matrix or not + * @param {Float32Array} [out=new Float32Array(9)] - If provided the array will be assigned to out + * @return {number[]} the newly created array which contains the matrix + */ + + + Matrix.prototype.toArray = function toArray(transpose, out) { + if (!this.array) { + this.array = new Float32Array(9); + } + + var array = out || this.array; + + if (transpose) { + array[0] = this.a; + array[1] = this.b; + array[2] = 0; + array[3] = this.c; + array[4] = this.d; + array[5] = 0; + array[6] = this.tx; + array[7] = this.ty; + array[8] = 1; + } else { + array[0] = this.a; + array[1] = this.c; + array[2] = this.tx; + array[3] = this.b; + array[4] = this.d; + array[5] = this.ty; + array[6] = 0; + array[7] = 0; + array[8] = 1; + } + + return array; + }; + + /** + * Get a new position with the current transformation applied. + * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering) + * + * @param {PIXI.Point} pos - The origin + * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input) + * @return {PIXI.Point} The new point, transformed through this matrix + */ + + + Matrix.prototype.apply = function apply(pos, newPos) { + newPos = newPos || new _Point2.default(); + + var x = pos.x; + var y = pos.y; + + newPos.x = this.a * x + this.c * y + this.tx; + newPos.y = this.b * x + this.d * y + this.ty; + + return newPos; + }; + + /** + * Get a new position with the inverse of the current transformation applied. + * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input) + * + * @param {PIXI.Point} pos - The origin + * @param {PIXI.Point} [newPos] - The point that the new position is assigned to (allowed to be same as input) + * @return {PIXI.Point} The new point, inverse-transformed through this matrix + */ + + + Matrix.prototype.applyInverse = function applyInverse(pos, newPos) { + newPos = newPos || new _Point2.default(); + + var id = 1 / (this.a * this.d + this.c * -this.b); + + var x = pos.x; + var y = pos.y; + + newPos.x = this.d * id * x + -this.c * id * y + (this.ty * this.c - this.tx * this.d) * id; + newPos.y = this.a * id * y + -this.b * id * x + (-this.ty * this.a + this.tx * this.b) * id; + + return newPos; + }; + + /** + * Translates the matrix on the x and y. + * + * @param {number} x How much to translate x by + * @param {number} y How much to translate y by + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.translate = function translate(x, y) { + this.tx += x; + this.ty += y; + + return this; + }; + + /** + * Applies a scale transformation to the matrix. + * + * @param {number} x The amount to scale horizontally + * @param {number} y The amount to scale vertically + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.scale = function scale(x, y) { + this.a *= x; + this.d *= y; + this.c *= x; + this.b *= y; + this.tx *= x; + this.ty *= y; + + return this; + }; + + /** + * Applies a rotation transformation to the matrix. + * + * @param {number} angle - The angle in radians. + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.rotate = function rotate(angle) { + var cos = Math.cos(angle); + var sin = Math.sin(angle); + + var a1 = this.a; + var c1 = this.c; + var tx1 = this.tx; + + this.a = a1 * cos - this.b * sin; + this.b = a1 * sin + this.b * cos; + this.c = c1 * cos - this.d * sin; + this.d = c1 * sin + this.d * cos; + this.tx = tx1 * cos - this.ty * sin; + this.ty = tx1 * sin + this.ty * cos; + + return this; + }; + + /** + * Appends the given Matrix to this Matrix. + * + * @param {PIXI.Matrix} matrix - The matrix to append. + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.append = function append(matrix) { + var a1 = this.a; + var b1 = this.b; + var c1 = this.c; + var d1 = this.d; + + this.a = matrix.a * a1 + matrix.b * c1; + this.b = matrix.a * b1 + matrix.b * d1; + this.c = matrix.c * a1 + matrix.d * c1; + this.d = matrix.c * b1 + matrix.d * d1; + + this.tx = matrix.tx * a1 + matrix.ty * c1 + this.tx; + this.ty = matrix.tx * b1 + matrix.ty * d1 + this.ty; + + return this; + }; + + /** + * Sets the matrix based on all the available properties + * + * @param {number} x - Position on the x axis + * @param {number} y - Position on the y axis + * @param {number} pivotX - Pivot on the x axis + * @param {number} pivotY - Pivot on the y axis + * @param {number} scaleX - Scale on the x axis + * @param {number} scaleY - Scale on the y axis + * @param {number} rotation - Rotation in radians + * @param {number} skewX - Skew on the x axis + * @param {number} skewY - Skew on the y axis + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.setTransform = function setTransform(x, y, pivotX, pivotY, scaleX, scaleY, rotation, skewX, skewY) { + var sr = Math.sin(rotation); + var cr = Math.cos(rotation); + var cy = Math.cos(skewY); + var sy = Math.sin(skewY); + var nsx = -Math.sin(skewX); + var cx = Math.cos(skewX); + + var a = cr * scaleX; + var b = sr * scaleX; + var c = -sr * scaleY; + var d = cr * scaleY; + + this.a = cy * a + sy * c; + this.b = cy * b + sy * d; + this.c = nsx * a + cx * c; + this.d = nsx * b + cx * d; + + this.tx = x + (pivotX * a + pivotY * c); + this.ty = y + (pivotX * b + pivotY * d); + + return this; + }; + + /** + * Prepends the given Matrix to this Matrix. + * + * @param {PIXI.Matrix} matrix - The matrix to prepend + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.prepend = function prepend(matrix) { + var tx1 = this.tx; + + if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1) { + var a1 = this.a; + var c1 = this.c; + + this.a = a1 * matrix.a + this.b * matrix.c; + this.b = a1 * matrix.b + this.b * matrix.d; + this.c = c1 * matrix.a + this.d * matrix.c; + this.d = c1 * matrix.b + this.d * matrix.d; + } + + this.tx = tx1 * matrix.a + this.ty * matrix.c + matrix.tx; + this.ty = tx1 * matrix.b + this.ty * matrix.d + matrix.ty; + + return this; + }; + + /** + * Decomposes the matrix (x, y, scaleX, scaleY, and rotation) and sets the properties on to a transform. + * + * @param {PIXI.Transform|PIXI.TransformStatic} transform - The transform to apply the properties to. + * @return {PIXI.Transform|PIXI.TransformStatic} The transform with the newly applied properties + */ + + + Matrix.prototype.decompose = function decompose(transform) { + // sort out rotation / skew.. + var a = this.a; + var b = this.b; + var c = this.c; + var d = this.d; + + var skewX = -Math.atan2(-c, d); + var skewY = Math.atan2(b, a); + + var delta = Math.abs(skewX + skewY); + + if (delta < 0.00001) { + transform.rotation = skewY; + + if (a < 0 && d >= 0) { + transform.rotation += transform.rotation <= 0 ? Math.PI : -Math.PI; + } + + transform.skew.x = transform.skew.y = 0; + } else { + transform.skew.x = skewX; + transform.skew.y = skewY; + } + + // next set scale + transform.scale.x = Math.sqrt(a * a + b * b); + transform.scale.y = Math.sqrt(c * c + d * d); + + // next set position + transform.position.x = this.tx; + transform.position.y = this.ty; + + return transform; + }; + + /** + * Inverts this matrix + * + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.invert = function invert() { + var a1 = this.a; + var b1 = this.b; + var c1 = this.c; + var d1 = this.d; + var tx1 = this.tx; + var n = a1 * d1 - b1 * c1; + + this.a = d1 / n; + this.b = -b1 / n; + this.c = -c1 / n; + this.d = a1 / n; + this.tx = (c1 * this.ty - d1 * tx1) / n; + this.ty = -(a1 * this.ty - b1 * tx1) / n; + + return this; + }; + + /** + * Resets this Matix to an identity (default) matrix. + * + * @return {PIXI.Matrix} This matrix. Good for chaining method calls. + */ + + + Matrix.prototype.identity = function identity() { + this.a = 1; + this.b = 0; + this.c = 0; + this.d = 1; + this.tx = 0; + this.ty = 0; + + return this; + }; + + /** + * Creates a new Matrix object with the same values as this one. + * + * @return {PIXI.Matrix} A copy of this matrix. Good for chaining method calls. + */ + + + Matrix.prototype.clone = function clone() { + var matrix = new Matrix(); + + matrix.a = this.a; + matrix.b = this.b; + matrix.c = this.c; + matrix.d = this.d; + matrix.tx = this.tx; + matrix.ty = this.ty; + + return matrix; + }; + + /** + * Changes the values of the given matrix to be the same as the ones in this matrix + * + * @param {PIXI.Matrix} matrix - The matrix to copy from. + * @return {PIXI.Matrix} The matrix given in parameter with its values updated. + */ + + + Matrix.prototype.copy = function copy(matrix) { + matrix.a = this.a; + matrix.b = this.b; + matrix.c = this.c; + matrix.d = this.d; + matrix.tx = this.tx; + matrix.ty = this.ty; + + return matrix; + }; + + /** + * A default (identity) matrix + * + * @static + * @const + */ + + + _createClass(Matrix, null, [{ + key: 'IDENTITY', + get: function get() { + return new Matrix(); + } + + /** + * A temp matrix + * + * @static + * @const + */ + + }, { + key: 'TEMP_MATRIX', + get: function get() { + return new Matrix(); + } + }]); + + return Matrix; +}(); + +exports.default = Matrix; + +},{"./Point":69}],68:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The Point object represents a location in a two-dimensional coordinate system, where x represents + * the horizontal axis and y represents the vertical axis. + * An observable point is a point that triggers a callback when the point's position is changed. + * + * @class + * @memberof PIXI + */ +var ObservablePoint = function () { + /** + * @param {Function} cb - callback when changed + * @param {object} scope - owner of callback + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + function ObservablePoint(cb, scope) { + var x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + _classCallCheck(this, ObservablePoint); + + this._x = x; + this._y = y; + + this.cb = cb; + this.scope = scope; + } + + /** + * Sets the point to a new x and y position. + * If y is omitted, both x and y will be set to x. + * + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + + + ObservablePoint.prototype.set = function set(x, y) { + var _x = x || 0; + var _y = y || (y !== 0 ? _x : 0); + + if (this._x !== _x || this._y !== _y) { + this._x = _x; + this._y = _y; + this.cb.call(this.scope); + } + }; + + /** + * Copies the data from another point + * + * @param {PIXI.Point|PIXI.ObservablePoint} point - point to copy from + */ + + + ObservablePoint.prototype.copy = function copy(point) { + if (this._x !== point.x || this._y !== point.y) { + this._x = point.x; + this._y = point.y; + this.cb.call(this.scope); + } + }; + + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * + * @member {number} + */ + + + _createClass(ObservablePoint, [{ + key: "x", + get: function get() { + return this._x; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (this._x !== value) { + this._x = value; + this.cb.call(this.scope); + } + } + + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * + * @member {number} + */ + + }, { + key: "y", + get: function get() { + return this._y; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (this._y !== value) { + this._y = value; + this.cb.call(this.scope); + } + } + }]); + + return ObservablePoint; +}(); + +exports.default = ObservablePoint; + +},{}],69:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The Point object represents a location in a two-dimensional coordinate system, where x represents + * the horizontal axis and y represents the vertical axis. + * + * @class + * @memberof PIXI + */ +var Point = function () { + /** + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + function Point() { + var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + _classCallCheck(this, Point); + + /** + * @member {number} + * @default 0 + */ + this.x = x; + + /** + * @member {number} + * @default 0 + */ + this.y = y; + } + + /** + * Creates a clone of this point + * + * @return {PIXI.Point} a copy of the point + */ + + + Point.prototype.clone = function clone() { + return new Point(this.x, this.y); + }; + + /** + * Copies x and y from the given point + * + * @param {PIXI.Point} p - The point to copy. + */ + + + Point.prototype.copy = function copy(p) { + this.set(p.x, p.y); + }; + + /** + * Returns true if the given point is equal to this point + * + * @param {PIXI.Point} p - The point to check + * @returns {boolean} Whether the given point equal to this point + */ + + + Point.prototype.equals = function equals(p) { + return p.x === this.x && p.y === this.y; + }; + + /** + * Sets the point to a new x and y position. + * If y is omitted, both x and y will be set to x. + * + * @param {number} [x=0] - position of the point on the x axis + * @param {number} [y=0] - position of the point on the y axis + */ + + + Point.prototype.set = function set(x, y) { + this.x = x || 0; + this.y = y || (y !== 0 ? this.x : 0); + }; + + return Point; +}(); + +exports.default = Point; + +},{}],70:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Point = require('./Point'); + +Object.defineProperty(exports, 'Point', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Point).default; + } +}); + +var _ObservablePoint = require('./ObservablePoint'); + +Object.defineProperty(exports, 'ObservablePoint', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_ObservablePoint).default; + } +}); + +var _Matrix = require('./Matrix'); + +Object.defineProperty(exports, 'Matrix', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Matrix).default; + } +}); + +var _GroupD = require('./GroupD8'); + +Object.defineProperty(exports, 'GroupD8', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_GroupD).default; + } +}); + +var _Circle = require('./shapes/Circle'); + +Object.defineProperty(exports, 'Circle', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Circle).default; + } +}); + +var _Ellipse = require('./shapes/Ellipse'); + +Object.defineProperty(exports, 'Ellipse', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Ellipse).default; + } +}); + +var _Polygon = require('./shapes/Polygon'); + +Object.defineProperty(exports, 'Polygon', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Polygon).default; + } +}); + +var _Rectangle = require('./shapes/Rectangle'); + +Object.defineProperty(exports, 'Rectangle', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Rectangle).default; + } +}); + +var _RoundedRectangle = require('./shapes/RoundedRectangle'); + +Object.defineProperty(exports, 'RoundedRectangle', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_RoundedRectangle).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./GroupD8":66,"./Matrix":67,"./ObservablePoint":68,"./Point":69,"./shapes/Circle":71,"./shapes/Ellipse":72,"./shapes/Polygon":73,"./shapes/Rectangle":74,"./shapes/RoundedRectangle":75}],71:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Rectangle = require('./Rectangle'); + +var _Rectangle2 = _interopRequireDefault(_Rectangle); + +var _const = require('../../const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The Circle object can be used to specify a hit area for displayObjects + * + * @class + * @memberof PIXI + */ +var Circle = function () { + /** + * @param {number} [x=0] - The X coordinate of the center of this circle + * @param {number} [y=0] - The Y coordinate of the center of this circle + * @param {number} [radius=0] - The radius of the circle + */ + function Circle() { + var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var radius = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + + _classCallCheck(this, Circle); + + /** + * @member {number} + * @default 0 + */ + this.x = x; + + /** + * @member {number} + * @default 0 + */ + this.y = y; + + /** + * @member {number} + * @default 0 + */ + this.radius = radius; + + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.CIRC + * @see PIXI.SHAPES + */ + this.type = _const.SHAPES.CIRC; + } + + /** + * Creates a clone of this Circle instance + * + * @return {PIXI.Circle} a copy of the Circle + */ + + + Circle.prototype.clone = function clone() { + return new Circle(this.x, this.y, this.radius); + }; + + /** + * Checks whether the x and y coordinates given are contained within this circle + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this Circle + */ + + + Circle.prototype.contains = function contains(x, y) { + if (this.radius <= 0) { + return false; + } + + var r2 = this.radius * this.radius; + var dx = this.x - x; + var dy = this.y - y; + + dx *= dx; + dy *= dy; + + return dx + dy <= r2; + }; + + /** + * Returns the framing rectangle of the circle as a Rectangle object + * + * @return {PIXI.Rectangle} the framing rectangle + */ + + + Circle.prototype.getBounds = function getBounds() { + return new _Rectangle2.default(this.x - this.radius, this.y - this.radius, this.radius * 2, this.radius * 2); + }; + + return Circle; +}(); + +exports.default = Circle; + +},{"../../const":46,"./Rectangle":74}],72:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Rectangle = require('./Rectangle'); + +var _Rectangle2 = _interopRequireDefault(_Rectangle); + +var _const = require('../../const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The Ellipse object can be used to specify a hit area for displayObjects + * + * @class + * @memberof PIXI + */ +var Ellipse = function () { + /** + * @param {number} [x=0] - The X coordinate of the center of this circle + * @param {number} [y=0] - The Y coordinate of the center of this circle + * @param {number} [width=0] - The half width of this ellipse + * @param {number} [height=0] - The half height of this ellipse + */ + function Ellipse() { + var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + _classCallCheck(this, Ellipse); + + /** + * @member {number} + * @default 0 + */ + this.x = x; + + /** + * @member {number} + * @default 0 + */ + this.y = y; + + /** + * @member {number} + * @default 0 + */ + this.width = width; + + /** + * @member {number} + * @default 0 + */ + this.height = height; + + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.ELIP + * @see PIXI.SHAPES + */ + this.type = _const.SHAPES.ELIP; + } + + /** + * Creates a clone of this Ellipse instance + * + * @return {PIXI.Ellipse} a copy of the ellipse + */ + + + Ellipse.prototype.clone = function clone() { + return new Ellipse(this.x, this.y, this.width, this.height); + }; + + /** + * Checks whether the x and y coordinates given are contained within this ellipse + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coords are within this ellipse + */ + + + Ellipse.prototype.contains = function contains(x, y) { + if (this.width <= 0 || this.height <= 0) { + return false; + } + + // normalize the coords to an ellipse with center 0,0 + var normx = (x - this.x) / this.width; + var normy = (y - this.y) / this.height; + + normx *= normx; + normy *= normy; + + return normx + normy <= 1; + }; + + /** + * Returns the framing rectangle of the ellipse as a Rectangle object + * + * @return {PIXI.Rectangle} the framing rectangle + */ + + + Ellipse.prototype.getBounds = function getBounds() { + return new _Rectangle2.default(this.x - this.width, this.y - this.height, this.width, this.height); + }; + + return Ellipse; +}(); + +exports.default = Ellipse; + +},{"../../const":46,"./Rectangle":74}],73:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Point = require('../Point'); + +var _Point2 = _interopRequireDefault(_Point); + +var _const = require('../../const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @class + * @memberof PIXI + */ +var Polygon = function () { + /** + * @param {PIXI.Point[]|number[]} points - This can be an array of Points + * that form the polygon, a flat array of numbers that will be interpreted as [x,y, x,y, ...], or + * the arguments passed can be all the points of the polygon e.g. + * `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the arguments passed can be flat + * x,y values e.g. `new Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are Numbers. + */ + function Polygon() { + for (var _len = arguments.length, points = Array(_len), _key = 0; _key < _len; _key++) { + points[_key] = arguments[_key]; + } + + _classCallCheck(this, Polygon); + + if (Array.isArray(points[0])) { + points = points[0]; + } + + // if this is an array of points, convert it to a flat array of numbers + if (points[0] instanceof _Point2.default) { + var p = []; + + for (var i = 0, il = points.length; i < il; i++) { + p.push(points[i].x, points[i].y); + } + + points = p; + } + + this.closed = true; + + /** + * An array of the points of this polygon + * + * @member {number[]} + */ + this.points = points; + + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.POLY + * @see PIXI.SHAPES + */ + this.type = _const.SHAPES.POLY; + } + + /** + * Creates a clone of this polygon + * + * @return {PIXI.Polygon} a copy of the polygon + */ + + + Polygon.prototype.clone = function clone() { + return new Polygon(this.points.slice()); + }; + + /** + * Closes the polygon, adding points if necessary. + * + */ + + + Polygon.prototype.close = function close() { + var points = this.points; + + // close the poly if the value is true! + if (points[0] !== points[points.length - 2] || points[1] !== points[points.length - 1]) { + points.push(points[0], points[1]); + } + }; + + /** + * Checks whether the x and y coordinates passed to this function are contained within this polygon + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this polygon + */ + + + Polygon.prototype.contains = function contains(x, y) { + var inside = false; + + // use some raycasting to test hits + // https://github.com/substack/point-in-polygon/blob/master/index.js + var length = this.points.length / 2; + + for (var i = 0, j = length - 1; i < length; j = i++) { + var xi = this.points[i * 2]; + var yi = this.points[i * 2 + 1]; + var xj = this.points[j * 2]; + var yj = this.points[j * 2 + 1]; + var intersect = yi > y !== yj > y && x < (xj - xi) * ((y - yi) / (yj - yi)) + xi; + + if (intersect) { + inside = !inside; + } + } + + return inside; + }; + + return Polygon; +}(); + +exports.default = Polygon; + +},{"../../const":46,"../Point":69}],74:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _const = require('../../const'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Rectangle object is an area defined by its position, as indicated by its top-left corner + * point (x, y) and by its width and its height. + * + * @class + * @memberof PIXI + */ +var Rectangle = function () { + /** + * @param {number} [x=0] - The X coordinate of the upper-left corner of the rectangle + * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rectangle + * @param {number} [width=0] - The overall width of this rectangle + * @param {number} [height=0] - The overall height of this rectangle + */ + function Rectangle() { + var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + _classCallCheck(this, Rectangle); + + /** + * @member {number} + * @default 0 + */ + this.x = Number(x); + + /** + * @member {number} + * @default 0 + */ + this.y = Number(y); + + /** + * @member {number} + * @default 0 + */ + this.width = Number(width); + + /** + * @member {number} + * @default 0 + */ + this.height = Number(height); + + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readOnly + * @default PIXI.SHAPES.RECT + * @see PIXI.SHAPES + */ + this.type = _const.SHAPES.RECT; + } + + /** + * returns the left edge of the rectangle + * + * @member {number} + */ + + + /** + * Creates a clone of this Rectangle + * + * @return {PIXI.Rectangle} a copy of the rectangle + */ + Rectangle.prototype.clone = function clone() { + return new Rectangle(this.x, this.y, this.width, this.height); + }; + + /** + * Copies another rectangle to this one. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to copy. + * @return {PIXI.Rectangle} Returns itself. + */ + + + Rectangle.prototype.copy = function copy(rectangle) { + this.x = rectangle.x; + this.y = rectangle.y; + this.width = rectangle.width; + this.height = rectangle.height; + + return this; + }; + + /** + * Checks whether the x and y coordinates given are contained within this Rectangle + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this Rectangle + */ + + + Rectangle.prototype.contains = function contains(x, y) { + if (this.width <= 0 || this.height <= 0) { + return false; + } + + if (x >= this.x && x < this.x + this.width) { + if (y >= this.y && y < this.y + this.height) { + return true; + } + } + + return false; + }; + + /** + * Pads the rectangle making it grow in all directions. + * + * @param {number} paddingX - The horizontal padding amount. + * @param {number} paddingY - The vertical padding amount. + */ + + + Rectangle.prototype.pad = function pad(paddingX, paddingY) { + paddingX = paddingX || 0; + paddingY = paddingY || (paddingY !== 0 ? paddingX : 0); + + this.x -= paddingX; + this.y -= paddingY; + + this.width += paddingX * 2; + this.height += paddingY * 2; + }; + + /** + * Fits this rectangle around the passed one. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to fit. + */ + + + Rectangle.prototype.fit = function fit(rectangle) { + if (this.x < rectangle.x) { + this.width += this.x; + if (this.width < 0) { + this.width = 0; + } + + this.x = rectangle.x; + } + + if (this.y < rectangle.y) { + this.height += this.y; + if (this.height < 0) { + this.height = 0; + } + this.y = rectangle.y; + } + + if (this.x + this.width > rectangle.x + rectangle.width) { + this.width = rectangle.width - this.x; + if (this.width < 0) { + this.width = 0; + } + } + + if (this.y + this.height > rectangle.y + rectangle.height) { + this.height = rectangle.height - this.y; + if (this.height < 0) { + this.height = 0; + } + } + }; + + /** + * Enlarges this rectangle to include the passed rectangle. + * + * @param {PIXI.Rectangle} rectangle - The rectangle to include. + */ + + + Rectangle.prototype.enlarge = function enlarge(rectangle) { + var x1 = Math.min(this.x, rectangle.x); + var x2 = Math.max(this.x + this.width, rectangle.x + rectangle.width); + var y1 = Math.min(this.y, rectangle.y); + var y2 = Math.max(this.y + this.height, rectangle.y + rectangle.height); + + this.x = x1; + this.width = x2 - x1; + this.y = y1; + this.height = y2 - y1; + }; + + _createClass(Rectangle, [{ + key: 'left', + get: function get() { + return this.x; + } + + /** + * returns the right edge of the rectangle + * + * @member {number} + */ + + }, { + key: 'right', + get: function get() { + return this.x + this.width; + } + + /** + * returns the top edge of the rectangle + * + * @member {number} + */ + + }, { + key: 'top', + get: function get() { + return this.y; + } + + /** + * returns the bottom edge of the rectangle + * + * @member {number} + */ + + }, { + key: 'bottom', + get: function get() { + return this.y + this.height; + } + + /** + * A constant empty rectangle. + * + * @static + * @constant + */ + + }], [{ + key: 'EMPTY', + get: function get() { + return new Rectangle(0, 0, 0, 0); + } + }]); + + return Rectangle; +}(); + +exports.default = Rectangle; + +},{"../../const":46}],75:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _const = require('../../const'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The Rounded Rectangle object is an area that has nice rounded corners, as indicated by its + * top-left corner point (x, y) and by its width and its height and its radius. + * + * @class + * @memberof PIXI + */ +var RoundedRectangle = function () { + /** + * @param {number} [x=0] - The X coordinate of the upper-left corner of the rounded rectangle + * @param {number} [y=0] - The Y coordinate of the upper-left corner of the rounded rectangle + * @param {number} [width=0] - The overall width of this rounded rectangle + * @param {number} [height=0] - The overall height of this rounded rectangle + * @param {number} [radius=20] - Controls the radius of the rounded corners + */ + function RoundedRectangle() { + var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var radius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 20; + + _classCallCheck(this, RoundedRectangle); + + /** + * @member {number} + * @default 0 + */ + this.x = x; + + /** + * @member {number} + * @default 0 + */ + this.y = y; + + /** + * @member {number} + * @default 0 + */ + this.width = width; + + /** + * @member {number} + * @default 0 + */ + this.height = height; + + /** + * @member {number} + * @default 20 + */ + this.radius = radius; + + /** + * The type of the object, mainly used to avoid `instanceof` checks + * + * @member {number} + * @readonly + * @default PIXI.SHAPES.RREC + * @see PIXI.SHAPES + */ + this.type = _const.SHAPES.RREC; + } + + /** + * Creates a clone of this Rounded Rectangle + * + * @return {PIXI.RoundedRectangle} a copy of the rounded rectangle + */ + + + RoundedRectangle.prototype.clone = function clone() { + return new RoundedRectangle(this.x, this.y, this.width, this.height, this.radius); + }; + + /** + * Checks whether the x and y coordinates given are contained within this Rounded Rectangle + * + * @param {number} x - The X coordinate of the point to test + * @param {number} y - The Y coordinate of the point to test + * @return {boolean} Whether the x/y coordinates are within this Rounded Rectangle + */ + + + RoundedRectangle.prototype.contains = function contains(x, y) { + if (this.width <= 0 || this.height <= 0) { + return false; + } + if (x >= this.x && x <= this.x + this.width) { + if (y >= this.y && y <= this.y + this.height) { + if (y >= this.y + this.radius && y <= this.y + this.height - this.radius || x >= this.x + this.radius && x <= this.x + this.width - this.radius) { + return true; + } + var dx = x - (this.x + this.radius); + var dy = y - (this.y + this.radius); + var radius2 = this.radius * this.radius; + + if (dx * dx + dy * dy <= radius2) { + return true; + } + dx = x - (this.x + this.width - this.radius); + if (dx * dx + dy * dy <= radius2) { + return true; + } + dy = y - (this.y + this.height - this.radius); + if (dx * dx + dy * dy <= radius2) { + return true; + } + dx = x - (this.x + this.radius); + if (dx * dx + dy * dy <= radius2) { + return true; + } + } + } + + return false; + }; + + return RoundedRectangle; +}(); + +exports.default = RoundedRectangle; + +},{"../../const":46}],76:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _utils = require('../utils'); + +var _math = require('../math'); + +var _const = require('../const'); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _Container = require('../display/Container'); + +var _Container2 = _interopRequireDefault(_Container); + +var _RenderTexture = require('../textures/RenderTexture'); + +var _RenderTexture2 = _interopRequireDefault(_RenderTexture); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var tempMatrix = new _math.Matrix(); + +/** + * The SystemRenderer is the base for a PixiJS Renderer. It is extended by the {@link PIXI.CanvasRenderer} + * and {@link PIXI.WebGLRenderer} which can be used for rendering a PixiJS scene. + * + * @abstract + * @class + * @extends EventEmitter + * @memberof PIXI + */ + +var SystemRenderer = function (_EventEmitter) { + _inherits(SystemRenderer, _EventEmitter); + + // eslint-disable-next-line valid-jsdoc + /** + * @param {string} system - The name of the system this renderer is for. + * @param {object} [options] - The optional renderer parameters + * @param {number} [options.width=800] - the width of the screen + * @param {number} [options.height=600] - the height of the screen + * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional + * @param {boolean} [options.transparent=false] - If the render view is transparent, default false + * @param {boolean} [options.autoResize=false] - If the render view is automatically resized, default false + * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment) + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. The + * resolution of the renderer retina would be 2. + * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, + * enable this if you need to call toDataUrl on the webgl context. + * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or + * not before the new render pass. + * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area + * (shown if not transparent). + * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering, + * stopping pixel interpolation. + */ + function SystemRenderer(system, options, arg2, arg3) { + _classCallCheck(this, SystemRenderer); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + (0, _utils.sayHello)(system); + + // Support for constructor(system, screenWidth, screenHeight, options) + if (typeof options === 'number') { + options = Object.assign({ + width: options, + height: arg2 || _settings2.default.RENDER_OPTIONS.height + }, arg3); + } + + // Add the default render options + options = Object.assign({}, _settings2.default.RENDER_OPTIONS, options); + + /** + * The supplied constructor options. + * + * @member {Object} + * @readOnly + */ + _this.options = options; + + /** + * The type of the renderer. + * + * @member {number} + * @default PIXI.RENDERER_TYPE.UNKNOWN + * @see PIXI.RENDERER_TYPE + */ + _this.type = _const.RENDERER_TYPE.UNKNOWN; + + /** + * Measurements of the screen. (0, 0, screenWidth, screenHeight) + * + * Its safe to use as filterArea or hitArea for whole stage + * + * @member {PIXI.Rectangle} + */ + _this.screen = new _math.Rectangle(0, 0, options.width, options.height); + + /** + * The canvas element that everything is drawn to + * + * @member {HTMLCanvasElement} + */ + _this.view = options.view || document.createElement('canvas'); + + /** + * The resolution / device pixel ratio of the renderer + * + * @member {number} + * @default 1 + */ + _this.resolution = options.resolution || _settings2.default.RESOLUTION; + + /** + * Whether the render view is transparent + * + * @member {boolean} + */ + _this.transparent = options.transparent; + + /** + * Whether css dimensions of canvas view should be resized to screen dimensions automatically + * + * @member {boolean} + */ + _this.autoResize = options.autoResize || false; + + /** + * Tracks the blend modes useful for this renderer. + * + * @member {object} + */ + _this.blendModes = null; + + /** + * The value of the preserveDrawingBuffer flag affects whether or not the contents of + * the stencil buffer is retained after rendering. + * + * @member {boolean} + */ + _this.preserveDrawingBuffer = options.preserveDrawingBuffer; + + /** + * This sets if the CanvasRenderer will clear the canvas or not before the new render pass. + * If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every + * frame to set the canvas background color. If the scene is transparent PixiJS will use clearRect + * to clear the canvas every frame. Disable this by setting this to false. For example if + * your game has a canvas filling background image you often don't need this set. + * + * @member {boolean} + * @default + */ + _this.clearBeforeRender = options.clearBeforeRender; + + /** + * If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation. + * Handy for crisp pixel art and speed on legacy devices. + * + * @member {boolean} + */ + _this.roundPixels = options.roundPixels; + + /** + * The background color as a number. + * + * @member {number} + * @private + */ + _this._backgroundColor = 0x000000; + + /** + * The background color as an [R, G, B] array. + * + * @member {number[]} + * @private + */ + _this._backgroundColorRgba = [0, 0, 0, 0]; + + /** + * The background color as a string. + * + * @member {string} + * @private + */ + _this._backgroundColorString = '#000000'; + + _this.backgroundColor = options.backgroundColor || _this._backgroundColor; // run bg color setter + + /** + * This temporary display object used as the parent of the currently being rendered item + * + * @member {PIXI.DisplayObject} + * @private + */ + _this._tempDisplayObjectParent = new _Container2.default(); + + /** + * The last root object that the renderer tried to render. + * + * @member {PIXI.DisplayObject} + * @private + */ + _this._lastObjectRendered = _this._tempDisplayObjectParent; + return _this; + } + + /** + * Same as view.width, actual number of pixels in the canvas by horizontal + * + * @member {number} + * @readonly + * @default 800 + */ + + + /** + * Resizes the screen and canvas to the specified width and height + * Canvas dimensions are multiplied by resolution + * + * @param {number} screenWidth - the new width of the screen + * @param {number} screenHeight - the new height of the screen + */ + SystemRenderer.prototype.resize = function resize(screenWidth, screenHeight) { + this.screen.width = screenWidth; + this.screen.height = screenHeight; + + this.view.width = screenWidth * this.resolution; + this.view.height = screenHeight * this.resolution; + + if (this.autoResize) { + this.view.style.width = screenWidth + 'px'; + this.view.style.height = screenHeight + 'px'; + } + }; + + /** + * Useful function that returns a texture of the display object that can then be used to create sprites + * This can be quite useful if your displayObject is complicated and needs to be reused multiple times. + * + * @param {PIXI.DisplayObject} displayObject - The displayObject the object will be generated from + * @param {number} scaleMode - Should be one of the scaleMode consts + * @param {number} resolution - The resolution / device pixel ratio of the texture being generated + * @return {PIXI.Texture} a texture of the graphics object + */ + + + SystemRenderer.prototype.generateTexture = function generateTexture(displayObject, scaleMode, resolution) { + var bounds = displayObject.getLocalBounds(); + + var renderTexture = _RenderTexture2.default.create(bounds.width | 0, bounds.height | 0, scaleMode, resolution); + + tempMatrix.tx = -bounds.x; + tempMatrix.ty = -bounds.y; + + this.render(displayObject, renderTexture, false, tempMatrix, true); + + return renderTexture; + }; + + /** + * Removes everything from the renderer and optionally removes the Canvas DOM element. + * + * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM. + */ + + + SystemRenderer.prototype.destroy = function destroy(removeView) { + if (removeView && this.view.parentNode) { + this.view.parentNode.removeChild(this.view); + } + + this.type = _const.RENDERER_TYPE.UNKNOWN; + + this.view = null; + + this.screen = null; + + this.resolution = 0; + + this.transparent = false; + + this.autoResize = false; + + this.blendModes = null; + + this.options = null; + + this.preserveDrawingBuffer = false; + this.clearBeforeRender = false; + + this.roundPixels = false; + + this._backgroundColor = 0; + this._backgroundColorRgba = null; + this._backgroundColorString = null; + + this._tempDisplayObjectParent = null; + this._lastObjectRendered = null; + }; + + /** + * The background color to fill if not transparent + * + * @member {number} + */ + + + _createClass(SystemRenderer, [{ + key: 'width', + get: function get() { + return this.view.width; + } + + /** + * Same as view.height, actual number of pixels in the canvas by vertical + * + * @member {number} + * @readonly + * @default 600 + */ + + }, { + key: 'height', + get: function get() { + return this.view.height; + } + }, { + key: 'backgroundColor', + get: function get() { + return this._backgroundColor; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._backgroundColor = value; + this._backgroundColorString = (0, _utils.hex2string)(value); + (0, _utils.hex2rgb)(value, this._backgroundColorRgba); + } + }]); + + return SystemRenderer; +}(_eventemitter2.default); + +exports.default = SystemRenderer; + +},{"../const":46,"../display/Container":48,"../math":70,"../settings":101,"../textures/RenderTexture":113,"../utils":124,"eventemitter3":20}],77:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _SystemRenderer2 = require('../SystemRenderer'); + +var _SystemRenderer3 = _interopRequireDefault(_SystemRenderer2); + +var _CanvasMaskManager = require('./utils/CanvasMaskManager'); + +var _CanvasMaskManager2 = _interopRequireDefault(_CanvasMaskManager); + +var _CanvasRenderTarget = require('./utils/CanvasRenderTarget'); + +var _CanvasRenderTarget2 = _interopRequireDefault(_CanvasRenderTarget); + +var _mapCanvasBlendModesToPixi = require('./utils/mapCanvasBlendModesToPixi'); + +var _mapCanvasBlendModesToPixi2 = _interopRequireDefault(_mapCanvasBlendModesToPixi); + +var _utils = require('../../utils'); + +var _const = require('../../const'); + +var _settings = require('../../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The CanvasRenderer draws the scene and all its content onto a 2d canvas. This renderer should + * be used for browsers that do not support WebGL. Don't forget to add the CanvasRenderer.view to + * your DOM or you will not see anything :) + * + * @class + * @memberof PIXI + * @extends PIXI.SystemRenderer + */ +var CanvasRenderer = function (_SystemRenderer) { + _inherits(CanvasRenderer, _SystemRenderer); + + // eslint-disable-next-line valid-jsdoc + /** + * @param {object} [options] - The optional renderer parameters + * @param {number} [options.width=800] - the width of the screen + * @param {number} [options.height=600] - the height of the screen + * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional + * @param {boolean} [options.transparent=false] - If the render view is transparent, default false + * @param {boolean} [options.autoResize=false] - If the render view is automatically resized, default false + * @param {boolean} [options.antialias=false] - sets antialias (only applicable in chrome at the moment) + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. The + * resolution of the renderer retina would be 2. + * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, + * enable this if you need to call toDataUrl on the webgl context. + * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear the canvas or + * not before the new render pass. + * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area + * (shown if not transparent). + * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when rendering, + * stopping pixel interpolation. + */ + function CanvasRenderer(options, arg2, arg3) { + _classCallCheck(this, CanvasRenderer); + + var _this = _possibleConstructorReturn(this, _SystemRenderer.call(this, 'Canvas', options, arg2, arg3)); + + _this.type = _const.RENDERER_TYPE.CANVAS; + + /** + * The root canvas 2d context that everything is drawn with. + * + * @member {CanvasRenderingContext2D} + */ + _this.rootContext = _this.view.getContext('2d', { alpha: _this.transparent }); + + /** + * The currently active canvas 2d context (could change with renderTextures) + * + * @member {CanvasRenderingContext2D} + */ + _this.context = _this.rootContext; + + /** + * Boolean flag controlling canvas refresh. + * + * @member {boolean} + */ + _this.refresh = true; + + /** + * Instance of a CanvasMaskManager, handles masking when using the canvas renderer. + * + * @member {PIXI.CanvasMaskManager} + */ + _this.maskManager = new _CanvasMaskManager2.default(_this); + + /** + * The canvas property used to set the canvas smoothing property. + * + * @member {string} + */ + _this.smoothProperty = 'imageSmoothingEnabled'; + + if (!_this.rootContext.imageSmoothingEnabled) { + if (_this.rootContext.webkitImageSmoothingEnabled) { + _this.smoothProperty = 'webkitImageSmoothingEnabled'; + } else if (_this.rootContext.mozImageSmoothingEnabled) { + _this.smoothProperty = 'mozImageSmoothingEnabled'; + } else if (_this.rootContext.oImageSmoothingEnabled) { + _this.smoothProperty = 'oImageSmoothingEnabled'; + } else if (_this.rootContext.msImageSmoothingEnabled) { + _this.smoothProperty = 'msImageSmoothingEnabled'; + } + } + + _this.initPlugins(); + + _this.blendModes = (0, _mapCanvasBlendModesToPixi2.default)(); + _this._activeBlendMode = null; + + _this.renderingToScreen = false; + + _this.resize(_this.options.width, _this.options.height); + + /** + * Fired after rendering finishes. + * + * @event PIXI.CanvasRenderer#postrender + */ + + /** + * Fired before rendering starts. + * + * @event PIXI.CanvasRenderer#prerender + */ + return _this; + } + + /** + * Renders the object to this canvas view + * + * @param {PIXI.DisplayObject} displayObject - The object to be rendered + * @param {PIXI.RenderTexture} [renderTexture] - A render texture to be rendered to. + * If unset, it will render to the root context. + * @param {boolean} [clear=false] - Whether to clear the canvas before drawing + * @param {PIXI.Transform} [transform] - A transformation to be applied + * @param {boolean} [skipUpdateTransform=false] - Whether to skip the update transform + */ + + + CanvasRenderer.prototype.render = function render(displayObject, renderTexture, clear, transform, skipUpdateTransform) { + if (!this.view) { + return; + } + + // can be handy to know! + this.renderingToScreen = !renderTexture; + + this.emit('prerender'); + + var rootResolution = this.resolution; + + if (renderTexture) { + renderTexture = renderTexture.baseTexture || renderTexture; + + if (!renderTexture._canvasRenderTarget) { + renderTexture._canvasRenderTarget = new _CanvasRenderTarget2.default(renderTexture.width, renderTexture.height, renderTexture.resolution); + renderTexture.source = renderTexture._canvasRenderTarget.canvas; + renderTexture.valid = true; + } + + this.context = renderTexture._canvasRenderTarget.context; + this.resolution = renderTexture._canvasRenderTarget.resolution; + } else { + this.context = this.rootContext; + } + + var context = this.context; + + if (!renderTexture) { + this._lastObjectRendered = displayObject; + } + + if (!skipUpdateTransform) { + // update the scene graph + var cacheParent = displayObject.parent; + var tempWt = this._tempDisplayObjectParent.transform.worldTransform; + + if (transform) { + transform.copy(tempWt); + + // lets not forget to flag the parent transform as dirty... + this._tempDisplayObjectParent.transform._worldID = -1; + } else { + tempWt.identity(); + } + + displayObject.parent = this._tempDisplayObjectParent; + + displayObject.updateTransform(); + displayObject.parent = cacheParent; + // displayObject.hitArea = //TODO add a temp hit area + } + + context.setTransform(1, 0, 0, 1, 0, 0); + context.globalAlpha = 1; + this._activeBlendMode = _const.BLEND_MODES.NORMAL; + context.globalCompositeOperation = this.blendModes[_const.BLEND_MODES.NORMAL]; + + if (navigator.isCocoonJS && this.view.screencanvas) { + context.fillStyle = 'black'; + context.clear(); + } + + if (clear !== undefined ? clear : this.clearBeforeRender) { + if (this.renderingToScreen) { + if (this.transparent) { + context.clearRect(0, 0, this.width, this.height); + } else { + context.fillStyle = this._backgroundColorString; + context.fillRect(0, 0, this.width, this.height); + } + } // else { + // TODO: implement background for CanvasRenderTarget or RenderTexture? + // } + } + + // TODO RENDER TARGET STUFF HERE.. + var tempContext = this.context; + + this.context = context; + displayObject.renderCanvas(this); + this.context = tempContext; + + this.resolution = rootResolution; + + this.emit('postrender'); + }; + + /** + * Clear the canvas of renderer. + * + * @param {string} [clearColor] - Clear the canvas with this color, except the canvas is transparent. + */ + + + CanvasRenderer.prototype.clear = function clear(clearColor) { + var context = this.context; + + clearColor = clearColor || this._backgroundColorString; + + if (!this.transparent && clearColor) { + context.fillStyle = clearColor; + context.fillRect(0, 0, this.width, this.height); + } else { + context.clearRect(0, 0, this.width, this.height); + } + }; + + /** + * Sets the blend mode of the renderer. + * + * @param {number} blendMode - See {@link PIXI.BLEND_MODES} for valid values. + */ + + + CanvasRenderer.prototype.setBlendMode = function setBlendMode(blendMode) { + if (this._activeBlendMode === blendMode) { + return; + } + + this._activeBlendMode = blendMode; + this.context.globalCompositeOperation = this.blendModes[blendMode]; + }; + + /** + * Removes everything from the renderer and optionally removes the Canvas DOM element. + * + * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM. + */ + + + CanvasRenderer.prototype.destroy = function destroy(removeView) { + this.destroyPlugins(); + + // call the base destroy + _SystemRenderer.prototype.destroy.call(this, removeView); + + this.context = null; + + this.refresh = true; + + this.maskManager.destroy(); + this.maskManager = null; + + this.smoothProperty = null; + }; + + /** + * Resizes the canvas view to the specified width and height. + * + * @extends PIXI.SystemRenderer#resize + * + * @param {number} screenWidth - the new width of the screen + * @param {number} screenHeight - the new height of the screen + */ + + + CanvasRenderer.prototype.resize = function resize(screenWidth, screenHeight) { + _SystemRenderer.prototype.resize.call(this, screenWidth, screenHeight); + + // reset the scale mode.. oddly this seems to be reset when the canvas is resized. + // surely a browser bug?? Let PixiJS fix that for you.. + if (this.smoothProperty) { + this.rootContext[this.smoothProperty] = _settings2.default.SCALE_MODE === _const.SCALE_MODES.LINEAR; + } + }; + + /** + * Checks if blend mode has changed. + */ + + + CanvasRenderer.prototype.invalidateBlendMode = function invalidateBlendMode() { + this._activeBlendMode = this.blendModes.indexOf(this.context.globalCompositeOperation); + }; + + return CanvasRenderer; +}(_SystemRenderer3.default); + +/** + * Collection of installed plugins. These are included by default in PIXI, but can be excluded + * by creating a custom build. Consult the README for more information about creating custom + * builds and excluding plugins. + * @name PIXI.CanvasRenderer#plugins + * @type {object} + * @readonly + * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements. + * @property {PIXI.extract.CanvasExtract} extract Extract image data from renderer. + * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events. + * @property {PIXI.prepare.CanvasPrepare} prepare Pre-render display objects. + */ + +/** + * Adds a plugin to the renderer. + * + * @method PIXI.CanvasRenderer#registerPlugin + * @param {string} pluginName - The name of the plugin. + * @param {Function} ctor - The constructor function or class for the plugin. + */ + +exports.default = CanvasRenderer; +_utils.pluginTarget.mixin(CanvasRenderer); + +},{"../../const":46,"../../settings":101,"../../utils":124,"../SystemRenderer":76,"./utils/CanvasMaskManager":78,"./utils/CanvasRenderTarget":79,"./utils/mapCanvasBlendModesToPixi":81}],78:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _const = require('../../../const'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A set of functions used to handle masking. + * + * @class + * @memberof PIXI + */ +var CanvasMaskManager = function () { + /** + * @param {PIXI.CanvasRenderer} renderer - The canvas renderer. + */ + function CanvasMaskManager(renderer) { + _classCallCheck(this, CanvasMaskManager); + + this.renderer = renderer; + } + + /** + * This method adds it to the current stack of masks. + * + * @param {object} maskData - the maskData that will be pushed + */ + + + CanvasMaskManager.prototype.pushMask = function pushMask(maskData) { + var renderer = this.renderer; + + renderer.context.save(); + + var cacheAlpha = maskData.alpha; + var transform = maskData.transform.worldTransform; + var resolution = renderer.resolution; + + renderer.context.setTransform(transform.a * resolution, transform.b * resolution, transform.c * resolution, transform.d * resolution, transform.tx * resolution, transform.ty * resolution); + + // TODO suport sprite alpha masks?? + // lots of effort required. If demand is great enough.. + if (!maskData._texture) { + this.renderGraphicsShape(maskData); + renderer.context.clip(); + } + + maskData.worldAlpha = cacheAlpha; + }; + + /** + * Renders a PIXI.Graphics shape. + * + * @param {PIXI.Graphics} graphics - The object to render. + */ + + + CanvasMaskManager.prototype.renderGraphicsShape = function renderGraphicsShape(graphics) { + var context = this.renderer.context; + var len = graphics.graphicsData.length; + + if (len === 0) { + return; + } + + context.beginPath(); + + for (var i = 0; i < len; i++) { + var data = graphics.graphicsData[i]; + var shape = data.shape; + + if (data.type === _const.SHAPES.POLY) { + var points = shape.points; + + context.moveTo(points[0], points[1]); + + for (var j = 1; j < points.length / 2; j++) { + context.lineTo(points[j * 2], points[j * 2 + 1]); + } + + // if the first and last point are the same close the path - much neater :) + if (points[0] === points[points.length - 2] && points[1] === points[points.length - 1]) { + context.closePath(); + } + } else if (data.type === _const.SHAPES.RECT) { + context.rect(shape.x, shape.y, shape.width, shape.height); + context.closePath(); + } else if (data.type === _const.SHAPES.CIRC) { + // TODO - need to be Undefined! + context.arc(shape.x, shape.y, shape.radius, 0, 2 * Math.PI); + context.closePath(); + } else if (data.type === _const.SHAPES.ELIP) { + // ellipse code taken from: http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas + + var w = shape.width * 2; + var h = shape.height * 2; + + var x = shape.x - w / 2; + var y = shape.y - h / 2; + + var kappa = 0.5522848; + var ox = w / 2 * kappa; // control point offset horizontal + var oy = h / 2 * kappa; // control point offset vertical + var xe = x + w; // x-end + var ye = y + h; // y-end + var xm = x + w / 2; // x-middle + var ym = y + h / 2; // y-middle + + context.moveTo(x, ym); + context.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); + context.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); + context.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); + context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); + context.closePath(); + } else if (data.type === _const.SHAPES.RREC) { + var rx = shape.x; + var ry = shape.y; + var width = shape.width; + var height = shape.height; + var radius = shape.radius; + + var maxRadius = Math.min(width, height) / 2 | 0; + + radius = radius > maxRadius ? maxRadius : radius; + + context.moveTo(rx, ry + radius); + context.lineTo(rx, ry + height - radius); + context.quadraticCurveTo(rx, ry + height, rx + radius, ry + height); + context.lineTo(rx + width - radius, ry + height); + context.quadraticCurveTo(rx + width, ry + height, rx + width, ry + height - radius); + context.lineTo(rx + width, ry + radius); + context.quadraticCurveTo(rx + width, ry, rx + width - radius, ry); + context.lineTo(rx + radius, ry); + context.quadraticCurveTo(rx, ry, rx, ry + radius); + context.closePath(); + } + } + }; + + /** + * Restores the current drawing context to the state it was before the mask was applied. + * + * @param {PIXI.CanvasRenderer} renderer - The renderer context to use. + */ + + + CanvasMaskManager.prototype.popMask = function popMask(renderer) { + renderer.context.restore(); + renderer.invalidateBlendMode(); + }; + + /** + * Destroys this canvas mask manager. + * + */ + + + CanvasMaskManager.prototype.destroy = function destroy() { + /* empty */ + }; + + return CanvasMaskManager; +}(); + +exports.default = CanvasMaskManager; + +},{"../../../const":46}],79:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _settings = require('../../../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Creates a Canvas element of the given size. + * + * @class + * @memberof PIXI + */ +var CanvasRenderTarget = function () { + /** + * @param {number} width - the width for the newly created canvas + * @param {number} height - the height for the newly created canvas + * @param {number} [resolution=1] - The resolution / device pixel ratio of the canvas + */ + function CanvasRenderTarget(width, height, resolution) { + _classCallCheck(this, CanvasRenderTarget); + + /** + * The Canvas object that belongs to this CanvasRenderTarget. + * + * @member {HTMLCanvasElement} + */ + this.canvas = document.createElement('canvas'); + + /** + * A CanvasRenderingContext2D object representing a two-dimensional rendering context. + * + * @member {CanvasRenderingContext2D} + */ + this.context = this.canvas.getContext('2d'); + + this.resolution = resolution || _settings2.default.RESOLUTION; + + this.resize(width, height); + } + + /** + * Clears the canvas that was created by the CanvasRenderTarget class. + * + * @private + */ + + + CanvasRenderTarget.prototype.clear = function clear() { + this.context.setTransform(1, 0, 0, 1, 0, 0); + this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); + }; + + /** + * Resizes the canvas to the specified width and height. + * + * @param {number} width - the new width of the canvas + * @param {number} height - the new height of the canvas + */ + + + CanvasRenderTarget.prototype.resize = function resize(width, height) { + this.canvas.width = width * this.resolution; + this.canvas.height = height * this.resolution; + }; + + /** + * Destroys this canvas. + * + */ + + + CanvasRenderTarget.prototype.destroy = function destroy() { + this.context = null; + this.canvas = null; + }; + + /** + * The width of the canvas buffer in pixels. + * + * @member {number} + */ + + + _createClass(CanvasRenderTarget, [{ + key: 'width', + get: function get() { + return this.canvas.width; + }, + set: function set(val) // eslint-disable-line require-jsdoc + { + this.canvas.width = val; + } + + /** + * The height of the canvas buffer in pixels. + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + return this.canvas.height; + }, + set: function set(val) // eslint-disable-line require-jsdoc + { + this.canvas.height = val; + } + }]); + + return CanvasRenderTarget; +}(); + +exports.default = CanvasRenderTarget; + +},{"../../../settings":101}],80:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = canUseNewCanvasBlendModes; +/** + * Creates a little colored canvas + * + * @ignore + * @param {string} color - The color to make the canvas + * @return {canvas} a small canvas element + */ +function createColoredCanvas(color) { + var canvas = document.createElement('canvas'); + + canvas.width = 6; + canvas.height = 1; + + var context = canvas.getContext('2d'); + + context.fillStyle = color; + context.fillRect(0, 0, 6, 1); + + return canvas; +} + +/** + * Checks whether the Canvas BlendModes are supported by the current browser + * + * @return {boolean} whether they are supported + */ +function canUseNewCanvasBlendModes() { + if (typeof document === 'undefined') { + return false; + } + + var magenta = createColoredCanvas('#ff00ff'); + var yellow = createColoredCanvas('#ffff00'); + + var canvas = document.createElement('canvas'); + + canvas.width = 6; + canvas.height = 1; + + var context = canvas.getContext('2d'); + + context.globalCompositeOperation = 'multiply'; + context.drawImage(magenta, 0, 0); + context.drawImage(yellow, 2, 0); + + var imageData = context.getImageData(2, 0, 1, 1); + + if (!imageData) { + return false; + } + + var data = imageData.data; + + return data[0] === 255 && data[1] === 0 && data[2] === 0; +} + +},{}],81:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = mapCanvasBlendModesToPixi; + +var _const = require('../../../const'); + +var _canUseNewCanvasBlendModes = require('./canUseNewCanvasBlendModes'); + +var _canUseNewCanvasBlendModes2 = _interopRequireDefault(_canUseNewCanvasBlendModes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Maps blend combinations to Canvas. + * + * @memberof PIXI + * @function mapCanvasBlendModesToPixi + * @private + * @param {string[]} [array=[]] - The array to output into. + * @return {string[]} Mapped modes. + */ +function mapCanvasBlendModesToPixi() { + var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + if ((0, _canUseNewCanvasBlendModes2.default)()) { + array[_const.BLEND_MODES.NORMAL] = 'source-over'; + array[_const.BLEND_MODES.ADD] = 'lighter'; // IS THIS OK??? + array[_const.BLEND_MODES.MULTIPLY] = 'multiply'; + array[_const.BLEND_MODES.SCREEN] = 'screen'; + array[_const.BLEND_MODES.OVERLAY] = 'overlay'; + array[_const.BLEND_MODES.DARKEN] = 'darken'; + array[_const.BLEND_MODES.LIGHTEN] = 'lighten'; + array[_const.BLEND_MODES.COLOR_DODGE] = 'color-dodge'; + array[_const.BLEND_MODES.COLOR_BURN] = 'color-burn'; + array[_const.BLEND_MODES.HARD_LIGHT] = 'hard-light'; + array[_const.BLEND_MODES.SOFT_LIGHT] = 'soft-light'; + array[_const.BLEND_MODES.DIFFERENCE] = 'difference'; + array[_const.BLEND_MODES.EXCLUSION] = 'exclusion'; + array[_const.BLEND_MODES.HUE] = 'hue'; + array[_const.BLEND_MODES.SATURATION] = 'saturate'; + array[_const.BLEND_MODES.COLOR] = 'color'; + array[_const.BLEND_MODES.LUMINOSITY] = 'luminosity'; + } else { + // this means that the browser does not support the cool new blend modes in canvas 'cough' ie 'cough' + array[_const.BLEND_MODES.NORMAL] = 'source-over'; + array[_const.BLEND_MODES.ADD] = 'lighter'; // IS THIS OK??? + array[_const.BLEND_MODES.MULTIPLY] = 'source-over'; + array[_const.BLEND_MODES.SCREEN] = 'source-over'; + array[_const.BLEND_MODES.OVERLAY] = 'source-over'; + array[_const.BLEND_MODES.DARKEN] = 'source-over'; + array[_const.BLEND_MODES.LIGHTEN] = 'source-over'; + array[_const.BLEND_MODES.COLOR_DODGE] = 'source-over'; + array[_const.BLEND_MODES.COLOR_BURN] = 'source-over'; + array[_const.BLEND_MODES.HARD_LIGHT] = 'source-over'; + array[_const.BLEND_MODES.SOFT_LIGHT] = 'source-over'; + array[_const.BLEND_MODES.DIFFERENCE] = 'source-over'; + array[_const.BLEND_MODES.EXCLUSION] = 'source-over'; + array[_const.BLEND_MODES.HUE] = 'source-over'; + array[_const.BLEND_MODES.SATURATION] = 'source-over'; + array[_const.BLEND_MODES.COLOR] = 'source-over'; + array[_const.BLEND_MODES.LUMINOSITY] = 'source-over'; + } + // not-premultiplied, only for webgl + array[_const.BLEND_MODES.NORMAL_NPM] = array[_const.BLEND_MODES.NORMAL]; + array[_const.BLEND_MODES.ADD_NPM] = array[_const.BLEND_MODES.ADD]; + array[_const.BLEND_MODES.SCREEN_NPM] = array[_const.BLEND_MODES.SCREEN]; + + return array; +} + +},{"../../../const":46,"./canUseNewCanvasBlendModes":80}],82:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _const = require('../../const'); + +var _settings = require('../../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * TextureGarbageCollector. This class manages the GPU and ensures that it does not get clogged + * up with textures that are no longer being used. + * + * @class + * @memberof PIXI + */ +var TextureGarbageCollector = function () { + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for. + */ + function TextureGarbageCollector(renderer) { + _classCallCheck(this, TextureGarbageCollector); + + this.renderer = renderer; + + this.count = 0; + this.checkCount = 0; + this.maxIdle = _settings2.default.GC_MAX_IDLE; + this.checkCountMax = _settings2.default.GC_MAX_CHECK_COUNT; + this.mode = _settings2.default.GC_MODE; + } + + /** + * Checks to see when the last time a texture was used + * if the texture has not been used for a specified amount of time it will be removed from the GPU + */ + + + TextureGarbageCollector.prototype.update = function update() { + this.count++; + + if (this.mode === _const.GC_MODES.MANUAL) { + return; + } + + this.checkCount++; + + if (this.checkCount > this.checkCountMax) { + this.checkCount = 0; + + this.run(); + } + }; + + /** + * Checks to see when the last time a texture was used + * if the texture has not been used for a specified amount of time it will be removed from the GPU + */ + + + TextureGarbageCollector.prototype.run = function run() { + var tm = this.renderer.textureManager; + var managedTextures = tm._managedTextures; + var wasRemoved = false; + + for (var i = 0; i < managedTextures.length; i++) { + var texture = managedTextures[i]; + + // only supports non generated textures at the moment! + if (!texture._glRenderTargets && this.count - texture.touched > this.maxIdle) { + tm.destroyTexture(texture, true); + managedTextures[i] = null; + wasRemoved = true; + } + } + + if (wasRemoved) { + var j = 0; + + for (var _i = 0; _i < managedTextures.length; _i++) { + if (managedTextures[_i] !== null) { + managedTextures[j++] = managedTextures[_i]; + } + } + + managedTextures.length = j; + } + }; + + /** + * Removes all the textures within the specified displayObject and its children from the GPU + * + * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from. + */ + + + TextureGarbageCollector.prototype.unload = function unload(displayObject) { + var tm = this.renderer.textureManager; + + // only destroy non generated textures + if (displayObject._texture && displayObject._texture._glRenderTargets) { + tm.destroyTexture(displayObject._texture, true); + } + + for (var i = displayObject.children.length - 1; i >= 0; i--) { + this.unload(displayObject.children[i]); + } + }; + + return TextureGarbageCollector; +}(); + +exports.default = TextureGarbageCollector; + +},{"../../const":46,"../../settings":101}],83:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _pixiGlCore = require('pixi-gl-core'); + +var _const = require('../../const'); + +var _RenderTarget = require('./utils/RenderTarget'); + +var _RenderTarget2 = _interopRequireDefault(_RenderTarget); + +var _utils = require('../../utils'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Helper class to create a webGL Texture + * + * @class + * @memberof PIXI + */ +var TextureManager = function () { + /** + * @param {PIXI.WebGLRenderer} renderer - A reference to the current renderer + */ + function TextureManager(renderer) { + _classCallCheck(this, TextureManager); + + /** + * A reference to the current renderer + * + * @member {PIXI.WebGLRenderer} + */ + this.renderer = renderer; + + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = renderer.gl; + + /** + * Track textures in the renderer so we can no longer listen to them on destruction. + * + * @member {Array<*>} + * @private + */ + this._managedTextures = []; + } + + /** + * Binds a texture. + * + */ + + + TextureManager.prototype.bindTexture = function bindTexture() {} + // empty + + + /** + * Gets a texture. + * + */ + ; + + TextureManager.prototype.getTexture = function getTexture() {} + // empty + + + /** + * Updates and/or Creates a WebGL texture for the renderer's context. + * + * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to update + * @param {number} location - the location the texture will be bound to. + * @return {GLTexture} The gl texture. + */ + ; + + TextureManager.prototype.updateTexture = function updateTexture(texture, location) { + // assume it good! + // texture = texture.baseTexture || texture; + + var gl = this.gl; + + var isRenderTexture = !!texture._glRenderTargets; + + if (!texture.hasLoaded) { + return null; + } + + var boundTextures = this.renderer.boundTextures; + + // if the location is undefined then this may have been called by n event. + // this being the case the texture may already be bound to a slot. As a texture can only be bound once + // we need to find its current location if it exists. + if (location === undefined) { + location = 0; + + // TODO maybe we can use texture bound ids later on... + // check if texture is already bound.. + for (var i = 0; i < boundTextures.length; ++i) { + if (boundTextures[i] === texture) { + location = i; + break; + } + } + } + + boundTextures[location] = texture; + + gl.activeTexture(gl.TEXTURE0 + location); + + var glTexture = texture._glTextures[this.renderer.CONTEXT_UID]; + + if (!glTexture) { + if (isRenderTexture) { + var renderTarget = new _RenderTarget2.default(this.gl, texture.width, texture.height, texture.scaleMode, texture.resolution); + + renderTarget.resize(texture.width, texture.height); + texture._glRenderTargets[this.renderer.CONTEXT_UID] = renderTarget; + glTexture = renderTarget.texture; + } else { + glTexture = new _pixiGlCore.GLTexture(this.gl, null, null, null, null); + glTexture.bind(location); + glTexture.premultiplyAlpha = true; + glTexture.upload(texture.source); + } + + texture._glTextures[this.renderer.CONTEXT_UID] = glTexture; + + texture.on('update', this.updateTexture, this); + texture.on('dispose', this.destroyTexture, this); + + this._managedTextures.push(texture); + + if (texture.isPowerOfTwo) { + if (texture.mipmap) { + glTexture.enableMipmap(); + } + + if (texture.wrapMode === _const.WRAP_MODES.CLAMP) { + glTexture.enableWrapClamp(); + } else if (texture.wrapMode === _const.WRAP_MODES.REPEAT) { + glTexture.enableWrapRepeat(); + } else { + glTexture.enableWrapMirrorRepeat(); + } + } else { + glTexture.enableWrapClamp(); + } + + if (texture.scaleMode === _const.SCALE_MODES.NEAREST) { + glTexture.enableNearestScaling(); + } else { + glTexture.enableLinearScaling(); + } + } + // the texture already exists so we only need to update it.. + else if (isRenderTexture) { + texture._glRenderTargets[this.renderer.CONTEXT_UID].resize(texture.width, texture.height); + } else { + glTexture.upload(texture.source); + } + + return glTexture; + }; + + /** + * Deletes the texture from WebGL + * + * @param {PIXI.BaseTexture|PIXI.Texture} texture - the texture to destroy + * @param {boolean} [skipRemove=false] - Whether to skip removing the texture from the TextureManager. + */ + + + TextureManager.prototype.destroyTexture = function destroyTexture(texture, skipRemove) { + texture = texture.baseTexture || texture; + + if (!texture.hasLoaded) { + return; + } + + var uid = this.renderer.CONTEXT_UID; + var glTextures = texture._glTextures; + var glRenderTargets = texture._glRenderTargets; + + if (glTextures[uid]) { + this.renderer.unbindTexture(texture); + + glTextures[uid].destroy(); + texture.off('update', this.updateTexture, this); + texture.off('dispose', this.destroyTexture, this); + + delete glTextures[uid]; + + if (!skipRemove) { + var i = this._managedTextures.indexOf(texture); + + if (i !== -1) { + (0, _utils.removeItems)(this._managedTextures, i, 1); + } + } + } + + if (glRenderTargets && glRenderTargets[uid]) { + glRenderTargets[uid].destroy(); + delete glRenderTargets[uid]; + } + }; + + /** + * Deletes all the textures from WebGL + */ + + + TextureManager.prototype.removeAll = function removeAll() { + // empty all the old gl textures as they are useless now + for (var i = 0; i < this._managedTextures.length; ++i) { + var texture = this._managedTextures[i]; + + if (texture._glTextures[this.renderer.CONTEXT_UID]) { + delete texture._glTextures[this.renderer.CONTEXT_UID]; + } + } + }; + + /** + * Destroys this manager and removes all its textures + */ + + + TextureManager.prototype.destroy = function destroy() { + // destroy managed textures + for (var i = 0; i < this._managedTextures.length; ++i) { + var texture = this._managedTextures[i]; + + this.destroyTexture(texture, true); + + texture.off('update', this.updateTexture, this); + texture.off('dispose', this.destroyTexture, this); + } + + this._managedTextures = null; + }; + + return TextureManager; +}(); + +exports.default = TextureManager; + +},{"../../const":46,"../../utils":124,"./utils/RenderTarget":96,"pixi-gl-core":7}],84:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _SystemRenderer2 = require('../SystemRenderer'); + +var _SystemRenderer3 = _interopRequireDefault(_SystemRenderer2); + +var _MaskManager = require('./managers/MaskManager'); + +var _MaskManager2 = _interopRequireDefault(_MaskManager); + +var _StencilManager = require('./managers/StencilManager'); + +var _StencilManager2 = _interopRequireDefault(_StencilManager); + +var _FilterManager = require('./managers/FilterManager'); + +var _FilterManager2 = _interopRequireDefault(_FilterManager); + +var _RenderTarget = require('./utils/RenderTarget'); + +var _RenderTarget2 = _interopRequireDefault(_RenderTarget); + +var _ObjectRenderer = require('./utils/ObjectRenderer'); + +var _ObjectRenderer2 = _interopRequireDefault(_ObjectRenderer); + +var _TextureManager = require('./TextureManager'); + +var _TextureManager2 = _interopRequireDefault(_TextureManager); + +var _BaseTexture = require('../../textures/BaseTexture'); + +var _BaseTexture2 = _interopRequireDefault(_BaseTexture); + +var _TextureGarbageCollector = require('./TextureGarbageCollector'); + +var _TextureGarbageCollector2 = _interopRequireDefault(_TextureGarbageCollector); + +var _WebGLState = require('./WebGLState'); + +var _WebGLState2 = _interopRequireDefault(_WebGLState); + +var _mapWebGLDrawModesToPixi = require('./utils/mapWebGLDrawModesToPixi'); + +var _mapWebGLDrawModesToPixi2 = _interopRequireDefault(_mapWebGLDrawModesToPixi); + +var _validateContext = require('./utils/validateContext'); + +var _validateContext2 = _interopRequireDefault(_validateContext); + +var _utils = require('../../utils'); + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +var _const = require('../../const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var CONTEXT_UID = 0; + +/** + * The WebGLRenderer draws the scene and all its content onto a webGL enabled canvas. This renderer + * should be used for browsers that support webGL. This Render works by automatically managing webGLBatchs. + * So no need for Sprite Batches or Sprite Clouds. + * Don't forget to add the view to your DOM or you will not see anything :) + * + * @class + * @memberof PIXI + * @extends PIXI.SystemRenderer + */ + +var WebGLRenderer = function (_SystemRenderer) { + _inherits(WebGLRenderer, _SystemRenderer); + + // eslint-disable-next-line valid-jsdoc + /** + * + * @param {object} [options] - The optional renderer parameters + * @param {number} [options.width=800] - the width of the screen + * @param {number} [options.height=600] - the height of the screen + * @param {HTMLCanvasElement} [options.view] - the canvas to use as a view, optional + * @param {boolean} [options.transparent=false] - If the render view is transparent, default false + * @param {boolean} [options.autoResize=false] - If the render view is automatically resized, default false + * @param {boolean} [options.antialias=false] - sets antialias. If not available natively then FXAA + * antialiasing is used + * @param {boolean} [options.forceFXAA=false] - forces FXAA antialiasing to be used over native. + * FXAA is faster, but may not always look as great + * @param {number} [options.resolution=1] - The resolution / device pixel ratio of the renderer. + * The resolution of the renderer retina would be 2. + * @param {boolean} [options.clearBeforeRender=true] - This sets if the renderer will clear + * the canvas or not before the new render pass. If you wish to set this to false, you *must* set + * preserveDrawingBuffer to `true`. + * @param {boolean} [options.preserveDrawingBuffer=false] - enables drawing buffer preservation, + * enable this if you need to call toDataUrl on the webgl context. + * @param {boolean} [options.roundPixels=false] - If true PixiJS will Math.floor() x/y values when + * rendering, stopping pixel interpolation. + * @param {number} [options.backgroundColor=0x000000] - The background color of the rendered area + * (shown if not transparent). + * @param {boolean} [options.legacy=false] - If true PixiJS will aim to ensure compatibility + * with older / less advanced devices. If you experiance unexplained flickering try setting this to true. + * @param {string} [options.powerPreference] - Parameter passed to webgl context, set to "high-performance" + * for devices with dual graphics card + */ + function WebGLRenderer(options, arg2, arg3) { + _classCallCheck(this, WebGLRenderer); + + var _this = _possibleConstructorReturn(this, _SystemRenderer.call(this, 'WebGL', options, arg2, arg3)); + + _this.legacy = _this.options.legacy; + + if (_this.legacy) { + _pixiGlCore2.default.VertexArrayObject.FORCE_NATIVE = true; + } + + /** + * The type of this renderer as a standardised const + * + * @member {number} + * @see PIXI.RENDERER_TYPE + */ + _this.type = _const.RENDERER_TYPE.WEBGL; + + _this.handleContextLost = _this.handleContextLost.bind(_this); + _this.handleContextRestored = _this.handleContextRestored.bind(_this); + + _this.view.addEventListener('webglcontextlost', _this.handleContextLost, false); + _this.view.addEventListener('webglcontextrestored', _this.handleContextRestored, false); + + /** + * The options passed in to create a new webgl context. + * + * @member {object} + * @private + */ + _this._contextOptions = { + alpha: _this.transparent, + antialias: _this.options.antialias, + premultipliedAlpha: _this.transparent && _this.transparent !== 'notMultiplied', + stencil: true, + preserveDrawingBuffer: _this.options.preserveDrawingBuffer, + powerPreference: _this.options.powerPreference + }; + + _this._backgroundColorRgba[3] = _this.transparent ? 0 : 1; + + /** + * Manages the masks using the stencil buffer. + * + * @member {PIXI.MaskManager} + */ + _this.maskManager = new _MaskManager2.default(_this); + + /** + * Manages the stencil buffer. + * + * @member {PIXI.StencilManager} + */ + _this.stencilManager = new _StencilManager2.default(_this); + + /** + * An empty renderer. + * + * @member {PIXI.ObjectRenderer} + */ + _this.emptyRenderer = new _ObjectRenderer2.default(_this); + + /** + * The currently active ObjectRenderer. + * + * @member {PIXI.ObjectRenderer} + */ + _this.currentRenderer = _this.emptyRenderer; + + _this.initPlugins(); + + /** + * The current WebGL rendering context, it is created here + * + * @member {WebGLRenderingContext} + */ + // initialize the context so it is ready for the managers. + if (_this.options.context) { + // checks to see if a context is valid.. + (0, _validateContext2.default)(_this.options.context); + } + + _this.gl = _this.options.context || _pixiGlCore2.default.createContext(_this.view, _this._contextOptions); + + _this.CONTEXT_UID = CONTEXT_UID++; + + /** + * The currently active ObjectRenderer. + * + * @member {PIXI.WebGLState} + */ + _this.state = new _WebGLState2.default(_this.gl); + + _this.renderingToScreen = true; + + /** + * Holds the current state of textures bound to the GPU. + * @type {Array} + */ + _this.boundTextures = null; + + /** + * Holds the current shader + * + * @member {PIXI.Shader} + */ + _this._activeShader = null; + + _this._activeVao = null; + + /** + * Holds the current render target + * + * @member {PIXI.RenderTarget} + */ + _this._activeRenderTarget = null; + + _this._initContext(); + + /** + * Manages the filters. + * + * @member {PIXI.FilterManager} + */ + _this.filterManager = new _FilterManager2.default(_this); + // map some webGL blend and drawmodes.. + _this.drawModes = (0, _mapWebGLDrawModesToPixi2.default)(_this.gl); + + _this._nextTextureLocation = 0; + + _this.setBlendMode(0); + + /** + * Fired after rendering finishes. + * + * @event PIXI.WebGLRenderer#postrender + */ + + /** + * Fired before rendering starts. + * + * @event PIXI.WebGLRenderer#prerender + */ + + /** + * Fired when the WebGL context is set. + * + * @event PIXI.WebGLRenderer#context + * @param {WebGLRenderingContext} gl - WebGL context. + */ + return _this; + } + + /** + * Creates the WebGL context + * + * @private + */ + + + WebGLRenderer.prototype._initContext = function _initContext() { + var gl = this.gl; + + // restore a context if it was previously lost + if (gl.isContextLost() && gl.getExtension('WEBGL_lose_context')) { + gl.getExtension('WEBGL_lose_context').restoreContext(); + } + + var maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); + + this._activeShader = null; + this._activeVao = null; + + this.boundTextures = new Array(maxTextures); + this.emptyTextures = new Array(maxTextures); + + // create a texture manager... + this.textureManager = new _TextureManager2.default(this); + this.textureGC = new _TextureGarbageCollector2.default(this); + + this.state.resetToDefault(); + + this.rootRenderTarget = new _RenderTarget2.default(gl, this.width, this.height, null, this.resolution, true); + this.rootRenderTarget.clearColor = this._backgroundColorRgba; + + this.bindRenderTarget(this.rootRenderTarget); + + // now lets fill up the textures with empty ones! + var emptyGLTexture = new _pixiGlCore2.default.GLTexture.fromData(gl, null, 1, 1); + + var tempObj = { _glTextures: {} }; + + tempObj._glTextures[this.CONTEXT_UID] = {}; + + for (var i = 0; i < maxTextures; i++) { + var empty = new _BaseTexture2.default(); + + empty._glTextures[this.CONTEXT_UID] = emptyGLTexture; + + this.boundTextures[i] = tempObj; + this.emptyTextures[i] = empty; + this.bindTexture(null, i); + } + + this.emit('context', gl); + + // setup the width/height properties and gl viewport + this.resize(this.screen.width, this.screen.height); + }; + + /** + * Renders the object to its webGL view + * + * @param {PIXI.DisplayObject} displayObject - the object to be rendered + * @param {PIXI.RenderTexture} renderTexture - The render texture to render to. + * @param {boolean} [clear] - Should the canvas be cleared before the new render + * @param {PIXI.Transform} [transform] - A transform to apply to the render texture before rendering. + * @param {boolean} [skipUpdateTransform] - Should we skip the update transform pass? + */ + + + WebGLRenderer.prototype.render = function render(displayObject, renderTexture, clear, transform, skipUpdateTransform) { + // can be handy to know! + this.renderingToScreen = !renderTexture; + + this.emit('prerender'); + + // no point rendering if our context has been blown up! + if (!this.gl || this.gl.isContextLost()) { + return; + } + + this._nextTextureLocation = 0; + + if (!renderTexture) { + this._lastObjectRendered = displayObject; + } + + if (!skipUpdateTransform) { + // update the scene graph + var cacheParent = displayObject.parent; + + displayObject.parent = this._tempDisplayObjectParent; + displayObject.updateTransform(); + displayObject.parent = cacheParent; + // displayObject.hitArea = //TODO add a temp hit area + } + + this.bindRenderTexture(renderTexture, transform); + + this.currentRenderer.start(); + + if (clear !== undefined ? clear : this.clearBeforeRender) { + this._activeRenderTarget.clear(); + } + + displayObject.renderWebGL(this); + + // apply transform.. + this.currentRenderer.flush(); + + // this.setObjectRenderer(this.emptyRenderer); + + this.textureGC.update(); + + this.emit('postrender'); + }; + + /** + * Changes the current renderer to the one given in parameter + * + * @param {PIXI.ObjectRenderer} objectRenderer - The object renderer to use. + */ + + + WebGLRenderer.prototype.setObjectRenderer = function setObjectRenderer(objectRenderer) { + if (this.currentRenderer === objectRenderer) { + return; + } + + this.currentRenderer.stop(); + this.currentRenderer = objectRenderer; + this.currentRenderer.start(); + }; + + /** + * This should be called if you wish to do some custom rendering + * It will basically render anything that may be batched up such as sprites + * + */ + + + WebGLRenderer.prototype.flush = function flush() { + this.setObjectRenderer(this.emptyRenderer); + }; + + /** + * Resizes the webGL view to the specified width and height. + * + * @param {number} screenWidth - the new width of the screen + * @param {number} screenHeight - the new height of the screen + */ + + + WebGLRenderer.prototype.resize = function resize(screenWidth, screenHeight) { + // if(width * this.resolution === this.width && height * this.resolution === this.height)return; + + _SystemRenderer3.default.prototype.resize.call(this, screenWidth, screenHeight); + + this.rootRenderTarget.resize(screenWidth, screenHeight); + + if (this._activeRenderTarget === this.rootRenderTarget) { + this.rootRenderTarget.activate(); + + if (this._activeShader) { + this._activeShader.uniforms.projectionMatrix = this.rootRenderTarget.projectionMatrix.toArray(true); + } + } + }; + + /** + * Resizes the webGL view to the specified width and height. + * + * @param {number} blendMode - the desired blend mode + */ + + + WebGLRenderer.prototype.setBlendMode = function setBlendMode(blendMode) { + this.state.setBlendMode(blendMode); + }; + + /** + * Erases the active render target and fills the drawing area with a colour + * + * @param {number} [clearColor] - The colour + */ + + + WebGLRenderer.prototype.clear = function clear(clearColor) { + this._activeRenderTarget.clear(clearColor); + }; + + /** + * Sets the transform of the active render target to the given matrix + * + * @param {PIXI.Matrix} matrix - The transformation matrix + */ + + + WebGLRenderer.prototype.setTransform = function setTransform(matrix) { + this._activeRenderTarget.transform = matrix; + }; + + /** + * Erases the render texture and fills the drawing area with a colour + * + * @param {PIXI.RenderTexture} renderTexture - The render texture to clear + * @param {number} [clearColor] - The colour + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.clearRenderTexture = function clearRenderTexture(renderTexture, clearColor) { + var baseTexture = renderTexture.baseTexture; + var renderTarget = baseTexture._glRenderTargets[this.CONTEXT_UID]; + + if (renderTarget) { + renderTarget.clear(clearColor); + } + + return this; + }; + + /** + * Binds a render texture for rendering + * + * @param {PIXI.RenderTexture} renderTexture - The render texture to render + * @param {PIXI.Transform} transform - The transform to be applied to the render texture + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.bindRenderTexture = function bindRenderTexture(renderTexture, transform) { + var renderTarget = void 0; + + if (renderTexture) { + var baseTexture = renderTexture.baseTexture; + + if (!baseTexture._glRenderTargets[this.CONTEXT_UID]) { + // bind the current texture + this.textureManager.updateTexture(baseTexture, 0); + } + + this.unbindTexture(baseTexture); + + renderTarget = baseTexture._glRenderTargets[this.CONTEXT_UID]; + renderTarget.setFrame(renderTexture.frame); + } else { + renderTarget = this.rootRenderTarget; + } + + renderTarget.transform = transform; + this.bindRenderTarget(renderTarget); + + return this; + }; + + /** + * Changes the current render target to the one given in parameter + * + * @param {PIXI.RenderTarget} renderTarget - the new render target + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.bindRenderTarget = function bindRenderTarget(renderTarget) { + if (renderTarget !== this._activeRenderTarget) { + this._activeRenderTarget = renderTarget; + renderTarget.activate(); + + if (this._activeShader) { + this._activeShader.uniforms.projectionMatrix = renderTarget.projectionMatrix.toArray(true); + } + + this.stencilManager.setMaskStack(renderTarget.stencilMaskStack); + } + + return this; + }; + + /** + * Changes the current shader to the one given in parameter + * + * @param {PIXI.Shader} shader - the new shader + * @param {boolean} [autoProject=true] - Whether automatically set the projection matrix + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.bindShader = function bindShader(shader, autoProject) { + // TODO cache + if (this._activeShader !== shader) { + this._activeShader = shader; + shader.bind(); + + // `autoProject` normally would be a default parameter set to true + // but because of how Babel transpiles default parameters + // it hinders the performance of this method. + if (autoProject !== false) { + // automatically set the projection matrix + shader.uniforms.projectionMatrix = this._activeRenderTarget.projectionMatrix.toArray(true); + } + } + + return this; + }; + + /** + * Binds the texture. This will return the location of the bound texture. + * It may not be the same as the one you pass in. This is due to optimisation that prevents + * needless binding of textures. For example if the texture is already bound it will return the + * current location of the texture instead of the one provided. To bypass this use force location + * + * @param {PIXI.Texture} texture - the new texture + * @param {number} location - the suggested texture location + * @param {boolean} forceLocation - force the location + * @return {number} bound texture location + */ + + + WebGLRenderer.prototype.bindTexture = function bindTexture(texture, location, forceLocation) { + texture = texture || this.emptyTextures[location]; + texture = texture.baseTexture || texture; + texture.touched = this.textureGC.count; + + if (!forceLocation) { + // TODO - maybe look into adding boundIds.. save us the loop? + for (var i = 0; i < this.boundTextures.length; i++) { + if (this.boundTextures[i] === texture) { + return i; + } + } + + if (location === undefined) { + this._nextTextureLocation++; + this._nextTextureLocation %= this.boundTextures.length; + location = this.boundTextures.length - this._nextTextureLocation - 1; + } + } else { + location = location || 0; + } + + var gl = this.gl; + var glTexture = texture._glTextures[this.CONTEXT_UID]; + + if (!glTexture) { + // this will also bind the texture.. + this.textureManager.updateTexture(texture, location); + } else { + // bind the current texture + this.boundTextures[location] = texture; + gl.activeTexture(gl.TEXTURE0 + location); + gl.bindTexture(gl.TEXTURE_2D, glTexture.texture); + } + + return location; + }; + + /** + * unbinds the texture ... + * + * @param {PIXI.Texture} texture - the texture to unbind + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.unbindTexture = function unbindTexture(texture) { + var gl = this.gl; + + texture = texture.baseTexture || texture; + + for (var i = 0; i < this.boundTextures.length; i++) { + if (this.boundTextures[i] === texture) { + this.boundTextures[i] = this.emptyTextures[i]; + + gl.activeTexture(gl.TEXTURE0 + i); + gl.bindTexture(gl.TEXTURE_2D, this.emptyTextures[i]._glTextures[this.CONTEXT_UID].texture); + } + } + + return this; + }; + + /** + * Creates a new VAO from this renderer's context and state. + * + * @return {VertexArrayObject} The new VAO. + */ + + + WebGLRenderer.prototype.createVao = function createVao() { + return new _pixiGlCore2.default.VertexArrayObject(this.gl, this.state.attribState); + }; + + /** + * Changes the current Vao to the one given in parameter + * + * @param {PIXI.VertexArrayObject} vao - the new Vao + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.bindVao = function bindVao(vao) { + if (this._activeVao === vao) { + return this; + } + + if (vao) { + vao.bind(); + } else if (this._activeVao) { + // TODO this should always be true i think? + this._activeVao.unbind(); + } + + this._activeVao = vao; + + return this; + }; + + /** + * Resets the WebGL state so you can render things however you fancy! + * + * @return {PIXI.WebGLRenderer} Returns itself. + */ + + + WebGLRenderer.prototype.reset = function reset() { + this.setObjectRenderer(this.emptyRenderer); + + this._activeShader = null; + this._activeRenderTarget = this.rootRenderTarget; + + // bind the main frame buffer (the screen); + this.rootRenderTarget.activate(); + + this.state.resetToDefault(); + + return this; + }; + + /** + * Handles a lost webgl context + * + * @private + * @param {WebGLContextEvent} event - The context lost event. + */ + + + WebGLRenderer.prototype.handleContextLost = function handleContextLost(event) { + event.preventDefault(); + }; + + /** + * Handles a restored webgl context + * + * @private + */ + + + WebGLRenderer.prototype.handleContextRestored = function handleContextRestored() { + this.textureManager.removeAll(); + this._initContext(); + }; + + /** + * Removes everything from the renderer (event listeners, spritebatch, etc...) + * + * @param {boolean} [removeView=false] - Removes the Canvas element from the DOM. + * See: https://github.com/pixijs/pixi.js/issues/2233 + */ + + + WebGLRenderer.prototype.destroy = function destroy(removeView) { + this.destroyPlugins(); + + // remove listeners + this.view.removeEventListener('webglcontextlost', this.handleContextLost); + this.view.removeEventListener('webglcontextrestored', this.handleContextRestored); + + this.textureManager.destroy(); + + // call base destroy + _SystemRenderer.prototype.destroy.call(this, removeView); + + this.uid = 0; + + // destroy the managers + this.maskManager.destroy(); + this.stencilManager.destroy(); + this.filterManager.destroy(); + + this.maskManager = null; + this.filterManager = null; + this.textureManager = null; + this.currentRenderer = null; + + this.handleContextLost = null; + this.handleContextRestored = null; + + this._contextOptions = null; + this.gl.useProgram(null); + + if (this.gl.getExtension('WEBGL_lose_context')) { + this.gl.getExtension('WEBGL_lose_context').loseContext(); + } + + this.gl = null; + + // this = null; + }; + + return WebGLRenderer; +}(_SystemRenderer3.default); + +/** + * Collection of installed plugins. These are included by default in PIXI, but can be excluded + * by creating a custom build. Consult the README for more information about creating custom + * builds and excluding plugins. + * @name PIXI.WebGLRenderer#plugins + * @type {object} + * @readonly + * @property {PIXI.accessibility.AccessibilityManager} accessibility Support tabbing interactive elements. + * @property {PIXI.extract.WebGLExtract} extract Extract image data from renderer. + * @property {PIXI.interaction.InteractionManager} interaction Handles mouse, touch and pointer events. + * @property {PIXI.prepare.WebGLPrepare} prepare Pre-render display objects. + */ + +/** + * Adds a plugin to the renderer. + * + * @method PIXI.WebGLRenderer#registerPlugin + * @param {string} pluginName - The name of the plugin. + * @param {Function} ctor - The constructor function or class for the plugin. + */ + +exports.default = WebGLRenderer; +_utils.pluginTarget.mixin(WebGLRenderer); + +},{"../../const":46,"../../textures/BaseTexture":112,"../../utils":124,"../SystemRenderer":76,"./TextureGarbageCollector":82,"./TextureManager":83,"./WebGLState":85,"./managers/FilterManager":90,"./managers/MaskManager":91,"./managers/StencilManager":92,"./utils/ObjectRenderer":94,"./utils/RenderTarget":96,"./utils/mapWebGLDrawModesToPixi":99,"./utils/validateContext":100,"pixi-gl-core":7}],85:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _mapWebGLBlendModesToPixi = require('./utils/mapWebGLBlendModesToPixi'); + +var _mapWebGLBlendModesToPixi2 = _interopRequireDefault(_mapWebGLBlendModesToPixi); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var BLEND = 0; +var DEPTH_TEST = 1; +var FRONT_FACE = 2; +var CULL_FACE = 3; +var BLEND_FUNC = 4; + +/** + * A WebGL state machines + * + * @memberof PIXI + * @class + */ + +var WebGLState = function () { + /** + * @param {WebGLRenderingContext} gl - The current WebGL rendering context + */ + function WebGLState(gl) { + _classCallCheck(this, WebGLState); + + /** + * The current active state + * + * @member {Uint8Array} + */ + this.activeState = new Uint8Array(16); + + /** + * The default state + * + * @member {Uint8Array} + */ + this.defaultState = new Uint8Array(16); + + // default blend mode.. + this.defaultState[0] = 1; + + /** + * The current state index in the stack + * + * @member {number} + * @private + */ + this.stackIndex = 0; + + /** + * The stack holding all the different states + * + * @member {Array<*>} + * @private + */ + this.stack = []; + + /** + * The current WebGL rendering context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + this.maxAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); + + this.attribState = { + tempAttribState: new Array(this.maxAttribs), + attribState: new Array(this.maxAttribs) + }; + + this.blendModes = (0, _mapWebGLBlendModesToPixi2.default)(gl); + + // check we have vao.. + this.nativeVaoExtension = gl.getExtension('OES_vertex_array_object') || gl.getExtension('MOZ_OES_vertex_array_object') || gl.getExtension('WEBKIT_OES_vertex_array_object'); + } + + /** + * Pushes a new active state + */ + + + WebGLState.prototype.push = function push() { + // next state.. + var state = this.stack[this.stackIndex]; + + if (!state) { + state = this.stack[this.stackIndex] = new Uint8Array(16); + } + + ++this.stackIndex; + + // copy state.. + // set active state so we can force overrides of gl state + for (var i = 0; i < this.activeState.length; i++) { + state[i] = this.activeState[i]; + } + }; + + /** + * Pops a state out + */ + + + WebGLState.prototype.pop = function pop() { + var state = this.stack[--this.stackIndex]; + + this.setState(state); + }; + + /** + * Sets the current state + * + * @param {*} state - The state to set. + */ + + + WebGLState.prototype.setState = function setState(state) { + this.setBlend(state[BLEND]); + this.setDepthTest(state[DEPTH_TEST]); + this.setFrontFace(state[FRONT_FACE]); + this.setCullFace(state[CULL_FACE]); + this.setBlendMode(state[BLEND_FUNC]); + }; + + /** + * Enables or disabled blending. + * + * @param {boolean} value - Turn on or off webgl blending. + */ + + + WebGLState.prototype.setBlend = function setBlend(value) { + value = value ? 1 : 0; + + if (this.activeState[BLEND] === value) { + return; + } + + this.activeState[BLEND] = value; + this.gl[value ? 'enable' : 'disable'](this.gl.BLEND); + }; + + /** + * Sets the blend mode. + * + * @param {number} value - The blend mode to set to. + */ + + + WebGLState.prototype.setBlendMode = function setBlendMode(value) { + if (value === this.activeState[BLEND_FUNC]) { + return; + } + + this.activeState[BLEND_FUNC] = value; + + var mode = this.blendModes[value]; + + if (mode.length === 2) { + this.gl.blendFunc(mode[0], mode[1]); + } else { + this.gl.blendFuncSeparate(mode[0], mode[1], mode[2], mode[3]); + } + }; + + /** + * Sets whether to enable or disable depth test. + * + * @param {boolean} value - Turn on or off webgl depth testing. + */ + + + WebGLState.prototype.setDepthTest = function setDepthTest(value) { + value = value ? 1 : 0; + + if (this.activeState[DEPTH_TEST] === value) { + return; + } + + this.activeState[DEPTH_TEST] = value; + this.gl[value ? 'enable' : 'disable'](this.gl.DEPTH_TEST); + }; + + /** + * Sets whether to enable or disable cull face. + * + * @param {boolean} value - Turn on or off webgl cull face. + */ + + + WebGLState.prototype.setCullFace = function setCullFace(value) { + value = value ? 1 : 0; + + if (this.activeState[CULL_FACE] === value) { + return; + } + + this.activeState[CULL_FACE] = value; + this.gl[value ? 'enable' : 'disable'](this.gl.CULL_FACE); + }; + + /** + * Sets the gl front face. + * + * @param {boolean} value - true is clockwise and false is counter-clockwise + */ + + + WebGLState.prototype.setFrontFace = function setFrontFace(value) { + value = value ? 1 : 0; + + if (this.activeState[FRONT_FACE] === value) { + return; + } + + this.activeState[FRONT_FACE] = value; + this.gl.frontFace(this.gl[value ? 'CW' : 'CCW']); + }; + + /** + * Disables all the vaos in use + * + */ + + + WebGLState.prototype.resetAttributes = function resetAttributes() { + for (var i = 0; i < this.attribState.tempAttribState.length; i++) { + this.attribState.tempAttribState[i] = 0; + } + + for (var _i = 0; _i < this.attribState.attribState.length; _i++) { + this.attribState.attribState[_i] = 0; + } + + // im going to assume one is always active for performance reasons. + for (var _i2 = 1; _i2 < this.maxAttribs; _i2++) { + this.gl.disableVertexAttribArray(_i2); + } + }; + + // used + /** + * Resets all the logic and disables the vaos + */ + + + WebGLState.prototype.resetToDefault = function resetToDefault() { + // unbind any VAO if they exist.. + if (this.nativeVaoExtension) { + this.nativeVaoExtension.bindVertexArrayOES(null); + } + + // reset all attributes.. + this.resetAttributes(); + + // set active state so we can force overrides of gl state + for (var i = 0; i < this.activeState.length; ++i) { + this.activeState[i] = 32; + } + + this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, false); + + this.setState(this.defaultState); + }; + + return WebGLState; +}(); + +exports.default = WebGLState; + +},{"./utils/mapWebGLBlendModesToPixi":98}],86:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _extractUniformsFromSrc = require('./extractUniformsFromSrc'); + +var _extractUniformsFromSrc2 = _interopRequireDefault(_extractUniformsFromSrc); + +var _utils = require('../../../utils'); + +var _const = require('../../../const'); + +var _settings = require('../../../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var SOURCE_KEY_MAP = {}; + +// let math = require('../../../math'); +/** + * @class + * @memberof PIXI + * @extends PIXI.Shader + */ + +var Filter = function () { + /** + * @param {string} [vertexSrc] - The source of the vertex shader. + * @param {string} [fragmentSrc] - The source of the fragment shader. + * @param {object} [uniforms] - Custom uniforms to use to augment the built-in ones. + */ + function Filter(vertexSrc, fragmentSrc, uniforms) { + _classCallCheck(this, Filter); + + /** + * The vertex shader. + * + * @member {string} + */ + this.vertexSrc = vertexSrc || Filter.defaultVertexSrc; + + /** + * The fragment shader. + * + * @member {string} + */ + this.fragmentSrc = fragmentSrc || Filter.defaultFragmentSrc; + + this._blendMode = _const.BLEND_MODES.NORMAL; + + this.uniformData = uniforms || (0, _extractUniformsFromSrc2.default)(this.vertexSrc, this.fragmentSrc, 'projectionMatrix|uSampler'); + + /** + * An object containing the current values of custom uniforms. + * @example Updating the value of a custom uniform + * filter.uniforms.time = performance.now(); + * + * @member {object} + */ + this.uniforms = {}; + + for (var i in this.uniformData) { + this.uniforms[i] = this.uniformData[i].value; + } + + // this is where we store shader references.. + // TODO we could cache this! + this.glShaders = {}; + + // used for cacheing.. sure there is a better way! + if (!SOURCE_KEY_MAP[this.vertexSrc + this.fragmentSrc]) { + SOURCE_KEY_MAP[this.vertexSrc + this.fragmentSrc] = (0, _utils.uid)(); + } + + this.glShaderKey = SOURCE_KEY_MAP[this.vertexSrc + this.fragmentSrc]; + + /** + * The padding of the filter. Some filters require extra space to breath such as a blur. + * Increasing this will add extra width and height to the bounds of the object that the + * filter is applied to. + * + * @member {number} + */ + this.padding = 4; + + /** + * The resolution of the filter. Setting this to be lower will lower the quality but + * increase the performance of the filter. + * + * @member {number} + */ + this.resolution = _settings2.default.RESOLUTION; + + /** + * If enabled is true the filter is applied, if false it will not. + * + * @member {boolean} + */ + this.enabled = true; + + /** + * If enabled, PixiJS will fit the filter area into boundaries for better performance. + * Switch it off if it does not work for specific shader. + * + * @member {boolean} + */ + this.autoFit = true; + } + + /** + * Applies the filter + * + * @param {PIXI.FilterManager} filterManager - The renderer to retrieve the filter from + * @param {PIXI.RenderTarget} input - The input render target. + * @param {PIXI.RenderTarget} output - The target to output to. + * @param {boolean} clear - Should the output be cleared before rendering to it + * @param {object} [currentState] - It's current state of filter. + * There are some useful properties in the currentState : + * target, filters, sourceFrame, destinationFrame, renderTarget, resolution + */ + + + Filter.prototype.apply = function apply(filterManager, input, output, clear, currentState) // eslint-disable-line no-unused-vars + { + // --- // + // this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(tempMatrix, window.panda ); + + // do as you please! + + filterManager.applyFilter(this, input, output, clear); + + // or just do a regular render.. + }; + + /** + * Sets the blendmode of the filter + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + */ + + + _createClass(Filter, [{ + key: 'blendMode', + get: function get() { + return this._blendMode; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._blendMode = value; + } + + /** + * The default vertex shader source + * + * @static + * @constant + */ + + }], [{ + key: 'defaultVertexSrc', + get: function get() { + return ['attribute vec2 aVertexPosition;', 'attribute vec2 aTextureCoord;', 'uniform mat3 projectionMatrix;', 'uniform mat3 filterMatrix;', 'varying vec2 vTextureCoord;', 'varying vec2 vFilterCoord;', 'void main(void){', ' gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);', ' vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;', ' vTextureCoord = aTextureCoord ;', '}'].join('\n'); + } + + /** + * The default fragment shader source + * + * @static + * @constant + */ + + }, { + key: 'defaultFragmentSrc', + get: function get() { + return ['varying vec2 vTextureCoord;', 'varying vec2 vFilterCoord;', 'uniform sampler2D uSampler;', 'uniform sampler2D filterSampler;', 'void main(void){', ' vec4 masky = texture2D(filterSampler, vFilterCoord);', ' vec4 sample = texture2D(uSampler, vTextureCoord);', ' vec4 color;', ' if(mod(vFilterCoord.x, 1.0) > 0.5)', ' {', ' color = vec4(1.0, 0.0, 0.0, 1.0);', ' }', ' else', ' {', ' color = vec4(0.0, 1.0, 0.0, 1.0);', ' }', + // ' gl_FragColor = vec4(mod(vFilterCoord.x, 1.5), vFilterCoord.y,0.0,1.0);', + ' gl_FragColor = mix(sample, masky, 0.5);', ' gl_FragColor *= sample.a;', '}'].join('\n'); + } + }]); + + return Filter; +}(); + +exports.default = Filter; + +},{"../../../const":46,"../../../settings":101,"../../../utils":124,"./extractUniformsFromSrc":87}],87:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = extractUniformsFromSrc; + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var defaultValue = _pixiGlCore2.default.shader.defaultValue; + +function extractUniformsFromSrc(vertexSrc, fragmentSrc, mask) { + var vertUniforms = extractUniformsFromString(vertexSrc, mask); + var fragUniforms = extractUniformsFromString(fragmentSrc, mask); + + return Object.assign(vertUniforms, fragUniforms); +} + +function extractUniformsFromString(string) { + var maskRegex = new RegExp('^(projectionMatrix|uSampler|filterArea|filterClamp)$'); + + var uniforms = {}; + var nameSplit = void 0; + + // clean the lines a little - remove extra spaces / tabs etc + // then split along ';' + var lines = string.replace(/\s+/g, ' ').split(/\s*;\s*/); + + // loop through.. + for (var i = 0; i < lines.length; i++) { + var line = lines[i].trim(); + + if (line.indexOf('uniform') > -1) { + var splitLine = line.split(' '); + var type = splitLine[1]; + + var name = splitLine[2]; + var size = 1; + + if (name.indexOf('[') > -1) { + // array! + nameSplit = name.split(/\[|]/); + name = nameSplit[0]; + size *= Number(nameSplit[1]); + } + + if (!name.match(maskRegex)) { + uniforms[name] = { + value: defaultValue(type, size), + name: name, + type: type + }; + } + } + } + + return uniforms; +} + +},{"pixi-gl-core":7}],88:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.calculateScreenSpaceMatrix = calculateScreenSpaceMatrix; +exports.calculateNormalizedScreenSpaceMatrix = calculateNormalizedScreenSpaceMatrix; +exports.calculateSpriteMatrix = calculateSpriteMatrix; + +var _math = require('../../../math'); + +/** + * Calculates the mapped matrix + * @param filterArea {Rectangle} The filter area + * @param sprite {Sprite} the target sprite + * @param outputMatrix {Matrix} @alvin + */ +// TODO playing around here.. this is temporary - (will end up in the shader) +// this returns a matrix that will normalise map filter cords in the filter to screen space +function calculateScreenSpaceMatrix(outputMatrix, filterArea, textureSize) { + // let worldTransform = sprite.worldTransform.copy(Matrix.TEMP_MATRIX), + // let texture = {width:1136, height:700};//sprite._texture.baseTexture; + + // TODO unwrap? + var mappedMatrix = outputMatrix.identity(); + + mappedMatrix.translate(filterArea.x / textureSize.width, filterArea.y / textureSize.height); + + mappedMatrix.scale(textureSize.width, textureSize.height); + + return mappedMatrix; +} + +function calculateNormalizedScreenSpaceMatrix(outputMatrix, filterArea, textureSize) { + var mappedMatrix = outputMatrix.identity(); + + mappedMatrix.translate(filterArea.x / textureSize.width, filterArea.y / textureSize.height); + + var translateScaleX = textureSize.width / filterArea.width; + var translateScaleY = textureSize.height / filterArea.height; + + mappedMatrix.scale(translateScaleX, translateScaleY); + + return mappedMatrix; +} + +// this will map the filter coord so that a texture can be used based on the transform of a sprite +function calculateSpriteMatrix(outputMatrix, filterArea, textureSize, sprite) { + var worldTransform = sprite.worldTransform.copy(_math.Matrix.TEMP_MATRIX); + var texture = sprite._texture.baseTexture; + + // TODO unwrap? + var mappedMatrix = outputMatrix.identity(); + + // scale.. + var ratio = textureSize.height / textureSize.width; + + mappedMatrix.translate(filterArea.x / textureSize.width, filterArea.y / textureSize.height); + + mappedMatrix.scale(1, ratio); + + var translateScaleX = textureSize.width / texture.width; + var translateScaleY = textureSize.height / texture.height; + + worldTransform.tx /= texture.width * translateScaleX; + + // this...? free beer for anyone who can explain why this makes sense! + worldTransform.ty /= texture.width * translateScaleX; + // worldTransform.ty /= texture.height * translateScaleY; + + worldTransform.invert(); + mappedMatrix.prepend(worldTransform); + + // apply inverse scale.. + mappedMatrix.scale(1, 1 / ratio); + + mappedMatrix.scale(translateScaleX, translateScaleY); + + mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y); + + return mappedMatrix; +} + +},{"../../../math":70}],89:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Filter2 = require('../Filter'); + +var _Filter3 = _interopRequireDefault(_Filter2); + +var _math = require('../../../../math'); + +var _path = require('path'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The SpriteMaskFilter class + * + * @class + * @extends PIXI.Filter + * @memberof PIXI + */ +var SpriteMaskFilter = function (_Filter) { + _inherits(SpriteMaskFilter, _Filter); + + /** + * @param {PIXI.Sprite} sprite - the target sprite + */ + function SpriteMaskFilter(sprite) { + _classCallCheck(this, SpriteMaskFilter); + + var maskMatrix = new _math.Matrix(); + + var _this = _possibleConstructorReturn(this, _Filter.call(this, 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 otherMatrix;\r\n\r\nvarying vec2 vMaskCoord;\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = aTextureCoord;\r\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\r\n}\r\n', 'varying vec2 vMaskCoord;\r\nvarying vec2 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\nuniform float alpha;\r\nuniform sampler2D mask;\r\n\r\nvoid main(void)\r\n{\r\n // check clip! this will stop the mask bleeding out from the edges\r\n vec2 text = abs( vMaskCoord - 0.5 );\r\n text = step(0.5, text);\r\n\r\n float clip = 1.0 - max(text.y, text.x);\r\n vec4 original = texture2D(uSampler, vTextureCoord);\r\n vec4 masky = texture2D(mask, vMaskCoord);\r\n\r\n original *= (masky.r * masky.a * alpha * clip);\r\n\r\n gl_FragColor = original;\r\n}\r\n')); + + sprite.renderable = false; + + _this.maskSprite = sprite; + _this.maskMatrix = maskMatrix; + return _this; + } + + /** + * Applies the filter + * + * @param {PIXI.FilterManager} filterManager - The renderer to retrieve the filter from + * @param {PIXI.RenderTarget} input - The input render target. + * @param {PIXI.RenderTarget} output - The target to output to. + */ + + + SpriteMaskFilter.prototype.apply = function apply(filterManager, input, output) { + var maskSprite = this.maskSprite; + + this.uniforms.mask = maskSprite._texture; + this.uniforms.otherMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, maskSprite); + this.uniforms.alpha = maskSprite.worldAlpha; + + filterManager.applyFilter(this, input, output); + }; + + return SpriteMaskFilter; +}(_Filter3.default); + +exports.default = SpriteMaskFilter; + +},{"../../../../math":70,"../Filter":86,"path":25}],90:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _WebGLManager2 = require('./WebGLManager'); + +var _WebGLManager3 = _interopRequireDefault(_WebGLManager2); + +var _RenderTarget = require('../utils/RenderTarget'); + +var _RenderTarget2 = _interopRequireDefault(_RenderTarget); + +var _Quad = require('../utils/Quad'); + +var _Quad2 = _interopRequireDefault(_Quad); + +var _math = require('../../../math'); + +var _Shader = require('../../../Shader'); + +var _Shader2 = _interopRequireDefault(_Shader); + +var _filterTransforms = require('../filters/filterTransforms'); + +var filterTransforms = _interopRequireWildcard(_filterTransforms); + +var _bitTwiddle = require('bit-twiddle'); + +var _bitTwiddle2 = _interopRequireDefault(_bitTwiddle); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @ignore + * @class + */ +var FilterState = +/** + * + */ +function FilterState() { + _classCallCheck(this, FilterState); + + this.renderTarget = null; + this.sourceFrame = new _math.Rectangle(); + this.destinationFrame = new _math.Rectangle(); + this.filters = []; + this.target = null; + this.resolution = 1; +}; + +/** + * @class + * @memberof PIXI + * @extends PIXI.WebGLManager + */ + + +var FilterManager = function (_WebGLManager) { + _inherits(FilterManager, _WebGLManager); + + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for. + */ + function FilterManager(renderer) { + _classCallCheck(this, FilterManager); + + var _this = _possibleConstructorReturn(this, _WebGLManager.call(this, renderer)); + + _this.gl = _this.renderer.gl; + // know about sprites! + _this.quad = new _Quad2.default(_this.gl, renderer.state.attribState); + + _this.shaderCache = {}; + // todo add default! + _this.pool = {}; + + _this.filterData = null; + return _this; + } + + /** + * Adds a new filter to the manager. + * + * @param {PIXI.DisplayObject} target - The target of the filter to render. + * @param {PIXI.Filter[]} filters - The filters to apply. + */ + + + FilterManager.prototype.pushFilter = function pushFilter(target, filters) { + var renderer = this.renderer; + + var filterData = this.filterData; + + if (!filterData) { + filterData = this.renderer._activeRenderTarget.filterStack; + + // add new stack + var filterState = new FilterState(); + + filterState.sourceFrame = filterState.destinationFrame = this.renderer._activeRenderTarget.size; + filterState.renderTarget = renderer._activeRenderTarget; + + this.renderer._activeRenderTarget.filterData = filterData = { + index: 0, + stack: [filterState] + }; + + this.filterData = filterData; + } + + // get the current filter state.. + var currentState = filterData.stack[++filterData.index]; + + if (!currentState) { + currentState = filterData.stack[filterData.index] = new FilterState(); + } + + // for now we go off the filter of the first resolution.. + var resolution = filters[0].resolution; + var padding = filters[0].padding | 0; + var targetBounds = target.filterArea || target.getBounds(true); + var sourceFrame = currentState.sourceFrame; + var destinationFrame = currentState.destinationFrame; + + sourceFrame.x = (targetBounds.x * resolution | 0) / resolution; + sourceFrame.y = (targetBounds.y * resolution | 0) / resolution; + sourceFrame.width = (targetBounds.width * resolution | 0) / resolution; + sourceFrame.height = (targetBounds.height * resolution | 0) / resolution; + + if (filterData.stack[0].renderTarget.transform) {// + + // TODO we should fit the rect around the transform.. + } else if (filters[0].autoFit) { + sourceFrame.fit(filterData.stack[0].destinationFrame); + } + + // lets apply the padding After we fit the element to the screen. + // this should stop the strange side effects that can occur when cropping to the edges + sourceFrame.pad(padding); + + destinationFrame.width = sourceFrame.width; + destinationFrame.height = sourceFrame.height; + + // lets play the padding after we fit the element to the screen. + // this should stop the strange side effects that can occur when cropping to the edges + + var renderTarget = this.getPotRenderTarget(renderer.gl, sourceFrame.width, sourceFrame.height, resolution); + + currentState.target = target; + currentState.filters = filters; + currentState.resolution = resolution; + currentState.renderTarget = renderTarget; + + // bind the render target to draw the shape in the top corner.. + + renderTarget.setFrame(destinationFrame, sourceFrame); + + // bind the render target + renderer.bindRenderTarget(renderTarget); + renderTarget.clear(); + }; + + /** + * Pops off the filter and applies it. + * + */ + + + FilterManager.prototype.popFilter = function popFilter() { + var filterData = this.filterData; + + var lastState = filterData.stack[filterData.index - 1]; + var currentState = filterData.stack[filterData.index]; + + this.quad.map(currentState.renderTarget.size, currentState.sourceFrame).upload(); + + var filters = currentState.filters; + + if (filters.length === 1) { + filters[0].apply(this, currentState.renderTarget, lastState.renderTarget, false, currentState); + this.freePotRenderTarget(currentState.renderTarget); + } else { + var flip = currentState.renderTarget; + var flop = this.getPotRenderTarget(this.renderer.gl, currentState.sourceFrame.width, currentState.sourceFrame.height, currentState.resolution); + + flop.setFrame(currentState.destinationFrame, currentState.sourceFrame); + + // finally lets clear the render target before drawing to it.. + flop.clear(); + + var i = 0; + + for (i = 0; i < filters.length - 1; ++i) { + filters[i].apply(this, flip, flop, true, currentState); + + var t = flip; + + flip = flop; + flop = t; + } + + filters[i].apply(this, flip, lastState.renderTarget, false, currentState); + + this.freePotRenderTarget(flip); + this.freePotRenderTarget(flop); + } + + filterData.index--; + + if (filterData.index === 0) { + this.filterData = null; + } + }; + + /** + * Draws a filter. + * + * @param {PIXI.Filter} filter - The filter to draw. + * @param {PIXI.RenderTarget} input - The input render target. + * @param {PIXI.RenderTarget} output - The target to output to. + * @param {boolean} clear - Should the output be cleared before rendering to it + */ + + + FilterManager.prototype.applyFilter = function applyFilter(filter, input, output, clear) { + var renderer = this.renderer; + var gl = renderer.gl; + + var shader = filter.glShaders[renderer.CONTEXT_UID]; + + // cacheing.. + if (!shader) { + if (filter.glShaderKey) { + shader = this.shaderCache[filter.glShaderKey]; + + if (!shader) { + shader = new _Shader2.default(this.gl, filter.vertexSrc, filter.fragmentSrc); + + filter.glShaders[renderer.CONTEXT_UID] = this.shaderCache[filter.glShaderKey] = shader; + } + } else { + shader = filter.glShaders[renderer.CONTEXT_UID] = new _Shader2.default(this.gl, filter.vertexSrc, filter.fragmentSrc); + } + + // TODO - this only needs to be done once? + renderer.bindVao(null); + + this.quad.initVao(shader); + } + + renderer.bindVao(this.quad.vao); + + renderer.bindRenderTarget(output); + + if (clear) { + gl.disable(gl.SCISSOR_TEST); + renderer.clear(); // [1, 1, 1, 1]); + gl.enable(gl.SCISSOR_TEST); + } + + // in case the render target is being masked using a scissor rect + if (output === renderer.maskManager.scissorRenderTarget) { + renderer.maskManager.pushScissorMask(null, renderer.maskManager.scissorData); + } + + renderer.bindShader(shader); + + // free unit 0 for us, doesn't matter what was there + // don't try to restore it, because syncUniforms can upload it to another slot + // and it'll be a problem + var tex = this.renderer.emptyTextures[0]; + + this.renderer.boundTextures[0] = tex; + // this syncs the PixiJS filters uniforms with glsl uniforms + this.syncUniforms(shader, filter); + + renderer.state.setBlendMode(filter.blendMode); + + gl.activeTexture(gl.TEXTURE0); + gl.bindTexture(gl.TEXTURE_2D, input.texture.texture); + + this.quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0); + + gl.bindTexture(gl.TEXTURE_2D, tex._glTextures[this.renderer.CONTEXT_UID].texture); + }; + + /** + * Uploads the uniforms of the filter. + * + * @param {GLShader} shader - The underlying gl shader. + * @param {PIXI.Filter} filter - The filter we are synchronizing. + */ + + + FilterManager.prototype.syncUniforms = function syncUniforms(shader, filter) { + var uniformData = filter.uniformData; + var uniforms = filter.uniforms; + + // 0 is reserved for the PixiJS texture so we start at 1! + var textureCount = 1; + var currentState = void 0; + + // filterArea and filterClamp that are handled by FilterManager directly + // they must not appear in uniformData + + if (shader.uniforms.filterArea) { + currentState = this.filterData.stack[this.filterData.index]; + + var filterArea = shader.uniforms.filterArea; + + filterArea[0] = currentState.renderTarget.size.width; + filterArea[1] = currentState.renderTarget.size.height; + filterArea[2] = currentState.sourceFrame.x; + filterArea[3] = currentState.sourceFrame.y; + + shader.uniforms.filterArea = filterArea; + } + + // use this to clamp displaced texture coords so they belong to filterArea + // see displacementFilter fragment shader for an example + if (shader.uniforms.filterClamp) { + currentState = currentState || this.filterData.stack[this.filterData.index]; + + var filterClamp = shader.uniforms.filterClamp; + + filterClamp[0] = 0; + filterClamp[1] = 0; + filterClamp[2] = (currentState.sourceFrame.width - 1) / currentState.renderTarget.size.width; + filterClamp[3] = (currentState.sourceFrame.height - 1) / currentState.renderTarget.size.height; + + shader.uniforms.filterClamp = filterClamp; + } + + // TODO Cacheing layer.. + for (var i in uniformData) { + if (uniformData[i].type === 'sampler2D' && uniforms[i] !== 0) { + if (uniforms[i].baseTexture) { + shader.uniforms[i] = this.renderer.bindTexture(uniforms[i].baseTexture, textureCount); + } else { + shader.uniforms[i] = textureCount; + + // TODO + // this is helpful as renderTargets can also be set. + // Although thinking about it, we could probably + // make the filter texture cache return a RenderTexture + // rather than a renderTarget + var gl = this.renderer.gl; + + this.renderer.boundTextures[textureCount] = this.renderer.emptyTextures[textureCount]; + gl.activeTexture(gl.TEXTURE0 + textureCount); + + uniforms[i].texture.bind(); + } + + textureCount++; + } else if (uniformData[i].type === 'mat3') { + // check if its PixiJS matrix.. + if (uniforms[i].a !== undefined) { + shader.uniforms[i] = uniforms[i].toArray(true); + } else { + shader.uniforms[i] = uniforms[i]; + } + } else if (uniformData[i].type === 'vec2') { + // check if its a point.. + if (uniforms[i].x !== undefined) { + var val = shader.uniforms[i] || new Float32Array(2); + + val[0] = uniforms[i].x; + val[1] = uniforms[i].y; + shader.uniforms[i] = val; + } else { + shader.uniforms[i] = uniforms[i]; + } + } else if (uniformData[i].type === 'float') { + if (shader.uniforms.data[i].value !== uniformData[i]) { + shader.uniforms[i] = uniforms[i]; + } + } else { + shader.uniforms[i] = uniforms[i]; + } + } + }; + + /** + * Gets a render target from the pool, or creates a new one. + * + * @param {boolean} clear - Should we clear the render texture when we get it? + * @param {number} resolution - The resolution of the target. + * @return {PIXI.RenderTarget} The new render target + */ + + + FilterManager.prototype.getRenderTarget = function getRenderTarget(clear, resolution) { + var currentState = this.filterData.stack[this.filterData.index]; + var renderTarget = this.getPotRenderTarget(this.renderer.gl, currentState.sourceFrame.width, currentState.sourceFrame.height, resolution || currentState.resolution); + + renderTarget.setFrame(currentState.destinationFrame, currentState.sourceFrame); + + return renderTarget; + }; + + /** + * Returns a render target to the pool. + * + * @param {PIXI.RenderTarget} renderTarget - The render target to return. + */ + + + FilterManager.prototype.returnRenderTarget = function returnRenderTarget(renderTarget) { + this.freePotRenderTarget(renderTarget); + }; + + /** + * Calculates the mapped matrix. + * + * TODO playing around here.. this is temporary - (will end up in the shader) + * this returns a matrix that will normalise map filter cords in the filter to screen space + * + * @param {PIXI.Matrix} outputMatrix - the matrix to output to. + * @return {PIXI.Matrix} The mapped matrix. + */ + + + FilterManager.prototype.calculateScreenSpaceMatrix = function calculateScreenSpaceMatrix(outputMatrix) { + var currentState = this.filterData.stack[this.filterData.index]; + + return filterTransforms.calculateScreenSpaceMatrix(outputMatrix, currentState.sourceFrame, currentState.renderTarget.size); + }; + + /** + * Multiply vTextureCoord to this matrix to achieve (0,0,1,1) for filterArea + * + * @param {PIXI.Matrix} outputMatrix - The matrix to output to. + * @return {PIXI.Matrix} The mapped matrix. + */ + + + FilterManager.prototype.calculateNormalizedScreenSpaceMatrix = function calculateNormalizedScreenSpaceMatrix(outputMatrix) { + var currentState = this.filterData.stack[this.filterData.index]; + + return filterTransforms.calculateNormalizedScreenSpaceMatrix(outputMatrix, currentState.sourceFrame, currentState.renderTarget.size, currentState.destinationFrame); + }; + + /** + * This will map the filter coord so that a texture can be used based on the transform of a sprite + * + * @param {PIXI.Matrix} outputMatrix - The matrix to output to. + * @param {PIXI.Sprite} sprite - The sprite to map to. + * @return {PIXI.Matrix} The mapped matrix. + */ + + + FilterManager.prototype.calculateSpriteMatrix = function calculateSpriteMatrix(outputMatrix, sprite) { + var currentState = this.filterData.stack[this.filterData.index]; + + return filterTransforms.calculateSpriteMatrix(outputMatrix, currentState.sourceFrame, currentState.renderTarget.size, sprite); + }; + + /** + * Destroys this Filter Manager. + * + */ + + + FilterManager.prototype.destroy = function destroy() { + this.shaderCache = {}; + this.emptyPool(); + }; + + /** + * Gets a Power-of-Two render texture. + * + * TODO move to a seperate class could be on renderer? + * also - could cause issue with multiple contexts? + * + * @private + * @param {WebGLRenderingContext} gl - The webgl rendering context + * @param {number} minWidth - The minimum width of the render target. + * @param {number} minHeight - The minimum height of the render target. + * @param {number} resolution - The resolution of the render target. + * @return {PIXI.RenderTarget} The new render target. + */ + + + FilterManager.prototype.getPotRenderTarget = function getPotRenderTarget(gl, minWidth, minHeight, resolution) { + // TODO you could return a bigger texture if there is not one in the pool? + minWidth = _bitTwiddle2.default.nextPow2(minWidth * resolution); + minHeight = _bitTwiddle2.default.nextPow2(minHeight * resolution); + + var key = (minWidth & 0xFFFF) << 16 | minHeight & 0xFFFF; + + if (!this.pool[key]) { + this.pool[key] = []; + } + + var renderTarget = this.pool[key].pop(); + + // creating render target will cause texture to be bound! + if (!renderTarget) { + // temporary bypass cache.. + var tex = this.renderer.boundTextures[0]; + + gl.activeTexture(gl.TEXTURE0); + + // internally - this will cause a texture to be bound.. + renderTarget = new _RenderTarget2.default(gl, minWidth, minHeight, null, 1); + + // set the current one back + gl.bindTexture(gl.TEXTURE_2D, tex._glTextures[this.renderer.CONTEXT_UID].texture); + } + + // manually tweak the resolution... + // this will not modify the size of the frame buffer, just its resolution. + renderTarget.resolution = resolution; + renderTarget.defaultFrame.width = renderTarget.size.width = minWidth / resolution; + renderTarget.defaultFrame.height = renderTarget.size.height = minHeight / resolution; + + return renderTarget; + }; + + /** + * Empties the texture pool. + * + */ + + + FilterManager.prototype.emptyPool = function emptyPool() { + for (var i in this.pool) { + var textures = this.pool[i]; + + if (textures) { + for (var j = 0; j < textures.length; j++) { + textures[j].destroy(true); + } + } + } + + this.pool = {}; + }; + + /** + * Frees a render target back into the pool. + * + * @param {PIXI.RenderTarget} renderTarget - The renderTarget to free + */ + + + FilterManager.prototype.freePotRenderTarget = function freePotRenderTarget(renderTarget) { + var minWidth = renderTarget.size.width * renderTarget.resolution; + var minHeight = renderTarget.size.height * renderTarget.resolution; + var key = (minWidth & 0xFFFF) << 16 | minHeight & 0xFFFF; + + this.pool[key].push(renderTarget); + }; + + return FilterManager; +}(_WebGLManager3.default); + +exports.default = FilterManager; + +},{"../../../Shader":44,"../../../math":70,"../filters/filterTransforms":88,"../utils/Quad":95,"../utils/RenderTarget":96,"./WebGLManager":93,"bit-twiddle":18}],91:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _WebGLManager2 = require('./WebGLManager'); + +var _WebGLManager3 = _interopRequireDefault(_WebGLManager2); + +var _SpriteMaskFilter = require('../filters/spriteMask/SpriteMaskFilter'); + +var _SpriteMaskFilter2 = _interopRequireDefault(_SpriteMaskFilter); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * @class + * @extends PIXI.WebGLManager + * @memberof PIXI + */ +var MaskManager = function (_WebGLManager) { + _inherits(MaskManager, _WebGLManager); + + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for. + */ + function MaskManager(renderer) { + _classCallCheck(this, MaskManager); + + // TODO - we don't need both! + var _this = _possibleConstructorReturn(this, _WebGLManager.call(this, renderer)); + + _this.scissor = false; + _this.scissorData = null; + _this.scissorRenderTarget = null; + + _this.enableScissor = true; + + _this.alphaMaskPool = []; + _this.alphaMaskIndex = 0; + return _this; + } + + /** + * Applies the Mask and adds it to the current filter stack. + * + * @param {PIXI.DisplayObject} target - Display Object to push the mask to + * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data. + */ + + + MaskManager.prototype.pushMask = function pushMask(target, maskData) { + // TODO the root check means scissor rect will not + // be used on render textures more info here: + // https://github.com/pixijs/pixi.js/pull/3545 + + if (maskData.texture) { + this.pushSpriteMask(target, maskData); + } else if (this.enableScissor && !this.scissor && this.renderer._activeRenderTarget.root && !this.renderer.stencilManager.stencilMaskStack.length && maskData.isFastRect()) { + var matrix = maskData.worldTransform; + + var rot = Math.atan2(matrix.b, matrix.a); + + // use the nearest degree! + rot = Math.round(rot * (180 / Math.PI)); + + if (rot % 90) { + this.pushStencilMask(maskData); + } else { + this.pushScissorMask(target, maskData); + } + } else { + this.pushStencilMask(maskData); + } + }; + + /** + * Removes the last mask from the mask stack and doesn't return it. + * + * @param {PIXI.DisplayObject} target - Display Object to pop the mask from + * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data. + */ + + + MaskManager.prototype.popMask = function popMask(target, maskData) { + if (maskData.texture) { + this.popSpriteMask(target, maskData); + } else if (this.enableScissor && !this.renderer.stencilManager.stencilMaskStack.length) { + this.popScissorMask(target, maskData); + } else { + this.popStencilMask(target, maskData); + } + }; + + /** + * Applies the Mask and adds it to the current filter stack. + * + * @param {PIXI.RenderTarget} target - Display Object to push the sprite mask to + * @param {PIXI.Sprite} maskData - Sprite to be used as the mask + */ + + + MaskManager.prototype.pushSpriteMask = function pushSpriteMask(target, maskData) { + var alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex]; + + if (!alphaMaskFilter) { + alphaMaskFilter = this.alphaMaskPool[this.alphaMaskIndex] = [new _SpriteMaskFilter2.default(maskData)]; + } + + alphaMaskFilter[0].resolution = this.renderer.resolution; + alphaMaskFilter[0].maskSprite = maskData; + + // TODO - may cause issues! + target.filterArea = maskData.getBounds(true); + + this.renderer.filterManager.pushFilter(target, alphaMaskFilter); + + this.alphaMaskIndex++; + }; + + /** + * Removes the last filter from the filter stack and doesn't return it. + * + */ + + + MaskManager.prototype.popSpriteMask = function popSpriteMask() { + this.renderer.filterManager.popFilter(); + this.alphaMaskIndex--; + }; + + /** + * Applies the Mask and adds it to the current filter stack. + * + * @param {PIXI.Sprite|PIXI.Graphics} maskData - The masking data. + */ + + + MaskManager.prototype.pushStencilMask = function pushStencilMask(maskData) { + this.renderer.currentRenderer.stop(); + this.renderer.stencilManager.pushStencil(maskData); + }; + + /** + * Removes the last filter from the filter stack and doesn't return it. + * + */ + + + MaskManager.prototype.popStencilMask = function popStencilMask() { + this.renderer.currentRenderer.stop(); + this.renderer.stencilManager.popStencil(); + }; + + /** + * + * @param {PIXI.DisplayObject} target - Display Object to push the mask to + * @param {PIXI.Graphics} maskData - The masking data. + */ + + + MaskManager.prototype.pushScissorMask = function pushScissorMask(target, maskData) { + maskData.renderable = true; + + var renderTarget = this.renderer._activeRenderTarget; + + var bounds = maskData.getBounds(); + + bounds.fit(renderTarget.size); + maskData.renderable = false; + + this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST); + + var resolution = this.renderer.resolution; + + this.renderer.gl.scissor(bounds.x * resolution, (renderTarget.root ? renderTarget.size.height - bounds.y - bounds.height : bounds.y) * resolution, bounds.width * resolution, bounds.height * resolution); + + this.scissorRenderTarget = renderTarget; + this.scissorData = maskData; + this.scissor = true; + }; + + /** + * + * + */ + + + MaskManager.prototype.popScissorMask = function popScissorMask() { + this.scissorRenderTarget = null; + this.scissorData = null; + this.scissor = false; + + // must be scissor! + var gl = this.renderer.gl; + + gl.disable(gl.SCISSOR_TEST); + }; + + return MaskManager; +}(_WebGLManager3.default); + +exports.default = MaskManager; + +},{"../filters/spriteMask/SpriteMaskFilter":89,"./WebGLManager":93}],92:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _WebGLManager2 = require('./WebGLManager'); + +var _WebGLManager3 = _interopRequireDefault(_WebGLManager2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * @class + * @extends PIXI.WebGLManager + * @memberof PIXI + */ +var StencilManager = function (_WebGLManager) { + _inherits(StencilManager, _WebGLManager); + + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for. + */ + function StencilManager(renderer) { + _classCallCheck(this, StencilManager); + + var _this = _possibleConstructorReturn(this, _WebGLManager.call(this, renderer)); + + _this.stencilMaskStack = null; + return _this; + } + + /** + * Changes the mask stack that is used by this manager. + * + * @param {PIXI.Graphics[]} stencilMaskStack - The mask stack + */ + + + StencilManager.prototype.setMaskStack = function setMaskStack(stencilMaskStack) { + this.stencilMaskStack = stencilMaskStack; + + var gl = this.renderer.gl; + + if (stencilMaskStack.length === 0) { + gl.disable(gl.STENCIL_TEST); + } else { + gl.enable(gl.STENCIL_TEST); + } + }; + + /** + * Applies the Mask and adds it to the current stencil stack. @alvin + * + * @param {PIXI.Graphics} graphics - The mask + */ + + + StencilManager.prototype.pushStencil = function pushStencil(graphics) { + this.renderer.setObjectRenderer(this.renderer.plugins.graphics); + + this.renderer._activeRenderTarget.attachStencilBuffer(); + + var gl = this.renderer.gl; + var prevMaskCount = this.stencilMaskStack.length; + + if (prevMaskCount === 0) { + gl.enable(gl.STENCIL_TEST); + } + + this.stencilMaskStack.push(graphics); + + // Increment the refference stencil value where the new mask overlaps with the old ones. + gl.colorMask(false, false, false, false); + gl.stencilFunc(gl.EQUAL, prevMaskCount, this._getBitwiseMask()); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + this.renderer.plugins.graphics.render(graphics); + + this._useCurrent(); + }; + + /** + * Removes the last mask from the stencil stack. @alvin + */ + + + StencilManager.prototype.popStencil = function popStencil() { + this.renderer.setObjectRenderer(this.renderer.plugins.graphics); + + var gl = this.renderer.gl; + var graphics = this.stencilMaskStack.pop(); + + if (this.stencilMaskStack.length === 0) { + // the stack is empty! + gl.disable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + gl.clearStencil(0); + } else { + // Decrement the refference stencil value where the popped mask overlaps with the other ones + gl.colorMask(false, false, false, false); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + this.renderer.plugins.graphics.render(graphics); + + this._useCurrent(); + } + }; + + /** + * Setup renderer to use the current stencil data. + */ + + + StencilManager.prototype._useCurrent = function _useCurrent() { + var gl = this.renderer.gl; + + gl.colorMask(true, true, true, true); + gl.stencilFunc(gl.EQUAL, this.stencilMaskStack.length, this._getBitwiseMask()); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + }; + + /** + * Fill 1s equal to the number of acitve stencil masks. + * + * @return {number} The bitwise mask. + */ + + + StencilManager.prototype._getBitwiseMask = function _getBitwiseMask() { + return (1 << this.stencilMaskStack.length) - 1; + }; + + /** + * Destroys the mask stack. + * + */ + + + StencilManager.prototype.destroy = function destroy() { + _WebGLManager3.default.prototype.destroy.call(this); + + this.stencilMaskStack.stencilStack = null; + }; + + return StencilManager; +}(_WebGLManager3.default); + +exports.default = StencilManager; + +},{"./WebGLManager":93}],93:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @class + * @memberof PIXI + */ +var WebGLManager = function () { + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this manager works for. + */ + function WebGLManager(renderer) { + _classCallCheck(this, WebGLManager); + + /** + * The renderer this manager works for. + * + * @member {PIXI.WebGLRenderer} + */ + this.renderer = renderer; + + this.renderer.on('context', this.onContextChange, this); + } + + /** + * Generic method called when there is a WebGL context change. + * + */ + + + WebGLManager.prototype.onContextChange = function onContextChange() {} + // do some codes init! + + + /** + * Generic destroy methods to be overridden by the subclass + * + */ + ; + + WebGLManager.prototype.destroy = function destroy() { + this.renderer.off('context', this.onContextChange, this); + + this.renderer = null; + }; + + return WebGLManager; +}(); + +exports.default = WebGLManager; + +},{}],94:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _WebGLManager2 = require('../managers/WebGLManager'); + +var _WebGLManager3 = _interopRequireDefault(_WebGLManager2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Base for a common object renderer that can be used as a system renderer plugin. + * + * @class + * @extends PIXI.WebGLManager + * @memberof PIXI + */ +var ObjectRenderer = function (_WebGLManager) { + _inherits(ObjectRenderer, _WebGLManager); + + function ObjectRenderer() { + _classCallCheck(this, ObjectRenderer); + + return _possibleConstructorReturn(this, _WebGLManager.apply(this, arguments)); + } + + /** + * Starts the renderer and sets the shader + * + */ + ObjectRenderer.prototype.start = function start() {} + // set the shader.. + + + /** + * Stops the renderer + * + */ + ; + + ObjectRenderer.prototype.stop = function stop() { + this.flush(); + }; + + /** + * Stub method for rendering content and emptying the current batch. + * + */ + + + ObjectRenderer.prototype.flush = function flush() {} + // flush! + + + /** + * Renders an object + * + * @param {PIXI.DisplayObject} object - The object to render. + */ + ; + + ObjectRenderer.prototype.render = function render(object) // eslint-disable-line no-unused-vars + { + // render the object + }; + + return ObjectRenderer; +}(_WebGLManager3.default); + +exports.default = ObjectRenderer; + +},{"../managers/WebGLManager":93}],95:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +var _createIndicesForQuads = require('../../../utils/createIndicesForQuads'); + +var _createIndicesForQuads2 = _interopRequireDefault(_createIndicesForQuads); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Helper class to create a quad + * + * @class + * @memberof PIXI + */ +var Quad = function () { + /** + * @param {WebGLRenderingContext} gl - The gl context for this quad to use. + * @param {object} state - TODO: Description + */ + function Quad(gl, state) { + _classCallCheck(this, Quad); + + /** + * the current WebGL drawing context + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + /** + * An array of vertices + * + * @member {Float32Array} + */ + this.vertices = new Float32Array([-1, -1, 1, -1, 1, 1, -1, 1]); + + /** + * The Uvs of the quad + * + * @member {Float32Array} + */ + this.uvs = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]); + + this.interleaved = new Float32Array(8 * 2); + + for (var i = 0; i < 4; i++) { + this.interleaved[i * 4] = this.vertices[i * 2]; + this.interleaved[i * 4 + 1] = this.vertices[i * 2 + 1]; + this.interleaved[i * 4 + 2] = this.uvs[i * 2]; + this.interleaved[i * 4 + 3] = this.uvs[i * 2 + 1]; + } + + /** + * An array containing the indices of the vertices + * + * @member {Uint16Array} + */ + this.indices = (0, _createIndicesForQuads2.default)(1); + + /** + * The vertex buffer + * + * @member {glCore.GLBuffer} + */ + this.vertexBuffer = _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, this.interleaved, gl.STATIC_DRAW); + + /** + * The index buffer + * + * @member {glCore.GLBuffer} + */ + this.indexBuffer = _pixiGlCore2.default.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW); + + /** + * The vertex array object + * + * @member {glCore.VertexArrayObject} + */ + this.vao = new _pixiGlCore2.default.VertexArrayObject(gl, state); + } + + /** + * Initialises the vaos and uses the shader. + * + * @param {PIXI.Shader} shader - the shader to use + */ + + + Quad.prototype.initVao = function initVao(shader) { + this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer, shader.attributes.aVertexPosition, this.gl.FLOAT, false, 4 * 4, 0).addAttribute(this.vertexBuffer, shader.attributes.aTextureCoord, this.gl.FLOAT, false, 4 * 4, 2 * 4); + }; + + /** + * Maps two Rectangle to the quad. + * + * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle + * @param {PIXI.Rectangle} destinationFrame - the second rectangle + * @return {PIXI.Quad} Returns itself. + */ + + + Quad.prototype.map = function map(targetTextureFrame, destinationFrame) { + var x = 0; // destinationFrame.x / targetTextureFrame.width; + var y = 0; // destinationFrame.y / targetTextureFrame.height; + + this.uvs[0] = x; + this.uvs[1] = y; + + this.uvs[2] = x + destinationFrame.width / targetTextureFrame.width; + this.uvs[3] = y; + + this.uvs[4] = x + destinationFrame.width / targetTextureFrame.width; + this.uvs[5] = y + destinationFrame.height / targetTextureFrame.height; + + this.uvs[6] = x; + this.uvs[7] = y + destinationFrame.height / targetTextureFrame.height; + + x = destinationFrame.x; + y = destinationFrame.y; + + this.vertices[0] = x; + this.vertices[1] = y; + + this.vertices[2] = x + destinationFrame.width; + this.vertices[3] = y; + + this.vertices[4] = x + destinationFrame.width; + this.vertices[5] = y + destinationFrame.height; + + this.vertices[6] = x; + this.vertices[7] = y + destinationFrame.height; + + return this; + }; + + /** + * Binds the buffer and uploads the data + * + * @return {PIXI.Quad} Returns itself. + */ + + + Quad.prototype.upload = function upload() { + for (var i = 0; i < 4; i++) { + this.interleaved[i * 4] = this.vertices[i * 2]; + this.interleaved[i * 4 + 1] = this.vertices[i * 2 + 1]; + this.interleaved[i * 4 + 2] = this.uvs[i * 2]; + this.interleaved[i * 4 + 3] = this.uvs[i * 2 + 1]; + } + + this.vertexBuffer.upload(this.interleaved); + + return this; + }; + + /** + * Removes this quad from WebGL + */ + + + Quad.prototype.destroy = function destroy() { + var gl = this.gl; + + gl.deleteBuffer(this.vertexBuffer); + gl.deleteBuffer(this.indexBuffer); + }; + + return Quad; +}(); + +exports.default = Quad; + +},{"../../../utils/createIndicesForQuads":122,"pixi-gl-core":7}],96:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _math = require('../../../math'); + +var _const = require('../../../const'); + +var _settings = require('../../../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _pixiGlCore = require('pixi-gl-core'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @class + * @memberof PIXI + */ +var RenderTarget = function () { + /** + * @param {WebGLRenderingContext} gl - The current WebGL drawing context + * @param {number} [width=0] - the horizontal range of the filter + * @param {number} [height=0] - the vertical range of the filter + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [resolution=1] - The current resolution / device pixel ratio + * @param {boolean} [root=false] - Whether this object is the root element or not + */ + function RenderTarget(gl, width, height, scaleMode, resolution, root) { + _classCallCheck(this, RenderTarget); + + // TODO Resolution could go here ( eg low res blurs ) + + /** + * The current WebGL drawing context. + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + // next time to create a frame buffer and texture + + /** + * A frame buffer + * + * @member {PIXI.glCore.GLFramebuffer} + */ + this.frameBuffer = null; + + /** + * The texture + * + * @member {PIXI.glCore.GLTexture} + */ + this.texture = null; + + /** + * The background colour of this render target, as an array of [r,g,b,a] values + * + * @member {number[]} + */ + this.clearColor = [0, 0, 0, 0]; + + /** + * The size of the object as a rectangle + * + * @member {PIXI.Rectangle} + */ + this.size = new _math.Rectangle(0, 0, 1, 1); + + /** + * The current resolution / device pixel ratio + * + * @member {number} + * @default 1 + */ + this.resolution = resolution || _settings2.default.RESOLUTION; + + /** + * The projection matrix + * + * @member {PIXI.Matrix} + */ + this.projectionMatrix = new _math.Matrix(); + + /** + * The object's transform + * + * @member {PIXI.Matrix} + */ + this.transform = null; + + /** + * The frame. + * + * @member {PIXI.Rectangle} + */ + this.frame = null; + + /** + * The stencil buffer stores masking data for the render target + * + * @member {glCore.GLBuffer} + */ + this.defaultFrame = new _math.Rectangle(); + this.destinationFrame = null; + this.sourceFrame = null; + + /** + * The stencil buffer stores masking data for the render target + * + * @member {glCore.GLBuffer} + */ + this.stencilBuffer = null; + + /** + * The data structure for the stencil masks + * + * @member {PIXI.Graphics[]} + */ + this.stencilMaskStack = []; + + /** + * Stores filter data for the render target + * + * @member {object[]} + */ + this.filterData = null; + + /** + * The scale mode. + * + * @member {number} + * @default PIXI.settings.SCALE_MODE + * @see PIXI.SCALE_MODES + */ + this.scaleMode = scaleMode !== undefined ? scaleMode : _settings2.default.SCALE_MODE; + + /** + * Whether this object is the root element or not + * + * @member {boolean} + */ + this.root = root; + + if (!this.root) { + this.frameBuffer = _pixiGlCore.GLFramebuffer.createRGBA(gl, 100, 100); + + if (this.scaleMode === _const.SCALE_MODES.NEAREST) { + this.frameBuffer.texture.enableNearestScaling(); + } else { + this.frameBuffer.texture.enableLinearScaling(); + } + /* + A frame buffer needs a target to render to.. + create a texture and bind it attach it to the framebuffer.. + */ + + // this is used by the base texture + this.texture = this.frameBuffer.texture; + } else { + // make it a null framebuffer.. + this.frameBuffer = new _pixiGlCore.GLFramebuffer(gl, 100, 100); + this.frameBuffer.framebuffer = null; + } + + this.setFrame(); + + this.resize(width, height); + } + + /** + * Clears the filter texture. + * + * @param {number[]} [clearColor=this.clearColor] - Array of [r,g,b,a] to clear the framebuffer + */ + + + RenderTarget.prototype.clear = function clear(clearColor) { + var cc = clearColor || this.clearColor; + + this.frameBuffer.clear(cc[0], cc[1], cc[2], cc[3]); // r,g,b,a); + }; + + /** + * Binds the stencil buffer. + * + */ + + + RenderTarget.prototype.attachStencilBuffer = function attachStencilBuffer() { + // TODO check if stencil is done? + /** + * The stencil buffer is used for masking in pixi + * lets create one and then add attach it to the framebuffer.. + */ + if (!this.root) { + this.frameBuffer.enableStencil(); + } + }; + + /** + * Sets the frame of the render target. + * + * @param {Rectangle} destinationFrame - The destination frame. + * @param {Rectangle} sourceFrame - The source frame. + */ + + + RenderTarget.prototype.setFrame = function setFrame(destinationFrame, sourceFrame) { + this.destinationFrame = destinationFrame || this.destinationFrame || this.defaultFrame; + this.sourceFrame = sourceFrame || this.sourceFrame || this.destinationFrame; + }; + + /** + * Binds the buffers and initialises the viewport. + * + */ + + + RenderTarget.prototype.activate = function activate() { + // TOOD refactor usage of frame.. + var gl = this.gl; + + // make sure the texture is unbound! + this.frameBuffer.bind(); + + this.calculateProjection(this.destinationFrame, this.sourceFrame); + + if (this.transform) { + this.projectionMatrix.append(this.transform); + } + + // TODO add a check as them may be the same! + if (this.destinationFrame !== this.sourceFrame) { + gl.enable(gl.SCISSOR_TEST); + gl.scissor(this.destinationFrame.x | 0, this.destinationFrame.y | 0, this.destinationFrame.width * this.resolution | 0, this.destinationFrame.height * this.resolution | 0); + } else { + gl.disable(gl.SCISSOR_TEST); + } + + // TODO - does not need to be updated all the time?? + gl.viewport(this.destinationFrame.x | 0, this.destinationFrame.y | 0, this.destinationFrame.width * this.resolution | 0, this.destinationFrame.height * this.resolution | 0); + }; + + /** + * Updates the projection matrix based on a projection frame (which is a rectangle) + * + * @param {Rectangle} destinationFrame - The destination frame. + * @param {Rectangle} sourceFrame - The source frame. + */ + + + RenderTarget.prototype.calculateProjection = function calculateProjection(destinationFrame, sourceFrame) { + var pm = this.projectionMatrix; + + sourceFrame = sourceFrame || destinationFrame; + + pm.identity(); + + // TODO: make dest scale source + if (!this.root) { + pm.a = 1 / destinationFrame.width * 2; + pm.d = 1 / destinationFrame.height * 2; + + pm.tx = -1 - sourceFrame.x * pm.a; + pm.ty = -1 - sourceFrame.y * pm.d; + } else { + pm.a = 1 / destinationFrame.width * 2; + pm.d = -1 / destinationFrame.height * 2; + + pm.tx = -1 - sourceFrame.x * pm.a; + pm.ty = 1 - sourceFrame.y * pm.d; + } + }; + + /** + * Resizes the texture to the specified width and height + * + * @param {number} width - the new width of the texture + * @param {number} height - the new height of the texture + */ + + + RenderTarget.prototype.resize = function resize(width, height) { + width = width | 0; + height = height | 0; + + if (this.size.width === width && this.size.height === height) { + return; + } + + this.size.width = width; + this.size.height = height; + + this.defaultFrame.width = width; + this.defaultFrame.height = height; + + this.frameBuffer.resize(width * this.resolution, height * this.resolution); + + var projectionFrame = this.frame || this.size; + + this.calculateProjection(projectionFrame); + }; + + /** + * Destroys the render target. + * + */ + + + RenderTarget.prototype.destroy = function destroy() { + this.frameBuffer.destroy(); + + this.frameBuffer = null; + this.texture = null; + }; + + return RenderTarget; +}(); + +exports.default = RenderTarget; + +},{"../../../const":46,"../../../math":70,"../../../settings":101,"pixi-gl-core":7}],97:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = checkMaxIfStatmentsInShader; + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var fragTemplate = ['precision mediump float;', 'void main(void){', 'float test = 0.1;', '%forloop%', 'gl_FragColor = vec4(0.0);', '}'].join('\n'); + +function checkMaxIfStatmentsInShader(maxIfs, gl) { + var createTempContext = !gl; + + if (maxIfs === 0) { + throw new Error('Invalid value of `0` passed to `checkMaxIfStatementsInShader`'); + } + + if (createTempContext) { + var tinyCanvas = document.createElement('canvas'); + + tinyCanvas.width = 1; + tinyCanvas.height = 1; + + gl = _pixiGlCore2.default.createContext(tinyCanvas); + } + + var shader = gl.createShader(gl.FRAGMENT_SHADER); + + while (true) // eslint-disable-line no-constant-condition + { + var fragmentSrc = fragTemplate.replace(/%forloop%/gi, generateIfTestSrc(maxIfs)); + + gl.shaderSource(shader, fragmentSrc); + gl.compileShader(shader); + + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + maxIfs = maxIfs / 2 | 0; + } else { + // valid! + break; + } + } + + if (createTempContext) { + // get rid of context + if (gl.getExtension('WEBGL_lose_context')) { + gl.getExtension('WEBGL_lose_context').loseContext(); + } + } + + return maxIfs; +} + +function generateIfTestSrc(maxIfs) { + var src = ''; + + for (var i = 0; i < maxIfs; ++i) { + if (i > 0) { + src += '\nelse '; + } + + if (i < maxIfs - 1) { + src += 'if(test == ' + i + '.0){}'; + } + } + + return src; +} + +},{"pixi-gl-core":7}],98:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = mapWebGLBlendModesToPixi; + +var _const = require('../../../const'); + +/** + * Maps gl blend combinations to WebGL. + * + * @memberof PIXI + * @function mapWebGLBlendModesToPixi + * @private + * @param {WebGLRenderingContext} gl - The rendering context. + * @param {string[]} [array=[]] - The array to output into. + * @return {string[]} Mapped modes. + */ +function mapWebGLBlendModesToPixi(gl) { + var array = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + // TODO - premultiply alpha would be different. + // add a boolean for that! + array[_const.BLEND_MODES.NORMAL] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.ADD] = [gl.ONE, gl.DST_ALPHA]; + array[_const.BLEND_MODES.MULTIPLY] = [gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.SCREEN] = [gl.ONE, gl.ONE_MINUS_SRC_COLOR]; + array[_const.BLEND_MODES.OVERLAY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.DARKEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.LIGHTEN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.COLOR_DODGE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.COLOR_BURN] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.HARD_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.SOFT_LIGHT] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.DIFFERENCE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.EXCLUSION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.HUE] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.SATURATION] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.COLOR] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.LUMINOSITY] = [gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + + // not-premultiplied blend modes + array[_const.BLEND_MODES.NORMAL_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA]; + array[_const.BLEND_MODES.ADD_NPM] = [gl.SRC_ALPHA, gl.DST_ALPHA, gl.ONE, gl.DST_ALPHA]; + array[_const.BLEND_MODES.SCREEN_NPM] = [gl.SRC_ALPHA, gl.ONE_MINUS_SRC_COLOR, gl.ONE, gl.ONE_MINUS_SRC_COLOR]; + + return array; +} + +},{"../../../const":46}],99:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = mapWebGLDrawModesToPixi; + +var _const = require('../../../const'); + +/** + * Generic Mask Stack data structure. + * + * @memberof PIXI + * @function mapWebGLDrawModesToPixi + * @private + * @param {WebGLRenderingContext} gl - The current WebGL drawing context + * @param {object} [object={}] - The object to map into + * @return {object} The mapped draw modes. + */ +function mapWebGLDrawModesToPixi(gl) { + var object = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + object[_const.DRAW_MODES.POINTS] = gl.POINTS; + object[_const.DRAW_MODES.LINES] = gl.LINES; + object[_const.DRAW_MODES.LINE_LOOP] = gl.LINE_LOOP; + object[_const.DRAW_MODES.LINE_STRIP] = gl.LINE_STRIP; + object[_const.DRAW_MODES.TRIANGLES] = gl.TRIANGLES; + object[_const.DRAW_MODES.TRIANGLE_STRIP] = gl.TRIANGLE_STRIP; + object[_const.DRAW_MODES.TRIANGLE_FAN] = gl.TRIANGLE_FAN; + + return object; +} + +},{"../../../const":46}],100:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = validateContext; +function validateContext(gl) { + var attributes = gl.getContextAttributes(); + + // this is going to be fairly simple for now.. but at least we have room to grow! + if (!attributes.stencil) { + /* eslint-disable no-console */ + console.warn('Provided WebGL context does not have a stencil buffer, masks may not render correctly'); + /* eslint-enable no-console */ + } +} + +},{}],101:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _maxRecommendedTextures = require('./utils/maxRecommendedTextures'); + +var _maxRecommendedTextures2 = _interopRequireDefault(_maxRecommendedTextures); + +var _canUploadSameBuffer = require('./utils/canUploadSameBuffer'); + +var _canUploadSameBuffer2 = _interopRequireDefault(_canUploadSameBuffer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * User's customizable globals for overriding the default PIXI settings, such + * as a renderer's default resolution, framerate, float percision, etc. + * @example + * // Use the native window resolution as the default resolution + * // will support high-density displays when rendering + * PIXI.settings.RESOLUTION = window.devicePixelRatio. + * + * // Disable interpolation when scaling, will make texture be pixelated + * PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST; + * @namespace PIXI.settings + */ +exports.default = { + + /** + * Target frames per millisecond. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 0.06 + */ + TARGET_FPMS: 0.06, + + /** + * If set to true WebGL will attempt make textures mimpaped by default. + * Mipmapping will only succeed if the base texture uploaded has power of two dimensions. + * + * @static + * @memberof PIXI.settings + * @type {boolean} + * @default true + */ + MIPMAP_TEXTURES: true, + + /** + * Default resolution / device pixel ratio of the renderer. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 1 + */ + RESOLUTION: 1, + + /** + * Default filter resolution. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 1 + */ + FILTER_RESOLUTION: 1, + + /** + * The maximum textures that this device supports. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 32 + */ + SPRITE_MAX_TEXTURES: (0, _maxRecommendedTextures2.default)(32), + + // TODO: maybe change to SPRITE.BATCH_SIZE: 2000 + // TODO: maybe add PARTICLE.BATCH_SIZE: 15000 + + /** + * The default sprite batch size. + * + * The default aims to balance desktop and mobile devices. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 4096 + */ + SPRITE_BATCH_SIZE: 4096, + + /** + * The prefix that denotes a URL is for a retina asset. + * + * @static + * @memberof PIXI.settings + * @type {RegExp} + * @example `@2x` + * @default /@([0-9\.]+)x/ + */ + RETINA_PREFIX: /@([0-9\.]+)x/, + + /** + * The default render options if none are supplied to {@link PIXI.WebGLRenderer} + * or {@link PIXI.CanvasRenderer}. + * + * @static + * @constant + * @memberof PIXI.settings + * @type {object} + * @property {HTMLCanvasElement} view=null + * @property {number} resolution=1 + * @property {boolean} antialias=false + * @property {boolean} forceFXAA=false + * @property {boolean} autoResize=false + * @property {boolean} transparent=false + * @property {number} backgroundColor=0x000000 + * @property {boolean} clearBeforeRender=true + * @property {boolean} preserveDrawingBuffer=false + * @property {boolean} roundPixels=false + * @property {number} width=800 + * @property {number} height=600 + * @property {boolean} legacy=false + */ + RENDER_OPTIONS: { + view: null, + antialias: false, + forceFXAA: false, + autoResize: false, + transparent: false, + backgroundColor: 0x000000, + clearBeforeRender: true, + preserveDrawingBuffer: false, + roundPixels: false, + width: 800, + height: 600, + legacy: false + }, + + /** + * Default transform type. + * + * @static + * @memberof PIXI.settings + * @type {PIXI.TRANSFORM_MODE} + * @default PIXI.TRANSFORM_MODE.STATIC + */ + TRANSFORM_MODE: 0, + + /** + * Default Garbage Collection mode. + * + * @static + * @memberof PIXI.settings + * @type {PIXI.GC_MODES} + * @default PIXI.GC_MODES.AUTO + */ + GC_MODE: 0, + + /** + * Default Garbage Collection max idle. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 3600 + */ + GC_MAX_IDLE: 60 * 60, + + /** + * Default Garbage Collection maximum check count. + * + * @static + * @memberof PIXI.settings + * @type {number} + * @default 600 + */ + GC_MAX_CHECK_COUNT: 60 * 10, + + /** + * Default wrap modes that are supported by pixi. + * + * @static + * @memberof PIXI.settings + * @type {PIXI.WRAP_MODES} + * @default PIXI.WRAP_MODES.CLAMP + */ + WRAP_MODE: 0, + + /** + * The scale modes that are supported by pixi. + * + * @static + * @memberof PIXI.settings + * @type {PIXI.SCALE_MODES} + * @default PIXI.SCALE_MODES.LINEAR + */ + SCALE_MODE: 0, + + /** + * Default specify float precision in vertex shader. + * + * @static + * @memberof PIXI.settings + * @type {PIXI.PRECISION} + * @default PIXI.PRECISION.HIGH + */ + PRECISION_VERTEX: 'highp', + + /** + * Default specify float precision in fragment shader. + * + * @static + * @memberof PIXI.settings + * @type {PIXI.PRECISION} + * @default PIXI.PRECISION.MEDIUM + */ + PRECISION_FRAGMENT: 'mediump', + + /** + * Can we upload the same buffer in a single frame? + * + * @static + * @constant + * @memberof PIXI + * @type {boolean} + */ + CAN_UPLOAD_SAME_BUFFER: (0, _canUploadSameBuffer2.default)() + +}; + +},{"./utils/canUploadSameBuffer":121,"./utils/maxRecommendedTextures":126}],102:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _math = require('../math'); + +var _utils = require('../utils'); + +var _const = require('../const'); + +var _Texture = require('../textures/Texture'); + +var _Texture2 = _interopRequireDefault(_Texture); + +var _Container2 = require('../display/Container'); + +var _Container3 = _interopRequireDefault(_Container2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var tempPoint = new _math.Point(); + +/** + * The Sprite object is the base for all textured objects that are rendered to the screen + * + * A sprite can be created directly from an image like this: + * + * ```js + * let sprite = new PIXI.Sprite.fromImage('assets/image.png'); + * ``` + * + * @class + * @extends PIXI.Container + * @memberof PIXI + */ + +var Sprite = function (_Container) { + _inherits(Sprite, _Container); + + /** + * @param {PIXI.Texture} texture - The texture for this sprite + */ + function Sprite(texture) { + _classCallCheck(this, Sprite); + + /** + * The anchor sets the origin point of the texture. + * The default is 0,0 this means the texture's origin is the top left + * Setting the anchor to 0.5,0.5 means the texture's origin is centered + * Setting the anchor to 1,1 would mean the texture's origin point will be the bottom right corner + * + * @member {PIXI.ObservablePoint} + * @private + */ + var _this = _possibleConstructorReturn(this, _Container.call(this)); + + _this._anchor = new _math.ObservablePoint(_this._onAnchorUpdate, _this); + + /** + * The texture that the sprite is using + * + * @private + * @member {PIXI.Texture} + */ + _this._texture = null; + + /** + * The width of the sprite (this is initially set by the texture) + * + * @private + * @member {number} + */ + _this._width = 0; + + /** + * The height of the sprite (this is initially set by the texture) + * + * @private + * @member {number} + */ + _this._height = 0; + + /** + * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * + * @private + * @member {number} + * @default 0xFFFFFF + */ + _this._tint = null; + _this._tintRGB = null; + _this.tint = 0xFFFFFF; + + /** + * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + * @see PIXI.BLEND_MODES + */ + _this.blendMode = _const.BLEND_MODES.NORMAL; + + /** + * The shader that will be used to render the sprite. Set to null to remove a current shader. + * + * @member {PIXI.Filter|PIXI.Shader} + */ + _this.shader = null; + + /** + * An internal cached value of the tint. + * + * @private + * @member {number} + * @default 0xFFFFFF + */ + _this.cachedTint = 0xFFFFFF; + + // call texture setter + _this.texture = texture || _Texture2.default.EMPTY; + + /** + * this is used to store the vertex data of the sprite (basically a quad) + * + * @private + * @member {Float32Array} + */ + _this.vertexData = new Float32Array(8); + + /** + * This is used to calculate the bounds of the object IF it is a trimmed sprite + * + * @private + * @member {Float32Array} + */ + _this.vertexTrimmedData = null; + + _this._transformID = -1; + _this._textureID = -1; + + _this._transformTrimmedID = -1; + _this._textureTrimmedID = -1; + + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_renderWebGL' & '_renderCanvas' methods. + * + * @member {string} + * @default 'sprite' + */ + _this.pluginName = 'sprite'; + return _this; + } + + /** + * When the texture is updated, this event will fire to update the scale and frame + * + * @private + */ + + + Sprite.prototype._onTextureUpdate = function _onTextureUpdate() { + this._textureID = -1; + this._textureTrimmedID = -1; + + // so if _width is 0 then width was not set.. + if (this._width) { + this.scale.x = (0, _utils.sign)(this.scale.x) * this._width / this._texture.orig.width; + } + + if (this._height) { + this.scale.y = (0, _utils.sign)(this.scale.y) * this._height / this._texture.orig.height; + } + }; + + /** + * Called when the anchor position updates. + * + * @private + */ + + + Sprite.prototype._onAnchorUpdate = function _onAnchorUpdate() { + this._transformID = -1; + this._transformTrimmedID = -1; + }; + + /** + * calculates worldTransform * vertices, store it in vertexData + */ + + + Sprite.prototype.calculateVertices = function calculateVertices() { + if (this._transformID === this.transform._worldID && this._textureID === this._texture._updateID) { + return; + } + + this._transformID = this.transform._worldID; + this._textureID = this._texture._updateID; + + // set the vertex data + + var texture = this._texture; + var wt = this.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + var vertexData = this.vertexData; + var trim = texture.trim; + var orig = texture.orig; + var anchor = this._anchor; + + var w0 = 0; + var w1 = 0; + var h0 = 0; + var h1 = 0; + + if (trim) { + // if the sprite is trimmed and is not a tilingsprite then we need to add the extra + // space before transforming the sprite coords. + w1 = trim.x - anchor._x * orig.width; + w0 = w1 + trim.width; + + h1 = trim.y - anchor._y * orig.height; + h0 = h1 + trim.height; + } else { + w1 = -anchor._x * orig.width; + w0 = w1 + orig.width; + + h1 = -anchor._y * orig.height; + h0 = h1 + orig.height; + } + + // xy + vertexData[0] = a * w1 + c * h1 + tx; + vertexData[1] = d * h1 + b * w1 + ty; + + // xy + vertexData[2] = a * w0 + c * h1 + tx; + vertexData[3] = d * h1 + b * w0 + ty; + + // xy + vertexData[4] = a * w0 + c * h0 + tx; + vertexData[5] = d * h0 + b * w0 + ty; + + // xy + vertexData[6] = a * w1 + c * h0 + tx; + vertexData[7] = d * h0 + b * w1 + ty; + }; + + /** + * calculates worldTransform * vertices for a non texture with a trim. store it in vertexTrimmedData + * This is used to ensure that the true width and height of a trimmed texture is respected + */ + + + Sprite.prototype.calculateTrimmedVertices = function calculateTrimmedVertices() { + if (!this.vertexTrimmedData) { + this.vertexTrimmedData = new Float32Array(8); + } else if (this._transformTrimmedID === this.transform._worldID && this._textureTrimmedID === this._texture._updateID) { + return; + } + + this._transformTrimmedID = this.transform._worldID; + this._textureTrimmedID = this._texture._updateID; + + // lets do some special trim code! + var texture = this._texture; + var vertexData = this.vertexTrimmedData; + var orig = texture.orig; + var anchor = this._anchor; + + // lets calculate the new untrimmed bounds.. + var wt = this.transform.worldTransform; + var a = wt.a; + var b = wt.b; + var c = wt.c; + var d = wt.d; + var tx = wt.tx; + var ty = wt.ty; + + var w1 = -anchor._x * orig.width; + var w0 = w1 + orig.width; + + var h1 = -anchor._y * orig.height; + var h0 = h1 + orig.height; + + // xy + vertexData[0] = a * w1 + c * h1 + tx; + vertexData[1] = d * h1 + b * w1 + ty; + + // xy + vertexData[2] = a * w0 + c * h1 + tx; + vertexData[3] = d * h1 + b * w0 + ty; + + // xy + vertexData[4] = a * w0 + c * h0 + tx; + vertexData[5] = d * h0 + b * w0 + ty; + + // xy + vertexData[6] = a * w1 + c * h0 + tx; + vertexData[7] = d * h0 + b * w1 + ty; + }; + + /** + * + * Renders the object using the WebGL renderer + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The webgl renderer to use. + */ + + + Sprite.prototype._renderWebGL = function _renderWebGL(renderer) { + this.calculateVertices(); + + renderer.setObjectRenderer(renderer.plugins[this.pluginName]); + renderer.plugins[this.pluginName].render(this); + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ + + + Sprite.prototype._renderCanvas = function _renderCanvas(renderer) { + renderer.plugins[this.pluginName].render(this); + }; + + /** + * Updates the bounds of the sprite. + * + * @private + */ + + + Sprite.prototype._calculateBounds = function _calculateBounds() { + var trim = this._texture.trim; + var orig = this._texture.orig; + + // First lets check to see if the current texture has a trim.. + if (!trim || trim.width === orig.width && trim.height === orig.height) { + // no trim! lets use the usual calculations.. + this.calculateVertices(); + this._bounds.addQuad(this.vertexData); + } else { + // lets calculate a special trimmed bounds... + this.calculateTrimmedVertices(); + this._bounds.addQuad(this.vertexTrimmedData); + } + }; + + /** + * Gets the local bounds of the sprite object. + * + * @param {PIXI.Rectangle} rect - The output rectangle. + * @return {PIXI.Rectangle} The bounds. + */ + + + Sprite.prototype.getLocalBounds = function getLocalBounds(rect) { + // we can do a fast local bounds if the sprite has no children! + if (this.children.length === 0) { + this._bounds.minX = this._texture.orig.width * -this._anchor._x; + this._bounds.minY = this._texture.orig.height * -this._anchor._y; + this._bounds.maxX = this._texture.orig.width * (1 - this._anchor._x); + this._bounds.maxY = this._texture.orig.height * (1 - this._anchor._y); + + if (!rect) { + if (!this._localBoundsRect) { + this._localBoundsRect = new _math.Rectangle(); + } + + rect = this._localBoundsRect; + } + + return this._bounds.getRectangle(rect); + } + + return _Container.prototype.getLocalBounds.call(this, rect); + }; + + /** + * Tests if a point is inside this sprite + * + * @param {PIXI.Point} point - the point to test + * @return {boolean} the result of the test + */ + + + Sprite.prototype.containsPoint = function containsPoint(point) { + this.worldTransform.applyInverse(point, tempPoint); + + var width = this._texture.orig.width; + var height = this._texture.orig.height; + var x1 = -width * this.anchor.x; + var y1 = 0; + + if (tempPoint.x >= x1 && tempPoint.x < x1 + width) { + y1 = -height * this.anchor.y; + + if (tempPoint.y >= y1 && tempPoint.y < y1 + height) { + return true; + } + } + + return false; + }; + + /** + * Destroys this sprite and optionally its texture and children + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + + + Sprite.prototype.destroy = function destroy(options) { + _Container.prototype.destroy.call(this, options); + + this._anchor = null; + + var destroyTexture = typeof options === 'boolean' ? options : options && options.texture; + + if (destroyTexture) { + var destroyBaseTexture = typeof options === 'boolean' ? options : options && options.baseTexture; + + this._texture.destroy(!!destroyBaseTexture); + } + + this._texture = null; + this.shader = null; + }; + + // some helper functions.. + + /** + * Helper function that creates a new sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {number|string|PIXI.BaseTexture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from + * @return {PIXI.Sprite} The newly created sprite + */ + + + Sprite.from = function from(source) { + return new Sprite(_Texture2.default.from(source)); + }; + + /** + * Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId + * The frame ids are created when a Texture packer file has been loaded + * + * @static + * @param {string} frameId - The frame Id of the texture in the cache + * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the frameId + */ + + + Sprite.fromFrame = function fromFrame(frameId) { + var texture = _utils.TextureCache[frameId]; + + if (!texture) { + throw new Error('The frameId "' + frameId + '" does not exist in the texture cache'); + } + + return new Sprite(texture); + }; + + /** + * Helper function that creates a sprite that will contain a texture based on an image url + * If the image is not in the texture cache it will be loaded + * + * @static + * @param {string} imageId - The image url of the texture + * @param {boolean} [crossorigin=(auto)] - if you want to specify the cross-origin parameter + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - if you want to specify the scale mode, + * see {@link PIXI.SCALE_MODES} for possible values + * @return {PIXI.Sprite} A new Sprite using a texture from the texture cache matching the image id + */ + + + Sprite.fromImage = function fromImage(imageId, crossorigin, scaleMode) { + return new Sprite(_Texture2.default.fromImage(imageId, crossorigin, scaleMode)); + }; + + /** + * The width of the sprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + + _createClass(Sprite, [{ + key: 'width', + get: function get() { + return Math.abs(this.scale.x) * this._texture.orig.width; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + var s = (0, _utils.sign)(this.scale.x) || 1; + + this.scale.x = s * value / this._texture.orig.width; + this._width = value; + } + + /** + * The height of the sprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + return Math.abs(this.scale.y) * this._texture.orig.height; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + var s = (0, _utils.sign)(this.scale.y) || 1; + + this.scale.y = s * value / this._texture.orig.height; + this._height = value; + } + + /** + * The anchor sets the origin point of the texture. + * The default is 0,0 this means the texture's origin is the top left + * Setting the anchor to 0.5,0.5 means the texture's origin is centered + * Setting the anchor to 1,1 would mean the texture's origin point will be the bottom right corner + * + * @member {PIXI.ObservablePoint} + */ + + }, { + key: 'anchor', + get: function get() { + return this._anchor; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._anchor.copy(value); + } + + /** + * The tint applied to the sprite. This is a hex value. + * A value of 0xFFFFFF will remove any tint effect. + * + * @member {number} + * @default 0xFFFFFF + */ + + }, { + key: 'tint', + get: function get() { + return this._tint; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._tint = value; + this._tintRGB = (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); + } + + /** + * The texture that the sprite is using + * + * @member {PIXI.Texture} + */ + + }, { + key: 'texture', + get: function get() { + return this._texture; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (this._texture === value) { + return; + } + + this._texture = value; + this.cachedTint = 0xFFFFFF; + + this._textureID = -1; + this._textureTrimmedID = -1; + + if (value) { + // wait for the texture to load + if (value.baseTexture.hasLoaded) { + this._onTextureUpdate(); + } else { + value.once('update', this._onTextureUpdate, this); + } + } + } + }]); + + return Sprite; +}(_Container3.default); + +exports.default = Sprite; + +},{"../const":46,"../display/Container":48,"../math":70,"../textures/Texture":115,"../utils":124}],103:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _CanvasRenderer = require('../../renderers/canvas/CanvasRenderer'); + +var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); + +var _const = require('../../const'); + +var _math = require('../../math'); + +var _CanvasTinter = require('./CanvasTinter'); + +var _CanvasTinter2 = _interopRequireDefault(_CanvasTinter); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var canvasRenderWorldTransform = new _math.Matrix(); + +/** + * @author Mat Groves + * + * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ + * for creating the original PixiJS version! + * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now + * share 4 bytes on the vertex buffer + * + * Heavily inspired by LibGDX's CanvasSpriteRenderer: + * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/CanvasSpriteRenderer.java + */ + +/** + * Renderer dedicated to drawing and batching sprites. + * + * @class + * @private + * @memberof PIXI + */ + +var CanvasSpriteRenderer = function () { + /** + * @param {PIXI.WebGLRenderer} renderer -The renderer sprite this batch works for. + */ + function CanvasSpriteRenderer(renderer) { + _classCallCheck(this, CanvasSpriteRenderer); + + this.renderer = renderer; + } + + /** + * Renders the sprite object. + * + * @param {PIXI.Sprite} sprite - the sprite to render when using this spritebatch + */ + + + CanvasSpriteRenderer.prototype.render = function render(sprite) { + var texture = sprite._texture; + var renderer = this.renderer; + + var width = texture._frame.width; + var height = texture._frame.height; + + var wt = sprite.transform.worldTransform; + var dx = 0; + var dy = 0; + + if (texture.orig.width <= 0 || texture.orig.height <= 0 || !texture.baseTexture.source) { + return; + } + + renderer.setBlendMode(sprite.blendMode); + + // Ignore null sources + if (texture.valid) { + renderer.context.globalAlpha = sprite.worldAlpha; + + // If smoothingEnabled is supported and we need to change the smoothing property for sprite texture + var smoothingEnabled = texture.baseTexture.scaleMode === _const.SCALE_MODES.LINEAR; + + if (renderer.smoothProperty && renderer.context[renderer.smoothProperty] !== smoothingEnabled) { + renderer.context[renderer.smoothProperty] = smoothingEnabled; + } + + if (texture.trim) { + dx = texture.trim.width / 2 + texture.trim.x - sprite.anchor.x * texture.orig.width; + dy = texture.trim.height / 2 + texture.trim.y - sprite.anchor.y * texture.orig.height; + } else { + dx = (0.5 - sprite.anchor.x) * texture.orig.width; + dy = (0.5 - sprite.anchor.y) * texture.orig.height; + } + + if (texture.rotate) { + wt.copy(canvasRenderWorldTransform); + wt = canvasRenderWorldTransform; + _math.GroupD8.matrixAppendRotationInv(wt, texture.rotate, dx, dy); + // the anchor has already been applied above, so lets set it to zero + dx = 0; + dy = 0; + } + + dx -= width / 2; + dy -= height / 2; + + // Allow for pixel rounding + if (renderer.roundPixels) { + renderer.context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * renderer.resolution | 0, wt.ty * renderer.resolution | 0); + + dx = dx | 0; + dy = dy | 0; + } else { + renderer.context.setTransform(wt.a, wt.b, wt.c, wt.d, wt.tx * renderer.resolution, wt.ty * renderer.resolution); + } + + var resolution = texture.baseTexture.resolution; + + if (sprite.tint !== 0xFFFFFF) { + if (sprite.cachedTint !== sprite.tint || sprite.tintedTexture.tintId !== sprite._texture._updateID) { + sprite.cachedTint = sprite.tint; + + // TODO clean up caching - how to clean up the caches? + sprite.tintedTexture = _CanvasTinter2.default.getTintedTexture(sprite, sprite.tint); + } + + renderer.context.drawImage(sprite.tintedTexture, 0, 0, width * resolution, height * resolution, dx * renderer.resolution, dy * renderer.resolution, width * renderer.resolution, height * renderer.resolution); + } else { + renderer.context.drawImage(texture.baseTexture.source, texture._frame.x * resolution, texture._frame.y * resolution, width * resolution, height * resolution, dx * renderer.resolution, dy * renderer.resolution, width * renderer.resolution, height * renderer.resolution); + } + } + }; + + /** + * destroy the sprite object. + * + */ + + + CanvasSpriteRenderer.prototype.destroy = function destroy() { + this.renderer = null; + }; + + return CanvasSpriteRenderer; +}(); + +exports.default = CanvasSpriteRenderer; + + +_CanvasRenderer2.default.registerPlugin('sprite', CanvasSpriteRenderer); + +},{"../../const":46,"../../math":70,"../../renderers/canvas/CanvasRenderer":77,"./CanvasTinter":104}],104:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../../utils'); + +var _canUseNewCanvasBlendModes = require('../../renderers/canvas/utils/canUseNewCanvasBlendModes'); + +var _canUseNewCanvasBlendModes2 = _interopRequireDefault(_canUseNewCanvasBlendModes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Utility methods for Sprite/Texture tinting. + * + * @class + * @memberof PIXI + */ +var CanvasTinter = { + /** + * Basically this method just needs a sprite and a color and tints the sprite with the given color. + * + * @memberof PIXI.CanvasTinter + * @param {PIXI.Sprite} sprite - the sprite to tint + * @param {number} color - the color to use to tint the sprite with + * @return {HTMLCanvasElement} The tinted canvas + */ + getTintedTexture: function getTintedTexture(sprite, color) { + var texture = sprite._texture; + + color = CanvasTinter.roundColor(color); + + var stringColor = '#' + ('00000' + (color | 0).toString(16)).substr(-6); + + texture.tintCache = texture.tintCache || {}; + + var cachedTexture = texture.tintCache[stringColor]; + + var canvas = void 0; + + if (cachedTexture) { + if (cachedTexture.tintId === texture._updateID) { + return texture.tintCache[stringColor]; + } + + canvas = texture.tintCache[stringColor]; + } else { + canvas = CanvasTinter.canvas || document.createElement('canvas'); + } + + CanvasTinter.tintMethod(texture, color, canvas); + + canvas.tintId = texture._updateID; + + if (CanvasTinter.convertTintToImage) { + // is this better? + var tintImage = new Image(); + + tintImage.src = canvas.toDataURL(); + + texture.tintCache[stringColor] = tintImage; + } else { + texture.tintCache[stringColor] = canvas; + // if we are not converting the texture to an image then we need to lose the reference to the canvas + CanvasTinter.canvas = null; + } + + return canvas; + }, + + /** + * Tint a texture using the 'multiply' operation. + * + * @memberof PIXI.CanvasTinter + * @param {PIXI.Texture} texture - the texture to tint + * @param {number} color - the color to use to tint the sprite with + * @param {HTMLCanvasElement} canvas - the current canvas + */ + tintWithMultiply: function tintWithMultiply(texture, color, canvas) { + var context = canvas.getContext('2d'); + var crop = texture._frame.clone(); + var resolution = texture.baseTexture.resolution; + + crop.x *= resolution; + crop.y *= resolution; + crop.width *= resolution; + crop.height *= resolution; + + canvas.width = Math.ceil(crop.width); + canvas.height = Math.ceil(crop.height); + + context.save(); + context.fillStyle = '#' + ('00000' + (color | 0).toString(16)).substr(-6); + + context.fillRect(0, 0, crop.width, crop.height); + + context.globalCompositeOperation = 'multiply'; + + context.drawImage(texture.baseTexture.source, crop.x, crop.y, crop.width, crop.height, 0, 0, crop.width, crop.height); + + context.globalCompositeOperation = 'destination-atop'; + + context.drawImage(texture.baseTexture.source, crop.x, crop.y, crop.width, crop.height, 0, 0, crop.width, crop.height); + context.restore(); + }, + + /** + * Tint a texture using the 'overlay' operation. + * + * @memberof PIXI.CanvasTinter + * @param {PIXI.Texture} texture - the texture to tint + * @param {number} color - the color to use to tint the sprite with + * @param {HTMLCanvasElement} canvas - the current canvas + */ + tintWithOverlay: function tintWithOverlay(texture, color, canvas) { + var context = canvas.getContext('2d'); + var crop = texture._frame.clone(); + var resolution = texture.baseTexture.resolution; + + crop.x *= resolution; + crop.y *= resolution; + crop.width *= resolution; + crop.height *= resolution; + + canvas.width = Math.ceil(crop.width); + canvas.height = Math.ceil(crop.height); + + context.save(); + context.globalCompositeOperation = 'copy'; + context.fillStyle = '#' + ('00000' + (color | 0).toString(16)).substr(-6); + context.fillRect(0, 0, crop.width, crop.height); + + context.globalCompositeOperation = 'destination-atop'; + context.drawImage(texture.baseTexture.source, crop.x, crop.y, crop.width, crop.height, 0, 0, crop.width, crop.height); + + // context.globalCompositeOperation = 'copy'; + context.restore(); + }, + + + /** + * Tint a texture pixel per pixel. + * + * @memberof PIXI.CanvasTinter + * @param {PIXI.Texture} texture - the texture to tint + * @param {number} color - the color to use to tint the sprite with + * @param {HTMLCanvasElement} canvas - the current canvas + */ + tintWithPerPixel: function tintWithPerPixel(texture, color, canvas) { + var context = canvas.getContext('2d'); + var crop = texture._frame.clone(); + var resolution = texture.baseTexture.resolution; + + crop.x *= resolution; + crop.y *= resolution; + crop.width *= resolution; + crop.height *= resolution; + + canvas.width = Math.ceil(crop.width); + canvas.height = Math.ceil(crop.height); + + context.save(); + context.globalCompositeOperation = 'copy'; + context.drawImage(texture.baseTexture.source, crop.x, crop.y, crop.width, crop.height, 0, 0, crop.width, crop.height); + context.restore(); + + var rgbValues = (0, _utils.hex2rgb)(color); + var r = rgbValues[0]; + var g = rgbValues[1]; + var b = rgbValues[2]; + + var pixelData = context.getImageData(0, 0, crop.width, crop.height); + + var pixels = pixelData.data; + + for (var i = 0; i < pixels.length; i += 4) { + pixels[i + 0] *= r; + pixels[i + 1] *= g; + pixels[i + 2] *= b; + } + + context.putImageData(pixelData, 0, 0); + }, + + /** + * Rounds the specified color according to the CanvasTinter.cacheStepsPerColorChannel. + * + * @memberof PIXI.CanvasTinter + * @param {number} color - the color to round, should be a hex color + * @return {number} The rounded color. + */ + roundColor: function roundColor(color) { + var step = CanvasTinter.cacheStepsPerColorChannel; + + var rgbValues = (0, _utils.hex2rgb)(color); + + rgbValues[0] = Math.min(255, rgbValues[0] / step * step); + rgbValues[1] = Math.min(255, rgbValues[1] / step * step); + rgbValues[2] = Math.min(255, rgbValues[2] / step * step); + + return (0, _utils.rgb2hex)(rgbValues); + }, + + /** + * Number of steps which will be used as a cap when rounding colors. + * + * @memberof PIXI.CanvasTinter + * @type {number} + */ + cacheStepsPerColorChannel: 8, + + /** + * Tint cache boolean flag. + * + * @memberof PIXI.CanvasTinter + * @type {boolean} + */ + convertTintToImage: false, + + /** + * Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method. + * + * @memberof PIXI.CanvasTinter + * @type {boolean} + */ + canUseMultiply: (0, _canUseNewCanvasBlendModes2.default)(), + + /** + * The tinting method that will be used. + * + * @memberof PIXI.CanvasTinter + * @type {tintMethodFunctionType} + */ + tintMethod: 0 +}; + +CanvasTinter.tintMethod = CanvasTinter.canUseMultiply ? CanvasTinter.tintWithMultiply : CanvasTinter.tintWithPerPixel; + +/** + * The tintMethod type. + * + * @memberof PIXI.CanvasTinter + * @callback tintMethodFunctionType + * @param texture {PIXI.Texture} the texture to tint + * @param color {number} the color to use to tint the sprite with + * @param canvas {HTMLCanvasElement} the current canvas + */ + +exports.default = CanvasTinter; + +},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":80,"../../utils":124}],105:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @class + * @memberof PIXI + */ +var Buffer = function () { + /** + * @param {number} size - The size of the buffer in bytes. + */ + function Buffer(size) { + _classCallCheck(this, Buffer); + + this.vertices = new ArrayBuffer(size); + + /** + * View on the vertices as a Float32Array for positions + * + * @member {Float32Array} + */ + this.float32View = new Float32Array(this.vertices); + + /** + * View on the vertices as a Uint32Array for uvs + * + * @member {Float32Array} + */ + this.uint32View = new Uint32Array(this.vertices); + } + + /** + * Destroys the buffer. + * + */ + + + Buffer.prototype.destroy = function destroy() { + this.vertices = null; + this.positions = null; + this.uvs = null; + this.colors = null; + }; + + return Buffer; +}(); + +exports.default = Buffer; + +},{}],106:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _ObjectRenderer2 = require('../../renderers/webgl/utils/ObjectRenderer'); + +var _ObjectRenderer3 = _interopRequireDefault(_ObjectRenderer2); + +var _WebGLRenderer = require('../../renderers/webgl/WebGLRenderer'); + +var _WebGLRenderer2 = _interopRequireDefault(_WebGLRenderer); + +var _createIndicesForQuads = require('../../utils/createIndicesForQuads'); + +var _createIndicesForQuads2 = _interopRequireDefault(_createIndicesForQuads); + +var _generateMultiTextureShader = require('./generateMultiTextureShader'); + +var _generateMultiTextureShader2 = _interopRequireDefault(_generateMultiTextureShader); + +var _checkMaxIfStatmentsInShader = require('../../renderers/webgl/utils/checkMaxIfStatmentsInShader'); + +var _checkMaxIfStatmentsInShader2 = _interopRequireDefault(_checkMaxIfStatmentsInShader); + +var _BatchBuffer = require('./BatchBuffer'); + +var _BatchBuffer2 = _interopRequireDefault(_BatchBuffer); + +var _settings = require('../../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _utils = require('../../utils'); + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +var _bitTwiddle = require('bit-twiddle'); + +var _bitTwiddle2 = _interopRequireDefault(_bitTwiddle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var TICK = 0; +var TEXTURE_TICK = 0; + +/** + * Renderer dedicated to drawing and batching sprites. + * + * @class + * @private + * @memberof PIXI + * @extends PIXI.ObjectRenderer + */ + +var SpriteRenderer = function (_ObjectRenderer) { + _inherits(SpriteRenderer, _ObjectRenderer); + + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this sprite batch works for. + */ + function SpriteRenderer(renderer) { + _classCallCheck(this, SpriteRenderer); + + /** + * Number of values sent in the vertex buffer. + * aVertexPosition(2), aTextureCoord(1), aColor(1), aTextureId(1) = 5 + * + * @member {number} + */ + var _this = _possibleConstructorReturn(this, _ObjectRenderer.call(this, renderer)); + + _this.vertSize = 5; + + /** + * The size of the vertex information in bytes. + * + * @member {number} + */ + _this.vertByteSize = _this.vertSize * 4; + + /** + * The number of images in the SpriteRenderer before it flushes. + * + * @member {number} + */ + _this.size = _settings2.default.SPRITE_BATCH_SIZE; // 2000 is a nice balance between mobile / desktop + + // the total number of bytes in our batch + // let numVerts = this.size * 4 * this.vertByteSize; + + _this.buffers = []; + for (var i = 1; i <= _bitTwiddle2.default.nextPow2(_this.size); i *= 2) { + _this.buffers.push(new _BatchBuffer2.default(i * 4 * _this.vertByteSize)); + } + + /** + * Holds the indices of the geometry (quads) to draw + * + * @member {Uint16Array} + */ + _this.indices = (0, _createIndicesForQuads2.default)(_this.size); + + /** + * The default shaders that is used if a sprite doesn't have a more specific one. + * there is a shader for each number of textures that can be rendererd. + * These shaders will also be generated on the fly as required. + * @member {PIXI.Shader[]} + */ + _this.shader = null; + + _this.currentIndex = 0; + _this.groups = []; + + for (var k = 0; k < _this.size; k++) { + _this.groups[k] = { textures: [], textureCount: 0, ids: [], size: 0, start: 0, blend: 0 }; + } + + _this.sprites = []; + + _this.vertexBuffers = []; + _this.vaos = []; + + _this.vaoMax = 2; + _this.vertexCount = 0; + + _this.renderer.on('prerender', _this.onPrerender, _this); + return _this; + } + + /** + * Sets up the renderer context and necessary buffers. + * + * @private + */ + + + SpriteRenderer.prototype.onContextChange = function onContextChange() { + var gl = this.renderer.gl; + + if (this.renderer.legacy) { + this.MAX_TEXTURES = 1; + } else { + // step 1: first check max textures the GPU can handle. + this.MAX_TEXTURES = Math.min(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS), _settings2.default.SPRITE_MAX_TEXTURES); + + // step 2: check the maximum number of if statements the shader can have too.. + this.MAX_TEXTURES = (0, _checkMaxIfStatmentsInShader2.default)(this.MAX_TEXTURES, gl); + } + + this.shader = (0, _generateMultiTextureShader2.default)(gl, this.MAX_TEXTURES); + + // create a couple of buffers + this.indexBuffer = _pixiGlCore2.default.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW); + + // we use the second shader as the first one depending on your browser may omit aTextureId + // as it is not used by the shader so is optimized out. + + this.renderer.bindVao(null); + + var attrs = this.shader.attributes; + + for (var i = 0; i < this.vaoMax; i++) { + /* eslint-disable max-len */ + var vertexBuffer = this.vertexBuffers[i] = _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW); + /* eslint-enable max-len */ + + // build the vao object that will render.. + var vao = this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0).addAttribute(vertexBuffer, attrs.aTextureCoord, gl.UNSIGNED_SHORT, true, this.vertByteSize, 2 * 4).addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 3 * 4); + + if (attrs.aTextureId) { + vao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 4 * 4); + } + + this.vaos[i] = vao; + } + + this.vao = this.vaos[0]; + this.currentBlendMode = 99999; + + this.boundTextures = new Array(this.MAX_TEXTURES); + }; + + /** + * Called before the renderer starts rendering. + * + */ + + + SpriteRenderer.prototype.onPrerender = function onPrerender() { + this.vertexCount = 0; + }; + + /** + * Renders the sprite object. + * + * @param {PIXI.Sprite} sprite - the sprite to render when using this spritebatch + */ + + + SpriteRenderer.prototype.render = function render(sprite) { + // TODO set blend modes.. + // check texture.. + if (this.currentIndex >= this.size) { + this.flush(); + } + + // get the uvs for the texture + + // if the uvs have not updated then no point rendering just yet! + if (!sprite._texture._uvs) { + return; + } + + // push a texture. + // increment the batchsize + this.sprites[this.currentIndex++] = sprite; + }; + + /** + * Renders the content and empties the current batch. + * + */ + + + SpriteRenderer.prototype.flush = function flush() { + if (this.currentIndex === 0) { + return; + } + + var gl = this.renderer.gl; + var MAX_TEXTURES = this.MAX_TEXTURES; + + var np2 = _bitTwiddle2.default.nextPow2(this.currentIndex); + var log2 = _bitTwiddle2.default.log2(np2); + var buffer = this.buffers[log2]; + + var sprites = this.sprites; + var groups = this.groups; + + var float32View = buffer.float32View; + var uint32View = buffer.uint32View; + + var boundTextures = this.boundTextures; + var rendererBoundTextures = this.renderer.boundTextures; + var touch = this.renderer.textureGC.count; + + var index = 0; + var nextTexture = void 0; + var currentTexture = void 0; + var groupCount = 1; + var textureCount = 0; + var currentGroup = groups[0]; + var vertexData = void 0; + var uvs = void 0; + var blendMode = _utils.premultiplyBlendMode[sprites[0]._texture.baseTexture.premultipliedAlpha ? 1 : 0][sprites[0].blendMode]; + + currentGroup.textureCount = 0; + currentGroup.start = 0; + currentGroup.blend = blendMode; + + TICK++; + + var i = void 0; + + // copy textures.. + for (i = 0; i < MAX_TEXTURES; ++i) { + boundTextures[i] = rendererBoundTextures[i]; + boundTextures[i]._virtalBoundId = i; + } + + for (i = 0; i < this.currentIndex; ++i) { + // upload the sprite elemetns... + // they have all ready been calculated so we just need to push them into the buffer. + var sprite = sprites[i]; + + nextTexture = sprite._texture.baseTexture; + + var spriteBlendMode = _utils.premultiplyBlendMode[Number(nextTexture.premultipliedAlpha)][sprite.blendMode]; + + if (blendMode !== spriteBlendMode) { + // finish a group.. + blendMode = spriteBlendMode; + + // force the batch to break! + currentTexture = null; + textureCount = MAX_TEXTURES; + TICK++; + } + + if (currentTexture !== nextTexture) { + currentTexture = nextTexture; + + if (nextTexture._enabled !== TICK) { + if (textureCount === MAX_TEXTURES) { + TICK++; + + currentGroup.size = i - currentGroup.start; + + textureCount = 0; + + currentGroup = groups[groupCount++]; + currentGroup.blend = blendMode; + currentGroup.textureCount = 0; + currentGroup.start = i; + } + + nextTexture.touched = touch; + + if (nextTexture._virtalBoundId === -1) { + for (var j = 0; j < MAX_TEXTURES; ++j) { + var tIndex = (j + TEXTURE_TICK) % MAX_TEXTURES; + + var t = boundTextures[tIndex]; + + if (t._enabled !== TICK) { + TEXTURE_TICK++; + + t._virtalBoundId = -1; + + nextTexture._virtalBoundId = tIndex; + + boundTextures[tIndex] = nextTexture; + break; + } + } + } + + nextTexture._enabled = TICK; + + currentGroup.textureCount++; + currentGroup.ids[textureCount] = nextTexture._virtalBoundId; + currentGroup.textures[textureCount++] = nextTexture; + } + } + + vertexData = sprite.vertexData; + + // TODO this sum does not need to be set each frame.. + uvs = sprite._texture._uvs.uvsUint32; + + if (this.renderer.roundPixels) { + var resolution = this.renderer.resolution; + + // xy + float32View[index] = (vertexData[0] * resolution | 0) / resolution; + float32View[index + 1] = (vertexData[1] * resolution | 0) / resolution; + + // xy + float32View[index + 5] = (vertexData[2] * resolution | 0) / resolution; + float32View[index + 6] = (vertexData[3] * resolution | 0) / resolution; + + // xy + float32View[index + 10] = (vertexData[4] * resolution | 0) / resolution; + float32View[index + 11] = (vertexData[5] * resolution | 0) / resolution; + + // xy + float32View[index + 15] = (vertexData[6] * resolution | 0) / resolution; + float32View[index + 16] = (vertexData[7] * resolution | 0) / resolution; + } else { + // xy + float32View[index] = vertexData[0]; + float32View[index + 1] = vertexData[1]; + + // xy + float32View[index + 5] = vertexData[2]; + float32View[index + 6] = vertexData[3]; + + // xy + float32View[index + 10] = vertexData[4]; + float32View[index + 11] = vertexData[5]; + + // xy + float32View[index + 15] = vertexData[6]; + float32View[index + 16] = vertexData[7]; + } + + uint32View[index + 2] = uvs[0]; + uint32View[index + 7] = uvs[1]; + uint32View[index + 12] = uvs[2]; + uint32View[index + 17] = uvs[3]; + /* eslint-disable max-len */ + var alpha = Math.min(sprite.worldAlpha, 1.0); + // we dont call extra function if alpha is 1.0, that's faster + var argb = alpha < 1.0 && nextTexture.premultipliedAlpha ? (0, _utils.premultiplyTint)(sprite._tintRGB, alpha) : sprite._tintRGB + (alpha * 255 << 24); + + uint32View[index + 3] = uint32View[index + 8] = uint32View[index + 13] = uint32View[index + 18] = argb; + float32View[index + 4] = float32View[index + 9] = float32View[index + 14] = float32View[index + 19] = nextTexture._virtalBoundId; + /* eslint-enable max-len */ + + index += 20; + } + + currentGroup.size = i - currentGroup.start; + + if (!_settings2.default.CAN_UPLOAD_SAME_BUFFER) { + // this is still needed for IOS performance.. + // it really does not like uploading to the same buffer in a single frame! + if (this.vaoMax <= this.vertexCount) { + this.vaoMax++; + + var attrs = this.shader.attributes; + + /* eslint-disable max-len */ + var vertexBuffer = this.vertexBuffers[this.vertexCount] = _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW); + /* eslint-enable max-len */ + + // build the vao object that will render.. + var vao = this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0).addAttribute(vertexBuffer, attrs.aTextureCoord, gl.UNSIGNED_SHORT, true, this.vertByteSize, 2 * 4).addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 3 * 4); + + if (attrs.aTextureId) { + vao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 4 * 4); + } + + this.vaos[this.vertexCount] = vao; + } + + this.renderer.bindVao(this.vaos[this.vertexCount]); + + this.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, false); + + this.vertexCount++; + } else { + // lets use the faster option, always use buffer number 0 + this.vertexBuffers[this.vertexCount].upload(buffer.vertices, 0, true); + } + + for (i = 0; i < MAX_TEXTURES; ++i) { + rendererBoundTextures[i]._virtalBoundId = -1; + } + + // render the groups.. + for (i = 0; i < groupCount; ++i) { + var group = groups[i]; + var groupTextureCount = group.textureCount; + + for (var _j = 0; _j < groupTextureCount; _j++) { + currentTexture = group.textures[_j]; + + // reset virtual ids.. + // lets do a quick check.. + if (rendererBoundTextures[group.ids[_j]] !== currentTexture) { + this.renderer.bindTexture(currentTexture, group.ids[_j], true); + } + + // reset the virtualId.. + currentTexture._virtalBoundId = -1; + } + + // set the blend mode.. + this.renderer.state.setBlendMode(group.blend); + + gl.drawElements(gl.TRIANGLES, group.size * 6, gl.UNSIGNED_SHORT, group.start * 6 * 2); + } + + // reset elements for the next flush + this.currentIndex = 0; + }; + + /** + * Starts a new sprite batch. + */ + + + SpriteRenderer.prototype.start = function start() { + this.renderer.bindShader(this.shader); + + if (_settings2.default.CAN_UPLOAD_SAME_BUFFER) { + // bind buffer #0, we don't need others + this.renderer.bindVao(this.vaos[this.vertexCount]); + + this.vertexBuffers[this.vertexCount].bind(); + } + }; + + /** + * Stops and flushes the current batch. + * + */ + + + SpriteRenderer.prototype.stop = function stop() { + this.flush(); + }; + + /** + * Destroys the SpriteRenderer. + * + */ + + + SpriteRenderer.prototype.destroy = function destroy() { + for (var i = 0; i < this.vaoMax; i++) { + if (this.vertexBuffers[i]) { + this.vertexBuffers[i].destroy(); + } + if (this.vaos[i]) { + this.vaos[i].destroy(); + } + } + + if (this.indexBuffer) { + this.indexBuffer.destroy(); + } + + this.renderer.off('prerender', this.onPrerender, this); + + _ObjectRenderer.prototype.destroy.call(this); + + if (this.shader) { + this.shader.destroy(); + this.shader = null; + } + + this.vertexBuffers = null; + this.vaos = null; + this.indexBuffer = null; + this.indices = null; + + this.sprites = null; + + for (var _i = 0; _i < this.buffers.length; ++_i) { + this.buffers[_i].destroy(); + } + }; + + return SpriteRenderer; +}(_ObjectRenderer3.default); + +exports.default = SpriteRenderer; + + +_WebGLRenderer2.default.registerPlugin('sprite', SpriteRenderer); + +},{"../../renderers/webgl/WebGLRenderer":84,"../../renderers/webgl/utils/ObjectRenderer":94,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":97,"../../settings":101,"../../utils":124,"../../utils/createIndicesForQuads":122,"./BatchBuffer":105,"./generateMultiTextureShader":107,"bit-twiddle":18,"pixi-gl-core":7}],107:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = generateMultiTextureShader; + +var _Shader = require('../../Shader'); + +var _Shader2 = _interopRequireDefault(_Shader); + +var _path = require('path'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var fragTemplate = ['varying vec2 vTextureCoord;', 'varying vec4 vColor;', 'varying float vTextureId;', 'uniform sampler2D uSamplers[%count%];', 'void main(void){', 'vec4 color;', 'float textureId = floor(vTextureId+0.5);', '%forloop%', 'gl_FragColor = color * vColor;', '}'].join('\n'); + +function generateMultiTextureShader(gl, maxTextures) { + var vertexSrc = 'precision highp float;\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\nattribute vec4 aColor;\r\nattribute float aTextureId;\r\n\r\nuniform mat3 projectionMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\nvarying vec4 vColor;\r\nvarying float vTextureId;\r\n\r\nvoid main(void){\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = aTextureCoord;\r\n vTextureId = aTextureId;\r\n vColor = aColor;\r\n}\r\n'; + var fragmentSrc = fragTemplate; + + fragmentSrc = fragmentSrc.replace(/%count%/gi, maxTextures); + fragmentSrc = fragmentSrc.replace(/%forloop%/gi, generateSampleSrc(maxTextures)); + + var shader = new _Shader2.default(gl, vertexSrc, fragmentSrc); + + var sampleValues = []; + + for (var i = 0; i < maxTextures; i++) { + sampleValues[i] = i; + } + + shader.bind(); + shader.uniforms.uSamplers = sampleValues; + + return shader; +} + +function generateSampleSrc(maxTextures) { + var src = ''; + + src += '\n'; + src += '\n'; + + for (var i = 0; i < maxTextures; i++) { + if (i > 0) { + src += '\nelse '; + } + + if (i < maxTextures - 1) { + src += 'if(textureId == ' + i + '.0)'; + } + + src += '\n{'; + src += '\n\tcolor = texture2D(uSamplers[' + i + '], vTextureCoord);'; + src += '\n}'; + } + + src += '\n'; + src += '\n'; + + return src; +} + +},{"../../Shader":44,"path":25}],108:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _Sprite2 = require('../sprites/Sprite'); + +var _Sprite3 = _interopRequireDefault(_Sprite2); + +var _Texture = require('../textures/Texture'); + +var _Texture2 = _interopRequireDefault(_Texture); + +var _math = require('../math'); + +var _utils = require('../utils'); + +var _const = require('../const'); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _TextStyle = require('./TextStyle'); + +var _TextStyle2 = _interopRequireDefault(_TextStyle); + +var _TextMetrics = require('./TextMetrics'); + +var _TextMetrics2 = _interopRequireDefault(_TextMetrics); + +var _trimCanvas = require('../utils/trimCanvas'); + +var _trimCanvas2 = _interopRequireDefault(_trimCanvas); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint max-depth: [2, 8] */ + + +var defaultDestroyOptions = { + texture: true, + children: false, + baseTexture: true +}; + +/** + * A Text Object will create a line or multiple lines of text. To split a line you can use '\n' in your text string, + * or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object. + * + * A Text can be created directly from a string and a style object + * + * ```js + * let text = new PIXI.Text('This is a PixiJS text',{fontFamily : 'Arial', fontSize: 24, fill : 0xff1010, align : 'center'}); + * ``` + * + * @class + * @extends PIXI.Sprite + * @memberof PIXI + */ + +var Text = function (_Sprite) { + _inherits(Text, _Sprite); + + /** + * @param {string} text - The string that you would like the text to display + * @param {object|PIXI.TextStyle} [style] - The style parameters + * @param {HTMLCanvasElement} [canvas] - The canvas element for drawing text + */ + function Text(text, style, canvas) { + _classCallCheck(this, Text); + + canvas = canvas || document.createElement('canvas'); + + canvas.width = 3; + canvas.height = 3; + + var texture = _Texture2.default.fromCanvas(canvas, _settings2.default.SCALE_MODE, 'text'); + + texture.orig = new _math.Rectangle(); + texture.trim = new _math.Rectangle(); + + // base texture is already automatically added to the cache, now adding the actual texture + var _this = _possibleConstructorReturn(this, _Sprite.call(this, texture)); + + _Texture2.default.addToCache(_this._texture, _this._texture.baseTexture.textureCacheIds[0]); + + /** + * The canvas element that everything is drawn to + * + * @member {HTMLCanvasElement} + */ + _this.canvas = canvas; + + /** + * The canvas 2d context that everything is drawn with + * @member {CanvasRenderingContext2D} + */ + _this.context = _this.canvas.getContext('2d'); + + /** + * The resolution / device pixel ratio of the canvas. This is set automatically by the renderer. + * @member {number} + * @default 1 + */ + _this.resolution = _settings2.default.RESOLUTION; + + /** + * Private tracker for the current text. + * + * @member {string} + * @private + */ + _this._text = null; + + /** + * Private tracker for the current style. + * + * @member {object} + * @private + */ + _this._style = null; + /** + * Private listener to track style changes. + * + * @member {Function} + * @private + */ + _this._styleListener = null; + + /** + * Private tracker for the current font. + * + * @member {string} + * @private + */ + _this._font = ''; + + _this.text = text; + _this.style = style; + + _this.localStyleID = -1; + return _this; + } + + /** + * Renders text and updates it when needed. + * + * @private + * @param {boolean} respectDirty - Whether to abort updating the text if the Text isn't dirty and the function is called. + */ + + + Text.prototype.updateText = function updateText(respectDirty) { + var style = this._style; + + // check if style has changed.. + if (this.localStyleID !== style.styleID) { + this.dirty = true; + this.localStyleID = style.styleID; + } + + if (!this.dirty && respectDirty) { + return; + } + + this._font = this._style.toFontString(); + + var context = this.context; + var measured = _TextMetrics2.default.measureText(this._text, this._style, this._style.wordWrap, this.canvas); + var width = measured.width; + var height = measured.height; + var lines = measured.lines; + var lineHeight = measured.lineHeight; + var lineWidths = measured.lineWidths; + var maxLineWidth = measured.maxLineWidth; + var fontProperties = measured.fontProperties; + + this.canvas.width = Math.ceil((width + style.padding * 2) * this.resolution); + this.canvas.height = Math.ceil((height + style.padding * 2) * this.resolution); + + context.scale(this.resolution, this.resolution); + + context.clearRect(0, 0, this.canvas.width, this.canvas.height); + + context.font = this._font; + context.strokeStyle = style.stroke; + context.lineWidth = style.strokeThickness; + context.textBaseline = style.textBaseline; + context.lineJoin = style.lineJoin; + context.miterLimit = style.miterLimit; + + var linePositionX = void 0; + var linePositionY = void 0; + + if (style.dropShadow) { + context.fillStyle = style.dropShadowColor; + context.globalAlpha = style.dropShadowAlpha; + context.shadowBlur = style.dropShadowBlur; + + if (style.dropShadowBlur > 0) { + context.shadowColor = style.dropShadowColor; + } + + var xShadowOffset = Math.cos(style.dropShadowAngle) * style.dropShadowDistance; + var yShadowOffset = Math.sin(style.dropShadowAngle) * style.dropShadowDistance; + + for (var i = 0; i < lines.length; i++) { + linePositionX = style.strokeThickness / 2; + linePositionY = style.strokeThickness / 2 + i * lineHeight + fontProperties.ascent; + + if (style.align === 'right') { + linePositionX += maxLineWidth - lineWidths[i]; + } else if (style.align === 'center') { + linePositionX += (maxLineWidth - lineWidths[i]) / 2; + } + + if (style.fill) { + this.drawLetterSpacing(lines[i], linePositionX + xShadowOffset + style.padding, linePositionY + yShadowOffset + style.padding); + + if (style.stroke && style.strokeThickness) { + context.strokeStyle = style.dropShadowColor; + this.drawLetterSpacing(lines[i], linePositionX + xShadowOffset + style.padding, linePositionY + yShadowOffset + style.padding, true); + context.strokeStyle = style.stroke; + } + } + } + } + + // reset the shadow blur and alpha that was set by the drop shadow, for the regular text + context.shadowBlur = 0; + context.globalAlpha = 1; + + // set canvas text styles + context.fillStyle = this._generateFillStyle(style, lines); + + // draw lines line by line + for (var _i = 0; _i < lines.length; _i++) { + linePositionX = style.strokeThickness / 2; + linePositionY = style.strokeThickness / 2 + _i * lineHeight + fontProperties.ascent; + + if (style.align === 'right') { + linePositionX += maxLineWidth - lineWidths[_i]; + } else if (style.align === 'center') { + linePositionX += (maxLineWidth - lineWidths[_i]) / 2; + } + + if (style.stroke && style.strokeThickness) { + this.drawLetterSpacing(lines[_i], linePositionX + style.padding, linePositionY + style.padding, true); + } + + if (style.fill) { + this.drawLetterSpacing(lines[_i], linePositionX + style.padding, linePositionY + style.padding); + } + } + + this.updateTexture(); + }; + + /** + * Render the text with letter-spacing. + * @param {string} text - The text to draw + * @param {number} x - Horizontal position to draw the text + * @param {number} y - Vertical position to draw the text + * @param {boolean} [isStroke=false] - Is this drawing for the outside stroke of the + * text? If not, it's for the inside fill + * @private + */ + + + Text.prototype.drawLetterSpacing = function drawLetterSpacing(text, x, y) { + var isStroke = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + var style = this._style; + + // letterSpacing of 0 means normal + var letterSpacing = style.letterSpacing; + + if (letterSpacing === 0) { + if (isStroke) { + this.context.strokeText(text, x, y); + } else { + this.context.fillText(text, x, y); + } + + return; + } + + var characters = String.prototype.split.call(text, ''); + var currentPosition = x; + var index = 0; + var current = ''; + + while (index < text.length) { + current = characters[index++]; + if (isStroke) { + this.context.strokeText(current, currentPosition, y); + } else { + this.context.fillText(current, currentPosition, y); + } + currentPosition += this.context.measureText(current).width + letterSpacing; + } + }; + + /** + * Updates texture size based on canvas size + * + * @private + */ + + + Text.prototype.updateTexture = function updateTexture() { + var canvas = this.canvas; + + if (this._style.trim) { + var trimmed = (0, _trimCanvas2.default)(canvas); + + canvas.width = trimmed.width; + canvas.height = trimmed.height; + this.context.putImageData(trimmed.data, 0, 0); + } + + var texture = this._texture; + var style = this._style; + var padding = style.trim ? 0 : style.padding; + var baseTexture = texture.baseTexture; + + baseTexture.hasLoaded = true; + baseTexture.resolution = this.resolution; + + baseTexture.realWidth = canvas.width; + baseTexture.realHeight = canvas.height; + baseTexture.width = canvas.width / this.resolution; + baseTexture.height = canvas.height / this.resolution; + + texture.trim.width = texture._frame.width = canvas.width / this.resolution; + texture.trim.height = texture._frame.height = canvas.height / this.resolution; + texture.trim.x = -padding; + texture.trim.y = -padding; + + texture.orig.width = texture._frame.width - padding * 2; + texture.orig.height = texture._frame.height - padding * 2; + + // call sprite onTextureUpdate to update scale if _width or _height were set + this._onTextureUpdate(); + + baseTexture.emit('update', baseTexture); + + this.dirty = false; + }; + + /** + * Renders the object using the WebGL renderer + * + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + Text.prototype.renderWebGL = function renderWebGL(renderer) { + if (this.resolution !== renderer.resolution) { + this.resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + _Sprite.prototype.renderWebGL.call(this, renderer); + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The renderer + */ + + + Text.prototype._renderCanvas = function _renderCanvas(renderer) { + if (this.resolution !== renderer.resolution) { + this.resolution = renderer.resolution; + this.dirty = true; + } + + this.updateText(true); + + _Sprite.prototype._renderCanvas.call(this, renderer); + }; + + /** + * Gets the local bounds of the text object. + * + * @param {Rectangle} rect - The output rectangle. + * @return {Rectangle} The bounds. + */ + + + Text.prototype.getLocalBounds = function getLocalBounds(rect) { + this.updateText(true); + + return _Sprite.prototype.getLocalBounds.call(this, rect); + }; + + /** + * calculates the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account. + */ + + + Text.prototype._calculateBounds = function _calculateBounds() { + this.updateText(true); + this.calculateVertices(); + // if we have already done this on THIS frame. + this._bounds.addQuad(this.vertexData); + }; + + /** + * Method to be called upon a TextStyle change. + * @private + */ + + + Text.prototype._onStyleChange = function _onStyleChange() { + this.dirty = true; + }; + + /** + * Generates the fill style. Can automatically generate a gradient based on the fill style being an array + * + * @private + * @param {object} style - The style. + * @param {string[]} lines - The lines of text. + * @return {string|number|CanvasGradient} The fill style + */ + + + Text.prototype._generateFillStyle = function _generateFillStyle(style, lines) { + if (!Array.isArray(style.fill)) { + return style.fill; + } + + // cocoon on canvas+ cannot generate textures, so use the first colour instead + if (navigator.isCocoonJS) { + return style.fill[0]; + } + + // the gradient will be evenly spaced out according to how large the array is. + // ['#FF0000', '#00FF00', '#0000FF'] would created stops at 0.25, 0.5 and 0.75 + var gradient = void 0; + var totalIterations = void 0; + var currentIteration = void 0; + var stop = void 0; + + var width = this.canvas.width / this.resolution; + var height = this.canvas.height / this.resolution; + + // make a copy of the style settings, so we can manipulate them later + var fill = style.fill.slice(); + var fillGradientStops = style.fillGradientStops.slice(); + + // wanting to evenly distribute the fills. So an array of 4 colours should give fills of 0.25, 0.5 and 0.75 + if (!fillGradientStops.length) { + var lengthPlus1 = fill.length + 1; + + for (var i = 1; i < lengthPlus1; ++i) { + fillGradientStops.push(i / lengthPlus1); + } + } + + // stop the bleeding of the last gradient on the line above to the top gradient of the this line + // by hard defining the first gradient colour at point 0, and last gradient colour at point 1 + fill.unshift(style.fill[0]); + fillGradientStops.unshift(0); + + fill.push(style.fill[style.fill.length - 1]); + fillGradientStops.push(1); + + if (style.fillGradientType === _const.TEXT_GRADIENT.LINEAR_VERTICAL) { + // start the gradient at the top center of the canvas, and end at the bottom middle of the canvas + gradient = this.context.createLinearGradient(width / 2, 0, width / 2, height); + + // we need to repeat the gradient so that each individual line of text has the same vertical gradient effect + // ['#FF0000', '#00FF00', '#0000FF'] over 2 lines would create stops at 0.125, 0.25, 0.375, 0.625, 0.75, 0.875 + totalIterations = (fill.length + 1) * lines.length; + currentIteration = 0; + for (var _i2 = 0; _i2 < lines.length; _i2++) { + currentIteration += 1; + for (var j = 0; j < fill.length; j++) { + if (typeof fillGradientStops[j] === 'number') { + stop = fillGradientStops[j] / lines.length + _i2 / lines.length; + } else { + stop = currentIteration / totalIterations; + } + gradient.addColorStop(stop, fill[j]); + currentIteration++; + } + } + } else { + // start the gradient at the center left of the canvas, and end at the center right of the canvas + gradient = this.context.createLinearGradient(0, height / 2, width, height / 2); + + // can just evenly space out the gradients in this case, as multiple lines makes no difference + // to an even left to right gradient + totalIterations = fill.length + 1; + currentIteration = 1; + + for (var _i3 = 0; _i3 < fill.length; _i3++) { + if (typeof fillGradientStops[_i3] === 'number') { + stop = fillGradientStops[_i3]; + } else { + stop = currentIteration / totalIterations; + } + gradient.addColorStop(stop, fill[_i3]); + currentIteration++; + } + } + + return gradient; + }; + + /** + * Destroys this text object. + * Note* Unlike a Sprite, a Text object will automatically destroy its baseTexture and texture as + * the majority of the time the texture will not be shared with any other Sprites. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their + * destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=true] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=true] - Should it destroy the base texture of the sprite as well + */ + + + Text.prototype.destroy = function destroy(options) { + if (typeof options === 'boolean') { + options = { children: options }; + } + + options = Object.assign({}, defaultDestroyOptions, options); + + _Sprite.prototype.destroy.call(this, options); + + // make sure to reset the the context and canvas.. dont want this hanging around in memory! + this.context = null; + this.canvas = null; + + this._style = null; + }; + + /** + * The width of the Text, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + + _createClass(Text, [{ + key: 'width', + get: function get() { + this.updateText(true); + + return Math.abs(this.scale.x) * this._texture.orig.width; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.updateText(true); + + var s = (0, _utils.sign)(this.scale.x) || 1; + + this.scale.x = s * value / this._texture.orig.width; + this._width = value; + } + + /** + * The height of the Text, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + this.updateText(true); + + return Math.abs(this.scale.y) * this._texture.orig.height; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.updateText(true); + + var s = (0, _utils.sign)(this.scale.y) || 1; + + this.scale.y = s * value / this._texture.orig.height; + this._height = value; + } + + /** + * Set the style of the text. Set up an event listener to listen for changes on the style + * object and mark the text as dirty. + * + * @member {object|PIXI.TextStyle} + */ + + }, { + key: 'style', + get: function get() { + return this._style; + }, + set: function set(style) // eslint-disable-line require-jsdoc + { + style = style || {}; + + if (style instanceof _TextStyle2.default) { + this._style = style; + } else { + this._style = new _TextStyle2.default(style); + } + + this.localStyleID = -1; + this.dirty = true; + } + + /** + * Set the copy for the text object. To split a line you can use '\n'. + * + * @member {string} + */ + + }, { + key: 'text', + get: function get() { + return this._text; + }, + set: function set(text) // eslint-disable-line require-jsdoc + { + text = String(text === '' || text === null || text === undefined ? ' ' : text); + + if (this._text === text) { + return; + } + this._text = text; + this.dirty = true; + } + }]); + + return Text; +}(_Sprite3.default); + +exports.default = Text; + +},{"../const":46,"../math":70,"../settings":101,"../sprites/Sprite":102,"../textures/Texture":115,"../utils":124,"../utils/trimCanvas":129,"./TextMetrics":109,"./TextStyle":110}],109:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * The TextMetrics object represents the measurement of a block of text with a specified style. + * + * @class + * @memberOf PIXI + */ +var TextMetrics = function () { + /** + * @param {string} text - the text that was measured + * @param {PIXI.TextStyle} style - the style that was measured + * @param {number} width - the measured width of the text + * @param {number} height - the measured height of the text + * @param {array} lines - an array of the lines of text broken by new lines and wrapping if specified in style + * @param {array} lineWidths - an array of the line widths for each line matched to `lines` + * @param {number} lineHeight - the measured line height for this style + * @param {number} maxLineWidth - the maximum line width for all measured lines + * @param {Object} fontProperties - the font properties object from TextMetrics.measureFont + */ + function TextMetrics(text, style, width, height, lines, lineWidths, lineHeight, maxLineWidth, fontProperties) { + _classCallCheck(this, TextMetrics); + + this.text = text; + this.style = style; + this.width = width; + this.height = height; + this.lines = lines; + this.lineWidths = lineWidths; + this.lineHeight = lineHeight; + this.maxLineWidth = maxLineWidth; + this.fontProperties = fontProperties; + } + + /** + * Measures the supplied string of text and returns a Rectangle. + * + * @param {string} text - the text to measure. + * @param {PIXI.TextStyle} style - the text style to use for measuring + * @param {boolean} [wordWrap] - optional override for if word-wrap should be applied to the text. + * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring. + * @return {PIXI.TextMetrics} measured width and height of the text. + */ + + + TextMetrics.measureText = function measureText(text, style, wordWrap) { + var canvas = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : TextMetrics._canvas; + + wordWrap = wordWrap || style.wordWrap; + var font = style.toFontString(); + var fontProperties = TextMetrics.measureFont(font); + var context = canvas.getContext('2d'); + + context.font = font; + + var outputText = wordWrap ? TextMetrics.wordWrap(text, style, canvas) : text; + var lines = outputText.split(/(?:\r\n|\r|\n)/); + var lineWidths = new Array(lines.length); + var maxLineWidth = 0; + + for (var i = 0; i < lines.length; i++) { + var lineWidth = context.measureText(lines[i]).width + (lines[i].length - 1) * style.letterSpacing; + + lineWidths[i] = lineWidth; + maxLineWidth = Math.max(maxLineWidth, lineWidth); + } + var width = maxLineWidth + style.strokeThickness; + + if (style.dropShadow) { + width += style.dropShadowDistance; + } + + var lineHeight = style.lineHeight || fontProperties.fontSize + style.strokeThickness; + var height = Math.max(lineHeight, fontProperties.fontSize + style.strokeThickness) + (lines.length - 1) * (lineHeight + style.leading); + + if (style.dropShadow) { + height += style.dropShadowDistance; + } + + return new TextMetrics(text, style, width, height, lines, lineWidths, lineHeight + style.leading, maxLineWidth, fontProperties); + }; + + /** + * Applies newlines to a string to have it optimally fit into the horizontal + * bounds set by the Text object's wordWrapWidth property. + * + * @private + * @param {string} text - String to apply word wrapping to + * @param {PIXI.TextStyle} style - the style to use when wrapping + * @param {HTMLCanvasElement} [canvas] - optional specification of the canvas to use for measuring. + * @return {string} New string with new lines applied where required + */ + + + TextMetrics.wordWrap = function wordWrap(text, style) { + var canvas = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : TextMetrics._canvas; + + var context = canvas.getContext('2d'); + + // Greedy wrapping algorithm that will wrap words as the line grows longer + // than its horizontal bounds. + var result = ''; + var lines = text.split('\n'); + var wordWrapWidth = style.wordWrapWidth; + var characterCache = {}; + + for (var i = 0; i < lines.length; i++) { + var spaceLeft = wordWrapWidth; + var words = lines[i].split(' '); + + for (var j = 0; j < words.length; j++) { + var wordWidth = context.measureText(words[j]).width; + + if (style.breakWords && wordWidth > wordWrapWidth) { + // Word should be split in the middle + var characters = words[j].split(''); + + for (var c = 0; c < characters.length; c++) { + var character = characters[c]; + var characterWidth = characterCache[character]; + + if (characterWidth === undefined) { + characterWidth = context.measureText(character).width; + characterCache[character] = characterWidth; + } + + if (characterWidth > spaceLeft) { + result += '\n' + character; + spaceLeft = wordWrapWidth - characterWidth; + } else { + if (c === 0) { + result += ' '; + } + + result += character; + spaceLeft -= characterWidth; + } + } + } else { + var wordWidthWithSpace = wordWidth + context.measureText(' ').width; + + if (j === 0 || wordWidthWithSpace > spaceLeft) { + // Skip printing the newline if it's the first word of the line that is + // greater than the word wrap width. + if (j > 0) { + result += '\n'; + } + result += words[j]; + spaceLeft = wordWrapWidth - wordWidth; + } else { + spaceLeft -= wordWidthWithSpace; + result += ' ' + words[j]; + } + } + } + + if (i < lines.length - 1) { + result += '\n'; + } + } + + return result; + }; + + /** + * Calculates the ascent, descent and fontSize of a given font-style + * + * @static + * @param {string} font - String representing the style of the font + * @return {PIXI.TextMetrics~FontMetrics} Font properties object + */ + + + TextMetrics.measureFont = function measureFont(font) { + // as this method is used for preparing assets, don't recalculate things if we don't need to + if (TextMetrics._fonts[font]) { + return TextMetrics._fonts[font]; + } + + var properties = {}; + + var canvas = TextMetrics._canvas; + var context = TextMetrics._context; + + context.font = font; + + var width = Math.ceil(context.measureText('|MÉq').width); + var baseline = Math.ceil(context.measureText('M').width); + var height = 2 * baseline; + + baseline = baseline * 1.4 | 0; + + canvas.width = width; + canvas.height = height; + + context.fillStyle = '#f00'; + context.fillRect(0, 0, width, height); + + context.font = font; + + context.textBaseline = 'alphabetic'; + context.fillStyle = '#000'; + context.fillText('|MÉq', 0, baseline); + + var imagedata = context.getImageData(0, 0, width, height).data; + var pixels = imagedata.length; + var line = width * 4; + + var i = 0; + var idx = 0; + var stop = false; + + // ascent. scan from top to bottom until we find a non red pixel + for (i = 0; i < baseline; ++i) { + for (var j = 0; j < line; j += 4) { + if (imagedata[idx + j] !== 255) { + stop = true; + break; + } + } + if (!stop) { + idx += line; + } else { + break; + } + } + + properties.ascent = baseline - i; + + idx = pixels - line; + stop = false; + + // descent. scan from bottom to top until we find a non red pixel + for (i = height; i > baseline; --i) { + for (var _j = 0; _j < line; _j += 4) { + if (imagedata[idx + _j] !== 255) { + stop = true; + break; + } + } + + if (!stop) { + idx -= line; + } else { + break; + } + } + + properties.descent = i - baseline; + properties.fontSize = properties.ascent + properties.descent; + + TextMetrics._fonts[font] = properties; + + return properties; + }; + + return TextMetrics; +}(); + +/** + * Internal return object for {@link PIXI.TextMetrics.measureFont `TextMetrics.measureFont`}. + * @class FontMetrics + * @memberof PIXI.TextMetrics~ + * @property {number} ascent - The ascent distance + * @property {number} descent - The descent distance + * @property {number} fontSize - Font size from ascent to descent + */ + +exports.default = TextMetrics; +var canvas = document.createElement('canvas'); + +canvas.width = canvas.height = 10; + +/** + * Cached canvas element for measuring text + * @memberof PIXI.TextMetrics + * @type {HTMLCanvasElement} + * @private + */ +TextMetrics._canvas = canvas; + +/** + * Cache for context to use. + * @memberof PIXI.TextMetrics + * @type {CanvasRenderingContext2D} + * @private + */ +TextMetrics._context = canvas.getContext('2d'); + +/** + * Cache of PIXI.TextMetrics~FontMetrics objects. + * @memberof PIXI.TextMetrics + * @type {Object} + * @private + */ +TextMetrics._fonts = {}; + +},{}],110:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // disabling eslint for now, going to rewrite this in v5 +/* eslint-disable */ + +var _const = require('../const'); + +var _utils = require('../utils'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var defaultStyle = { + align: 'left', + breakWords: false, + dropShadow: false, + dropShadowAlpha: 1, + dropShadowAngle: Math.PI / 6, + dropShadowBlur: 0, + dropShadowColor: 'black', + dropShadowDistance: 5, + fill: 'black', + fillGradientType: _const.TEXT_GRADIENT.LINEAR_VERTICAL, + fillGradientStops: [], + fontFamily: 'Arial', + fontSize: 26, + fontStyle: 'normal', + fontVariant: 'normal', + fontWeight: 'normal', + letterSpacing: 0, + lineHeight: 0, + lineJoin: 'miter', + miterLimit: 10, + padding: 0, + stroke: 'black', + strokeThickness: 0, + textBaseline: 'alphabetic', + trim: false, + wordWrap: false, + wordWrapWidth: 100, + leading: 0 +}; + +/** + * A TextStyle Object decorates a Text Object. It can be shared between + * multiple Text objects. Changing the style will update all text objects using it. + * + * @class + * @memberof PIXI + */ + +var TextStyle = function () { + /** + * @param {object} [style] - The style parameters + * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'), + * does not affect single line text + * @param {boolean} [style.breakWords=false] - Indicates if lines can be wrapped within words, it + * needs wordWrap to be set to true + * @param {boolean} [style.dropShadow=false] - Set a drop shadow for the text + * @param {number} [style.dropShadowAlpha=1] - Set alpha for the drop shadow + * @param {number} [style.dropShadowAngle=Math.PI/6] - Set a angle of the drop shadow + * @param {number} [style.dropShadowBlur=0] - Set a shadow blur radius + * @param {string|number} [style.dropShadowColor='black'] - A fill style to be used on the dropshadow e.g 'red', '#00FF00' + * @param {number} [style.dropShadowDistance=5] - Set a distance of the drop shadow + * @param {string|string[]|number|number[]|CanvasGradient|CanvasPattern} [style.fill='black'] - A canvas + * fillstyle that will be used on the text e.g 'red', '#00FF00'. Can be an array to create a gradient + * eg ['#000000','#FFFFFF'] + * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN} + * @param {number} [style.fillGradientType=PIXI.TEXT_GRADIENT.LINEAR_VERTICAL] - If fill is an array of colours + * to create a gradient, this can change the type/direction of the gradient. See {@link PIXI.TEXT_GRADIENT} + * @param {number[]} [style.fillGradientStops] - If fill is an array of colours to create a gradient, this array can set + * the stop points (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them. + * @param {string|string[]} [style.fontFamily='Arial'] - The font family + * @param {number|string} [style.fontSize=26] - The font size (as a number it converts to px, but as a string, + * equivalents are '26px','20pt','160%' or '1.6em') + * @param {string} [style.fontStyle='normal'] - The font style ('normal', 'italic' or 'oblique') + * @param {string} [style.fontVariant='normal'] - The font variant ('normal' or 'small-caps') + * @param {string} [style.fontWeight='normal'] - The font weight ('normal', 'bold', 'bolder', 'lighter' and '100', + * '200', '300', '400', '500', '600', '700', 800' or '900') + * @param {number} [style.leading=0] - The space between lines + * @param {number} [style.letterSpacing=0] - The amount of spacing between letters, default is 0 + * @param {number} [style.lineHeight] - The line height, a number that represents the vertical space that a letter uses + * @param {string} [style.lineJoin='miter'] - The lineJoin property sets the type of corner created, it can resolve + * spiked text issues. Default is 'miter' (creates a sharp corner). + * @param {number} [style.miterLimit=10] - The miter limit to use when using the 'miter' lineJoin mode. This can reduce + * or increase the spikiness of rendered text. + * @param {number} [style.padding=0] - Occasionally some fonts are cropped. Adding some padding will prevent this from + * happening by adding padding to all sides of the text. + * @param {string|number} [style.stroke='black'] - A canvas fillstyle that will be used on the text stroke + * e.g 'blue', '#FCFF00' + * @param {number} [style.strokeThickness=0] - A number that represents the thickness of the stroke. + * Default is 0 (no stroke) + * @param {boolean} [style.trim=false] - Trim transparent borders + * @param {string} [style.textBaseline='alphabetic'] - The baseline of the text that is rendered. + * @param {boolean} [style.wordWrap=false] - Indicates if word wrap should be used + * @param {number} [style.wordWrapWidth=100] - The width at which text will wrap, it needs wordWrap to be set to true + */ + function TextStyle(style) { + _classCallCheck(this, TextStyle); + + this.styleID = 0; + + Object.assign(this, defaultStyle, style); + } + + /** + * Creates a new TextStyle object with the same values as this one. + * Note that the only the properties of the object are cloned. + * + * @return {PIXI.TextStyle} New cloned TextStyle object + */ + + + TextStyle.prototype.clone = function clone() { + var clonedProperties = {}; + + for (var key in defaultStyle) { + clonedProperties[key] = this[key]; + } + + return new TextStyle(clonedProperties); + }; + + /** + * Resets all properties to the defaults specified in TextStyle.prototype._default + */ + + + TextStyle.prototype.reset = function reset() { + Object.assign(this, defaultStyle); + }; + + /** + * Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text + * + * @member {string} + */ + + + /** + * Generates a font style string to use for `TextMetrics.measureFont()`. + * + * @return {string} Font style string, for passing to `TextMetrics.measureFont()` + */ + TextStyle.prototype.toFontString = function toFontString() { + // build canvas api font setting from individual components. Convert a numeric this.fontSize to px + var fontSizeString = typeof this.fontSize === 'number' ? this.fontSize + 'px' : this.fontSize; + + // Clean-up fontFamily property by quoting each font name + // this will support font names with spaces + var fontFamilies = this.fontFamily; + + if (!Array.isArray(this.fontFamily)) { + fontFamilies = this.fontFamily.split(','); + } + + for (var i = fontFamilies.length - 1; i >= 0; i--) { + // Trim any extra white-space + var fontFamily = fontFamilies[i].trim(); + + // Check if font already contains strings + if (!/([\"\'])[^\'\"]+\1/.test(fontFamily)) { + fontFamily = '"' + fontFamily + '"'; + } + fontFamilies[i] = fontFamily; + } + + return this.fontStyle + ' ' + this.fontVariant + ' ' + this.fontWeight + ' ' + fontSizeString + ' ' + fontFamilies.join(','); + }; + + _createClass(TextStyle, [{ + key: 'align', + get: function get() { + return this._align; + }, + set: function set(align) // eslint-disable-line require-jsdoc + { + if (this._align !== align) { + this._align = align; + this.styleID++; + } + } + + /** + * Indicates if lines can be wrapped within words, it needs wordWrap to be set to true + * + * @member {boolean} + */ + + }, { + key: 'breakWords', + get: function get() { + return this._breakWords; + }, + set: function set(breakWords) // eslint-disable-line require-jsdoc + { + if (this._breakWords !== breakWords) { + this._breakWords = breakWords; + this.styleID++; + } + } + + /** + * Set a drop shadow for the text + * + * @member {boolean} + */ + + }, { + key: 'dropShadow', + get: function get() { + return this._dropShadow; + }, + set: function set(dropShadow) // eslint-disable-line require-jsdoc + { + if (this._dropShadow !== dropShadow) { + this._dropShadow = dropShadow; + this.styleID++; + } + } + + /** + * Set alpha for the drop shadow + * + * @member {number} + */ + + }, { + key: 'dropShadowAlpha', + get: function get() { + return this._dropShadowAlpha; + }, + set: function set(dropShadowAlpha) // eslint-disable-line require-jsdoc + { + if (this._dropShadowAlpha !== dropShadowAlpha) { + this._dropShadowAlpha = dropShadowAlpha; + this.styleID++; + } + } + + /** + * Set a angle of the drop shadow + * + * @member {number} + */ + + }, { + key: 'dropShadowAngle', + get: function get() { + return this._dropShadowAngle; + }, + set: function set(dropShadowAngle) // eslint-disable-line require-jsdoc + { + if (this._dropShadowAngle !== dropShadowAngle) { + this._dropShadowAngle = dropShadowAngle; + this.styleID++; + } + } + + /** + * Set a shadow blur radius + * + * @member {number} + */ + + }, { + key: 'dropShadowBlur', + get: function get() { + return this._dropShadowBlur; + }, + set: function set(dropShadowBlur) // eslint-disable-line require-jsdoc + { + if (this._dropShadowBlur !== dropShadowBlur) { + this._dropShadowBlur = dropShadowBlur; + this.styleID++; + } + } + + /** + * A fill style to be used on the dropshadow e.g 'red', '#00FF00' + * + * @member {string|number} + */ + + }, { + key: 'dropShadowColor', + get: function get() { + return this._dropShadowColor; + }, + set: function set(dropShadowColor) // eslint-disable-line require-jsdoc + { + var outputColor = getColor(dropShadowColor); + if (this._dropShadowColor !== outputColor) { + this._dropShadowColor = outputColor; + this.styleID++; + } + } + + /** + * Set a distance of the drop shadow + * + * @member {number} + */ + + }, { + key: 'dropShadowDistance', + get: function get() { + return this._dropShadowDistance; + }, + set: function set(dropShadowDistance) // eslint-disable-line require-jsdoc + { + if (this._dropShadowDistance !== dropShadowDistance) { + this._dropShadowDistance = dropShadowDistance; + this.styleID++; + } + } + + /** + * A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'. + * Can be an array to create a gradient eg ['#000000','#FFFFFF'] + * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle|MDN} + * + * @member {string|string[]|number|number[]|CanvasGradient|CanvasPattern} + */ + + }, { + key: 'fill', + get: function get() { + return this._fill; + }, + set: function set(fill) // eslint-disable-line require-jsdoc + { + var outputColor = getColor(fill); + if (this._fill !== outputColor) { + this._fill = outputColor; + this.styleID++; + } + } + + /** + * If fill is an array of colours to create a gradient, this can change the type/direction of the gradient. + * See {@link PIXI.TEXT_GRADIENT} + * + * @member {number} + */ + + }, { + key: 'fillGradientType', + get: function get() { + return this._fillGradientType; + }, + set: function set(fillGradientType) // eslint-disable-line require-jsdoc + { + if (this._fillGradientType !== fillGradientType) { + this._fillGradientType = fillGradientType; + this.styleID++; + } + } + + /** + * If fill is an array of colours to create a gradient, this array can set the stop points + * (numbers between 0 and 1) for the color, overriding the default behaviour of evenly spacing them. + * + * @member {number[]} + */ + + }, { + key: 'fillGradientStops', + get: function get() { + return this._fillGradientStops; + }, + set: function set(fillGradientStops) // eslint-disable-line require-jsdoc + { + if (!areArraysEqual(this._fillGradientStops, fillGradientStops)) { + this._fillGradientStops = fillGradientStops; + this.styleID++; + } + } + + /** + * The font family + * + * @member {string|string[]} + */ + + }, { + key: 'fontFamily', + get: function get() { + return this._fontFamily; + }, + set: function set(fontFamily) // eslint-disable-line require-jsdoc + { + if (this.fontFamily !== fontFamily) { + this._fontFamily = fontFamily; + this.styleID++; + } + } + + /** + * The font size + * (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em') + * + * @member {number|string} + */ + + }, { + key: 'fontSize', + get: function get() { + return this._fontSize; + }, + set: function set(fontSize) // eslint-disable-line require-jsdoc + { + if (this._fontSize !== fontSize) { + this._fontSize = fontSize; + this.styleID++; + } + } + + /** + * The font style + * ('normal', 'italic' or 'oblique') + * + * @member {string} + */ + + }, { + key: 'fontStyle', + get: function get() { + return this._fontStyle; + }, + set: function set(fontStyle) // eslint-disable-line require-jsdoc + { + if (this._fontStyle !== fontStyle) { + this._fontStyle = fontStyle; + this.styleID++; + } + } + + /** + * The font variant + * ('normal' or 'small-caps') + * + * @member {string} + */ + + }, { + key: 'fontVariant', + get: function get() { + return this._fontVariant; + }, + set: function set(fontVariant) // eslint-disable-line require-jsdoc + { + if (this._fontVariant !== fontVariant) { + this._fontVariant = fontVariant; + this.styleID++; + } + } + + /** + * The font weight + * ('normal', 'bold', 'bolder', 'lighter' and '100', '200', '300', '400', '500', '600', '700', 800' or '900') + * + * @member {string} + */ + + }, { + key: 'fontWeight', + get: function get() { + return this._fontWeight; + }, + set: function set(fontWeight) // eslint-disable-line require-jsdoc + { + if (this._fontWeight !== fontWeight) { + this._fontWeight = fontWeight; + this.styleID++; + } + } + + /** + * The amount of spacing between letters, default is 0 + * + * @member {number} + */ + + }, { + key: 'letterSpacing', + get: function get() { + return this._letterSpacing; + }, + set: function set(letterSpacing) // eslint-disable-line require-jsdoc + { + if (this._letterSpacing !== letterSpacing) { + this._letterSpacing = letterSpacing; + this.styleID++; + } + } + + /** + * The line height, a number that represents the vertical space that a letter uses + * + * @member {number} + */ + + }, { + key: 'lineHeight', + get: function get() { + return this._lineHeight; + }, + set: function set(lineHeight) // eslint-disable-line require-jsdoc + { + if (this._lineHeight !== lineHeight) { + this._lineHeight = lineHeight; + this.styleID++; + } + } + + /** + * The space between lines + * + * @member {number} + */ + + }, { + key: 'leading', + get: function get() { + return this._leading; + }, + set: function set(leading) // eslint-disable-line require-jsdoc + { + if (this._leading !== leading) { + this._leading = leading; + this.styleID++; + } + } + + /** + * The lineJoin property sets the type of corner created, it can resolve spiked text issues. + * Default is 'miter' (creates a sharp corner). + * + * @member {string} + */ + + }, { + key: 'lineJoin', + get: function get() { + return this._lineJoin; + }, + set: function set(lineJoin) // eslint-disable-line require-jsdoc + { + if (this._lineJoin !== lineJoin) { + this._lineJoin = lineJoin; + this.styleID++; + } + } + + /** + * The miter limit to use when using the 'miter' lineJoin mode + * This can reduce or increase the spikiness of rendered text. + * + * @member {number} + */ + + }, { + key: 'miterLimit', + get: function get() { + return this._miterLimit; + }, + set: function set(miterLimit) // eslint-disable-line require-jsdoc + { + if (this._miterLimit !== miterLimit) { + this._miterLimit = miterLimit; + this.styleID++; + } + } + + /** + * Occasionally some fonts are cropped. Adding some padding will prevent this from happening + * by adding padding to all sides of the text. + * + * @member {number} + */ + + }, { + key: 'padding', + get: function get() { + return this._padding; + }, + set: function set(padding) // eslint-disable-line require-jsdoc + { + if (this._padding !== padding) { + this._padding = padding; + this.styleID++; + } + } + + /** + * A canvas fillstyle that will be used on the text stroke + * e.g 'blue', '#FCFF00' + * + * @member {string|number} + */ + + }, { + key: 'stroke', + get: function get() { + return this._stroke; + }, + set: function set(stroke) // eslint-disable-line require-jsdoc + { + var outputColor = getColor(stroke); + if (this._stroke !== outputColor) { + this._stroke = outputColor; + this.styleID++; + } + } + + /** + * A number that represents the thickness of the stroke. + * Default is 0 (no stroke) + * + * @member {number} + */ + + }, { + key: 'strokeThickness', + get: function get() { + return this._strokeThickness; + }, + set: function set(strokeThickness) // eslint-disable-line require-jsdoc + { + if (this._strokeThickness !== strokeThickness) { + this._strokeThickness = strokeThickness; + this.styleID++; + } + } + + /** + * The baseline of the text that is rendered. + * + * @member {string} + */ + + }, { + key: 'textBaseline', + get: function get() { + return this._textBaseline; + }, + set: function set(textBaseline) // eslint-disable-line require-jsdoc + { + if (this._textBaseline !== textBaseline) { + this._textBaseline = textBaseline; + this.styleID++; + } + } + + /** + * Trim transparent borders + * + * @member {boolean} + */ + + }, { + key: 'trim', + get: function get() { + return this._trim; + }, + set: function set(trim) // eslint-disable-line require-jsdoc + { + if (this._trim !== trim) { + this._trim = trim; + this.styleID++; + } + } + + /** + * Indicates if word wrap should be used + * + * @member {boolean} + */ + + }, { + key: 'wordWrap', + get: function get() { + return this._wordWrap; + }, + set: function set(wordWrap) // eslint-disable-line require-jsdoc + { + if (this._wordWrap !== wordWrap) { + this._wordWrap = wordWrap; + this.styleID++; + } + } + + /** + * The width at which text will wrap, it needs wordWrap to be set to true + * + * @member {number} + */ + + }, { + key: 'wordWrapWidth', + get: function get() { + return this._wordWrapWidth; + }, + set: function set(wordWrapWidth) // eslint-disable-line require-jsdoc + { + if (this._wordWrapWidth !== wordWrapWidth) { + this._wordWrapWidth = wordWrapWidth; + this.styleID++; + } + } + }]); + + return TextStyle; +}(); + +/** + * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string. + * + * @param {number|number[]} color + * @return {string} The color as a string. + */ + + +exports.default = TextStyle; +function getSingleColor(color) { + if (typeof color === 'number') { + return (0, _utils.hex2string)(color); + } else if (typeof color === 'string') { + if (color.indexOf('0x') === 0) { + color = color.replace('0x', '#'); + } + } + + return color; +} + +/** + * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string. + * This version can also convert array of colors + * + * @param {number|number[]} color + * @return {string} The color as a string. + */ +function getColor(color) { + if (!Array.isArray(color)) { + return getSingleColor(color); + } else { + for (var i = 0; i < color.length; ++i) { + color[i] = getSingleColor(color[i]); + } + + return color; + } +} + +/** + * Utility function to convert hexadecimal colors to strings, and simply return the color if it's a string. + * This version can also convert array of colors + * + * @param {Array} array1 First array to compare + * @param {Array} array2 Second array to compare + * @return {boolean} Do the arrays contain the same values in the same order + */ +function areArraysEqual(array1, array2) { + if (!Array.isArray(array1) || !Array.isArray(array2)) { + return false; + } + + if (array1.length !== array2.length) { + return false; + } + + for (var i = 0; i < array1.length; ++i) { + if (array1[i] !== array2[i]) { + return false; + } + } + + return true; +} + +},{"../const":46,"../utils":124}],111:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _BaseTexture2 = require('./BaseTexture'); + +var _BaseTexture3 = _interopRequireDefault(_BaseTexture2); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A BaseRenderTexture is a special texture that allows any PixiJS display object to be rendered to it. + * + * __Hint__: All DisplayObjects (i.e. Sprites) that render to a BaseRenderTexture should be preloaded + * otherwise black rectangles will be drawn instead. + * + * A BaseRenderTexture takes a snapshot of any Display Object given to its render method. The position + * and rotation of the given Display Objects is ignored. For example: + * + * ```js + * let renderer = PIXI.autoDetectRenderer(1024, 1024, { view: canvas, ratio: 1 }); + * let baseRenderTexture = new PIXI.BaseRenderTexture(renderer, 800, 600); + * let sprite = PIXI.Sprite.fromImage("spinObj_01.png"); + * + * sprite.position.x = 800/2; + * sprite.position.y = 600/2; + * sprite.anchor.x = 0.5; + * sprite.anchor.y = 0.5; + * + * baseRenderTexture.render(sprite); + * ``` + * + * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0 + * you can clear the transform + * + * ```js + * + * sprite.setTransform() + * + * let baseRenderTexture = new PIXI.BaseRenderTexture(100, 100); + * let renderTexture = new PIXI.RenderTexture(baseRenderTexture); + * + * renderer.render(sprite, renderTexture); // Renders to center of RenderTexture + * ``` + * + * @class + * @extends PIXI.BaseTexture + * @memberof PIXI + */ +var BaseRenderTexture = function (_BaseTexture) { + _inherits(BaseRenderTexture, _BaseTexture); + + /** + * @param {number} [width=100] - The width of the base render texture + * @param {number} [height=100] - The height of the base render texture + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [resolution=1] - The resolution / device pixel ratio of the texture being generated + */ + function BaseRenderTexture() { + var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100; + var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; + var scaleMode = arguments[2]; + var resolution = arguments[3]; + + _classCallCheck(this, BaseRenderTexture); + + var _this = _possibleConstructorReturn(this, _BaseTexture.call(this, null, scaleMode)); + + _this.resolution = resolution || _settings2.default.RESOLUTION; + + _this.width = width; + _this.height = height; + + _this.realWidth = _this.width * _this.resolution; + _this.realHeight = _this.height * _this.resolution; + + _this.scaleMode = scaleMode !== undefined ? scaleMode : _settings2.default.SCALE_MODE; + _this.hasLoaded = true; + + /** + * A map of renderer IDs to webgl renderTargets + * + * @private + * @member {object} + */ + _this._glRenderTargets = {}; + + /** + * A reference to the canvas render target (we only need one as this can be shared across renderers) + * + * @private + * @member {object} + */ + _this._canvasRenderTarget = null; + + /** + * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered. + * + * @member {boolean} + */ + _this.valid = false; + return _this; + } + + /** + * Resizes the BaseRenderTexture. + * + * @param {number} width - The width to resize to. + * @param {number} height - The height to resize to. + */ + + + BaseRenderTexture.prototype.resize = function resize(width, height) { + if (width === this.width && height === this.height) { + return; + } + + this.valid = width > 0 && height > 0; + + this.width = width; + this.height = height; + + this.realWidth = this.width * this.resolution; + this.realHeight = this.height * this.resolution; + + if (!this.valid) { + return; + } + + this.emit('update', this); + }; + + /** + * Destroys this texture + * + */ + + + BaseRenderTexture.prototype.destroy = function destroy() { + _BaseTexture.prototype.destroy.call(this, true); + this.renderer = null; + }; + + return BaseRenderTexture; +}(_BaseTexture3.default); + +exports.default = BaseRenderTexture; + +},{"../settings":101,"./BaseTexture":112}],112:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _utils = require('../utils'); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +var _determineCrossOrigin = require('../utils/determineCrossOrigin'); + +var _determineCrossOrigin2 = _interopRequireDefault(_determineCrossOrigin); + +var _bitTwiddle = require('bit-twiddle'); + +var _bitTwiddle2 = _interopRequireDefault(_bitTwiddle); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A texture stores the information that represents an image. All textures have a base texture. + * + * @class + * @extends EventEmitter + * @memberof PIXI + */ +var BaseTexture = function (_EventEmitter) { + _inherits(BaseTexture, _EventEmitter); + + /** + * @param {HTMLImageElement|HTMLCanvasElement} [source] - the source object of the texture. + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [resolution=1] - The resolution / device pixel ratio of the texture + */ + function BaseTexture(source, scaleMode, resolution) { + _classCallCheck(this, BaseTexture); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + _this.uid = (0, _utils.uid)(); + + _this.touched = 0; + + /** + * The resolution / device pixel ratio of the texture + * + * @member {number} + * @default 1 + */ + _this.resolution = resolution || _settings2.default.RESOLUTION; + + /** + * The width of the base texture set when the image has loaded + * + * @readonly + * @member {number} + */ + _this.width = 100; + + /** + * The height of the base texture set when the image has loaded + * + * @readonly + * @member {number} + */ + _this.height = 100; + + // TODO docs + // used to store the actual dimensions of the source + /** + * Used to store the actual width of the source of this texture + * + * @readonly + * @member {number} + */ + _this.realWidth = 100; + /** + * Used to store the actual height of the source of this texture + * + * @readonly + * @member {number} + */ + _this.realHeight = 100; + + /** + * The scale mode to apply when scaling this texture + * + * @member {number} + * @default PIXI.settings.SCALE_MODE + * @see PIXI.SCALE_MODES + */ + _this.scaleMode = scaleMode !== undefined ? scaleMode : _settings2.default.SCALE_MODE; + + /** + * Set to true once the base texture has successfully loaded. + * + * This is never true if the underlying source fails to load or has no texture data. + * + * @readonly + * @member {boolean} + */ + _this.hasLoaded = false; + + /** + * Set to true if the source is currently loading. + * + * If an Image source is loading the 'loaded' or 'error' event will be + * dispatched when the operation ends. An underyling source that is + * immediately-available bypasses loading entirely. + * + * @readonly + * @member {boolean} + */ + _this.isLoading = false; + + /** + * The image source that is used to create the texture. + * + * TODO: Make this a setter that calls loadSource(); + * + * @readonly + * @member {HTMLImageElement|HTMLCanvasElement} + */ + _this.source = null; // set in loadSource, if at all + + /** + * The image source that is used to create the texture. This is used to + * store the original Svg source when it is replaced with a canvas element. + * + * TODO: Currently not in use but could be used when re-scaling svg. + * + * @readonly + * @member {Image} + */ + _this.origSource = null; // set in loadSvg, if at all + + /** + * Type of image defined in source, eg. `png` or `svg` + * + * @readonly + * @member {string} + */ + _this.imageType = null; // set in updateImageType + + /** + * Scale for source image. Used with Svg images to scale them before rasterization. + * + * @readonly + * @member {number} + */ + _this.sourceScale = 1.0; + + /** + * Controls if RGB channels should be pre-multiplied by Alpha (WebGL only) + * All blend modes, and shaders written for default value. Change it on your own risk. + * + * @member {boolean} + * @default true + */ + _this.premultipliedAlpha = true; + + /** + * The image url of the texture + * + * @member {string} + */ + _this.imageUrl = null; + + /** + * Whether or not the texture is a power of two, try to use power of two textures as much + * as you can + * + * @private + * @member {boolean} + */ + _this.isPowerOfTwo = false; + + // used for webGL + + /** + * + * Set this to true if a mipmap of this texture needs to be generated. This value needs + * to be set before the texture is used + * Also the texture must be a power of two size to work + * + * @member {boolean} + * @see PIXI.MIPMAP_TEXTURES + */ + _this.mipmap = _settings2.default.MIPMAP_TEXTURES; + + /** + * + * WebGL Texture wrap mode + * + * @member {number} + * @see PIXI.WRAP_MODES + */ + _this.wrapMode = _settings2.default.WRAP_MODE; + + /** + * A map of renderer IDs to webgl textures + * + * @private + * @member {object} + */ + _this._glTextures = {}; + + _this._enabled = 0; + _this._virtalBoundId = -1; + + /** + * If the object has been destroyed via destroy(). If true, it should not be used. + * + * @member {boolean} + * @private + * @readonly + */ + _this._destroyed = false; + + /** + * The ids under which this BaseTexture has been added to the base texture cache. This is + * automatically set as long as BaseTexture.addToCache is used, but may not be set if a + * BaseTexture is added directly to the BaseTextureCache array. + * + * @member {string[]} + */ + _this.textureCacheIds = []; + + // if no source passed don't try to load + if (source) { + _this.loadSource(source); + } + + /** + * Fired when a not-immediately-available source finishes loading. + * + * @protected + * @event PIXI.BaseTexture#loaded + * @param {PIXI.BaseTexture} baseTexture - Resource loaded. + */ + + /** + * Fired when a not-immediately-available source fails to load. + * + * @protected + * @event PIXI.BaseTexture#error + * @param {PIXI.BaseTexture} baseTexture - Resource errored. + */ + + /** + * Fired when BaseTexture is updated. + * + * @protected + * @event PIXI.BaseTexture#update + * @param {PIXI.BaseTexture} baseTexture - Instance of texture being updated. + */ + + /** + * Fired when BaseTexture is destroyed. + * + * @protected + * @event PIXI.BaseTexture#dispose + * @param {PIXI.BaseTexture} baseTexture - Instance of texture being destroyed. + */ + return _this; + } + + /** + * Updates the texture on all the webgl renderers, this also assumes the src has changed. + * + * @fires PIXI.BaseTexture#update + */ + + + BaseTexture.prototype.update = function update() { + // Svg size is handled during load + if (this.imageType !== 'svg') { + this.realWidth = this.source.naturalWidth || this.source.videoWidth || this.source.width; + this.realHeight = this.source.naturalHeight || this.source.videoHeight || this.source.height; + + this._updateDimensions(); + } + + this.emit('update', this); + }; + + /** + * Update dimensions from real values + */ + + + BaseTexture.prototype._updateDimensions = function _updateDimensions() { + this.width = this.realWidth / this.resolution; + this.height = this.realHeight / this.resolution; + + this.isPowerOfTwo = _bitTwiddle2.default.isPow2(this.realWidth) && _bitTwiddle2.default.isPow2(this.realHeight); + }; + + /** + * Load a source. + * + * If the source is not-immediately-available, such as an image that needs to be + * downloaded, then the 'loaded' or 'error' event will be dispatched in the future + * and `hasLoaded` will remain false after this call. + * + * The logic state after calling `loadSource` directly or indirectly (eg. `fromImage`, `new BaseTexture`) is: + * + * if (texture.hasLoaded) { + * // texture ready for use + * } else if (texture.isLoading) { + * // listen to 'loaded' and/or 'error' events on texture + * } else { + * // not loading, not going to load UNLESS the source is reloaded + * // (it may still make sense to listen to the events) + * } + * + * @protected + * @param {HTMLImageElement|HTMLCanvasElement} source - the source object of the texture. + */ + + + BaseTexture.prototype.loadSource = function loadSource(source) { + var _this2 = this; + + var wasLoading = this.isLoading; + + this.hasLoaded = false; + this.isLoading = false; + + if (wasLoading && this.source) { + this.source.onload = null; + this.source.onerror = null; + } + + var firstSourceLoaded = !this.source; + + this.source = source; + + // Apply source if loaded. Otherwise setup appropriate loading monitors. + if ((source.src && source.complete || source.getContext) && source.width && source.height) { + this._updateImageType(); + + if (this.imageType === 'svg') { + this._loadSvgSource(); + } else { + this._sourceLoaded(); + } + + if (firstSourceLoaded) { + // send loaded event if previous source was null and we have been passed a pre-loaded IMG element + this.emit('loaded', this); + } + } else if (!source.getContext) { + var _ret = function () { + // Image fail / not ready + _this2.isLoading = true; + + var scope = _this2; + + source.onload = function () { + scope._updateImageType(); + source.onload = null; + source.onerror = null; + + if (!scope.isLoading) { + return; + } + + scope.isLoading = false; + scope._sourceLoaded(); + + if (scope.imageType === 'svg') { + scope._loadSvgSource(); + + return; + } + + scope.emit('loaded', scope); + }; + + source.onerror = function () { + source.onload = null; + source.onerror = null; + + if (!scope.isLoading) { + return; + } + + scope.isLoading = false; + scope.emit('error', scope); + }; + + // Per http://www.w3.org/TR/html5/embedded-content-0.html#the-img-element + // "The value of `complete` can thus change while a script is executing." + // So complete needs to be re-checked after the callbacks have been added.. + // NOTE: complete will be true if the image has no src so best to check if the src is set. + if (source.complete && source.src) { + // ..and if we're complete now, no need for callbacks + source.onload = null; + source.onerror = null; + + if (scope.imageType === 'svg') { + scope._loadSvgSource(); + + return { + v: void 0 + }; + } + + _this2.isLoading = false; + + if (source.width && source.height) { + _this2._sourceLoaded(); + + // If any previous subscribers possible + if (wasLoading) { + _this2.emit('loaded', _this2); + } + } + // If any previous subscribers possible + else if (wasLoading) { + _this2.emit('error', _this2); + } + } + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + }; + + /** + * Updates type of the source image. + */ + + + BaseTexture.prototype._updateImageType = function _updateImageType() { + if (!this.imageUrl) { + return; + } + + var dataUri = (0, _utils.decomposeDataUri)(this.imageUrl); + var imageType = void 0; + + if (dataUri && dataUri.mediaType === 'image') { + // Check for subType validity + var firstSubType = dataUri.subType.split('+')[0]; + + imageType = (0, _utils.getUrlFileExtension)('.' + firstSubType); + + if (!imageType) { + throw new Error('Invalid image type in data URI.'); + } + } else { + imageType = (0, _utils.getUrlFileExtension)(this.imageUrl); + + if (!imageType) { + imageType = 'png'; + } + } + + this.imageType = imageType; + }; + + /** + * Checks if `source` is an SVG image and whether it's loaded via a URL or a data URI. Then calls + * `_loadSvgSourceUsingDataUri` or `_loadSvgSourceUsingXhr`. + */ + + + BaseTexture.prototype._loadSvgSource = function _loadSvgSource() { + if (this.imageType !== 'svg') { + // Do nothing if source is not svg + return; + } + + var dataUri = (0, _utils.decomposeDataUri)(this.imageUrl); + + if (dataUri) { + this._loadSvgSourceUsingDataUri(dataUri); + } else { + // We got an URL, so we need to do an XHR to check the svg size + this._loadSvgSourceUsingXhr(); + } + }; + + /** + * Reads an SVG string from data URI and then calls `_loadSvgSourceUsingString`. + * + * @param {string} dataUri - The data uri to load from. + */ + + + BaseTexture.prototype._loadSvgSourceUsingDataUri = function _loadSvgSourceUsingDataUri(dataUri) { + var svgString = void 0; + + if (dataUri.encoding === 'base64') { + if (!atob) { + throw new Error('Your browser doesn\'t support base64 conversions.'); + } + svgString = atob(dataUri.data); + } else { + svgString = dataUri.data; + } + + this._loadSvgSourceUsingString(svgString); + }; + + /** + * Loads an SVG string from `imageUrl` using XHR and then calls `_loadSvgSourceUsingString`. + */ + + + BaseTexture.prototype._loadSvgSourceUsingXhr = function _loadSvgSourceUsingXhr() { + var _this3 = this; + + var svgXhr = new XMLHttpRequest(); + + // This throws error on IE, so SVG Document can't be used + // svgXhr.responseType = 'document'; + + // This is not needed since we load the svg as string (breaks IE too) + // but overrideMimeType() can be used to force the response to be parsed as XML + // svgXhr.overrideMimeType('image/svg+xml'); + + svgXhr.onload = function () { + if (svgXhr.readyState !== svgXhr.DONE || svgXhr.status !== 200) { + throw new Error('Failed to load SVG using XHR.'); + } + + _this3._loadSvgSourceUsingString(svgXhr.response); + }; + + svgXhr.onerror = function () { + return _this3.emit('error', _this3); + }; + + svgXhr.open('GET', this.imageUrl, true); + svgXhr.send(); + }; + + /** + * Loads texture using an SVG string. The original SVG Image is stored as `origSource` and the + * created canvas is the new `source`. The SVG is scaled using `sourceScale`. Called by + * `_loadSvgSourceUsingXhr` or `_loadSvgSourceUsingDataUri`. + * + * @param {string} svgString SVG source as string + * + * @fires PIXI.BaseTexture#loaded + */ + + + BaseTexture.prototype._loadSvgSourceUsingString = function _loadSvgSourceUsingString(svgString) { + var svgSize = (0, _utils.getSvgSize)(svgString); + + var svgWidth = svgSize.width; + var svgHeight = svgSize.height; + + if (!svgWidth || !svgHeight) { + throw new Error('The SVG image must have width and height defined (in pixels), canvas API needs them.'); + } + + // Scale realWidth and realHeight + this.realWidth = Math.round(svgWidth * this.sourceScale); + this.realHeight = Math.round(svgHeight * this.sourceScale); + + this._updateDimensions(); + + // Create a canvas element + var canvas = document.createElement('canvas'); + + canvas.width = this.realWidth; + canvas.height = this.realHeight; + canvas._pixiId = 'canvas_' + (0, _utils.uid)(); + + // Draw the Svg to the canvas + canvas.getContext('2d').drawImage(this.source, 0, 0, svgWidth, svgHeight, 0, 0, this.realWidth, this.realHeight); + + // Replace the original source image with the canvas + this.origSource = this.source; + this.source = canvas; + + // Add also the canvas in cache (destroy clears by `imageUrl` and `source._pixiId`) + BaseTexture.addToCache(this, canvas._pixiId); + + this.isLoading = false; + this._sourceLoaded(); + this.emit('loaded', this); + }; + + /** + * Used internally to update the width, height, and some other tracking vars once + * a source has successfully loaded. + * + * @private + */ + + + BaseTexture.prototype._sourceLoaded = function _sourceLoaded() { + this.hasLoaded = true; + this.update(); + }; + + /** + * Destroys this base texture + * + */ + + + BaseTexture.prototype.destroy = function destroy() { + if (this.imageUrl) { + delete _utils.TextureCache[this.imageUrl]; + + this.imageUrl = null; + + if (!navigator.isCocoonJS) { + this.source.src = ''; + } + } + + this.source = null; + + this.dispose(); + + BaseTexture.removeFromCache(this); + this.textureCacheIds = null; + + this._destroyed = true; + }; + + /** + * Frees the texture from WebGL memory without destroying this texture object. + * This means you can still use the texture later which will upload it to GPU + * memory again. + * + * @fires PIXI.BaseTexture#dispose + */ + + + BaseTexture.prototype.dispose = function dispose() { + this.emit('dispose', this); + }; + + /** + * Changes the source image of the texture. + * The original source must be an Image element. + * + * @param {string} newSrc - the path of the image + */ + + + BaseTexture.prototype.updateSourceImage = function updateSourceImage(newSrc) { + this.source.src = newSrc; + + this.loadSource(this.source); + }; + + /** + * Helper function that creates a base texture from the given image url. + * If the image is not in the base texture cache it will be created and loaded. + * + * @static + * @param {string} imageUrl - The image url of the texture + * @param {boolean} [crossorigin=(auto)] - Should use anonymous CORS? Defaults to true if the URL is not a data-URI. + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images. + * @return {PIXI.BaseTexture} The new base texture. + */ + + + BaseTexture.fromImage = function fromImage(imageUrl, crossorigin, scaleMode, sourceScale) { + var baseTexture = _utils.BaseTextureCache[imageUrl]; + + if (!baseTexture) { + // new Image() breaks tex loading in some versions of Chrome. + // See https://code.google.com/p/chromium/issues/detail?id=238071 + var image = new Image(); // document.createElement('img'); + + if (crossorigin === undefined && imageUrl.indexOf('data:') !== 0) { + image.crossOrigin = (0, _determineCrossOrigin2.default)(imageUrl); + } else if (crossorigin) { + image.crossOrigin = typeof crossorigin === 'string' ? crossorigin : 'anonymous'; + } + + baseTexture = new BaseTexture(image, scaleMode); + baseTexture.imageUrl = imageUrl; + + if (sourceScale) { + baseTexture.sourceScale = sourceScale; + } + + // if there is an @2x at the end of the url we are going to assume its a highres image + baseTexture.resolution = (0, _utils.getResolutionOfUrl)(imageUrl); + + image.src = imageUrl; // Setting this triggers load + + BaseTexture.addToCache(baseTexture, imageUrl); + } + + return baseTexture; + }; + + /** + * Helper function that creates a base texture from the given canvas element. + * + * @static + * @param {HTMLCanvasElement} canvas - The canvas element source of the texture + * @param {number} scaleMode - See {@link PIXI.SCALE_MODES} for possible values + * @param {string} [origin='canvas'] - A string origin of who created the base texture + * @return {PIXI.BaseTexture} The new base texture. + */ + + + BaseTexture.fromCanvas = function fromCanvas(canvas, scaleMode) { + var origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'canvas'; + + if (!canvas._pixiId) { + canvas._pixiId = origin + '_' + (0, _utils.uid)(); + } + + var baseTexture = _utils.BaseTextureCache[canvas._pixiId]; + + if (!baseTexture) { + baseTexture = new BaseTexture(canvas, scaleMode); + BaseTexture.addToCache(baseTexture, canvas._pixiId); + } + + return baseTexture; + }; + + /** + * Helper function that creates a base texture based on the source you provide. + * The source can be - image url, image element, canvas element. + * + * @static + * @param {string|HTMLImageElement|HTMLCanvasElement} source - The source to create base texture from. + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [sourceScale=(auto)] - Scale for the original image, used with Svg images. + * @return {PIXI.BaseTexture} The new base texture. + */ + + + BaseTexture.from = function from(source, scaleMode, sourceScale) { + if (typeof source === 'string') { + return BaseTexture.fromImage(source, undefined, scaleMode, sourceScale); + } else if (source instanceof HTMLImageElement) { + var imageUrl = source.src; + var baseTexture = _utils.BaseTextureCache[imageUrl]; + + if (!baseTexture) { + baseTexture = new BaseTexture(source, scaleMode); + baseTexture.imageUrl = imageUrl; + + if (sourceScale) { + baseTexture.sourceScale = sourceScale; + } + + // if there is an @2x at the end of the url we are going to assume its a highres image + baseTexture.resolution = (0, _utils.getResolutionOfUrl)(imageUrl); + + BaseTexture.addToCache(baseTexture, imageUrl); + } + + return baseTexture; + } else if (source instanceof HTMLCanvasElement) { + return BaseTexture.fromCanvas(source, scaleMode); + } + + // lets assume its a base texture! + return source; + }; + + /** + * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object. + * + * @static + * @param {PIXI.BaseTexture} baseTexture - The BaseTexture to add to the cache. + * @param {string} id - The id that the BaseTexture will be stored against. + */ + + + BaseTexture.addToCache = function addToCache(baseTexture, id) { + if (id) { + if (baseTexture.textureCacheIds.indexOf(id) === -1) { + baseTexture.textureCacheIds.push(id); + } + + /* eslint-disable no-console */ + if (_utils.BaseTextureCache[id]) { + console.warn('BaseTexture added to the cache with an id [' + id + '] that already had an entry'); + } + /* eslint-enable no-console */ + + _utils.BaseTextureCache[id] = baseTexture; + } + }; + + /** + * Remove a BaseTexture from the global BaseTextureCache. + * + * @static + * @param {string|PIXI.BaseTexture} baseTexture - id of a BaseTexture to be removed, or a BaseTexture instance itself. + * @return {PIXI.BaseTexture|null} The BaseTexture that was removed. + */ + + + BaseTexture.removeFromCache = function removeFromCache(baseTexture) { + if (typeof baseTexture === 'string') { + var baseTextureFromCache = _utils.BaseTextureCache[baseTexture]; + + if (baseTextureFromCache) { + var index = baseTextureFromCache.textureCacheIds.indexOf(baseTexture); + + if (index > -1) { + baseTextureFromCache.textureCacheIds.splice(index, 1); + } + + delete _utils.BaseTextureCache[baseTexture]; + + return baseTextureFromCache; + } + } else if (baseTexture && baseTexture.textureCacheIds) { + for (var i = 0; i < baseTexture.textureCacheIds.length; ++i) { + delete _utils.BaseTextureCache[baseTexture.textureCacheIds[i]]; + } + + baseTexture.textureCacheIds.length = 0; + + return baseTexture; + } + + return null; + }; + + return BaseTexture; +}(_eventemitter2.default); + +exports.default = BaseTexture; + +},{"../settings":101,"../utils":124,"../utils/determineCrossOrigin":123,"bit-twiddle":18,"eventemitter3":20}],113:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _BaseRenderTexture = require('./BaseRenderTexture'); + +var _BaseRenderTexture2 = _interopRequireDefault(_BaseRenderTexture); + +var _Texture2 = require('./Texture'); + +var _Texture3 = _interopRequireDefault(_Texture2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A RenderTexture is a special texture that allows any PixiJS display object to be rendered to it. + * + * __Hint__: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded + * otherwise black rectangles will be drawn instead. + * + * A RenderTexture takes a snapshot of any Display Object given to its render method. For example: + * + * ```js + * let renderer = PIXI.autoDetectRenderer(1024, 1024, { view: canvas, ratio: 1 }); + * let renderTexture = PIXI.RenderTexture.create(800, 600); + * let sprite = PIXI.Sprite.fromImage("spinObj_01.png"); + * + * sprite.position.x = 800/2; + * sprite.position.y = 600/2; + * sprite.anchor.x = 0.5; + * sprite.anchor.y = 0.5; + * + * renderer.render(sprite, renderTexture); + * ``` + * + * The Sprite in this case will be rendered using its local transform. To render this sprite at 0,0 + * you can clear the transform + * + * ```js + * + * sprite.setTransform() + * + * let renderTexture = new PIXI.RenderTexture.create(100, 100); + * + * renderer.render(sprite, renderTexture); // Renders to center of RenderTexture + * ``` + * + * @class + * @extends PIXI.Texture + * @memberof PIXI + */ +var RenderTexture = function (_Texture) { + _inherits(RenderTexture, _Texture); + + /** + * @param {PIXI.BaseRenderTexture} baseRenderTexture - The renderer used for this RenderTexture + * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show + */ + function RenderTexture(baseRenderTexture, frame) { + _classCallCheck(this, RenderTexture); + + // support for legacy.. + var _legacyRenderer = null; + + if (!(baseRenderTexture instanceof _BaseRenderTexture2.default)) { + /* eslint-disable prefer-rest-params, no-console */ + var width = arguments[1]; + var height = arguments[2]; + var scaleMode = arguments[3]; + var resolution = arguments[4]; + + // we have an old render texture.. + console.warn('Please use RenderTexture.create(' + width + ', ' + height + ') instead of the ctor directly.'); + _legacyRenderer = arguments[0]; + /* eslint-enable prefer-rest-params, no-console */ + + frame = null; + baseRenderTexture = new _BaseRenderTexture2.default(width, height, scaleMode, resolution); + } + + /** + * The base texture object that this texture uses + * + * @member {BaseTexture} + */ + + var _this = _possibleConstructorReturn(this, _Texture.call(this, baseRenderTexture, frame)); + + _this.legacyRenderer = _legacyRenderer; + + /** + * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered. + * + * @member {boolean} + */ + _this.valid = true; + + _this._updateUvs(); + return _this; + } + + /** + * Resizes the RenderTexture. + * + * @param {number} width - The width to resize to. + * @param {number} height - The height to resize to. + * @param {boolean} doNotResizeBaseTexture - Should the baseTexture.width and height values be resized as well? + */ + + + RenderTexture.prototype.resize = function resize(width, height, doNotResizeBaseTexture) { + // TODO - could be not required.. + this.valid = width > 0 && height > 0; + + this._frame.width = this.orig.width = width; + this._frame.height = this.orig.height = height; + + if (!doNotResizeBaseTexture) { + this.baseTexture.resize(width, height); + } + + this._updateUvs(); + }; + + /** + * A short hand way of creating a render texture. + * + * @param {number} [width=100] - The width of the render texture + * @param {number} [height=100] - The height of the render texture + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [resolution=1] - The resolution / device pixel ratio of the texture being generated + * @return {PIXI.RenderTexture} The new render texture + */ + + + RenderTexture.create = function create(width, height, scaleMode, resolution) { + return new RenderTexture(new _BaseRenderTexture2.default(width, height, scaleMode, resolution)); + }; + + return RenderTexture; +}(_Texture3.default); + +exports.default = RenderTexture; + +},{"./BaseRenderTexture":111,"./Texture":115}],114:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _ = require('../'); + +var _utils = require('../utils'); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Utility class for maintaining reference to a collection + * of Textures on a single Spritesheet. + * + * @class + * @memberof PIXI + */ +var Spritesheet = function () { + _createClass(Spritesheet, null, [{ + key: 'BATCH_SIZE', + + /** + * The maximum number of Textures to build per process. + * + * @type {number} + * @default 1000 + */ + get: function get() { + return 1000; + } + + /** + * @param {PIXI.BaseTexture} baseTexture Reference to the source BaseTexture object. + * @param {Object} data - Spritesheet image data. + * @param {string} [resolutionFilename] - The filename to consider when determining + * the resolution of the spritesheet. If not provided, the imageUrl will + * be used on the BaseTexture. + */ + + }]); + + function Spritesheet(baseTexture, data) { + var resolutionFilename = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + _classCallCheck(this, Spritesheet); + + /** + * Reference to ths source texture + * @type {PIXI.BaseTexture} + */ + this.baseTexture = baseTexture; + + /** + * Map of spritesheet textures. + * @type {Object} + */ + this.textures = {}; + + /** + * Reference to the original JSON data. + * @type {Object} + */ + this.data = data; + + /** + * The resolution of the spritesheet. + * @type {number} + */ + this.resolution = this._updateResolution(resolutionFilename || this.baseTexture.imageUrl); + + /** + * Map of spritesheet frames. + * @type {Object} + * @private + */ + this._frames = this.data.frames; + + /** + * Collection of frame names. + * @type {string[]} + * @private + */ + this._frameKeys = Object.keys(this._frames); + + /** + * Current batch index being processed. + * @type {number} + * @private + */ + this._batchIndex = 0; + + /** + * Callback when parse is completed. + * @type {Function} + * @private + */ + this._callback = null; + } + + /** + * Generate the resolution from the filename or fallback + * to the meta.scale field of the JSON data. + * + * @private + * @param {string} resolutionFilename - The filename to use for resolving + * the default resolution. + * @return {number} Resolution to use for spritesheet. + */ + + + Spritesheet.prototype._updateResolution = function _updateResolution(resolutionFilename) { + var scale = this.data.meta.scale; + + // Use a defaultValue of `null` to check if a url-based resolution is set + var resolution = (0, _utils.getResolutionOfUrl)(resolutionFilename, null); + + // No resolution found via URL + if (resolution === null) { + // Use the scale value or default to 1 + resolution = scale !== undefined ? parseFloat(scale) : 1; + } + + // For non-1 resolutions, update baseTexture + if (resolution !== 1) { + this.baseTexture.resolution = resolution; + this.baseTexture.update(); + } + + return resolution; + }; + + /** + * Parser spritesheet from loaded data. This is done asynchronously + * to prevent creating too many Texture within a single process. + * + * @param {Function} callback - Callback when complete returns + * a map of the Textures for this spritesheet. + */ + + + Spritesheet.prototype.parse = function parse(callback) { + this._batchIndex = 0; + this._callback = callback; + + if (this._frameKeys.length <= Spritesheet.BATCH_SIZE) { + this._processFrames(0); + this._parseComplete(); + } else { + this._nextBatch(); + } + }; + + /** + * Process a batch of frames + * + * @private + * @param {number} initialFrameIndex - The index of frame to start. + */ + + + Spritesheet.prototype._processFrames = function _processFrames(initialFrameIndex) { + var frameIndex = initialFrameIndex; + var maxFrames = Spritesheet.BATCH_SIZE; + + while (frameIndex - initialFrameIndex < maxFrames && frameIndex < this._frameKeys.length) { + var i = this._frameKeys[frameIndex]; + var rect = this._frames[i].frame; + + if (rect) { + var frame = null; + var trim = null; + var orig = new _.Rectangle(0, 0, this._frames[i].sourceSize.w / this.resolution, this._frames[i].sourceSize.h / this.resolution); + + if (this._frames[i].rotated) { + frame = new _.Rectangle(rect.x / this.resolution, rect.y / this.resolution, rect.h / this.resolution, rect.w / this.resolution); + } else { + frame = new _.Rectangle(rect.x / this.resolution, rect.y / this.resolution, rect.w / this.resolution, rect.h / this.resolution); + } + + // Check to see if the sprite is trimmed + if (this._frames[i].trimmed) { + trim = new _.Rectangle(this._frames[i].spriteSourceSize.x / this.resolution, this._frames[i].spriteSourceSize.y / this.resolution, rect.w / this.resolution, rect.h / this.resolution); + } + + this.textures[i] = new _.Texture(this.baseTexture, frame, orig, trim, this._frames[i].rotated ? 2 : 0); + + // lets also add the frame to pixi's global cache for fromFrame and fromImage functions + _.Texture.addToCache(this.textures[i], i); + } + + frameIndex++; + } + }; + + /** + * The parse has completed. + * + * @private + */ + + + Spritesheet.prototype._parseComplete = function _parseComplete() { + var callback = this._callback; + + this._callback = null; + this._batchIndex = 0; + callback.call(this, this.textures); + }; + + /** + * Begin the next batch of textures. + * + * @private + */ + + + Spritesheet.prototype._nextBatch = function _nextBatch() { + var _this = this; + + this._processFrames(this._batchIndex * Spritesheet.BATCH_SIZE); + this._batchIndex++; + setTimeout(function () { + if (_this._batchIndex * Spritesheet.BATCH_SIZE < _this._frameKeys.length) { + _this._nextBatch(); + } else { + _this._parseComplete(); + } + }, 0); + }; + + /** + * Destroy Spritesheet and don't use after this. + * + * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well + */ + + + Spritesheet.prototype.destroy = function destroy() { + var destroyBase = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + for (var i in this.textures) { + this.textures[i].destroy(); + } + this._frames = null; + this._frameKeys = null; + this.data = null; + this.textures = null; + if (destroyBase) { + this.baseTexture.destroy(); + } + this.baseTexture = null; + }; + + return Spritesheet; +}(); + +exports.default = Spritesheet; + +},{"../":65,"../utils":124}],115:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _BaseTexture = require('./BaseTexture'); + +var _BaseTexture2 = _interopRequireDefault(_BaseTexture); + +var _VideoBaseTexture = require('./VideoBaseTexture'); + +var _VideoBaseTexture2 = _interopRequireDefault(_VideoBaseTexture); + +var _TextureUvs = require('./TextureUvs'); + +var _TextureUvs2 = _interopRequireDefault(_TextureUvs); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +var _math = require('../math'); + +var _utils = require('../utils'); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A texture stores the information that represents an image or part of an image. It cannot be added + * to the display list directly. Instead use it as the texture for a Sprite. If no frame is provided + * then the whole image is used. + * + * You can directly create a texture from an image and then reuse it multiple times like this : + * + * ```js + * let texture = PIXI.Texture.fromImage('assets/image.png'); + * let sprite1 = new PIXI.Sprite(texture); + * let sprite2 = new PIXI.Sprite(texture); + * ``` + * + * Textures made from SVGs, loaded or not, cannot be used before the file finishes processing. + * You can check for this by checking the sprite's _textureID property. + * ```js + * var texture = PIXI.Texture.fromImage('assets/image.svg'); + * var sprite1 = new PIXI.Sprite(texture); + * //sprite1._textureID should not be undefined if the texture has finished processing the SVG file + * ``` + * You can use a ticker or rAF to ensure your sprites load the finished textures after processing. See issue #3068. + * + * @class + * @extends EventEmitter + * @memberof PIXI + */ +var Texture = function (_EventEmitter) { + _inherits(Texture, _EventEmitter); + + /** + * @param {PIXI.BaseTexture} baseTexture - The base texture source to create the texture from + * @param {PIXI.Rectangle} [frame] - The rectangle frame of the texture to show + * @param {PIXI.Rectangle} [orig] - The area of original texture + * @param {PIXI.Rectangle} [trim] - Trimmed rectangle of original texture + * @param {number} [rotate] - indicates how the texture was rotated by texture packer. See {@link PIXI.GroupD8} + */ + function Texture(baseTexture, frame, orig, trim, rotate) { + _classCallCheck(this, Texture); + + /** + * Does this Texture have any frame data assigned to it? + * + * @member {boolean} + */ + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + _this.noFrame = false; + + if (!frame) { + _this.noFrame = true; + frame = new _math.Rectangle(0, 0, 1, 1); + } + + if (baseTexture instanceof Texture) { + baseTexture = baseTexture.baseTexture; + } + + /** + * The base texture that this texture uses. + * + * @member {PIXI.BaseTexture} + */ + _this.baseTexture = baseTexture; + + /** + * This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering, + * irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases) + * + * @member {PIXI.Rectangle} + */ + _this._frame = frame; + + /** + * This is the trimmed area of original texture, before it was put in atlas + * + * @member {PIXI.Rectangle} + */ + _this.trim = trim; + + /** + * This will let the renderer know if the texture is valid. If it's not then it cannot be rendered. + * + * @member {boolean} + */ + _this.valid = false; + + /** + * This will let a renderer know that a texture has been updated (used mainly for webGL uv updates) + * + * @member {boolean} + */ + _this.requiresUpdate = false; + + /** + * The WebGL UV data cache. + * + * @member {PIXI.TextureUvs} + * @private + */ + _this._uvs = null; + + /** + * This is the area of original texture, before it was put in atlas + * + * @member {PIXI.Rectangle} + */ + _this.orig = orig || frame; // new Rectangle(0, 0, 1, 1); + + _this._rotate = Number(rotate || 0); + + if (rotate === true) { + // this is old texturepacker legacy, some games/libraries are passing "true" for rotated textures + _this._rotate = 2; + } else if (_this._rotate % 2 !== 0) { + throw new Error('attempt to use diamond-shaped UVs. If you are sure, set rotation manually'); + } + + if (baseTexture.hasLoaded) { + if (_this.noFrame) { + frame = new _math.Rectangle(0, 0, baseTexture.width, baseTexture.height); + + // if there is no frame we should monitor for any base texture changes.. + baseTexture.on('update', _this.onBaseTextureUpdated, _this); + } + _this.frame = frame; + } else { + baseTexture.once('loaded', _this.onBaseTextureLoaded, _this); + } + + /** + * Fired when the texture is updated. This happens if the frame or the baseTexture is updated. + * + * @event PIXI.Texture#update + * @protected + * @param {PIXI.Texture} texture - Instance of texture being updated. + */ + + _this._updateID = 0; + + /** + * Extra field for extra plugins. May contain clamp settings and some matrices + * @type {Object} + */ + _this.transform = null; + + /** + * The ids under which this Texture has been added to the texture cache. This is + * automatically set as long as Texture.addToCache is used, but may not be set if a + * Texture is added directly to the TextureCache array. + * + * @member {string[]} + */ + _this.textureCacheIds = []; + return _this; + } + + /** + * Updates this texture on the gpu. + * + */ + + + Texture.prototype.update = function update() { + this.baseTexture.update(); + }; + + /** + * Called when the base texture is loaded + * + * @private + * @param {PIXI.BaseTexture} baseTexture - The base texture. + */ + + + Texture.prototype.onBaseTextureLoaded = function onBaseTextureLoaded(baseTexture) { + this._updateID++; + + // TODO this code looks confusing.. boo to abusing getters and setters! + if (this.noFrame) { + this.frame = new _math.Rectangle(0, 0, baseTexture.width, baseTexture.height); + } else { + this.frame = this._frame; + } + + this.baseTexture.on('update', this.onBaseTextureUpdated, this); + this.emit('update', this); + }; + + /** + * Called when the base texture is updated + * + * @private + * @param {PIXI.BaseTexture} baseTexture - The base texture. + */ + + + Texture.prototype.onBaseTextureUpdated = function onBaseTextureUpdated(baseTexture) { + this._updateID++; + + this._frame.width = baseTexture.width; + this._frame.height = baseTexture.height; + + this.emit('update', this); + }; + + /** + * Destroys this texture + * + * @param {boolean} [destroyBase=false] Whether to destroy the base texture as well + */ + + + Texture.prototype.destroy = function destroy(destroyBase) { + if (this.baseTexture) { + if (destroyBase) { + // delete the texture if it exists in the texture cache.. + // this only needs to be removed if the base texture is actually destroyed too.. + if (_utils.TextureCache[this.baseTexture.imageUrl]) { + Texture.removeFromCache(this.baseTexture.imageUrl); + } + + this.baseTexture.destroy(); + } + + this.baseTexture.off('update', this.onBaseTextureUpdated, this); + this.baseTexture.off('loaded', this.onBaseTextureLoaded, this); + + this.baseTexture = null; + } + + this._frame = null; + this._uvs = null; + this.trim = null; + this.orig = null; + + this.valid = false; + + Texture.removeFromCache(this); + this.textureCacheIds = null; + }; + + /** + * Creates a new texture object that acts the same as this one. + * + * @return {PIXI.Texture} The new texture + */ + + + Texture.prototype.clone = function clone() { + return new Texture(this.baseTexture, this.frame, this.orig, this.trim, this.rotate); + }; + + /** + * Updates the internal WebGL UV cache. + * + * @protected + */ + + + Texture.prototype._updateUvs = function _updateUvs() { + if (!this._uvs) { + this._uvs = new _TextureUvs2.default(); + } + + this._uvs.set(this._frame, this.baseTexture, this.rotate); + + this._updateID++; + }; + + /** + * Helper function that creates a Texture object from the given image url. + * If the image is not in the texture cache it will be created and loaded. + * + * @static + * @param {string} imageUrl - The image url of the texture + * @param {boolean} [crossorigin] - Whether requests should be treated as crossorigin + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {number} [sourceScale=(auto)] - Scale for the original image, used with SVG images. + * @return {PIXI.Texture} The newly created texture + */ + + + Texture.fromImage = function fromImage(imageUrl, crossorigin, scaleMode, sourceScale) { + var texture = _utils.TextureCache[imageUrl]; + + if (!texture) { + texture = new Texture(_BaseTexture2.default.fromImage(imageUrl, crossorigin, scaleMode, sourceScale)); + Texture.addToCache(texture, imageUrl); + } + + return texture; + }; + + /** + * Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId + * The frame ids are created when a Texture packer file has been loaded + * + * @static + * @param {string} frameId - The frame Id of the texture in the cache + * @return {PIXI.Texture} The newly created texture + */ + + + Texture.fromFrame = function fromFrame(frameId) { + var texture = _utils.TextureCache[frameId]; + + if (!texture) { + throw new Error('The frameId "' + frameId + '" does not exist in the texture cache'); + } + + return texture; + }; + + /** + * Helper function that creates a new Texture based on the given canvas element. + * + * @static + * @param {HTMLCanvasElement} canvas - The canvas element source of the texture + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @param {string} [origin='canvas'] - A string origin of who created the base texture + * @return {PIXI.Texture} The newly created texture + */ + + + Texture.fromCanvas = function fromCanvas(canvas, scaleMode) { + var origin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'canvas'; + + return new Texture(_BaseTexture2.default.fromCanvas(canvas, scaleMode, origin)); + }; + + /** + * Helper function that creates a new Texture based on the given video element. + * + * @static + * @param {HTMLVideoElement|string} video - The URL or actual element of the video + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @return {PIXI.Texture} The newly created texture + */ + + + Texture.fromVideo = function fromVideo(video, scaleMode) { + if (typeof video === 'string') { + return Texture.fromVideoUrl(video, scaleMode); + } + + return new Texture(_VideoBaseTexture2.default.fromVideo(video, scaleMode)); + }; + + /** + * Helper function that creates a new Texture based on the video url. + * + * @static + * @param {string} videoUrl - URL of the video + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @return {PIXI.Texture} The newly created texture + */ + + + Texture.fromVideoUrl = function fromVideoUrl(videoUrl, scaleMode) { + return new Texture(_VideoBaseTexture2.default.fromUrl(videoUrl, scaleMode)); + }; + + /** + * Helper function that creates a new Texture based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {number|string|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|PIXI.BaseTexture} + * source - Source to create texture from + * @return {PIXI.Texture} The newly created texture + */ + + + Texture.from = function from(source) { + // TODO auto detect cross origin.. + // TODO pass in scale mode? + if (typeof source === 'string') { + var texture = _utils.TextureCache[source]; + + if (!texture) { + // check if its a video.. + var isVideo = source.match(/\.(mp4|webm|ogg|h264|avi|mov)$/) !== null; + + if (isVideo) { + return Texture.fromVideoUrl(source); + } + + return Texture.fromImage(source); + } + + return texture; + } else if (source instanceof HTMLImageElement) { + return new Texture(_BaseTexture2.default.from(source)); + } else if (source instanceof HTMLCanvasElement) { + return Texture.fromCanvas(source, _settings2.default.SCALE_MODE, 'HTMLCanvasElement'); + } else if (source instanceof HTMLVideoElement) { + return Texture.fromVideo(source); + } else if (source instanceof _BaseTexture2.default) { + return new Texture(source); + } + + // lets assume its a texture! + return source; + }; + + /** + * Create a texture from a source and add to the cache. + * + * @static + * @param {HTMLImageElement|HTMLCanvasElement} source - The input source. + * @param {String} imageUrl - File name of texture, for cache and resolving resolution. + * @param {String} [name] - Human readible name for the texture cache. If no name is + * specified, only `imageUrl` will be used as the cache ID. + * @return {PIXI.Texture} Output texture + */ + + + Texture.fromLoader = function fromLoader(source, imageUrl, name) { + var baseTexture = new _BaseTexture2.default(source, undefined, (0, _utils.getResolutionOfUrl)(imageUrl)); + var texture = new Texture(baseTexture); + + baseTexture.imageUrl = imageUrl; + + // No name, use imageUrl instead + if (!name) { + name = imageUrl; + } + + // lets also add the frame to pixi's global cache for fromFrame and fromImage fucntions + _BaseTexture2.default.addToCache(texture.baseTexture, name); + Texture.addToCache(texture, name); + + // also add references by url if they are different. + if (name !== imageUrl) { + _BaseTexture2.default.addToCache(texture.baseTexture, imageUrl); + Texture.addToCache(texture, imageUrl); + } + + return texture; + }; + + /** + * Adds a Texture to the global TextureCache. This cache is shared across the whole PIXI object. + * + * @static + * @param {PIXI.Texture} texture - The Texture to add to the cache. + * @param {string} id - The id that the Texture will be stored against. + */ + + + Texture.addToCache = function addToCache(texture, id) { + if (id) { + if (texture.textureCacheIds.indexOf(id) === -1) { + texture.textureCacheIds.push(id); + } + + /* eslint-disable no-console */ + if (_utils.TextureCache[id]) { + console.warn('Texture added to the cache with an id [' + id + '] that already had an entry'); + } + /* eslint-enable no-console */ + + _utils.TextureCache[id] = texture; + } + }; + + /** + * Remove a Texture from the global TextureCache. + * + * @static + * @param {string|PIXI.Texture} texture - id of a Texture to be removed, or a Texture instance itself + * @return {PIXI.Texture|null} The Texture that was removed + */ + + + Texture.removeFromCache = function removeFromCache(texture) { + if (typeof texture === 'string') { + var textureFromCache = _utils.TextureCache[texture]; + + if (textureFromCache) { + var index = textureFromCache.textureCacheIds.indexOf(texture); + + if (index > -1) { + textureFromCache.textureCacheIds.splice(index, 1); + } + + delete _utils.TextureCache[texture]; + + return textureFromCache; + } + } else if (texture && texture.textureCacheIds) { + for (var i = 0; i < texture.textureCacheIds.length; ++i) { + // Check that texture matches the one being passed in before deleting it from the cache. + if (_utils.TextureCache[texture.textureCacheIds[i]] === texture) { + delete _utils.TextureCache[texture.textureCacheIds[i]]; + } + } + + texture.textureCacheIds.length = 0; + + return texture; + } + + return null; + }; + + /** + * The frame specifies the region of the base texture that this texture uses. + * + * @member {PIXI.Rectangle} + */ + + + _createClass(Texture, [{ + key: 'frame', + get: function get() { + return this._frame; + }, + set: function set(frame) // eslint-disable-line require-jsdoc + { + this._frame = frame; + + this.noFrame = false; + + if (frame.x + frame.width > this.baseTexture.width || frame.y + frame.height > this.baseTexture.height) { + throw new Error('Texture Error: frame does not fit inside the base Texture dimensions: ' + ('X: ' + frame.x + ' + ' + frame.width + ' = ' + (frame.x + frame.width) + ' > ' + this.baseTexture.width + ' ') + ('Y: ' + frame.y + ' + ' + frame.height + ' = ' + (frame.y + frame.height) + ' > ' + this.baseTexture.height)); + } + + // this.valid = frame && frame.width && frame.height && this.baseTexture.source && this.baseTexture.hasLoaded; + this.valid = frame && frame.width && frame.height && this.baseTexture.hasLoaded; + + if (!this.trim && !this.rotate) { + this.orig = frame; + } + + if (this.valid) { + this._updateUvs(); + } + } + + /** + * Indicates whether the texture is rotated inside the atlas + * set to 2 to compensate for texture packer rotation + * set to 6 to compensate for spine packer rotation + * can be used to rotate or mirror sprites + * See {@link PIXI.GroupD8} for explanation + * + * @member {number} + */ + + }, { + key: 'rotate', + get: function get() { + return this._rotate; + }, + set: function set(rotate) // eslint-disable-line require-jsdoc + { + this._rotate = rotate; + if (this.valid) { + this._updateUvs(); + } + } + + /** + * The width of the Texture in pixels. + * + * @member {number} + */ + + }, { + key: 'width', + get: function get() { + return this.orig.width; + } + + /** + * The height of the Texture in pixels. + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + return this.orig.height; + } + }]); + + return Texture; +}(_eventemitter2.default); + +exports.default = Texture; + + +function createWhiteTexture() { + var canvas = document.createElement('canvas'); + + canvas.width = 10; + canvas.height = 10; + + var context = canvas.getContext('2d'); + + context.fillStyle = 'white'; + context.fillRect(0, 0, 10, 10); + + return new Texture(new _BaseTexture2.default(canvas)); +} + +function removeAllHandlers(tex) { + tex.destroy = function _emptyDestroy() {/* empty */}; + tex.on = function _emptyOn() {/* empty */}; + tex.once = function _emptyOnce() {/* empty */}; + tex.emit = function _emptyEmit() {/* empty */}; +} + +/** + * An empty texture, used often to not have to create multiple empty textures. + * Can not be destroyed. + * + * @static + * @constant + */ +Texture.EMPTY = new Texture(new _BaseTexture2.default()); +removeAllHandlers(Texture.EMPTY); +removeAllHandlers(Texture.EMPTY.baseTexture); + +/** + * A white texture of 10x10 size, used for graphics and other things + * Can not be destroyed. + * + * @static + * @constant + */ +Texture.WHITE = createWhiteTexture(); +removeAllHandlers(Texture.WHITE); +removeAllHandlers(Texture.WHITE.baseTexture); + +},{"../math":70,"../settings":101,"../utils":124,"./BaseTexture":112,"./TextureUvs":116,"./VideoBaseTexture":117,"eventemitter3":20}],116:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _GroupD = require('../math/GroupD8'); + +var _GroupD2 = _interopRequireDefault(_GroupD); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A standard object to store the Uvs of a texture + * + * @class + * @private + * @memberof PIXI + */ +var TextureUvs = function () { + /** + * + */ + function TextureUvs() { + _classCallCheck(this, TextureUvs); + + this.x0 = 0; + this.y0 = 0; + + this.x1 = 1; + this.y1 = 0; + + this.x2 = 1; + this.y2 = 1; + + this.x3 = 0; + this.y3 = 1; + + this.uvsUint32 = new Uint32Array(4); + } + + /** + * Sets the texture Uvs based on the given frame information. + * + * @private + * @param {PIXI.Rectangle} frame - The frame of the texture + * @param {PIXI.Rectangle} baseFrame - The base frame of the texture + * @param {number} rotate - Rotation of frame, see {@link PIXI.GroupD8} + */ + + + TextureUvs.prototype.set = function set(frame, baseFrame, rotate) { + var tw = baseFrame.width; + var th = baseFrame.height; + + if (rotate) { + // width and height div 2 div baseFrame size + var w2 = frame.width / 2 / tw; + var h2 = frame.height / 2 / th; + + // coordinates of center + var cX = frame.x / tw + w2; + var cY = frame.y / th + h2; + + rotate = _GroupD2.default.add(rotate, _GroupD2.default.NW); // NW is top-left corner + this.x0 = cX + w2 * _GroupD2.default.uX(rotate); + this.y0 = cY + h2 * _GroupD2.default.uY(rotate); + + rotate = _GroupD2.default.add(rotate, 2); // rotate 90 degrees clockwise + this.x1 = cX + w2 * _GroupD2.default.uX(rotate); + this.y1 = cY + h2 * _GroupD2.default.uY(rotate); + + rotate = _GroupD2.default.add(rotate, 2); + this.x2 = cX + w2 * _GroupD2.default.uX(rotate); + this.y2 = cY + h2 * _GroupD2.default.uY(rotate); + + rotate = _GroupD2.default.add(rotate, 2); + this.x3 = cX + w2 * _GroupD2.default.uX(rotate); + this.y3 = cY + h2 * _GroupD2.default.uY(rotate); + } else { + this.x0 = frame.x / tw; + this.y0 = frame.y / th; + + this.x1 = (frame.x + frame.width) / tw; + this.y1 = frame.y / th; + + this.x2 = (frame.x + frame.width) / tw; + this.y2 = (frame.y + frame.height) / th; + + this.x3 = frame.x / tw; + this.y3 = (frame.y + frame.height) / th; + } + + this.uvsUint32[0] = (this.y0 * 65535 & 0xFFFF) << 16 | this.x0 * 65535 & 0xFFFF; + this.uvsUint32[1] = (this.y1 * 65535 & 0xFFFF) << 16 | this.x1 * 65535 & 0xFFFF; + this.uvsUint32[2] = (this.y2 * 65535 & 0xFFFF) << 16 | this.x2 * 65535 & 0xFFFF; + this.uvsUint32[3] = (this.y3 * 65535 & 0xFFFF) << 16 | this.x3 * 65535 & 0xFFFF; + }; + + return TextureUvs; +}(); + +exports.default = TextureUvs; + +},{"../math/GroupD8":66}],117:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _BaseTexture2 = require('./BaseTexture'); + +var _BaseTexture3 = _interopRequireDefault(_BaseTexture2); + +var _utils = require('../utils'); + +var _ticker = require('../ticker'); + +var _const = require('../const'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A texture of a [playing] Video. + * + * Video base textures mimic PixiJS BaseTexture.from.... method in their creation process. + * + * This can be used in several ways, such as: + * + * ```js + * let texture = PIXI.VideoBaseTexture.fromUrl('http://mydomain.com/video.mp4'); + * + * let texture = PIXI.VideoBaseTexture.fromUrl({ src: 'http://mydomain.com/video.mp4', mime: 'video/mp4' }); + * + * let texture = PIXI.VideoBaseTexture.fromUrls(['/video.webm', '/video.mp4']); + * + * let texture = PIXI.VideoBaseTexture.fromUrls([ + * { src: '/video.webm', mime: 'video/webm' }, + * { src: '/video.mp4', mime: 'video/mp4' } + * ]); + * ``` + * + * See the ["deus" demo](http://www.goodboydigital.com/pixijs/examples/deus/). + * + * @class + * @extends PIXI.BaseTexture + * @memberof PIXI + */ +var VideoBaseTexture = function (_BaseTexture) { + _inherits(VideoBaseTexture, _BaseTexture); + + /** + * @param {HTMLVideoElement} source - Video source + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + */ + function VideoBaseTexture(source, scaleMode) { + _classCallCheck(this, VideoBaseTexture); + + if (!source) { + throw new Error('No video source element specified.'); + } + + // hook in here to check if video is already available. + // BaseTexture looks for a source.complete boolean, plus width & height. + + if ((source.readyState === source.HAVE_ENOUGH_DATA || source.readyState === source.HAVE_FUTURE_DATA) && source.width && source.height) { + source.complete = true; + } + + var _this = _possibleConstructorReturn(this, _BaseTexture.call(this, source, scaleMode)); + + _this.width = source.videoWidth; + _this.height = source.videoHeight; + + _this._autoUpdate = true; + _this._isAutoUpdating = false; + + /** + * When set to true will automatically play videos used by this texture once + * they are loaded. If false, it will not modify the playing state. + * + * @member {boolean} + * @default true + */ + _this.autoPlay = true; + + _this.update = _this.update.bind(_this); + _this._onCanPlay = _this._onCanPlay.bind(_this); + + source.addEventListener('play', _this._onPlayStart.bind(_this)); + source.addEventListener('pause', _this._onPlayStop.bind(_this)); + _this.hasLoaded = false; + _this.__loaded = false; + + if (!_this._isSourceReady()) { + source.addEventListener('canplay', _this._onCanPlay); + source.addEventListener('canplaythrough', _this._onCanPlay); + } else { + _this._onCanPlay(); + } + return _this; + } + + /** + * Returns true if the underlying source is playing. + * + * @private + * @return {boolean} True if playing. + */ + + + VideoBaseTexture.prototype._isSourcePlaying = function _isSourcePlaying() { + var source = this.source; + + return source.currentTime > 0 && source.paused === false && source.ended === false && source.readyState > 2; + }; + + /** + * Returns true if the underlying source is ready for playing. + * + * @private + * @return {boolean} True if ready. + */ + + + VideoBaseTexture.prototype._isSourceReady = function _isSourceReady() { + return this.source.readyState === 3 || this.source.readyState === 4; + }; + + /** + * Runs the update loop when the video is ready to play + * + * @private + */ + + + VideoBaseTexture.prototype._onPlayStart = function _onPlayStart() { + // Just in case the video has not received its can play even yet.. + if (!this.hasLoaded) { + this._onCanPlay(); + } + + if (!this._isAutoUpdating && this.autoUpdate) { + _ticker.shared.add(this.update, this, _const.UPDATE_PRIORITY.HIGH); + this._isAutoUpdating = true; + } + }; + + /** + * Fired when a pause event is triggered, stops the update loop + * + * @private + */ + + + VideoBaseTexture.prototype._onPlayStop = function _onPlayStop() { + if (this._isAutoUpdating) { + _ticker.shared.remove(this.update, this); + this._isAutoUpdating = false; + } + }; + + /** + * Fired when the video is loaded and ready to play + * + * @private + */ + + + VideoBaseTexture.prototype._onCanPlay = function _onCanPlay() { + this.hasLoaded = true; + + if (this.source) { + this.source.removeEventListener('canplay', this._onCanPlay); + this.source.removeEventListener('canplaythrough', this._onCanPlay); + + this.width = this.source.videoWidth; + this.height = this.source.videoHeight; + + // prevent multiple loaded dispatches.. + if (!this.__loaded) { + this.__loaded = true; + this.emit('loaded', this); + } + + if (this._isSourcePlaying()) { + this._onPlayStart(); + } else if (this.autoPlay) { + this.source.play(); + } + } + }; + + /** + * Destroys this texture + * + */ + + + VideoBaseTexture.prototype.destroy = function destroy() { + if (this._isAutoUpdating) { + _ticker.shared.remove(this.update, this); + } + + if (this.source && this.source._pixiId) { + _BaseTexture3.default.removeFromCache(this.source._pixiId); + delete this.source._pixiId; + } + + _BaseTexture.prototype.destroy.call(this); + }; + + /** + * Mimic PixiJS BaseTexture.from.... method. + * + * @static + * @param {HTMLVideoElement} video - Video to create texture from + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - See {@link PIXI.SCALE_MODES} for possible values + * @return {PIXI.VideoBaseTexture} Newly created VideoBaseTexture + */ + + + VideoBaseTexture.fromVideo = function fromVideo(video, scaleMode) { + if (!video._pixiId) { + video._pixiId = 'video_' + (0, _utils.uid)(); + } + + var baseTexture = _utils.BaseTextureCache[video._pixiId]; + + if (!baseTexture) { + baseTexture = new VideoBaseTexture(video, scaleMode); + _BaseTexture3.default.addToCache(baseTexture, video._pixiId); + } + + return baseTexture; + }; + + /** + * Helper function that creates a new BaseTexture based on the given video element. + * This BaseTexture can then be used to create a texture + * + * @static + * @param {string|object|string[]|object[]} videoSrc - The URL(s) for the video. + * @param {string} [videoSrc.src] - One of the source urls for the video + * @param {string} [videoSrc.mime] - The mimetype of the video (e.g. 'video/mp4'). If not specified + * the url's extension will be used as the second part of the mime type. + * @param {number} scaleMode - See {@link PIXI.SCALE_MODES} for possible values + * @return {PIXI.VideoBaseTexture} Newly created VideoBaseTexture + */ + + + VideoBaseTexture.fromUrl = function fromUrl(videoSrc, scaleMode) { + var video = document.createElement('video'); + + video.setAttribute('webkit-playsinline', ''); + video.setAttribute('playsinline', ''); + + // array of objects or strings + if (Array.isArray(videoSrc)) { + for (var i = 0; i < videoSrc.length; ++i) { + video.appendChild(createSource(videoSrc[i].src || videoSrc[i], videoSrc[i].mime)); + } + } + // single object or string + else { + video.appendChild(createSource(videoSrc.src || videoSrc, videoSrc.mime)); + } + + video.load(); + + return VideoBaseTexture.fromVideo(video, scaleMode); + }; + + /** + * Should the base texture automatically update itself, set to true by default + * + * @member {boolean} + */ + + + _createClass(VideoBaseTexture, [{ + key: 'autoUpdate', + get: function get() { + return this._autoUpdate; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (value !== this._autoUpdate) { + this._autoUpdate = value; + + if (!this._autoUpdate && this._isAutoUpdating) { + _ticker.shared.remove(this.update, this); + this._isAutoUpdating = false; + } else if (this._autoUpdate && !this._isAutoUpdating) { + _ticker.shared.add(this.update, this, _const.UPDATE_PRIORITY.HIGH); + this._isAutoUpdating = true; + } + } + } + }]); + + return VideoBaseTexture; +}(_BaseTexture3.default); + +exports.default = VideoBaseTexture; + + +VideoBaseTexture.fromUrls = VideoBaseTexture.fromUrl; + +function createSource(path, type) { + if (!type) { + type = 'video/' + path.substr(path.lastIndexOf('.') + 1); + } + + var source = document.createElement('source'); + + source.src = path; + source.type = type; + + return source; +} + +},{"../const":46,"../ticker":120,"../utils":124,"./BaseTexture":112}],118:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _const = require('../const'); + +var _TickerListener = require('./TickerListener'); + +var _TickerListener2 = _interopRequireDefault(_TickerListener); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A Ticker class that runs an update loop that other objects listen to. + * This class is composed around listeners + * meant for execution on the next requested animation frame. + * Animation frames are requested only when necessary, + * e.g. When the ticker is started and the emitter has listeners. + * + * @class + * @memberof PIXI.ticker + */ +var Ticker = function () { + /** + * + */ + function Ticker() { + var _this = this; + + _classCallCheck(this, Ticker); + + /** + * The first listener. All new listeners added are chained on this. + * @private + * @type {TickerListener} + */ + this._head = new _TickerListener2.default(null, null, Infinity); + + /** + * Internal current frame request ID + * @private + */ + this._requestId = null; + + /** + * Internal value managed by minFPS property setter and getter. + * This is the maximum allowed milliseconds between updates. + * @private + */ + this._maxElapsedMS = 100; + + /** + * Whether or not this ticker should invoke the method + * {@link PIXI.ticker.Ticker#start} automatically + * when a listener is added. + * + * @member {boolean} + * @default false + */ + this.autoStart = false; + + /** + * Scalar time value from last frame to this frame. + * This value is capped by setting {@link PIXI.ticker.Ticker#minFPS} + * and is scaled with {@link PIXI.ticker.Ticker#speed}. + * **Note:** The cap may be exceeded by scaling. + * + * @member {number} + * @default 1 + */ + this.deltaTime = 1; + + /** + * Time elapsed in milliseconds from last frame to this frame. + * Opposed to what the scalar {@link PIXI.ticker.Ticker#deltaTime} + * is based, this value is neither capped nor scaled. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * Defaults to target frame time + * + * @member {number} + * @default 16.66 + */ + this.elapsedMS = 1 / _settings2.default.TARGET_FPMS; + + /** + * The last time {@link PIXI.ticker.Ticker#update} was invoked. + * This value is also reset internally outside of invoking + * update, but only when a new animation frame is requested. + * If the platform supports DOMHighResTimeStamp, + * this value will have a precision of 1 µs. + * + * @member {number} + * @default -1 + */ + this.lastTime = -1; + + /** + * Factor of current {@link PIXI.ticker.Ticker#deltaTime}. + * @example + * // Scales ticker.deltaTime to what would be + * // the equivalent of approximately 120 FPS + * ticker.speed = 2; + * + * @member {number} + * @default 1 + */ + this.speed = 1; + + /** + * Whether or not this ticker has been started. + * `true` if {@link PIXI.ticker.Ticker#start} has been called. + * `false` if {@link PIXI.ticker.Ticker#stop} has been called. + * While `false`, this value may change to `true` in the + * event of {@link PIXI.ticker.Ticker#autoStart} being `true` + * and a listener is added. + * + * @member {boolean} + * @default false + */ + this.started = false; + + /** + * Internal tick method bound to ticker instance. + * This is because in early 2015, Function.bind + * is still 60% slower in high performance scenarios. + * Also separating frame requests from update method + * so listeners may be called at any time and with + * any animation API, just invoke ticker.update(time). + * + * @private + * @param {number} time - Time since last tick. + */ + this._tick = function (time) { + _this._requestId = null; + + if (_this.started) { + // Invoke listeners now + _this.update(time); + // Listener side effects may have modified ticker state. + if (_this.started && _this._requestId === null && _this._head.next) { + _this._requestId = requestAnimationFrame(_this._tick); + } + } + }; + } + + /** + * Conditionally requests a new animation frame. + * If a frame has not already been requested, and if the internal + * emitter has listeners, a new frame is requested. + * + * @private + */ + + + Ticker.prototype._requestIfNeeded = function _requestIfNeeded() { + if (this._requestId === null && this._head.next) { + // ensure callbacks get correct delta + this.lastTime = performance.now(); + this._requestId = requestAnimationFrame(this._tick); + } + }; + + /** + * Conditionally cancels a pending animation frame. + * + * @private + */ + + + Ticker.prototype._cancelIfNeeded = function _cancelIfNeeded() { + if (this._requestId !== null) { + cancelAnimationFrame(this._requestId); + this._requestId = null; + } + }; + + /** + * Conditionally requests a new animation frame. + * If the ticker has been started it checks if a frame has not already + * been requested, and if the internal emitter has listeners. If these + * conditions are met, a new frame is requested. If the ticker has not + * been started, but autoStart is `true`, then the ticker starts now, + * and continues with the previous conditions to request a new frame. + * + * @private + */ + + + Ticker.prototype._startIfPossible = function _startIfPossible() { + if (this.started) { + this._requestIfNeeded(); + } else if (this.autoStart) { + this.start(); + } + }; + + /** + * Register a handler for tick events. Calls continuously unless + * it is removed or the ticker is stopped. + * + * @param {Function} fn - The listener function to be added for updates + * @param {Function} [context] - The listener context + * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting + * @returns {PIXI.ticker.Ticker} This instance of a ticker + */ + + + Ticker.prototype.add = function add(fn, context) { + var priority = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _const.UPDATE_PRIORITY.NORMAL; + + return this._addListener(new _TickerListener2.default(fn, context, priority)); + }; + + /** + * Add a handler for the tick event which is only execute once. + * + * @param {Function} fn - The listener function to be added for one update + * @param {Function} [context] - The listener context + * @param {number} [priority=PIXI.UPDATE_PRIORITY.NORMAL] - The priority for emitting + * @returns {PIXI.ticker.Ticker} This instance of a ticker + */ + + + Ticker.prototype.addOnce = function addOnce(fn, context) { + var priority = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _const.UPDATE_PRIORITY.NORMAL; + + return this._addListener(new _TickerListener2.default(fn, context, priority, true)); + }; + + /** + * Internally adds the event handler so that it can be sorted by priority. + * Priority allows certain handler (user, AnimatedSprite, Interaction) to be run + * before the rendering. + * + * @private + * @param {TickerListener} listener - Current listener being added. + * @returns {PIXI.ticker.Ticker} This instance of a ticker + */ + + + Ticker.prototype._addListener = function _addListener(listener) { + // For attaching to head + var current = this._head.next; + var previous = this._head; + + // Add the first item + if (!current) { + listener.connect(previous); + } else { + // Go from highest to lowest priority + while (current) { + if (listener.priority > current.priority) { + listener.connect(previous); + break; + } + previous = current; + current = current.next; + } + + // Not yet connected + if (!listener.previous) { + listener.connect(previous); + } + } + + this._startIfPossible(); + + return this; + }; + + /** + * Removes any handlers matching the function and context parameters. + * If no handlers are left after removing, then it cancels the animation frame. + * + * @param {Function} fn - The listener function to be removed + * @param {Function} [context] - The listener context to be removed + * @returns {PIXI.ticker.Ticker} This instance of a ticker + */ + + + Ticker.prototype.remove = function remove(fn, context) { + var listener = this._head.next; + + while (listener) { + // We found a match, lets remove it + // no break to delete all possible matches + // incase a listener was added 2+ times + if (listener.match(fn, context)) { + listener = listener.destroy(); + } else { + listener = listener.next; + } + } + + if (!this._head.next) { + this._cancelIfNeeded(); + } + + return this; + }; + + /** + * Starts the ticker. If the ticker has listeners + * a new animation frame is requested at this point. + */ + + + Ticker.prototype.start = function start() { + if (!this.started) { + this.started = true; + this._requestIfNeeded(); + } + }; + + /** + * Stops the ticker. If the ticker has requested + * an animation frame it is canceled at this point. + */ + + + Ticker.prototype.stop = function stop() { + if (this.started) { + this.started = false; + this._cancelIfNeeded(); + } + }; + + /** + * Destroy the ticker and don't use after this. Calling + * this method removes all references to internal events. + */ + + + Ticker.prototype.destroy = function destroy() { + this.stop(); + + var listener = this._head.next; + + while (listener) { + listener = listener.destroy(true); + } + + this._head.destroy(); + this._head = null; + }; + + /** + * Triggers an update. An update entails setting the + * current {@link PIXI.ticker.Ticker#elapsedMS}, + * the current {@link PIXI.ticker.Ticker#deltaTime}, + * invoking all listeners with current deltaTime, + * and then finally setting {@link PIXI.ticker.Ticker#lastTime} + * with the value of currentTime that was provided. + * This method will be called automatically by animation + * frame callbacks if the ticker instance has been started + * and listeners are added. + * + * @param {number} [currentTime=performance.now()] - the current time of execution + */ + + + Ticker.prototype.update = function update() { + var currentTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : performance.now(); + + var elapsedMS = void 0; + + // If the difference in time is zero or negative, we ignore most of the work done here. + // If there is no valid difference, then should be no reason to let anyone know about it. + // A zero delta, is exactly that, nothing should update. + // + // The difference in time can be negative, and no this does not mean time traveling. + // This can be the result of a race condition between when an animation frame is requested + // on the current JavaScript engine event loop, and when the ticker's start method is invoked + // (which invokes the internal _requestIfNeeded method). If a frame is requested before + // _requestIfNeeded is invoked, then the callback for the animation frame the ticker requests, + // can receive a time argument that can be less than the lastTime value that was set within + // _requestIfNeeded. This difference is in microseconds, but this is enough to cause problems. + // + // This check covers this browser engine timing issue, as well as if consumers pass an invalid + // currentTime value. This may happen if consumers opt-out of the autoStart, and update themselves. + + if (currentTime > this.lastTime) { + // Save uncapped elapsedMS for measurement + elapsedMS = this.elapsedMS = currentTime - this.lastTime; + + // cap the milliseconds elapsed used for deltaTime + if (elapsedMS > this._maxElapsedMS) { + elapsedMS = this._maxElapsedMS; + } + + this.deltaTime = elapsedMS * _settings2.default.TARGET_FPMS * this.speed; + + // Cache a local reference, in-case ticker is destroyed + // during the emit, we can still check for head.next + var head = this._head; + + // Invoke listeners added to internal emitter + var listener = head.next; + + while (listener) { + listener = listener.emit(this.deltaTime); + } + + if (!head.next) { + this._cancelIfNeeded(); + } + } else { + this.deltaTime = this.elapsedMS = 0; + } + + this.lastTime = currentTime; + }; + + /** + * The frames per second at which this ticker is running. + * The default is approximately 60 in most modern browsers. + * **Note:** This does not factor in the value of + * {@link PIXI.ticker.Ticker#speed}, which is specific + * to scaling {@link PIXI.ticker.Ticker#deltaTime}. + * + * @member {number} + * @readonly + */ + + + _createClass(Ticker, [{ + key: 'FPS', + get: function get() { + return 1000 / this.elapsedMS; + } + + /** + * Manages the maximum amount of milliseconds allowed to + * elapse between invoking {@link PIXI.ticker.Ticker#update}. + * This value is used to cap {@link PIXI.ticker.Ticker#deltaTime}, + * but does not effect the measured value of {@link PIXI.ticker.Ticker#FPS}. + * When setting this property it is clamped to a value between + * `0` and `PIXI.settings.TARGET_FPMS * 1000`. + * + * @member {number} + * @default 10 + */ + + }, { + key: 'minFPS', + get: function get() { + return 1000 / this._maxElapsedMS; + }, + set: function set(fps) // eslint-disable-line require-jsdoc + { + // Clamp: 0 to TARGET_FPMS + var minFPMS = Math.min(Math.max(0, fps) / 1000, _settings2.default.TARGET_FPMS); + + this._maxElapsedMS = 1 / minFPMS; + } + }]); + + return Ticker; +}(); + +exports.default = Ticker; + +},{"../const":46,"../settings":101,"./TickerListener":119}],119:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Internal class for handling the priority sorting of ticker handlers. + * + * @private + * @class + * @memberof PIXI.ticker + */ +var TickerListener = function () { + /** + * Constructor + * + * @param {Function} fn - The listener function to be added for one update + * @param {Function} [context=null] - The listener context + * @param {number} [priority=0] - The priority for emitting + * @param {boolean} [once=false] - If the handler should fire once + */ + function TickerListener(fn) { + var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var priority = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + _classCallCheck(this, TickerListener); + + /** + * The handler function to execute. + * @member {Function} + */ + this.fn = fn; + + /** + * The calling to execute. + * @member {Function} + */ + this.context = context; + + /** + * The current priority. + * @member {number} + */ + this.priority = priority; + + /** + * If this should only execute once. + * @member {boolean} + */ + this.once = once; + + /** + * The next item in chain. + * @member {TickerListener} + */ + this.next = null; + + /** + * The previous item in chain. + * @member {TickerListener} + */ + this.previous = null; + + /** + * `true` if this listener has been destroyed already. + * @member {boolean} + * @private + */ + this._destroyed = false; + } + + /** + * Simple compare function to figure out if a function and context match. + * + * @param {Function} fn - The listener function to be added for one update + * @param {Function} context - The listener context + * @return {boolean} `true` if the listener match the arguments + */ + + + TickerListener.prototype.match = function match(fn, context) { + context = context || null; + + return this.fn === fn && this.context === context; + }; + + /** + * Emit by calling the current function. + * @param {number} deltaTime - time since the last emit. + * @return {TickerListener} Next ticker + */ + + + TickerListener.prototype.emit = function emit(deltaTime) { + if (this.fn) { + if (this.context) { + this.fn.call(this.context, deltaTime); + } else { + this.fn(deltaTime); + } + } + + var redirect = this.next; + + if (this.once) { + this.destroy(true); + } + + // Soft-destroying should remove + // the next reference + if (this._destroyed) { + this.next = null; + } + + return redirect; + }; + + /** + * Connect to the list. + * @param {TickerListener} previous - Input node, previous listener + */ + + + TickerListener.prototype.connect = function connect(previous) { + this.previous = previous; + if (previous.next) { + previous.next.previous = this; + } + this.next = previous.next; + previous.next = this; + }; + + /** + * Destroy and don't use after this. + * @param {boolean} [hard = false] `true` to remove the `next` reference, this + * is considered a hard destroy. Soft destroy maintains the next reference. + * @return {TickerListener} The listener to redirect while emitting or removing. + */ + + + TickerListener.prototype.destroy = function destroy() { + var hard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + this._destroyed = true; + this.fn = null; + this.context = null; + + // Disconnect, hook up next and previous + if (this.previous) { + this.previous.next = this.next; + } + + if (this.next) { + this.next.previous = this.previous; + } + + // Redirect to the next item + var redirect = this.previous; + + // Remove references + this.next = hard ? null : redirect; + this.previous = null; + + return redirect; + }; + + return TickerListener; +}(); + +exports.default = TickerListener; + +},{}],120:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.Ticker = exports.shared = undefined; + +var _Ticker = require('./Ticker'); + +var _Ticker2 = _interopRequireDefault(_Ticker); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The shared ticker instance used by {@link PIXI.extras.AnimatedSprite}. + * and by {@link PIXI.interaction.InteractionManager}. + * The property {@link PIXI.ticker.Ticker#autoStart} is set to `true` + * for this instance. Please follow the examples for usage, including + * how to opt-out of auto-starting the shared ticker. + * + * @example + * let ticker = PIXI.ticker.shared; + * // Set this to prevent starting this ticker when listeners are added. + * // By default this is true only for the PIXI.ticker.shared instance. + * ticker.autoStart = false; + * // FYI, call this to ensure the ticker is stopped. It should be stopped + * // if you have not attempted to render anything yet. + * ticker.stop(); + * // Call this when you are ready for a running shared ticker. + * ticker.start(); + * + * @example + * // You may use the shared ticker to render... + * let renderer = PIXI.autoDetectRenderer(800, 600); + * let stage = new PIXI.Container(); + * let interactionManager = PIXI.interaction.InteractionManager(renderer); + * document.body.appendChild(renderer.view); + * ticker.add(function (time) { + * renderer.render(stage); + * }); + * + * @example + * // Or you can just update it manually. + * ticker.autoStart = false; + * ticker.stop(); + * function animate(time) { + * ticker.update(time); + * renderer.render(stage); + * requestAnimationFrame(animate); + * } + * animate(performance.now()); + * + * @type {PIXI.ticker.Ticker} + * @memberof PIXI.ticker + */ +var shared = new _Ticker2.default(); + +shared.autoStart = true; +shared.destroy = function () { + // protect destroying shared ticker + // this is used by other internal systems + // like AnimatedSprite and InteractionManager +}; + +/** + * This namespace contains an API for interacting with PIXI's internal global update loop. + * + * This ticker is used for rendering, {@link PIXI.extras.AnimatedSprite AnimatedSprite}, + * {@link PIXI.interaction.InteractionManager InteractionManager} and many other time-based PIXI systems. + * @example + * const ticker = new PIXI.ticker.Ticker(); + * ticker.stop(); + * ticker.add((deltaTime) => { + * // do something every frame + * }); + * ticker.start(); + * @namespace PIXI.ticker + */ +exports.shared = shared; +exports.Ticker = _Ticker2.default; + +},{"./Ticker":118}],121:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.default = canUploadSameBuffer; +function canUploadSameBuffer() { + // Uploading the same buffer multiple times in a single frame can cause perf issues. + // Apparent on IOS so only check for that at the moment + // this check may become more complex if this issue pops up elsewhere. + var ios = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform); + + return !ios; +} + +},{}],122:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.default = createIndicesForQuads; +/** + * Generic Mask Stack data structure + * + * @memberof PIXI + * @function createIndicesForQuads + * @private + * @param {number} size - Number of quads + * @return {Uint16Array} indices + */ +function createIndicesForQuads(size) { + // the total number of indices in our array, there are 6 points per quad. + + var totalIndices = size * 6; + + var indices = new Uint16Array(totalIndices); + + // fill the indices with the quads to draw + for (var i = 0, j = 0; i < totalIndices; i += 6, j += 4) { + indices[i + 0] = j + 0; + indices[i + 1] = j + 1; + indices[i + 2] = j + 2; + indices[i + 3] = j + 0; + indices[i + 4] = j + 2; + indices[i + 5] = j + 3; + } + + return indices; +} + +},{}],123:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = determineCrossOrigin; + +var _url2 = require('url'); + +var _url3 = _interopRequireDefault(_url2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var tempAnchor = void 0; + +/** + * Sets the `crossOrigin` property for this resource based on if the url + * for this resource is cross-origin. If crossOrigin was manually set, this + * function does nothing. + * Nipped from the resource loader! + * + * @ignore + * @param {string} url - The url to test. + * @param {object} [loc=window.location] - The location object to test against. + * @return {string} The crossOrigin value to use (or empty string for none). + */ +function determineCrossOrigin(url) { + var loc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location; + + // data: and javascript: urls are considered same-origin + if (url.indexOf('data:') === 0) { + return ''; + } + + // default is window.location + loc = loc || window.location; + + if (!tempAnchor) { + tempAnchor = document.createElement('a'); + } + + // let the browser determine the full href for the url of this resource and then + // parse with the node url lib, we can't use the properties of the anchor element + // because they don't work in IE9 :( + tempAnchor.href = url; + url = _url3.default.parse(tempAnchor.href); + + var samePort = !url.port && loc.port === '' || url.port === loc.port; + + // if cross origin + if (url.hostname !== loc.hostname || !samePort || url.protocol !== loc.protocol) { + return 'anonymous'; + } + + return ''; +} + +},{"url":38}],124:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.premultiplyBlendMode = exports.BaseTextureCache = exports.TextureCache = exports.mixins = exports.pluginTarget = exports.EventEmitter = exports.removeItems = exports.isMobile = undefined; +exports.uid = uid; +exports.hex2rgb = hex2rgb; +exports.hex2string = hex2string; +exports.rgb2hex = rgb2hex; +exports.getResolutionOfUrl = getResolutionOfUrl; +exports.decomposeDataUri = decomposeDataUri; +exports.getUrlFileExtension = getUrlFileExtension; +exports.getSvgSize = getSvgSize; +exports.skipHello = skipHello; +exports.sayHello = sayHello; +exports.isWebGLSupported = isWebGLSupported; +exports.sign = sign; +exports.destroyTextureCache = destroyTextureCache; +exports.clearTextureCache = clearTextureCache; +exports.correctBlendMode = correctBlendMode; +exports.premultiplyTint = premultiplyTint; +exports.premultiplyRgba = premultiplyRgba; +exports.premultiplyTintToRgba = premultiplyTintToRgba; + +var _const = require('../const'); + +var _settings = require('../settings'); + +var _settings2 = _interopRequireDefault(_settings); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +var _pluginTarget = require('./pluginTarget'); + +var _pluginTarget2 = _interopRequireDefault(_pluginTarget); + +var _mixin = require('./mixin'); + +var mixins = _interopRequireWildcard(_mixin); + +var _ismobilejs = require('ismobilejs'); + +var isMobile = _interopRequireWildcard(_ismobilejs); + +var _removeArrayItems = require('remove-array-items'); + +var _removeArrayItems2 = _interopRequireDefault(_removeArrayItems); + +var _mapPremultipliedBlendModes = require('./mapPremultipliedBlendModes'); + +var _mapPremultipliedBlendModes2 = _interopRequireDefault(_mapPremultipliedBlendModes); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var nextUid = 0; +var saidHello = false; + +/** + * Generalized convenience utilities for PIXI. + * @example + * // Extend PIXI's internal Event Emitter. + * class MyEmitter extends PIXI.utils.EventEmitter { + * constructor() { + * super(); + * console.log("Emitter created!"); + * } + * } + * + * // Get info on current device + * console.log(PIXI.utils.isMobile); + * + * // Convert hex color to string + * console.log(PIXI.utils.hex2string(0xff00ff)); // returns: "#ff00ff" + * @namespace PIXI.utils + */ +exports.isMobile = isMobile; +exports.removeItems = _removeArrayItems2.default; +exports.EventEmitter = _eventemitter2.default; +exports.pluginTarget = _pluginTarget2.default; +exports.mixins = mixins; + +/** + * Gets the next unique identifier + * + * @memberof PIXI.utils + * @function uid + * @return {number} The next unique identifier to use. + */ + +function uid() { + return ++nextUid; +} + +/** + * Converts a hex color number to an [R, G, B] array + * + * @memberof PIXI.utils + * @function hex2rgb + * @param {number} hex - The number to convert + * @param {number[]} [out=[]] If supplied, this array will be used rather than returning a new one + * @return {number[]} An array representing the [R, G, B] of the color. + */ +function hex2rgb(hex, out) { + out = out || []; + + out[0] = (hex >> 16 & 0xFF) / 255; + out[1] = (hex >> 8 & 0xFF) / 255; + out[2] = (hex & 0xFF) / 255; + + return out; +} + +/** + * Converts a hex color number to a string. + * + * @memberof PIXI.utils + * @function hex2string + * @param {number} hex - Number in hex + * @return {string} The string color. + */ +function hex2string(hex) { + hex = hex.toString(16); + hex = '000000'.substr(0, 6 - hex.length) + hex; + + return '#' + hex; +} + +/** + * Converts a color as an [R, G, B] array to a hex number + * + * @memberof PIXI.utils + * @function rgb2hex + * @param {number[]} rgb - rgb array + * @return {number} The color number + */ +function rgb2hex(rgb) { + return (rgb[0] * 255 << 16) + (rgb[1] * 255 << 8) + (rgb[2] * 255 | 0); +} + +/** + * get the resolution / device pixel ratio of an asset by looking for the prefix + * used by spritesheets and image urls + * + * @memberof PIXI.utils + * @function getResolutionOfUrl + * @param {string} url - the image path + * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set. + * @return {number} resolution / device pixel ratio of an asset + */ +function getResolutionOfUrl(url, defaultValue) { + var resolution = _settings2.default.RETINA_PREFIX.exec(url); + + if (resolution) { + return parseFloat(resolution[1]); + } + + return defaultValue !== undefined ? defaultValue : 1; +} + +/** + * Typedef for decomposeDataUri return object. + * + * @typedef {object} DecomposedDataUri + * @property {mediaType} Media type, eg. `image` + * @property {subType} Sub type, eg. `png` + * @property {encoding} Data encoding, eg. `base64` + * @property {data} The actual data + */ + +/** + * Split a data URI into components. Returns undefined if + * parameter `dataUri` is not a valid data URI. + * + * @memberof PIXI.utils + * @function decomposeDataUri + * @param {string} dataUri - the data URI to check + * @return {DecomposedDataUri|undefined} The decomposed data uri or undefined + */ +function decomposeDataUri(dataUri) { + var dataUriMatch = _const.DATA_URI.exec(dataUri); + + if (dataUriMatch) { + return { + mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : undefined, + subType: dataUriMatch[2] ? dataUriMatch[2].toLowerCase() : undefined, + encoding: dataUriMatch[3] ? dataUriMatch[3].toLowerCase() : undefined, + data: dataUriMatch[4] + }; + } + + return undefined; +} + +/** + * Get type of the image by regexp for extension. Returns undefined for unknown extensions. + * + * @memberof PIXI.utils + * @function getUrlFileExtension + * @param {string} url - the image path + * @return {string|undefined} image extension + */ +function getUrlFileExtension(url) { + var extension = _const.URL_FILE_EXTENSION.exec(url); + + if (extension) { + return extension[1].toLowerCase(); + } + + return undefined; +} + +/** + * Typedef for Size object. + * + * @typedef {object} Size + * @property {width} Width component + * @property {height} Height component + */ + +/** + * Get size from an svg string using regexp. + * + * @memberof PIXI.utils + * @function getSvgSize + * @param {string} svgString - a serialized svg element + * @return {Size|undefined} image extension + */ +function getSvgSize(svgString) { + var sizeMatch = _const.SVG_SIZE.exec(svgString); + var size = {}; + + if (sizeMatch) { + size[sizeMatch[1]] = Math.round(parseFloat(sizeMatch[3])); + size[sizeMatch[5]] = Math.round(parseFloat(sizeMatch[7])); + } + + return size; +} + +/** + * Skips the hello message of renderers that are created after this is run. + * + * @function skipHello + * @memberof PIXI.utils + */ +function skipHello() { + saidHello = true; +} + +/** + * Logs out the version and renderer information for this running instance of PIXI. + * If you don't want to see this message you can run `PIXI.utils.skipHello()` before + * creating your renderer. Keep in mind that doing that will forever makes you a jerk face. + * + * @static + * @function sayHello + * @memberof PIXI.utils + * @param {string} type - The string renderer type to log. + */ +function sayHello(type) { + if (saidHello) { + return; + } + + if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { + var args = ['\n %c %c %c PixiJS ' + _const.VERSION + ' - \u2730 ' + type + ' \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665 \n\n', 'background: #ff66a5; padding:5px 0;', 'background: #ff66a5; padding:5px 0;', 'color: #ff66a5; background: #030307; padding:5px 0;', 'background: #ff66a5; padding:5px 0;', 'background: #ffc3dc; padding:5px 0;', 'background: #ff66a5; padding:5px 0;', 'color: #ff2424; background: #fff; padding:5px 0;', 'color: #ff2424; background: #fff; padding:5px 0;', 'color: #ff2424; background: #fff; padding:5px 0;']; + + window.console.log.apply(console, args); + } else if (window.console) { + window.console.log('PixiJS ' + _const.VERSION + ' - ' + type + ' - http://www.pixijs.com/'); + } + + saidHello = true; +} + +/** + * Helper for checking for webgl support + * + * @memberof PIXI.utils + * @function isWebGLSupported + * @return {boolean} is webgl supported + */ +function isWebGLSupported() { + var contextOptions = { stencil: true, failIfMajorPerformanceCaveat: true }; + + try { + if (!window.WebGLRenderingContext) { + return false; + } + + var canvas = document.createElement('canvas'); + var gl = canvas.getContext('webgl', contextOptions) || canvas.getContext('experimental-webgl', contextOptions); + + var success = !!(gl && gl.getContextAttributes().stencil); + + if (gl) { + var loseContext = gl.getExtension('WEBGL_lose_context'); + + if (loseContext) { + loseContext.loseContext(); + } + } + + gl = null; + + return success; + } catch (e) { + return false; + } +} + +/** + * Returns sign of number + * + * @memberof PIXI.utils + * @function sign + * @param {number} n - the number to check the sign of + * @returns {number} 0 if `n` is 0, -1 if `n` is negative, 1 if `n` is positive + */ +function sign(n) { + if (n === 0) return 0; + + return n < 0 ? -1 : 1; +} + +/** + * @todo Describe property usage + * + * @memberof PIXI.utils + * @private + */ +var TextureCache = exports.TextureCache = Object.create(null); + +/** + * @todo Describe property usage + * + * @memberof PIXI.utils + * @private + */ +var BaseTextureCache = exports.BaseTextureCache = Object.create(null); + +/** + * Destroys all texture in the cache + * + * @memberof PIXI.utils + * @function destroyTextureCache + */ +function destroyTextureCache() { + var key = void 0; + + for (key in TextureCache) { + TextureCache[key].destroy(); + } + for (key in BaseTextureCache) { + BaseTextureCache[key].destroy(); + } +} + +/** + * Removes all textures from cache, but does not destroy them + * + * @memberof PIXI.utils + * @function clearTextureCache + */ +function clearTextureCache() { + var key = void 0; + + for (key in TextureCache) { + delete TextureCache[key]; + } + for (key in BaseTextureCache) { + delete BaseTextureCache[key]; + } +} + +/** + * maps premultiply flag and blendMode to adjusted blendMode + * @memberof PIXI.utils + * @const premultiplyBlendMode + * @type {Array} + */ +var premultiplyBlendMode = exports.premultiplyBlendMode = (0, _mapPremultipliedBlendModes2.default)(); + +/** + * changes blendMode according to texture format + * + * @memberof PIXI.utils + * @function correctBlendMode + * @param {number} blendMode supposed blend mode + * @param {boolean} premultiplied whether source is premultiplied + * @returns {number} true blend mode for this texture + */ +function correctBlendMode(blendMode, premultiplied) { + return premultiplyBlendMode[premultiplied ? 1 : 0][blendMode]; +} + +/** + * premultiplies tint + * + * @param {number} tint integet RGB + * @param {number} alpha floating point alpha (0.0-1.0) + * @returns {number} tint multiplied by alpha + */ +function premultiplyTint(tint, alpha) { + if (alpha === 1.0) { + return (alpha * 255 << 24) + tint; + } + if (alpha === 0.0) { + return 0; + } + var R = tint >> 16 & 0xFF; + var G = tint >> 8 & 0xFF; + var B = tint & 0xFF; + + R = R * alpha + 0.5 | 0; + G = G * alpha + 0.5 | 0; + B = B * alpha + 0.5 | 0; + + return (alpha * 255 << 24) + (R << 16) + (G << 8) + B; +} + +/** + * combines rgb and alpha to out array + * + * @param {Float32Array|number[]} rgb input rgb + * @param {number} alpha alpha param + * @param {Float32Array} [out] output + * @param {boolean} [premultiply=true] do premultiply it + * @returns {Float32Array} vec4 rgba + */ +function premultiplyRgba(rgb, alpha, out, premultiply) { + out = out || new Float32Array(4); + if (premultiply || premultiply === undefined) { + out[0] = rgb[0] * alpha; + out[1] = rgb[1] * alpha; + out[2] = rgb[2] * alpha; + } else { + out[0] = rgb[0]; + out[1] = rgb[1]; + out[2] = rgb[2]; + } + out[3] = alpha; + + return out; +} + +/** + * converts integer tint and float alpha to vec4 form, premultiplies by default + * + * @param {number} tint input tint + * @param {number} alpha alpha param + * @param {Float32Array} [out] output + * @param {boolean} [premultiply=true] do premultiply it + * @returns {Float32Array} vec4 rgba + */ +function premultiplyTintToRgba(tint, alpha, out, premultiply) { + out = out || new Float32Array(4); + out[0] = (tint >> 16 & 0xFF) / 255.0; + out[1] = (tint >> 8 & 0xFF) / 255.0; + out[2] = (tint & 0xFF) / 255.0; + if (premultiply || premultiply === undefined) { + out[0] *= alpha; + out[1] *= alpha; + out[2] *= alpha; + } + out[3] = alpha; + + return out; +} + +},{"../const":46,"../settings":101,"./mapPremultipliedBlendModes":125,"./mixin":127,"./pluginTarget":128,"eventemitter3":20,"ismobilejs":21,"remove-array-items":31}],125:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = mapPremultipliedBlendModes; + +var _const = require('../const'); + +/** + * Corrects PixiJS blend, takes premultiplied alpha into account + * + * @memberof PIXI + * @function mapPremultipliedBlendModes + * @private + * @param {Array} [array] - The array to output into. + * @return {Array} Mapped modes. + */ + +function mapPremultipliedBlendModes() { + var pm = []; + var npm = []; + + for (var i = 0; i < 32; i++) { + pm[i] = i; + npm[i] = i; + } + + pm[_const.BLEND_MODES.NORMAL_NPM] = _const.BLEND_MODES.NORMAL; + pm[_const.BLEND_MODES.ADD_NPM] = _const.BLEND_MODES.ADD; + pm[_const.BLEND_MODES.SCREEN_NPM] = _const.BLEND_MODES.SCREEN; + + npm[_const.BLEND_MODES.NORMAL] = _const.BLEND_MODES.NORMAL_NPM; + npm[_const.BLEND_MODES.ADD] = _const.BLEND_MODES.ADD_NPM; + npm[_const.BLEND_MODES.SCREEN] = _const.BLEND_MODES.SCREEN_NPM; + + var array = []; + + array.push(npm); + array.push(pm); + + return array; +} + +},{"../const":46}],126:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = maxRecommendedTextures; + +var _ismobilejs = require('ismobilejs'); + +var _ismobilejs2 = _interopRequireDefault(_ismobilejs); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function maxRecommendedTextures(max) { + if (_ismobilejs2.default.tablet || _ismobilejs2.default.phone) { + // check if the res is iphone 6 or higher.. + return 4; + } + + // desktop should be ok + return max; +} + +},{"ismobilejs":21}],127:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.mixin = mixin; +exports.delayMixin = delayMixin; +exports.performMixins = performMixins; +/** + * Mixes all enumerable properties and methods from a source object to a target object. + * + * @memberof PIXI.utils.mixins + * @function mixin + * @param {object} target The prototype or instance that properties and methods should be added to. + * @param {object} source The source of properties and methods to mix in. + */ +function mixin(target, source) { + if (!target || !source) return; + // in ES8/ES2017, this would be really easy: + // Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + + // get all the enumerable property keys + var keys = Object.keys(source); + + // loop through properties + for (var i = 0; i < keys.length; ++i) { + var propertyName = keys[i]; + + // Set the property using the property descriptor - this works for accessors and normal value properties + Object.defineProperty(target, propertyName, Object.getOwnPropertyDescriptor(source, propertyName)); + } +} + +var mixins = []; + +/** + * Queues a mixin to be handled towards the end of the initialization of PIXI, so that deprecation + * can take effect. + * + * @memberof PIXI.utils.mixins + * @function delayMixin + * @private + * @param {object} target The prototype or instance that properties and methods should be added to. + * @param {object} source The source of properties and methods to mix in. + */ +function delayMixin(target, source) { + mixins.push(target, source); +} + +/** + * Handles all mixins queued via delayMixin(). + * + * @memberof PIXI.utils.mixins + * @function performMixins + * @private + */ +function performMixins() { + for (var i = 0; i < mixins.length; i += 2) { + mixin(mixins[i], mixins[i + 1]); + } + mixins.length = 0; +} + +},{}],128:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +/** + * Mixins functionality to make an object have "plugins". + * + * @example + * function MyObject() {} + * + * pluginTarget.mixin(MyObject); + * + * @mixin + * @memberof PIXI.utils + * @param {object} obj - The object to mix into. + */ +function pluginTarget(obj) { + obj.__plugins = {}; + + /** + * Adds a plugin to an object + * + * @param {string} pluginName - The events that should be listed. + * @param {Function} ctor - The constructor function for the plugin. + */ + obj.registerPlugin = function registerPlugin(pluginName, ctor) { + obj.__plugins[pluginName] = ctor; + }; + + /** + * Instantiates all the plugins of this object + * + */ + obj.prototype.initPlugins = function initPlugins() { + this.plugins = this.plugins || {}; + + for (var o in obj.__plugins) { + this.plugins[o] = new obj.__plugins[o](this); + } + }; + + /** + * Removes all the plugins of this object + * + */ + obj.prototype.destroyPlugins = function destroyPlugins() { + for (var o in this.plugins) { + this.plugins[o].destroy(); + this.plugins[o] = null; + } + + this.plugins = null; + }; +} + +exports.default = { + /** + * Mixes in the properties of the pluginTarget into another object + * + * @param {object} obj - The obj to mix into + */ + mixin: function mixin(obj) { + pluginTarget(obj); + } +}; + +},{}],129:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = trimCanvas; +/** + * Trim transparent borders from a canvas + * + * @memberof PIXI + * @function trimCanvas + * @private + * @param {HTMLCanvasElement} canvas - the canvas to trim + * @returns {object} Trim data + */ +function trimCanvas(canvas) { + // https://gist.github.com/remy/784508 + + var width = canvas.width; + var height = canvas.height; + + var context = canvas.getContext('2d'); + var imageData = context.getImageData(0, 0, width, height); + var pixels = imageData.data; + var len = pixels.length; + + var bound = { + top: null, + left: null, + right: null, + bottom: null + }; + var i = void 0; + var x = void 0; + var y = void 0; + + for (i = 0; i < len; i += 4) { + if (pixels[i + 3] !== 0) { + x = i / 4 % width; + y = ~~(i / 4 / width); + + if (bound.top === null) { + bound.top = y; + } + + if (bound.left === null) { + bound.left = x; + } else if (x < bound.left) { + bound.left = x; + } + + if (bound.right === null) { + bound.right = x + 1; + } else if (bound.right < x) { + bound.right = x + 1; + } + + if (bound.bottom === null) { + bound.bottom = y; + } else if (bound.bottom < y) { + bound.bottom = y; + } + } + } + + width = bound.right - bound.left; + height = bound.bottom - bound.top + 1; + + var data = context.getImageData(bound.left, bound.top, width, height); + + return { + height: height, + width: width, + data: data + }; +} + +},{}],130:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = deprecation; +// provide method to give a stack track for warnings +// useful for tracking-down where deprecated methods/properties/classes +// are being used within the code +function warn(msg) { + /* eslint-disable no-console */ + var stack = new Error().stack; + + // Handle IE < 10 and Safari < 6 + if (typeof stack === 'undefined') { + console.warn('Deprecation Warning: ', msg); + } else { + // chop off the stack trace which includes pixi.js internal calls + stack = stack.split('\n').splice(3).join('\n'); + + if (console.groupCollapsed) { + console.groupCollapsed('%cDeprecation Warning: %c%s', 'color:#614108;background:#fffbe6', 'font-weight:normal;color:#614108;background:#fffbe6', msg); + console.warn(stack); + console.groupEnd(); + } else { + console.warn('Deprecation Warning: ', msg); + console.warn(stack); + } + } + /* eslint-enable no-console */ +} + +function deprecation(core) { + var mesh = core.mesh; + var particles = core.particles; + var extras = core.extras; + var filters = core.filters; + var prepare = core.prepare; + var loaders = core.loaders; + var interaction = core.interaction; + + + Object.defineProperties(core, { + + /** + * @class + * @private + * @name SpriteBatch + * @memberof PIXI + * @see PIXI.ParticleContainer + * @throws {ReferenceError} SpriteBatch does not exist any more, please use the new ParticleContainer instead. + * @deprecated since version 3.0.0 + */ + SpriteBatch: { + get: function get() { + throw new ReferenceError('SpriteBatch does not exist any more, ' + 'please use the new ParticleContainer instead.'); + } + }, + + /** + * @class + * @private + * @name AssetLoader + * @memberof PIXI + * @see PIXI.loaders.Loader + * @throws {ReferenceError} The loader system was overhauled in PixiJS v3, + * please see the new PIXI.loaders.Loader class. + * @deprecated since version 3.0.0 + */ + AssetLoader: { + get: function get() { + throw new ReferenceError('The loader system was overhauled in PixiJS v3, ' + 'please see the new PIXI.loaders.Loader class.'); + } + }, + + /** + * @class + * @private + * @name Stage + * @memberof PIXI + * @see PIXI.Container + * @deprecated since version 3.0.0 + */ + Stage: { + get: function get() { + warn('You do not need to use a PIXI Stage any more, you can simply render any container.'); + + return core.Container; + } + }, + + /** + * @class + * @private + * @name DisplayObjectContainer + * @memberof PIXI + * @see PIXI.Container + * @deprecated since version 3.0.0 + */ + DisplayObjectContainer: { + get: function get() { + warn('DisplayObjectContainer has been shortened to Container, please use Container from now on.'); + + return core.Container; + } + }, + + /** + * @class + * @private + * @name Strip + * @memberof PIXI + * @see PIXI.mesh.Mesh + * @deprecated since version 3.0.0 + */ + Strip: { + get: function get() { + warn('The Strip class has been renamed to Mesh and moved to mesh.Mesh, please use mesh.Mesh from now on.'); + + return mesh.Mesh; + } + }, + + /** + * @class + * @private + * @name Rope + * @memberof PIXI + * @see PIXI.mesh.Rope + * @deprecated since version 3.0.0 + */ + Rope: { + get: function get() { + warn('The Rope class has been moved to mesh.Rope, please use mesh.Rope from now on.'); + + return mesh.Rope; + } + }, + + /** + * @class + * @private + * @name ParticleContainer + * @memberof PIXI + * @see PIXI.particles.ParticleContainer + * @deprecated since version 4.0.0 + */ + ParticleContainer: { + get: function get() { + warn('The ParticleContainer class has been moved to particles.ParticleContainer, ' + 'please use particles.ParticleContainer from now on.'); + + return particles.ParticleContainer; + } + }, + + /** + * @class + * @private + * @name MovieClip + * @memberof PIXI + * @see PIXI.extras.MovieClip + * @deprecated since version 3.0.0 + */ + MovieClip: { + get: function get() { + warn('The MovieClip class has been moved to extras.AnimatedSprite, please use extras.AnimatedSprite.'); + + return extras.AnimatedSprite; + } + }, + + /** + * @class + * @private + * @name TilingSprite + * @memberof PIXI + * @see PIXI.extras.TilingSprite + * @deprecated since version 3.0.0 + */ + TilingSprite: { + get: function get() { + warn('The TilingSprite class has been moved to extras.TilingSprite, ' + 'please use extras.TilingSprite from now on.'); + + return extras.TilingSprite; + } + }, + + /** + * @class + * @private + * @name BitmapText + * @memberof PIXI + * @see PIXI.extras.BitmapText + * @deprecated since version 3.0.0 + */ + BitmapText: { + get: function get() { + warn('The BitmapText class has been moved to extras.BitmapText, ' + 'please use extras.BitmapText from now on.'); + + return extras.BitmapText; + } + }, + + /** + * @class + * @private + * @name blendModes + * @memberof PIXI + * @see PIXI.BLEND_MODES + * @deprecated since version 3.0.0 + */ + blendModes: { + get: function get() { + warn('The blendModes has been moved to BLEND_MODES, please use BLEND_MODES from now on.'); + + return core.BLEND_MODES; + } + }, + + /** + * @class + * @private + * @name scaleModes + * @memberof PIXI + * @see PIXI.SCALE_MODES + * @deprecated since version 3.0.0 + */ + scaleModes: { + get: function get() { + warn('The scaleModes has been moved to SCALE_MODES, please use SCALE_MODES from now on.'); + + return core.SCALE_MODES; + } + }, + + /** + * @class + * @private + * @name BaseTextureCache + * @memberof PIXI + * @see PIXI.utils.BaseTextureCache + * @deprecated since version 3.0.0 + */ + BaseTextureCache: { + get: function get() { + warn('The BaseTextureCache class has been moved to utils.BaseTextureCache, ' + 'please use utils.BaseTextureCache from now on.'); + + return core.utils.BaseTextureCache; + } + }, + + /** + * @class + * @private + * @name TextureCache + * @memberof PIXI + * @see PIXI.utils.TextureCache + * @deprecated since version 3.0.0 + */ + TextureCache: { + get: function get() { + warn('The TextureCache class has been moved to utils.TextureCache, ' + 'please use utils.TextureCache from now on.'); + + return core.utils.TextureCache; + } + }, + + /** + * @namespace + * @private + * @name math + * @memberof PIXI + * @see PIXI + * @deprecated since version 3.0.6 + */ + math: { + get: function get() { + warn('The math namespace is deprecated, please access members already accessible on PIXI.'); + + return core; + } + }, + + /** + * @class + * @private + * @name PIXI.AbstractFilter + * @see PIXI.Filter + * @deprecated since version 3.0.6 + */ + AbstractFilter: { + get: function get() { + warn('AstractFilter has been renamed to Filter, please use PIXI.Filter'); + + return core.Filter; + } + }, + + /** + * @class + * @private + * @name PIXI.TransformManual + * @see PIXI.TransformBase + * @deprecated since version 4.0.0 + */ + TransformManual: { + get: function get() { + warn('TransformManual has been renamed to TransformBase, please update your pixi-spine'); + + return core.TransformBase; + } + }, + + /** + * @static + * @constant + * @name PIXI.TARGET_FPMS + * @see PIXI.settings.TARGET_FPMS + * @deprecated since version 4.2.0 + */ + TARGET_FPMS: { + get: function get() { + warn('PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS'); + + return core.settings.TARGET_FPMS; + }, + set: function set(value) { + warn('PIXI.TARGET_FPMS has been deprecated, please use PIXI.settings.TARGET_FPMS'); + + core.settings.TARGET_FPMS = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.FILTER_RESOLUTION + * @see PIXI.settings.FILTER_RESOLUTION + * @deprecated since version 4.2.0 + */ + FILTER_RESOLUTION: { + get: function get() { + warn('PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION'); + + return core.settings.FILTER_RESOLUTION; + }, + set: function set(value) { + warn('PIXI.FILTER_RESOLUTION has been deprecated, please use PIXI.settings.FILTER_RESOLUTION'); + + core.settings.FILTER_RESOLUTION = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.RESOLUTION + * @see PIXI.settings.RESOLUTION + * @deprecated since version 4.2.0 + */ + RESOLUTION: { + get: function get() { + warn('PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION'); + + return core.settings.RESOLUTION; + }, + set: function set(value) { + warn('PIXI.RESOLUTION has been deprecated, please use PIXI.settings.RESOLUTION'); + + core.settings.RESOLUTION = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.MIPMAP_TEXTURES + * @see PIXI.settings.MIPMAP_TEXTURES + * @deprecated since version 4.2.0 + */ + MIPMAP_TEXTURES: { + get: function get() { + warn('PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES'); + + return core.settings.MIPMAP_TEXTURES; + }, + set: function set(value) { + warn('PIXI.MIPMAP_TEXTURES has been deprecated, please use PIXI.settings.MIPMAP_TEXTURES'); + + core.settings.MIPMAP_TEXTURES = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.SPRITE_BATCH_SIZE + * @see PIXI.settings.SPRITE_BATCH_SIZE + * @deprecated since version 4.2.0 + */ + SPRITE_BATCH_SIZE: { + get: function get() { + warn('PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE'); + + return core.settings.SPRITE_BATCH_SIZE; + }, + set: function set(value) { + warn('PIXI.SPRITE_BATCH_SIZE has been deprecated, please use PIXI.settings.SPRITE_BATCH_SIZE'); + + core.settings.SPRITE_BATCH_SIZE = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.SPRITE_MAX_TEXTURES + * @see PIXI.settings.SPRITE_MAX_TEXTURES + * @deprecated since version 4.2.0 + */ + SPRITE_MAX_TEXTURES: { + get: function get() { + warn('PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES'); + + return core.settings.SPRITE_MAX_TEXTURES; + }, + set: function set(value) { + warn('PIXI.SPRITE_MAX_TEXTURES has been deprecated, please use PIXI.settings.SPRITE_MAX_TEXTURES'); + + core.settings.SPRITE_MAX_TEXTURES = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.RETINA_PREFIX + * @see PIXI.settings.RETINA_PREFIX + * @deprecated since version 4.2.0 + */ + RETINA_PREFIX: { + get: function get() { + warn('PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX'); + + return core.settings.RETINA_PREFIX; + }, + set: function set(value) { + warn('PIXI.RETINA_PREFIX has been deprecated, please use PIXI.settings.RETINA_PREFIX'); + + core.settings.RETINA_PREFIX = value; + } + }, + + /** + * @static + * @constant + * @name PIXI.DEFAULT_RENDER_OPTIONS + * @see PIXI.settings.RENDER_OPTIONS + * @deprecated since version 4.2.0 + */ + DEFAULT_RENDER_OPTIONS: { + get: function get() { + warn('PIXI.DEFAULT_RENDER_OPTIONS has been deprecated, please use PIXI.settings.DEFAULT_RENDER_OPTIONS'); + + return core.settings.RENDER_OPTIONS; + } + } + }); + + // Move the default properties to settings + var defaults = [{ parent: 'TRANSFORM_MODE', target: 'TRANSFORM_MODE' }, { parent: 'GC_MODES', target: 'GC_MODE' }, { parent: 'WRAP_MODES', target: 'WRAP_MODE' }, { parent: 'SCALE_MODES', target: 'SCALE_MODE' }, { parent: 'PRECISION', target: 'PRECISION_FRAGMENT' }]; + + var _loop = function _loop(i) { + var deprecation = defaults[i]; + + Object.defineProperty(core[deprecation.parent], 'DEFAULT', { + get: function get() { + warn('PIXI.' + deprecation.parent + '.DEFAULT has been deprecated, ' + ('please use PIXI.settings.' + deprecation.target)); + + return core.settings[deprecation.target]; + }, + set: function set(value) { + warn('PIXI.' + deprecation.parent + '.DEFAULT has been deprecated, ' + ('please use PIXI.settings.' + deprecation.target)); + + core.settings[deprecation.target] = value; + } + }); + }; + + for (var i = 0; i < defaults.length; i++) { + _loop(i); + } + + Object.defineProperties(core.settings, { + + /** + * @static + * @name PRECISION + * @memberof PIXI.settings + * @see PIXI.PRECISION + * @deprecated since version 4.4.0 + */ + PRECISION: { + get: function get() { + warn('PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT'); + + return core.settings.PRECISION_FRAGMENT; + }, + set: function set(value) { + warn('PIXI.settings.PRECISION has been deprecated, please use PIXI.settings.PRECISION_FRAGMENT'); + + core.settings.PRECISION_FRAGMENT = value; + } + } + }); + + if (extras.AnimatedSprite) { + Object.defineProperties(extras, { + + /** + * @class + * @name MovieClip + * @memberof PIXI.extras + * @see PIXI.extras.AnimatedSprite + * @deprecated since version 4.2.0 + */ + MovieClip: { + get: function get() { + warn('The MovieClip class has been renamed to AnimatedSprite, please use AnimatedSprite from now on.'); + + return extras.AnimatedSprite; + } + } + }); + } + + core.DisplayObject.prototype.generateTexture = function generateTexture(renderer, scaleMode, resolution) { + warn('generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)'); + + return renderer.generateTexture(this, scaleMode, resolution); + }; + + core.Graphics.prototype.generateTexture = function generateTexture(scaleMode, resolution) { + warn('graphics generate texture has moved to the renderer. ' + 'Or to render a graphics to a texture using canvas please use generateCanvasTexture'); + + return this.generateCanvasTexture(scaleMode, resolution); + }; + + core.RenderTexture.prototype.render = function render(displayObject, matrix, clear, updateTransform) { + this.legacyRenderer.render(displayObject, this, clear, matrix, !updateTransform); + warn('RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)'); + }; + + core.RenderTexture.prototype.getImage = function getImage(target) { + warn('RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)'); + + return this.legacyRenderer.extract.image(target); + }; + + core.RenderTexture.prototype.getBase64 = function getBase64(target) { + warn('RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)'); + + return this.legacyRenderer.extract.base64(target); + }; + + core.RenderTexture.prototype.getCanvas = function getCanvas(target) { + warn('RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)'); + + return this.legacyRenderer.extract.canvas(target); + }; + + core.RenderTexture.prototype.getPixels = function getPixels(target) { + warn('RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)'); + + return this.legacyRenderer.pixels(target); + }; + + /** + * @method + * @private + * @name PIXI.Sprite#setTexture + * @see PIXI.Sprite#texture + * @deprecated since version 3.0.0 + * @param {PIXI.Texture} texture - The texture to set to. + */ + core.Sprite.prototype.setTexture = function setTexture(texture) { + this.texture = texture; + warn('setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;'); + }; + + if (extras.BitmapText) { + /** + * @method + * @name PIXI.extras.BitmapText#setText + * @see PIXI.extras.BitmapText#text + * @deprecated since version 3.0.0 + * @param {string} text - The text to set to. + */ + extras.BitmapText.prototype.setText = function setText(text) { + this.text = text; + warn('setText is now deprecated, please use the text property, e.g : myBitmapText.text = \'my text\';'); + }; + } + + /** + * @method + * @name PIXI.Text#setText + * @see PIXI.Text#text + * @deprecated since version 3.0.0 + * @param {string} text - The text to set to. + */ + core.Text.prototype.setText = function setText(text) { + this.text = text; + warn('setText is now deprecated, please use the text property, e.g : myText.text = \'my text\';'); + }; + + /** + * Calculates the ascent, descent and fontSize of a given fontStyle + * + * @name PIXI.Text.calculateFontProperties + * @see PIXI.TextMetrics.measureFont + * @deprecated since version 4.5.0 + * @param {string} font - String representing the style of the font + * @return {Object} Font properties object + */ + core.Text.calculateFontProperties = function calculateFontProperties(font) { + warn('Text.calculateFontProperties is now deprecated, please use the TextMetrics.measureFont'); + + return core.TextMetrics.measureFont(font); + }; + + Object.defineProperties(core.Text, { + fontPropertiesCache: { + get: function get() { + warn('Text.fontPropertiesCache is deprecated'); + + return core.TextMetrics._fonts; + } + }, + fontPropertiesCanvas: { + get: function get() { + warn('Text.fontPropertiesCanvas is deprecated'); + + return core.TextMetrics._canvas; + } + }, + fontPropertiesContext: { + get: function get() { + warn('Text.fontPropertiesContext is deprecated'); + + return core.TextMetrics._context; + } + } + }); + + /** + * @method + * @name PIXI.Text#setStyle + * @see PIXI.Text#style + * @deprecated since version 3.0.0 + * @param {*} style - The style to set to. + */ + core.Text.prototype.setStyle = function setStyle(style) { + this.style = style; + warn('setStyle is now deprecated, please use the style property, e.g : myText.style = style;'); + }; + + /** + * @method + * @name PIXI.Text#determineFontProperties + * @see PIXI.Text#measureFontProperties + * @deprecated since version 4.2.0 + * @private + * @param {string} fontStyle - String representing the style of the font + * @return {Object} Font properties object + */ + core.Text.prototype.determineFontProperties = function determineFontProperties(fontStyle) { + warn('determineFontProperties is now deprecated, please use TextMetrics.measureFont method'); + + return core.TextMetrics.measureFont(fontStyle); + }; + + /** + * @method + * @name PIXI.Text.getFontStyle + * @see PIXI.TextMetrics.getFontStyle + * @deprecated since version 4.5.0 + * @param {PIXI.TextStyle} style - The style to use. + * @return {string} Font string + */ + core.Text.getFontStyle = function getFontStyle(style) { + warn('getFontStyle is now deprecated, please use TextStyle.toFontString() instead'); + + style = style || {}; + + if (!(style instanceof core.TextStyle)) { + style = new core.TextStyle(style); + } + + return style.toFontString(); + }; + + Object.defineProperties(core.TextStyle.prototype, { + /** + * Set all properties of a font as a single string + * + * @name PIXI.TextStyle#font + * @deprecated since version 4.0.0 + */ + font: { + get: function get() { + warn('text style property \'font\' is now deprecated, please use the ' + '\'fontFamily\', \'fontSize\', \'fontStyle\', \'fontVariant\' and \'fontWeight\' properties from now on'); + + var fontSizeString = typeof this._fontSize === 'number' ? this._fontSize + 'px' : this._fontSize; + + return this._fontStyle + ' ' + this._fontVariant + ' ' + this._fontWeight + ' ' + fontSizeString + ' ' + this._fontFamily; + }, + set: function set(font) { + warn('text style property \'font\' is now deprecated, please use the ' + '\'fontFamily\',\'fontSize\',fontStyle\',\'fontVariant\' and \'fontWeight\' properties from now on'); + + // can work out fontStyle from search of whole string + if (font.indexOf('italic') > 1) { + this._fontStyle = 'italic'; + } else if (font.indexOf('oblique') > -1) { + this._fontStyle = 'oblique'; + } else { + this._fontStyle = 'normal'; + } + + // can work out fontVariant from search of whole string + if (font.indexOf('small-caps') > -1) { + this._fontVariant = 'small-caps'; + } else { + this._fontVariant = 'normal'; + } + + // fontWeight and fontFamily are tricker to find, but it's easier to find the fontSize due to it's units + var splits = font.split(' '); + var fontSizeIndex = -1; + + this._fontSize = 26; + for (var _i = 0; _i < splits.length; ++_i) { + if (splits[_i].match(/(px|pt|em|%)/)) { + fontSizeIndex = _i; + this._fontSize = splits[_i]; + break; + } + } + + // we can now search for fontWeight as we know it must occur before the fontSize + this._fontWeight = 'normal'; + for (var _i2 = 0; _i2 < fontSizeIndex; ++_i2) { + if (splits[_i2].match(/(bold|bolder|lighter|100|200|300|400|500|600|700|800|900)/)) { + this._fontWeight = splits[_i2]; + break; + } + } + + // and finally join everything together after the fontSize in case the font family has multiple words + if (fontSizeIndex > -1 && fontSizeIndex < splits.length - 1) { + this._fontFamily = ''; + for (var _i3 = fontSizeIndex + 1; _i3 < splits.length; ++_i3) { + this._fontFamily += splits[_i3] + ' '; + } + + this._fontFamily = this._fontFamily.slice(0, -1); + } else { + this._fontFamily = 'Arial'; + } + + this.styleID++; + } + } + }); + + /** + * @method + * @name PIXI.Texture#setFrame + * @see PIXI.Texture#setFrame + * @deprecated since version 3.0.0 + * @param {PIXI.Rectangle} frame - The frame to set. + */ + core.Texture.prototype.setFrame = function setFrame(frame) { + this.frame = frame; + warn('setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;'); + }; + + /** + * @static + * @function + * @name PIXI.Texture.addTextureToCache + * @see PIXI.Texture.addToCache + * @deprecated since 4.5.0 + * @param {PIXI.Texture} texture - The Texture to add to the cache. + * @param {string} id - The id that the texture will be stored against. + */ + core.Texture.addTextureToCache = function addTextureToCache(texture, id) { + core.Texture.addToCache(texture, id); + warn('Texture.addTextureToCache is deprecated, please use Texture.addToCache from now on.'); + }; + + /** + * @static + * @function + * @name PIXI.Texture.removeTextureFromCache + * @see PIXI.Texture.removeFromCache + * @deprecated since 4.5.0 + * @param {string} id - The id of the texture to be removed + * @return {PIXI.Texture|null} The texture that was removed + */ + core.Texture.removeTextureFromCache = function removeTextureFromCache(id) { + warn('Texture.removeTextureFromCache is deprecated, please use Texture.removeFromCache from now on. ' + 'Be aware that Texture.removeFromCache does not automatically its BaseTexture from the BaseTextureCache. ' + 'For that, use BaseTexture.removeFromCache'); + + core.BaseTexture.removeFromCache(id); + + return core.Texture.removeFromCache(id); + }; + + Object.defineProperties(filters, { + + /** + * @class + * @private + * @name PIXI.filters.AbstractFilter + * @see PIXI.AbstractFilter + * @deprecated since version 3.0.6 + */ + AbstractFilter: { + get: function get() { + warn('AstractFilter has been renamed to Filter, please use PIXI.Filter'); + + return core.AbstractFilter; + } + }, + + /** + * @class + * @private + * @name PIXI.filters.SpriteMaskFilter + * @see PIXI.SpriteMaskFilter + * @deprecated since version 3.0.6 + */ + SpriteMaskFilter: { + get: function get() { + warn('filters.SpriteMaskFilter is an undocumented alias, please use SpriteMaskFilter from now on.'); + + return core.SpriteMaskFilter; + } + } + }); + + /** + * @method + * @name PIXI.utils.uuid + * @see PIXI.utils.uid + * @deprecated since version 3.0.6 + * @return {number} The uid + */ + core.utils.uuid = function () { + warn('utils.uuid() is deprecated, please use utils.uid() from now on.'); + + return core.utils.uid(); + }; + + /** + * @method + * @name PIXI.utils.canUseNewCanvasBlendModes + * @see PIXI.CanvasTinter + * @deprecated + * @return {boolean} Can use blend modes. + */ + core.utils.canUseNewCanvasBlendModes = function () { + warn('utils.canUseNewCanvasBlendModes() is deprecated, please use CanvasTinter.canUseMultiply from now on'); + + return core.CanvasTinter.canUseMultiply; + }; + + var saidHello = true; + + /** + * @name PIXI.utils._saidHello + * @type {boolean} + * @see PIXI.utils.skipHello + * @deprecated since 4.1.0 + */ + Object.defineProperty(core.utils, '_saidHello', { + set: function set(bool) { + if (bool) { + warn('PIXI.utils._saidHello is deprecated, please use PIXI.utils.skipHello()'); + this.skipHello(); + } + saidHello = bool; + }, + get: function get() { + return saidHello; + } + }); + + if (prepare.BasePrepare) { + /** + * @method + * @name PIXI.prepare.BasePrepare#register + * @see PIXI.prepare.BasePrepare#registerFindHook + * @deprecated since version 4.4.2 + * @param {Function} [addHook] - Function call that takes two parameters: `item:*, queue:Array` + * function must return `true` if it was able to add item to the queue. + * @param {Function} [uploadHook] - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and + * function must return `true` if it was able to handle upload of item. + * @return {PIXI.BasePrepare} Instance of plugin for chaining. + */ + prepare.BasePrepare.prototype.register = function register(addHook, uploadHook) { + warn('renderer.plugins.prepare.register is now deprecated, ' + 'please use renderer.plugins.prepare.registerFindHook & renderer.plugins.prepare.registerUploadHook'); + + if (addHook) { + this.registerFindHook(addHook); + } + + if (uploadHook) { + this.registerUploadHook(uploadHook); + } + + return this; + }; + } + + if (prepare.canvas) { + /** + * The number of graphics or textures to upload to the GPU. + * + * @name PIXI.prepare.canvas.UPLOADS_PER_FRAME + * @static + * @type {number} + * @see PIXI.prepare.BasePrepare.limiter + * @deprecated since 4.2.0 + */ + Object.defineProperty(prepare.canvas, 'UPLOADS_PER_FRAME', { + set: function set() { + warn('PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please set ' + 'renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer'); + // because we don't have a reference to the renderer, we can't actually set + // the uploads per frame, so we'll have to stick with the warning. + }, + get: function get() { + warn('PIXI.CanvasPrepare.UPLOADS_PER_FRAME has been removed. Please use ' + 'renderer.plugins.prepare.limiter'); + + return NaN; + } + }); + } + + if (prepare.webgl) { + /** + * The number of graphics or textures to upload to the GPU. + * + * @name PIXI.prepare.webgl.UPLOADS_PER_FRAME + * @static + * @type {number} + * @see PIXI.prepare.BasePrepare.limiter + * @deprecated since 4.2.0 + */ + Object.defineProperty(prepare.webgl, 'UPLOADS_PER_FRAME', { + set: function set() { + warn('PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please set ' + 'renderer.plugins.prepare.limiter.maxItemsPerFrame on your renderer'); + // because we don't have a reference to the renderer, we can't actually set + // the uploads per frame, so we'll have to stick with the warning. + }, + get: function get() { + warn('PIXI.WebGLPrepare.UPLOADS_PER_FRAME has been removed. Please use ' + 'renderer.plugins.prepare.limiter'); + + return NaN; + } + }); + } + + if (loaders.Loader) { + (function () { + var Resource = loaders.Resource; + var Loader = loaders.Loader; + + Object.defineProperties(Resource.prototype, { + isJson: { + get: function get() { + warn('The isJson property is deprecated, please use `resource.type === Resource.TYPE.JSON`.'); + + return this.type === Resource.TYPE.JSON; + } + }, + isXml: { + get: function get() { + warn('The isXml property is deprecated, please use `resource.type === Resource.TYPE.XML`.'); + + return this.type === Resource.TYPE.XML; + } + }, + isImage: { + get: function get() { + warn('The isImage property is deprecated, please use `resource.type === Resource.TYPE.IMAGE`.'); + + return this.type === Resource.TYPE.IMAGE; + } + }, + isAudio: { + get: function get() { + warn('The isAudio property is deprecated, please use `resource.type === Resource.TYPE.AUDIO`.'); + + return this.type === Resource.TYPE.AUDIO; + } + }, + isVideo: { + get: function get() { + warn('The isVideo property is deprecated, please use `resource.type === Resource.TYPE.VIDEO`.'); + + return this.type === Resource.TYPE.VIDEO; + } + } + }); + + Object.defineProperties(Loader.prototype, { + before: { + get: function get() { + warn('The before() method is deprecated, please use pre().'); + + return this.pre; + } + }, + after: { + get: function get() { + warn('The after() method is deprecated, please use use().'); + + return this.use; + } + } + }); + })(); + } + + if (interaction.interactiveTarget) { + /** + * @name PIXI.interaction.interactiveTarget#defaultCursor + * @static + * @type {number} + * @see PIXI.interaction.interactiveTarget#cursor + * @deprecated since 4.3.0 + */ + Object.defineProperty(interaction.interactiveTarget, 'defaultCursor', { + set: function set(value) { + warn('Property defaultCursor has been replaced with \'cursor\'. '); + this.cursor = value; + }, + get: function get() { + warn('Property defaultCursor has been replaced with \'cursor\'. '); + + return this.cursor; + } + }); + } + + if (interaction.InteractionManager) { + /** + * @name PIXI.interaction.InteractionManager#defaultCursorStyle + * @static + * @type {string} + * @see PIXI.interaction.InteractionManager#cursorStyles + * @deprecated since 4.3.0 + */ + Object.defineProperty(interaction.InteractionManager, 'defaultCursorStyle', { + set: function set(value) { + warn('Property defaultCursorStyle has been replaced with \'cursorStyles.default\'. '); + this.cursorStyles.default = value; + }, + get: function get() { + warn('Property defaultCursorStyle has been replaced with \'cursorStyles.default\'. '); + + return this.cursorStyles.default; + } + }); + + /** + * @name PIXI.interaction.InteractionManager#currentCursorStyle + * @static + * @type {string} + * @see PIXI.interaction.InteractionManager#cursorStyles + * @deprecated since 4.3.0 + */ + Object.defineProperty(interaction.InteractionManager, 'currentCursorStyle', { + set: function set(value) { + warn('Property currentCursorStyle has been removed.' + 'See the currentCursorMode property, which works differently.'); + this.currentCursorMode = value; + }, + get: function get() { + warn('Property currentCursorStyle has been removed.' + 'See the currentCursorMode property, which works differently.'); + + return this.currentCursorMode; + } + }); + } +} + +},{}],131:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var TEMP_RECT = new core.Rectangle(); + +/** + * The extract manager provides functionality to export content from the renderers. + * + * An instance of this class is automatically created by default, and can be found at renderer.plugins.extract + * + * @class + * @memberof PIXI.extract + */ + +var CanvasExtract = function () { + /** + * @param {PIXI.CanvasRenderer} renderer - A reference to the current renderer + */ + function CanvasExtract(renderer) { + _classCallCheck(this, CanvasExtract); + + this.renderer = renderer; + /** + * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture + * + * @member {PIXI.extract.CanvasExtract} extract + * @memberof PIXI.CanvasRenderer# + * @see PIXI.extract.CanvasExtract + */ + renderer.extract = this; + } + + /** + * Will return a HTML Image of the target + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {HTMLImageElement} HTML Image of the target + */ + + + CanvasExtract.prototype.image = function image(target) { + var image = new Image(); + + image.src = this.base64(target); + + return image; + }; + + /** + * Will return a a base64 encoded string of this target. It works by calling + * `CanvasExtract.getCanvas` and then running toDataURL on that. + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {string} A base64 encoded string of the texture. + */ + + + CanvasExtract.prototype.base64 = function base64(target) { + return this.canvas(target).toDataURL(); + }; + + /** + * Creates a Canvas element, renders this target to it and then returns it. + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {HTMLCanvasElement} A Canvas element with the texture rendered on. + */ + + + CanvasExtract.prototype.canvas = function canvas(target) { + var renderer = this.renderer; + var context = void 0; + var resolution = void 0; + var frame = void 0; + var renderTexture = void 0; + + if (target) { + if (target instanceof core.RenderTexture) { + renderTexture = target; + } else { + renderTexture = renderer.generateTexture(target); + } + } + + if (renderTexture) { + context = renderTexture.baseTexture._canvasRenderTarget.context; + resolution = renderTexture.baseTexture._canvasRenderTarget.resolution; + frame = renderTexture.frame; + } else { + context = renderer.rootContext; + + frame = TEMP_RECT; + frame.width = this.renderer.width; + frame.height = this.renderer.height; + } + + var width = frame.width * resolution; + var height = frame.height * resolution; + + var canvasBuffer = new core.CanvasRenderTarget(width, height); + var canvasData = context.getImageData(frame.x * resolution, frame.y * resolution, width, height); + + canvasBuffer.context.putImageData(canvasData, 0, 0); + + // send the canvas back.. + return canvasBuffer.canvas; + }; + + /** + * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA + * order, with integer values between 0 and 255 (included). + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture + */ + + + CanvasExtract.prototype.pixels = function pixels(target) { + var renderer = this.renderer; + var context = void 0; + var resolution = void 0; + var frame = void 0; + var renderTexture = void 0; + + if (target) { + if (target instanceof core.RenderTexture) { + renderTexture = target; + } else { + renderTexture = renderer.generateTexture(target); + } + } + + if (renderTexture) { + context = renderTexture.baseTexture._canvasRenderTarget.context; + resolution = renderTexture.baseTexture._canvasRenderTarget.resolution; + frame = renderTexture.frame; + } else { + context = renderer.rootContext; + + frame = TEMP_RECT; + frame.width = renderer.width; + frame.height = renderer.height; + } + + return context.getImageData(0, 0, frame.width * resolution, frame.height * resolution).data; + }; + + /** + * Destroys the extract + * + */ + + + CanvasExtract.prototype.destroy = function destroy() { + this.renderer.extract = null; + this.renderer = null; + }; + + return CanvasExtract; +}(); + +exports.default = CanvasExtract; + + +core.CanvasRenderer.registerPlugin('extract', CanvasExtract); + +},{"../../core":65}],132:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _WebGLExtract = require('./webgl/WebGLExtract'); + +Object.defineProperty(exports, 'webgl', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_WebGLExtract).default; + } +}); + +var _CanvasExtract = require('./canvas/CanvasExtract'); + +Object.defineProperty(exports, 'canvas', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasExtract).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./canvas/CanvasExtract":131,"./webgl/WebGLExtract":133}],133:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var TEMP_RECT = new core.Rectangle(); +var BYTES_PER_PIXEL = 4; + +/** + * The extract manager provides functionality to export content from the renderers. + * + * An instance of this class is automatically created by default, and can be found at renderer.plugins.extract + * + * @class + * @memberof PIXI.extract + */ + +var WebGLExtract = function () { + /** + * @param {PIXI.WebGLRenderer} renderer - A reference to the current renderer + */ + function WebGLExtract(renderer) { + _classCallCheck(this, WebGLExtract); + + this.renderer = renderer; + /** + * Collection of methods for extracting data (image, pixels, etc.) from a display object or render texture + * + * @member {PIXI.extract.WebGLExtract} extract + * @memberof PIXI.WebGLRenderer# + * @see PIXI.extract.WebGLExtract + */ + renderer.extract = this; + } + + /** + * Will return a HTML Image of the target + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {HTMLImageElement} HTML Image of the target + */ + + + WebGLExtract.prototype.image = function image(target) { + var image = new Image(); + + image.src = this.base64(target); + + return image; + }; + + /** + * Will return a a base64 encoded string of this target. It works by calling + * `WebGLExtract.getCanvas` and then running toDataURL on that. + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {string} A base64 encoded string of the texture. + */ + + + WebGLExtract.prototype.base64 = function base64(target) { + return this.canvas(target).toDataURL(); + }; + + /** + * Creates a Canvas element, renders this target to it and then returns it. + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {HTMLCanvasElement} A Canvas element with the texture rendered on. + */ + + + WebGLExtract.prototype.canvas = function canvas(target) { + var renderer = this.renderer; + var textureBuffer = void 0; + var resolution = void 0; + var frame = void 0; + var flipY = false; + var renderTexture = void 0; + + if (target) { + if (target instanceof core.RenderTexture) { + renderTexture = target; + } else { + renderTexture = this.renderer.generateTexture(target); + } + } + + if (renderTexture) { + textureBuffer = renderTexture.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]; + resolution = textureBuffer.resolution; + frame = renderTexture.frame; + flipY = false; + } else { + textureBuffer = this.renderer.rootRenderTarget; + resolution = textureBuffer.resolution; + flipY = true; + + frame = TEMP_RECT; + frame.width = textureBuffer.size.width; + frame.height = textureBuffer.size.height; + } + + var width = frame.width * resolution; + var height = frame.height * resolution; + + var canvasBuffer = new core.CanvasRenderTarget(width, height); + + if (textureBuffer) { + // bind the buffer + renderer.bindRenderTarget(textureBuffer); + + // set up an array of pixels + var webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height); + + // read pixels to the array + var gl = renderer.gl; + + gl.readPixels(frame.x * resolution, frame.y * resolution, width, height, gl.RGBA, gl.UNSIGNED_BYTE, webglPixels); + + // add the pixels to the canvas + var canvasData = canvasBuffer.context.getImageData(0, 0, width, height); + + canvasData.data.set(webglPixels); + + canvasBuffer.context.putImageData(canvasData, 0, 0); + + // pulling pixels + if (flipY) { + canvasBuffer.context.scale(1, -1); + canvasBuffer.context.drawImage(canvasBuffer.canvas, 0, -height); + } + } + + // send the canvas back.. + return canvasBuffer.canvas; + }; + + /** + * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA + * order, with integer values between 0 and 255 (included). + * + * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture + * to convert. If left empty will use use the main renderer + * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture + */ + + + WebGLExtract.prototype.pixels = function pixels(target) { + var renderer = this.renderer; + var textureBuffer = void 0; + var resolution = void 0; + var frame = void 0; + var renderTexture = void 0; + + if (target) { + if (target instanceof core.RenderTexture) { + renderTexture = target; + } else { + renderTexture = this.renderer.generateTexture(target); + } + } + + if (renderTexture) { + textureBuffer = renderTexture.baseTexture._glRenderTargets[this.renderer.CONTEXT_UID]; + resolution = textureBuffer.resolution; + frame = renderTexture.frame; + } else { + textureBuffer = this.renderer.rootRenderTarget; + resolution = textureBuffer.resolution; + + frame = TEMP_RECT; + frame.width = textureBuffer.size.width; + frame.height = textureBuffer.size.height; + } + + var width = frame.width * resolution; + var height = frame.height * resolution; + + var webglPixels = new Uint8Array(BYTES_PER_PIXEL * width * height); + + if (textureBuffer) { + // bind the buffer + renderer.bindRenderTarget(textureBuffer); + // read pixels to the array + var gl = renderer.gl; + + gl.readPixels(frame.x * resolution, frame.y * resolution, width, height, gl.RGBA, gl.UNSIGNED_BYTE, webglPixels); + } + + return webglPixels; + }; + + /** + * Destroys the extract + * + */ + + + WebGLExtract.prototype.destroy = function destroy() { + this.renderer.extract = null; + this.renderer = null; + }; + + return WebGLExtract; +}(); + +exports.default = WebGLExtract; + + +core.WebGLRenderer.registerPlugin('extract', WebGLExtract); + +},{"../../core":65}],134:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * @typedef FrameObject + * @type {object} + * @property {PIXI.Texture} texture - The {@link PIXI.Texture} of the frame + * @property {number} time - the duration of the frame in ms + */ + +/** + * An AnimatedSprite is a simple way to display an animation depicted by a list of textures. + * + * ```js + * let alienImages = ["image_sequence_01.png","image_sequence_02.png","image_sequence_03.png","image_sequence_04.png"]; + * let textureArray = []; + * + * for (let i=0; i < 4; i++) + * { + * let texture = PIXI.Texture.fromImage(alienImages[i]); + * textureArray.push(texture); + * }; + * + * let mc = new PIXI.AnimatedSprite(textureArray); + * ``` + * + * @class + * @extends PIXI.Sprite + * @memberof PIXI.extras + */ +var AnimatedSprite = function (_core$Sprite) { + _inherits(AnimatedSprite, _core$Sprite); + + /** + * @param {PIXI.Texture[]|FrameObject[]} textures - an array of {@link PIXI.Texture} or frame + * objects that make up the animation + * @param {boolean} [autoUpdate=true] - Whether to use PIXI.ticker.shared to auto update animation time. + */ + function AnimatedSprite(textures, autoUpdate) { + _classCallCheck(this, AnimatedSprite); + + /** + * @private + */ + var _this = _possibleConstructorReturn(this, _core$Sprite.call(this, textures[0] instanceof core.Texture ? textures[0] : textures[0].texture)); + + _this._textures = null; + + /** + * @private + */ + _this._durations = null; + + _this.textures = textures; + + /** + * `true` uses PIXI.ticker.shared to auto update animation time. + * @type {boolean} + * @default true + * @private + */ + _this._autoUpdate = autoUpdate !== false; + + /** + * The speed that the AnimatedSprite will play at. Higher is faster, lower is slower + * + * @member {number} + * @default 1 + */ + _this.animationSpeed = 1; + + /** + * Whether or not the animate sprite repeats after playing. + * + * @member {boolean} + * @default true + */ + _this.loop = true; + + /** + * Function to call when a AnimatedSprite finishes playing + * + * @member {Function} + */ + _this.onComplete = null; + + /** + * Function to call when a AnimatedSprite changes which texture is being rendered + * + * @member {Function} + */ + _this.onFrameChange = null; + + /** + * Function to call when 'loop' is true, and an AnimatedSprite is played and loops around to start again + * + * @member {Function} + */ + _this.onLoop = null; + + /** + * Elapsed time since animation has been started, used internally to display current texture + * + * @member {number} + * @private + */ + _this._currentTime = 0; + + /** + * Indicates if the AnimatedSprite is currently playing + * + * @member {boolean} + * @readonly + */ + _this.playing = false; + return _this; + } + + /** + * Stops the AnimatedSprite + * + */ + + + AnimatedSprite.prototype.stop = function stop() { + if (!this.playing) { + return; + } + + this.playing = false; + if (this._autoUpdate) { + core.ticker.shared.remove(this.update, this); + } + }; + + /** + * Plays the AnimatedSprite + * + */ + + + AnimatedSprite.prototype.play = function play() { + if (this.playing) { + return; + } + + this.playing = true; + if (this._autoUpdate) { + core.ticker.shared.add(this.update, this, core.UPDATE_PRIORITY.HIGH); + } + }; + + /** + * Stops the AnimatedSprite and goes to a specific frame + * + * @param {number} frameNumber - frame index to stop at + */ + + + AnimatedSprite.prototype.gotoAndStop = function gotoAndStop(frameNumber) { + this.stop(); + + var previousFrame = this.currentFrame; + + this._currentTime = frameNumber; + + if (previousFrame !== this.currentFrame) { + this.updateTexture(); + } + }; + + /** + * Goes to a specific frame and begins playing the AnimatedSprite + * + * @param {number} frameNumber - frame index to start at + */ + + + AnimatedSprite.prototype.gotoAndPlay = function gotoAndPlay(frameNumber) { + var previousFrame = this.currentFrame; + + this._currentTime = frameNumber; + + if (previousFrame !== this.currentFrame) { + this.updateTexture(); + } + + this.play(); + }; + + /** + * Updates the object transform for rendering. + * + * @private + * @param {number} deltaTime - Time since last tick. + */ + + + AnimatedSprite.prototype.update = function update(deltaTime) { + var elapsed = this.animationSpeed * deltaTime; + var previousFrame = this.currentFrame; + + if (this._durations !== null) { + var lag = this._currentTime % 1 * this._durations[this.currentFrame]; + + lag += elapsed / 60 * 1000; + + while (lag < 0) { + this._currentTime--; + lag += this._durations[this.currentFrame]; + } + + var sign = Math.sign(this.animationSpeed * deltaTime); + + this._currentTime = Math.floor(this._currentTime); + + while (lag >= this._durations[this.currentFrame]) { + lag -= this._durations[this.currentFrame] * sign; + this._currentTime += sign; + } + + this._currentTime += lag / this._durations[this.currentFrame]; + } else { + this._currentTime += elapsed; + } + + if (this._currentTime < 0 && !this.loop) { + this.gotoAndStop(0); + + if (this.onComplete) { + this.onComplete(); + } + } else if (this._currentTime >= this._textures.length && !this.loop) { + this.gotoAndStop(this._textures.length - 1); + + if (this.onComplete) { + this.onComplete(); + } + } else if (previousFrame !== this.currentFrame) { + if (this.loop && this.onLoop) { + if (this.animationSpeed > 0 && this.currentFrame < previousFrame) { + this.onLoop(); + } else if (this.animationSpeed < 0 && this.currentFrame > previousFrame) { + this.onLoop(); + } + } + + this.updateTexture(); + } + }; + + /** + * Updates the displayed texture to match the current frame index + * + * @private + */ + + + AnimatedSprite.prototype.updateTexture = function updateTexture() { + this._texture = this._textures[this.currentFrame]; + this._textureID = -1; + + if (this.onFrameChange) { + this.onFrameChange(this.currentFrame); + } + }; + + /** + * Stops the AnimatedSprite and destroys it + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + + + AnimatedSprite.prototype.destroy = function destroy(options) { + this.stop(); + _core$Sprite.prototype.destroy.call(this, options); + }; + + /** + * A short hand way of creating a movieclip from an array of frame ids + * + * @static + * @param {string[]} frames - The array of frames ids the movieclip will use as its texture frames + * @return {AnimatedSprite} The new animated sprite with the specified frames. + */ + + + AnimatedSprite.fromFrames = function fromFrames(frames) { + var textures = []; + + for (var i = 0; i < frames.length; ++i) { + textures.push(core.Texture.fromFrame(frames[i])); + } + + return new AnimatedSprite(textures); + }; + + /** + * A short hand way of creating a movieclip from an array of image ids + * + * @static + * @param {string[]} images - the array of image urls the movieclip will use as its texture frames + * @return {AnimatedSprite} The new animate sprite with the specified images as frames. + */ + + + AnimatedSprite.fromImages = function fromImages(images) { + var textures = []; + + for (var i = 0; i < images.length; ++i) { + textures.push(core.Texture.fromImage(images[i])); + } + + return new AnimatedSprite(textures); + }; + + /** + * totalFrames is the total number of frames in the AnimatedSprite. This is the same as number of textures + * assigned to the AnimatedSprite. + * + * @readonly + * @member {number} + * @default 0 + */ + + + _createClass(AnimatedSprite, [{ + key: 'totalFrames', + get: function get() { + return this._textures.length; + } + + /** + * The array of textures used for this AnimatedSprite + * + * @member {PIXI.Texture[]} + */ + + }, { + key: 'textures', + get: function get() { + return this._textures; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (value[0] instanceof core.Texture) { + this._textures = value; + this._durations = null; + } else { + this._textures = []; + this._durations = []; + + for (var i = 0; i < value.length; i++) { + this._textures.push(value[i].texture); + this._durations.push(value[i].time); + } + } + this.gotoAndStop(0); + this.updateTexture(); + } + + /** + * The AnimatedSprites current frame index + * + * @member {number} + * @readonly + */ + + }, { + key: 'currentFrame', + get: function get() { + var currentFrame = Math.floor(this._currentTime) % this._textures.length; + + if (currentFrame < 0) { + currentFrame += this._textures.length; + } + + return currentFrame; + } + }]); + + return AnimatedSprite; +}(core.Sprite); + +exports.default = AnimatedSprite; + +},{"../core":65}],135:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _ObservablePoint = require('../core/math/ObservablePoint'); + +var _ObservablePoint2 = _interopRequireDefault(_ObservablePoint); + +var _settings = require('../core/settings'); + +var _settings2 = _interopRequireDefault(_settings); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * A BitmapText object will create a line or multiple lines of text using bitmap font. To + * split a line you can use '\n', '\r' or '\r\n' in your string. You can generate the fnt files using: + * + * A BitmapText can only be created when the font is loaded + * + * ```js + * // in this case the font is in a file called 'desyrel.fnt' + * let bitmapText = new PIXI.extras.BitmapText("text using a fancy font!", {font: "35px Desyrel", align: "right"}); + * ``` + * + * http://www.angelcode.com/products/bmfont/ for windows or + * http://www.bmglyph.com/ for mac. + * + * @class + * @extends PIXI.Container + * @memberof PIXI.extras + */ +var BitmapText = function (_core$Container) { + _inherits(BitmapText, _core$Container); + + /** + * @param {string} text - The copy that you would like the text to display + * @param {object} style - The style parameters + * @param {string|object} style.font - The font descriptor for the object, can be passed as a string of form + * "24px FontName" or "FontName" or as an object with explicit name/size properties. + * @param {string} [style.font.name] - The bitmap font id + * @param {number} [style.font.size] - The size of the font in pixels, e.g. 24 + * @param {string} [style.align='left'] - Alignment for multiline text ('left', 'center' or 'right'), does not affect + * single line text + * @param {number} [style.tint=0xFFFFFF] - The tint color + */ + function BitmapText(text) { + var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, BitmapText); + + /** + * Private tracker for the width of the overall text + * + * @member {number} + * @private + */ + var _this = _possibleConstructorReturn(this, _core$Container.call(this)); + + _this._textWidth = 0; + + /** + * Private tracker for the height of the overall text + * + * @member {number} + * @private + */ + _this._textHeight = 0; + + /** + * Private tracker for the letter sprite pool. + * + * @member {PIXI.Sprite[]} + * @private + */ + _this._glyphs = []; + + /** + * Private tracker for the current style. + * + * @member {object} + * @private + */ + _this._font = { + tint: style.tint !== undefined ? style.tint : 0xFFFFFF, + align: style.align || 'left', + name: null, + size: 0 + }; + + /** + * Private tracker for the current font. + * + * @member {object} + * @private + */ + _this.font = style.font; // run font setter + + /** + * Private tracker for the current text. + * + * @member {string} + * @private + */ + _this._text = text; + + /** + * The max width of this bitmap text in pixels. If the text provided is longer than the + * value provided, line breaks will be automatically inserted in the last whitespace. + * Disable by setting value to 0 + * + * @member {number} + * @private + */ + _this._maxWidth = 0; + + /** + * The max line height. This is useful when trying to use the total height of the Text, + * ie: when trying to vertically align. + * + * @member {number} + * @private + */ + _this._maxLineHeight = 0; + + /** + * Text anchor. read-only + * + * @member {PIXI.ObservablePoint} + * @private + */ + _this._anchor = new _ObservablePoint2.default(function () { + _this.dirty = true; + }, _this, 0, 0); + + /** + * The dirty state of this object. + * + * @member {boolean} + */ + _this.dirty = false; + + _this.updateText(); + return _this; + } + + /** + * Renders text and updates it when needed + * + * @private + */ + + + BitmapText.prototype.updateText = function updateText() { + var data = BitmapText.fonts[this._font.name]; + var scale = this._font.size / data.size; + var pos = new core.Point(); + var chars = []; + var lineWidths = []; + + var prevCharCode = null; + var lastLineWidth = 0; + var maxLineWidth = 0; + var line = 0; + var lastSpace = -1; + var lastSpaceWidth = 0; + var spacesRemoved = 0; + var maxLineHeight = 0; + + for (var i = 0; i < this.text.length; i++) { + var charCode = this.text.charCodeAt(i); + + if (/(\s)/.test(this.text.charAt(i))) { + lastSpace = i; + lastSpaceWidth = lastLineWidth; + } + + if (/(?:\r\n|\r|\n)/.test(this.text.charAt(i))) { + lineWidths.push(lastLineWidth); + maxLineWidth = Math.max(maxLineWidth, lastLineWidth); + line++; + + pos.x = 0; + pos.y += data.lineHeight; + prevCharCode = null; + continue; + } + + if (lastSpace !== -1 && this._maxWidth > 0 && pos.x * scale > this._maxWidth) { + core.utils.removeItems(chars, lastSpace - spacesRemoved, i - lastSpace); + i = lastSpace; + lastSpace = -1; + ++spacesRemoved; + + lineWidths.push(lastSpaceWidth); + maxLineWidth = Math.max(maxLineWidth, lastSpaceWidth); + line++; + + pos.x = 0; + pos.y += data.lineHeight; + prevCharCode = null; + continue; + } + + var charData = data.chars[charCode]; + + if (!charData) { + continue; + } + + if (prevCharCode && charData.kerning[prevCharCode]) { + pos.x += charData.kerning[prevCharCode]; + } + + chars.push({ + texture: charData.texture, + line: line, + charCode: charCode, + position: new core.Point(pos.x + charData.xOffset, pos.y + charData.yOffset) + }); + lastLineWidth = pos.x + (charData.texture.width + charData.xOffset); + pos.x += charData.xAdvance; + maxLineHeight = Math.max(maxLineHeight, charData.yOffset + charData.texture.height); + prevCharCode = charCode; + } + + lineWidths.push(lastLineWidth); + maxLineWidth = Math.max(maxLineWidth, lastLineWidth); + + var lineAlignOffsets = []; + + for (var _i = 0; _i <= line; _i++) { + var alignOffset = 0; + + if (this._font.align === 'right') { + alignOffset = maxLineWidth - lineWidths[_i]; + } else if (this._font.align === 'center') { + alignOffset = (maxLineWidth - lineWidths[_i]) / 2; + } + + lineAlignOffsets.push(alignOffset); + } + + var lenChars = chars.length; + var tint = this.tint; + + for (var _i2 = 0; _i2 < lenChars; _i2++) { + var c = this._glyphs[_i2]; // get the next glyph sprite + + if (c) { + c.texture = chars[_i2].texture; + } else { + c = new core.Sprite(chars[_i2].texture); + this._glyphs.push(c); + } + + c.position.x = (chars[_i2].position.x + lineAlignOffsets[chars[_i2].line]) * scale; + c.position.y = chars[_i2].position.y * scale; + c.scale.x = c.scale.y = scale; + c.tint = tint; + + if (!c.parent) { + this.addChild(c); + } + } + + // remove unnecessary children. + for (var _i3 = lenChars; _i3 < this._glyphs.length; ++_i3) { + this.removeChild(this._glyphs[_i3]); + } + + this._textWidth = maxLineWidth * scale; + this._textHeight = (pos.y + data.lineHeight) * scale; + + // apply anchor + if (this.anchor.x !== 0 || this.anchor.y !== 0) { + for (var _i4 = 0; _i4 < lenChars; _i4++) { + this._glyphs[_i4].x -= this._textWidth * this.anchor.x; + this._glyphs[_i4].y -= this._textHeight * this.anchor.y; + } + } + this._maxLineHeight = maxLineHeight * scale; + }; + + /** + * Updates the transform of this object + * + * @private + */ + + + BitmapText.prototype.updateTransform = function updateTransform() { + this.validate(); + this.containerUpdateTransform(); + }; + + /** + * Validates text before calling parent's getLocalBounds + * + * @return {PIXI.Rectangle} The rectangular bounding area + */ + + + BitmapText.prototype.getLocalBounds = function getLocalBounds() { + this.validate(); + + return _core$Container.prototype.getLocalBounds.call(this); + }; + + /** + * Updates text when needed + * + * @private + */ + + + BitmapText.prototype.validate = function validate() { + if (this.dirty) { + this.updateText(); + this.dirty = false; + } + }; + + /** + * The tint of the BitmapText object + * + * @member {number} + */ + + + /** + * Register a bitmap font with data and a texture. + * + * @static + * @param {XMLDocument} xml - The XML document data. + * @param {PIXI.Texture} texture - Texture with all symbols. + * @return {Object} Result font object with font, size, lineHeight and char fields. + */ + BitmapText.registerFont = function registerFont(xml, texture) { + var data = {}; + var info = xml.getElementsByTagName('info')[0]; + var common = xml.getElementsByTagName('common')[0]; + var res = texture.baseTexture.resolution || _settings2.default.RESOLUTION; + + data.font = info.getAttribute('face'); + data.size = parseInt(info.getAttribute('size'), 10); + data.lineHeight = parseInt(common.getAttribute('lineHeight'), 10) / res; + data.chars = {}; + + // parse letters + var letters = xml.getElementsByTagName('char'); + + for (var i = 0; i < letters.length; i++) { + var letter = letters[i]; + var charCode = parseInt(letter.getAttribute('id'), 10); + + var textureRect = new core.Rectangle(parseInt(letter.getAttribute('x'), 10) / res + texture.frame.x / res, parseInt(letter.getAttribute('y'), 10) / res + texture.frame.y / res, parseInt(letter.getAttribute('width'), 10) / res, parseInt(letter.getAttribute('height'), 10) / res); + + data.chars[charCode] = { + xOffset: parseInt(letter.getAttribute('xoffset'), 10) / res, + yOffset: parseInt(letter.getAttribute('yoffset'), 10) / res, + xAdvance: parseInt(letter.getAttribute('xadvance'), 10) / res, + kerning: {}, + texture: new core.Texture(texture.baseTexture, textureRect) + + }; + } + + // parse kernings + var kernings = xml.getElementsByTagName('kerning'); + + for (var _i5 = 0; _i5 < kernings.length; _i5++) { + var kerning = kernings[_i5]; + var first = parseInt(kerning.getAttribute('first'), 10) / res; + var second = parseInt(kerning.getAttribute('second'), 10) / res; + var amount = parseInt(kerning.getAttribute('amount'), 10) / res; + + if (data.chars[second]) { + data.chars[second].kerning[first] = amount; + } + } + + // I'm leaving this as a temporary fix so we can test the bitmap fonts in v3 + // but it's very likely to change + BitmapText.fonts[data.font] = data; + + return data; + }; + + _createClass(BitmapText, [{ + key: 'tint', + get: function get() { + return this._font.tint; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._font.tint = typeof value === 'number' && value >= 0 ? value : 0xFFFFFF; + + this.dirty = true; + } + + /** + * The alignment of the BitmapText object + * + * @member {string} + * @default 'left' + */ + + }, { + key: 'align', + get: function get() { + return this._font.align; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._font.align = value || 'left'; + + this.dirty = true; + } + + /** + * The anchor sets the origin point of the text. + * The default is 0,0 this means the text's origin is the top left + * Setting the anchor to 0.5,0.5 means the text's origin is centered + * Setting the anchor to 1,1 would mean the text's origin point will be the bottom right corner + * + * @member {PIXI.Point | number} + */ + + }, { + key: 'anchor', + get: function get() { + return this._anchor; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (typeof value === 'number') { + this._anchor.set(value); + } else { + this._anchor.copy(value); + } + } + + /** + * The font descriptor of the BitmapText object + * + * @member {string|object} + */ + + }, { + key: 'font', + get: function get() { + return this._font; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (!value) { + return; + } + + if (typeof value === 'string') { + value = value.split(' '); + + this._font.name = value.length === 1 ? value[0] : value.slice(1).join(' '); + this._font.size = value.length >= 2 ? parseInt(value[0], 10) : BitmapText.fonts[this._font.name].size; + } else { + this._font.name = value.name; + this._font.size = typeof value.size === 'number' ? value.size : parseInt(value.size, 10); + } + + this.dirty = true; + } + + /** + * The text of the BitmapText object + * + * @member {string} + */ + + }, { + key: 'text', + get: function get() { + return this._text; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + value = value.toString() || ' '; + if (this._text === value) { + return; + } + this._text = value; + this.dirty = true; + } + + /** + * The max width of this bitmap text in pixels. If the text provided is longer than the + * value provided, line breaks will be automatically inserted in the last whitespace. + * Disable by setting value to 0 + * + * @member {number} + */ + + }, { + key: 'maxWidth', + get: function get() { + return this._maxWidth; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (this._maxWidth === value) { + return; + } + this._maxWidth = value; + this.dirty = true; + } + + /** + * The max line height. This is useful when trying to use the total height of the Text, + * ie: when trying to vertically align. + * + * @member {number} + * @readonly + */ + + }, { + key: 'maxLineHeight', + get: function get() { + this.validate(); + + return this._maxLineHeight; + } + + /** + * The width of the overall text, different from fontSize, + * which is defined in the style object + * + * @member {number} + * @readonly + */ + + }, { + key: 'textWidth', + get: function get() { + this.validate(); + + return this._textWidth; + } + + /** + * The height of the overall text, different from fontSize, + * which is defined in the style object + * + * @member {number} + * @readonly + */ + + }, { + key: 'textHeight', + get: function get() { + this.validate(); + + return this._textHeight; + } + }]); + + return BitmapText; +}(core.Container); + +exports.default = BitmapText; + + +BitmapText.fonts = {}; + +},{"../core":65,"../core/math/ObservablePoint":68,"../core/settings":101}],136:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _Matrix = require('../core/math/Matrix'); + +var _Matrix2 = _interopRequireDefault(_Matrix); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var tempMat = new _Matrix2.default(); + +/** + * class controls uv transform and frame clamp for texture + * + * @class + * @memberof PIXI.extras + */ + +var TextureTransform = function () { + /** + * + * @param {PIXI.Texture} texture observed texture + * @param {number} [clampMargin] Changes frame clamping, 0.5 by default. Use -0.5 for extra border. + * @constructor + */ + function TextureTransform(texture, clampMargin) { + _classCallCheck(this, TextureTransform); + + this._texture = texture; + + this.mapCoord = new _Matrix2.default(); + + this.uClampFrame = new Float32Array(4); + + this.uClampOffset = new Float32Array(2); + + this._lastTextureID = -1; + + /** + * Changes frame clamping + * Works with TilingSprite and Mesh + * Change to 1.5 if you texture has repeated right and bottom lines, that leads to smoother borders + * + * @default 0 + * @member {number} + */ + this.clampOffset = 0; + + /** + * Changes frame clamping + * Works with TilingSprite and Mesh + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * + * @default 0.5 + * @member {number} + */ + this.clampMargin = typeof clampMargin === 'undefined' ? 0.5 : clampMargin; + } + + /** + * texture property + * @member {PIXI.Texture} + */ + + + /** + * Multiplies uvs array to transform + * @param {Float32Array} uvs mesh uvs + * @param {Float32Array} [out=uvs] output + * @returns {Float32Array} output + */ + TextureTransform.prototype.multiplyUvs = function multiplyUvs(uvs, out) { + if (out === undefined) { + out = uvs; + } + + var mat = this.mapCoord; + + for (var i = 0; i < uvs.length; i += 2) { + var x = uvs[i]; + var y = uvs[i + 1]; + + out[i] = x * mat.a + y * mat.c + mat.tx; + out[i + 1] = x * mat.b + y * mat.d + mat.ty; + } + + return out; + }; + + /** + * updates matrices if texture was changed + * @param {boolean} forceUpdate if true, matrices will be updated any case + * @returns {boolean} whether or not it was updated + */ + + + TextureTransform.prototype.update = function update(forceUpdate) { + var tex = this._texture; + + if (!tex || !tex.valid) { + return false; + } + + if (!forceUpdate && this._lastTextureID === tex._updateID) { + return false; + } + + this._lastTextureID = tex._updateID; + + var uvs = tex._uvs; + + this.mapCoord.set(uvs.x1 - uvs.x0, uvs.y1 - uvs.y0, uvs.x3 - uvs.x0, uvs.y3 - uvs.y0, uvs.x0, uvs.y0); + + var orig = tex.orig; + var trim = tex.trim; + + if (trim) { + tempMat.set(orig.width / trim.width, 0, 0, orig.height / trim.height, -trim.x / trim.width, -trim.y / trim.height); + this.mapCoord.append(tempMat); + } + + var texBase = tex.baseTexture; + var frame = this.uClampFrame; + var margin = this.clampMargin / texBase.resolution; + var offset = this.clampOffset; + + frame[0] = (tex._frame.x + margin + offset) / texBase.width; + frame[1] = (tex._frame.y + margin + offset) / texBase.height; + frame[2] = (tex._frame.x + tex._frame.width - margin + offset) / texBase.width; + frame[3] = (tex._frame.y + tex._frame.height - margin + offset) / texBase.height; + this.uClampOffset[0] = offset / texBase.realWidth; + this.uClampOffset[1] = offset / texBase.realHeight; + + return true; + }; + + _createClass(TextureTransform, [{ + key: 'texture', + get: function get() { + return this._texture; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._texture = value; + this._lastTextureID = -1; + } + }]); + + return TextureTransform; +}(); + +exports.default = TextureTransform; + +},{"../core/math/Matrix":67}],137:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _CanvasTinter = require('../core/sprites/canvas/CanvasTinter'); + +var _CanvasTinter2 = _interopRequireDefault(_CanvasTinter); + +var _TextureTransform = require('./TextureTransform'); + +var _TextureTransform2 = _interopRequireDefault(_TextureTransform); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var tempPoint = new core.Point(); + +/** + * A tiling sprite is a fast way of rendering a tiling image + * + * @class + * @extends PIXI.Sprite + * @memberof PIXI.extras + */ + +var TilingSprite = function (_core$Sprite) { + _inherits(TilingSprite, _core$Sprite); + + /** + * @param {PIXI.Texture} texture - the texture of the tiling sprite + * @param {number} [width=100] - the width of the tiling sprite + * @param {number} [height=100] - the height of the tiling sprite + */ + function TilingSprite(texture) { + var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100; + var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100; + + _classCallCheck(this, TilingSprite); + + /** + * Tile transform + * + * @member {PIXI.TransformStatic} + */ + var _this = _possibleConstructorReturn(this, _core$Sprite.call(this, texture)); + + _this.tileTransform = new core.TransformStatic(); + + // /// private + + /** + * The with of the tiling sprite + * + * @member {number} + * @private + */ + _this._width = width; + + /** + * The height of the tiling sprite + * + * @member {number} + * @private + */ + _this._height = height; + + /** + * Canvas pattern + * + * @type {CanvasPattern} + * @private + */ + _this._canvasPattern = null; + + /** + * transform that is applied to UV to get the texture coords + * + * @member {PIXI.extras.TextureTransform} + */ + _this.uvTransform = texture.transform || new _TextureTransform2.default(texture); + + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_renderWebGL' method. + * + * @member {string} + * @default 'tilingSprite' + */ + _this.pluginName = 'tilingSprite'; + + /** + * Whether or not anchor affects uvs + * + * @member {boolean} + * @default false + */ + _this.uvRespectAnchor = false; + return _this; + } + /** + * Changes frame clamping in corresponding textureTransform, shortcut + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * + * @default 0.5 + * @member {number} + */ + + + /** + * @private + */ + TilingSprite.prototype._onTextureUpdate = function _onTextureUpdate() { + if (this.uvTransform) { + this.uvTransform.texture = this._texture; + } + }; + + /** + * Renders the object using the WebGL renderer + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The renderer + */ + + + TilingSprite.prototype._renderWebGL = function _renderWebGL(renderer) { + // tweak our texture temporarily.. + var texture = this._texture; + + if (!texture || !texture.valid) { + return; + } + + this.tileTransform.updateLocalTransform(); + this.uvTransform.update(); + + renderer.setObjectRenderer(renderer.plugins[this.pluginName]); + renderer.plugins[this.pluginName].render(this); + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - a reference to the canvas renderer + */ + + + TilingSprite.prototype._renderCanvas = function _renderCanvas(renderer) { + var texture = this._texture; + + if (!texture.baseTexture.hasLoaded) { + return; + } + + var context = renderer.context; + var transform = this.worldTransform; + var resolution = renderer.resolution; + var baseTexture = texture.baseTexture; + var baseTextureResolution = baseTexture.resolution; + var modX = this.tilePosition.x / this.tileScale.x % texture._frame.width * baseTextureResolution; + var modY = this.tilePosition.y / this.tileScale.y % texture._frame.height * baseTextureResolution; + + // create a nice shiny pattern! + // TODO this needs to be refreshed if texture changes.. + if (!this._canvasPattern) { + // cut an object from a spritesheet.. + var tempCanvas = new core.CanvasRenderTarget(texture._frame.width, texture._frame.height, baseTextureResolution); + + // Tint the tiling sprite + if (this.tint !== 0xFFFFFF) { + if (this.cachedTint !== this.tint) { + this.cachedTint = this.tint; + + this.tintedTexture = _CanvasTinter2.default.getTintedTexture(this, this.tint); + } + tempCanvas.context.drawImage(this.tintedTexture, 0, 0); + } else { + tempCanvas.context.drawImage(baseTexture.source, -texture._frame.x * baseTextureResolution, -texture._frame.y * baseTextureResolution); + } + this._canvasPattern = tempCanvas.context.createPattern(tempCanvas.canvas, 'repeat'); + } + + // set context state.. + context.globalAlpha = this.worldAlpha; + context.setTransform(transform.a * resolution, transform.b * resolution, transform.c * resolution, transform.d * resolution, transform.tx * resolution, transform.ty * resolution); + + renderer.setBlendMode(this.blendMode); + + // fill the pattern! + context.fillStyle = this._canvasPattern; + + // TODO - this should be rolled into the setTransform above.. + context.scale(this.tileScale.x / baseTextureResolution, this.tileScale.y / baseTextureResolution); + + var anchorX = this.anchor.x * -this._width; + var anchorY = this.anchor.y * -this._height; + + if (this.uvRespectAnchor) { + context.translate(modX, modY); + + context.fillRect(-modX + anchorX, -modY + anchorY, this._width / this.tileScale.x * baseTextureResolution, this._height / this.tileScale.y * baseTextureResolution); + } else { + context.translate(modX + anchorX, modY + anchorY); + + context.fillRect(-modX, -modY, this._width / this.tileScale.x * baseTextureResolution, this._height / this.tileScale.y * baseTextureResolution); + } + }; + + /** + * Updates the bounds of the tiling sprite. + * + * @private + */ + + + TilingSprite.prototype._calculateBounds = function _calculateBounds() { + var minX = this._width * -this._anchor._x; + var minY = this._height * -this._anchor._y; + var maxX = this._width * (1 - this._anchor._x); + var maxY = this._height * (1 - this._anchor._y); + + this._bounds.addFrame(this.transform, minX, minY, maxX, maxY); + }; + + /** + * Gets the local bounds of the sprite object. + * + * @param {PIXI.Rectangle} rect - The output rectangle. + * @return {PIXI.Rectangle} The bounds. + */ + + + TilingSprite.prototype.getLocalBounds = function getLocalBounds(rect) { + // we can do a fast local bounds if the sprite has no children! + if (this.children.length === 0) { + this._bounds.minX = this._width * -this._anchor._x; + this._bounds.minY = this._height * -this._anchor._y; + this._bounds.maxX = this._width * (1 - this._anchor._x); + this._bounds.maxY = this._height * (1 - this._anchor._x); + + if (!rect) { + if (!this._localBoundsRect) { + this._localBoundsRect = new core.Rectangle(); + } + + rect = this._localBoundsRect; + } + + return this._bounds.getRectangle(rect); + } + + return _core$Sprite.prototype.getLocalBounds.call(this, rect); + }; + + /** + * Checks if a point is inside this tiling sprite. + * + * @param {PIXI.Point} point - the point to check + * @return {boolean} Whether or not the sprite contains the point. + */ + + + TilingSprite.prototype.containsPoint = function containsPoint(point) { + this.worldTransform.applyInverse(point, tempPoint); + + var width = this._width; + var height = this._height; + var x1 = -width * this.anchor._x; + + if (tempPoint.x >= x1 && tempPoint.x < x1 + width) { + var y1 = -height * this.anchor._y; + + if (tempPoint.y >= y1 && tempPoint.y < y1 + height) { + return true; + } + } + + return false; + }; + + /** + * Destroys this sprite and optionally its texture and children + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Should it destroy the current texture of the sprite as well + * @param {boolean} [options.baseTexture=false] - Should it destroy the base texture of the sprite as well + */ + + + TilingSprite.prototype.destroy = function destroy(options) { + _core$Sprite.prototype.destroy.call(this, options); + + this.tileTransform = null; + this.uvTransform = null; + }; + + /** + * Helper function that creates a new tiling sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {number|string|PIXI.BaseTexture|HTMLCanvasElement|HTMLVideoElement} source - Source to create texture from + * @param {number} width - the width of the tiling sprite + * @param {number} height - the height of the tiling sprite + * @return {PIXI.Texture} The newly created texture + */ + + + TilingSprite.from = function from(source, width, height) { + return new TilingSprite(core.Texture.from(source), width, height); + }; + + /** + * Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId + * The frame ids are created when a Texture packer file has been loaded + * + * @static + * @param {string} frameId - The frame Id of the texture in the cache + * @param {number} width - the width of the tiling sprite + * @param {number} height - the height of the tiling sprite + * @return {PIXI.extras.TilingSprite} A new TilingSprite using a texture from the texture cache matching the frameId + */ + + + TilingSprite.fromFrame = function fromFrame(frameId, width, height) { + var texture = core.utils.TextureCache[frameId]; + + if (!texture) { + throw new Error('The frameId "' + frameId + '" does not exist in the texture cache ' + this); + } + + return new TilingSprite(texture, width, height); + }; + + /** + * Helper function that creates a sprite that will contain a texture based on an image url + * If the image is not in the texture cache it will be loaded + * + * @static + * @param {string} imageId - The image url of the texture + * @param {number} width - the width of the tiling sprite + * @param {number} height - the height of the tiling sprite + * @param {boolean} [crossorigin] - if you want to specify the cross-origin parameter + * @param {number} [scaleMode=PIXI.settings.SCALE_MODE] - if you want to specify the scale mode, + * see {@link PIXI.SCALE_MODES} for possible values + * @return {PIXI.extras.TilingSprite} A new TilingSprite using a texture from the texture cache matching the image id + */ + + + TilingSprite.fromImage = function fromImage(imageId, width, height, crossorigin, scaleMode) { + return new TilingSprite(core.Texture.fromImage(imageId, crossorigin, scaleMode), width, height); + }; + + /** + * The width of the sprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + + _createClass(TilingSprite, [{ + key: 'clampMargin', + get: function get() { + return this.uvTransform.clampMargin; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.uvTransform.clampMargin = value; + this.uvTransform.update(true); + } + + /** + * The scaling of the image that is being tiled + * + * @member {PIXI.ObservablePoint} + */ + + }, { + key: 'tileScale', + get: function get() { + return this.tileTransform.scale; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.tileTransform.scale.copy(value); + } + + /** + * The offset of the image that is being tiled + * + * @member {PIXI.ObservablePoint} + */ + + }, { + key: 'tilePosition', + get: function get() { + return this.tileTransform.position; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.tileTransform.position.copy(value); + } + }, { + key: 'width', + get: function get() { + return this._width; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._width = value; + } + + /** + * The height of the TilingSprite, setting this will actually modify the scale to achieve the value set + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + return this._height; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._height = value; + } + }]); + + return TilingSprite; +}(core.Sprite); + +exports.default = TilingSprite; + +},{"../core":65,"../core/sprites/canvas/CanvasTinter":104,"./TextureTransform":136}],138:[function(require,module,exports){ +'use strict'; + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _Texture = require('../core/textures/Texture'); + +var _Texture2 = _interopRequireDefault(_Texture); + +var _BaseTexture = require('../core/textures/BaseTexture'); + +var _BaseTexture2 = _interopRequireDefault(_BaseTexture); + +var _utils = require('../core/utils'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var DisplayObject = core.DisplayObject; +var _tempMatrix = new core.Matrix(); + +DisplayObject.prototype._cacheAsBitmap = false; +DisplayObject.prototype._cacheData = false; + +// figured theres no point adding ALL the extra variables to prototype. +// this model can hold the information needed. This can also be generated on demand as +// most objects are not cached as bitmaps. +/** + * @class + * @ignore + */ + +var CacheData = +/** + * + */ +function CacheData() { + _classCallCheck(this, CacheData); + + this.textureCacheId = null; + + this.originalRenderWebGL = null; + this.originalRenderCanvas = null; + this.originalCalculateBounds = null; + this.originalGetLocalBounds = null; + + this.originalUpdateTransform = null; + this.originalHitTest = null; + this.originalDestroy = null; + this.originalMask = null; + this.originalFilterArea = null; + this.sprite = null; +}; + +Object.defineProperties(DisplayObject.prototype, { + /** + * Set this to true if you want this display object to be cached as a bitmap. + * This basically takes a snap shot of the display object as it is at that moment. It can + * provide a performance benefit for complex static displayObjects. + * To remove simply set this property to 'false' + * + * IMPORTANT GOTCHA - make sure that all your textures are preloaded BEFORE setting this property to true + * as it will take a snapshot of what is currently there. If the textures have not loaded then they will not appear. + * + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + cacheAsBitmap: { + get: function get() { + return this._cacheAsBitmap; + }, + set: function set(value) { + if (this._cacheAsBitmap === value) { + return; + } + + this._cacheAsBitmap = value; + + var data = void 0; + + if (value) { + if (!this._cacheData) { + this._cacheData = new CacheData(); + } + + data = this._cacheData; + + data.originalRenderWebGL = this.renderWebGL; + data.originalRenderCanvas = this.renderCanvas; + + data.originalUpdateTransform = this.updateTransform; + data.originalCalculateBounds = this._calculateBounds; + data.originalGetLocalBounds = this.getLocalBounds; + + data.originalDestroy = this.destroy; + + data.originalContainsPoint = this.containsPoint; + + data.originalMask = this._mask; + data.originalFilterArea = this.filterArea; + + this.renderWebGL = this._renderCachedWebGL; + this.renderCanvas = this._renderCachedCanvas; + + this.destroy = this._cacheAsBitmapDestroy; + } else { + data = this._cacheData; + + if (data.sprite) { + this._destroyCachedDisplayObject(); + } + + this.renderWebGL = data.originalRenderWebGL; + this.renderCanvas = data.originalRenderCanvas; + this._calculateBounds = data.originalCalculateBounds; + this.getLocalBounds = data.originalGetLocalBounds; + + this.destroy = data.originalDestroy; + + this.updateTransform = data.originalUpdateTransform; + this.containsPoint = data.originalContainsPoint; + + this._mask = data.originalMask; + this.filterArea = data.originalFilterArea; + } + } + } +}); + +/** + * Renders a cached version of the sprite with WebGL + * + * @private + * @memberof PIXI.DisplayObject# + * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer + */ +DisplayObject.prototype._renderCachedWebGL = function _renderCachedWebGL(renderer) { + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) { + return; + } + + this._initCachedDisplayObject(renderer); + + this._cacheData.sprite._transformID = -1; + this._cacheData.sprite.worldAlpha = this.worldAlpha; + this._cacheData.sprite._renderWebGL(renderer); +}; + +/** + * Prepares the WebGL renderer to cache the sprite + * + * @private + * @memberof PIXI.DisplayObject# + * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer + */ +DisplayObject.prototype._initCachedDisplayObject = function _initCachedDisplayObject(renderer) { + if (this._cacheData && this._cacheData.sprite) { + return; + } + + // make sure alpha is set to 1 otherwise it will get rendered as invisible! + var cacheAlpha = this.alpha; + + this.alpha = 1; + + // first we flush anything left in the renderer (otherwise it would get rendered to the cached texture) + renderer.currentRenderer.flush(); + // this.filters= []; + + // next we find the dimensions of the untransformed object + // this function also calls updatetransform on all its children as part of the measuring. + // This means we don't need to update the transform again in this function + // TODO pass an object to clone too? saves having to create a new one each time! + var bounds = this.getLocalBounds().clone(); + + // add some padding! + if (this._filters) { + var padding = this._filters[0].padding; + + bounds.pad(padding); + } + + // for now we cache the current renderTarget that the webGL renderer is currently using. + // this could be more elegent.. + var cachedRenderTarget = renderer._activeRenderTarget; + // We also store the filter stack - I will definitely look to change how this works a little later down the line. + var stack = renderer.filterManager.filterStack; + + // this renderTexture will be used to store the cached DisplayObject + + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + + var textureCacheId = 'cacheAsBitmap_' + (0, _utils.uid)(); + + this._cacheData.textureCacheId = textureCacheId; + + _BaseTexture2.default.addToCache(renderTexture.baseTexture, textureCacheId); + _Texture2.default.addToCache(renderTexture, textureCacheId); + + // need to set // + var m = _tempMatrix; + + m.tx = -bounds.x; + m.ty = -bounds.y; + + // reset + this.transform.worldTransform.identity(); + + // set all properties to there original so we can render to a texture + this.renderWebGL = this._cacheData.originalRenderWebGL; + + renderer.render(this, renderTexture, true, m, true); + // now restore the state be setting the new properties + + renderer.bindRenderTarget(cachedRenderTarget); + + renderer.filterManager.filterStack = stack; + + this.renderWebGL = this._renderCachedWebGL; + this.updateTransform = this.displayObjectUpdateTransform; + + this._mask = null; + this.filterArea = null; + + // create our cached sprite + var cachedSprite = new core.Sprite(renderTexture); + + cachedSprite.transform.worldTransform = this.transform.worldTransform; + cachedSprite.anchor.x = -(bounds.x / bounds.width); + cachedSprite.anchor.y = -(bounds.y / bounds.height); + cachedSprite.alpha = cacheAlpha; + cachedSprite._bounds = this._bounds; + + // easy bounds.. + this._calculateBounds = this._calculateCachedBounds; + this.getLocalBounds = this._getCachedLocalBounds; + + this._cacheData.sprite = cachedSprite; + + this.transform._parentID = -1; + // restore the transform of the cached sprite to avoid the nasty flicker.. + if (!this.parent) { + this.parent = renderer._tempDisplayObjectParent; + this.updateTransform(); + this.parent = null; + } else { + this.updateTransform(); + } + + // map the hit test.. + this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite); +}; + +/** + * Renders a cached version of the sprite with canvas + * + * @private + * @memberof PIXI.DisplayObject# + * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer + */ +DisplayObject.prototype._renderCachedCanvas = function _renderCachedCanvas(renderer) { + if (!this.visible || this.worldAlpha <= 0 || !this.renderable) { + return; + } + + this._initCachedDisplayObjectCanvas(renderer); + + this._cacheData.sprite.worldAlpha = this.worldAlpha; + + this._cacheData.sprite.renderCanvas(renderer); +}; + +// TODO this can be the same as the webGL verison.. will need to do a little tweaking first though.. +/** + * Prepares the Canvas renderer to cache the sprite + * + * @private + * @memberof PIXI.DisplayObject# + * @param {PIXI.WebGLRenderer} renderer - the WebGL renderer + */ +DisplayObject.prototype._initCachedDisplayObjectCanvas = function _initCachedDisplayObjectCanvas(renderer) { + if (this._cacheData && this._cacheData.sprite) { + return; + } + + // get bounds actually transforms the object for us already! + var bounds = this.getLocalBounds(); + + var cacheAlpha = this.alpha; + + this.alpha = 1; + + var cachedRenderTarget = renderer.context; + + var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); + + var textureCacheId = 'cacheAsBitmap_' + (0, _utils.uid)(); + + this._cacheData.textureCacheId = textureCacheId; + + _BaseTexture2.default.addToCache(renderTexture.baseTexture, textureCacheId); + _Texture2.default.addToCache(renderTexture, textureCacheId); + + // need to set // + var m = _tempMatrix; + + this.transform.localTransform.copy(m); + m.invert(); + + m.tx -= bounds.x; + m.ty -= bounds.y; + + // m.append(this.transform.worldTransform.) + // set all properties to there original so we can render to a texture + this.renderCanvas = this._cacheData.originalRenderCanvas; + + // renderTexture.render(this, m, true); + renderer.render(this, renderTexture, true, m, false); + + // now restore the state be setting the new properties + renderer.context = cachedRenderTarget; + + this.renderCanvas = this._renderCachedCanvas; + this._calculateBounds = this._calculateCachedBounds; + + this._mask = null; + this.filterArea = null; + + // create our cached sprite + var cachedSprite = new core.Sprite(renderTexture); + + cachedSprite.transform.worldTransform = this.transform.worldTransform; + cachedSprite.anchor.x = -(bounds.x / bounds.width); + cachedSprite.anchor.y = -(bounds.y / bounds.height); + cachedSprite._bounds = this._bounds; + cachedSprite.alpha = cacheAlpha; + + if (!this.parent) { + this.parent = renderer._tempDisplayObjectParent; + this.updateTransform(); + this.parent = null; + } else { + this.updateTransform(); + } + + this.updateTransform = this.displayObjectUpdateTransform; + + this._cacheData.sprite = cachedSprite; + + this.containsPoint = cachedSprite.containsPoint.bind(cachedSprite); +}; + +/** + * Calculates the bounds of the cached sprite + * + * @private + */ +DisplayObject.prototype._calculateCachedBounds = function _calculateCachedBounds() { + this._cacheData.sprite._calculateBounds(); +}; + +/** + * Gets the bounds of the cached sprite. + * + * @private + * @return {Rectangle} The local bounds. + */ +DisplayObject.prototype._getCachedLocalBounds = function _getCachedLocalBounds() { + return this._cacheData.sprite.getLocalBounds(); +}; + +/** + * Destroys the cached sprite. + * + * @private + */ +DisplayObject.prototype._destroyCachedDisplayObject = function _destroyCachedDisplayObject() { + this._cacheData.sprite._texture.destroy(true); + this._cacheData.sprite = null; + + _BaseTexture2.default.removeFromCache(this._cacheData.textureCacheId); + _Texture2.default.removeFromCache(this._cacheData.textureCacheId); + + this._cacheData.textureCacheId = null; +}; + +/** + * Destroys the cached object. + * + * @private + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value. + * Used when destroying containers, see the Container.destroy method. + */ +DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(options) { + this.cacheAsBitmap = false; + this.destroy(options); +}; + +},{"../core":65,"../core/textures/BaseTexture":112,"../core/textures/Texture":115,"../core/utils":124}],139:[function(require,module,exports){ +'use strict'; + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +/** + * The instance name of the object. + * + * @memberof PIXI.DisplayObject# + * @member {string} + */ +core.DisplayObject.prototype.name = null; + +/** + * Returns the display object in the container + * + * @memberof PIXI.Container# + * @param {string} name - instance name + * @return {PIXI.DisplayObject} The child with the specified name. + */ +core.Container.prototype.getChildByName = function getChildByName(name) { + for (var i = 0; i < this.children.length; i++) { + if (this.children[i].name === name) { + return this.children[i]; + } + } + + return null; +}; + +},{"../core":65}],140:[function(require,module,exports){ +'use strict'; + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +/** + * Returns the global position of the displayObject. Does not depend on object scale, rotation and pivot. + * + * @memberof PIXI.DisplayObject# + * @param {Point} point - the point to write the global value to. If null a new point will be returned + * @param {boolean} skipUpdate - setting to true will stop the transforms of the scene graph from + * being updated. This means the calculation returned MAY be out of date BUT will give you a + * nice performance boost + * @return {Point} The updated point + */ +core.DisplayObject.prototype.getGlobalPosition = function getGlobalPosition() { + var point = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new core.Point(); + var skipUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (this.parent) { + this.parent.toGlobal(this.position, point, skipUpdate); + } else { + point.x = this.position.x; + point.y = this.position.y; + } + + return point; +}; + +},{"../core":65}],141:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.BitmapText = exports.TilingSpriteRenderer = exports.TilingSprite = exports.TextureTransform = exports.AnimatedSprite = undefined; + +var _AnimatedSprite = require('./AnimatedSprite'); + +Object.defineProperty(exports, 'AnimatedSprite', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_AnimatedSprite).default; + } +}); + +var _TextureTransform = require('./TextureTransform'); + +Object.defineProperty(exports, 'TextureTransform', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TextureTransform).default; + } +}); + +var _TilingSprite = require('./TilingSprite'); + +Object.defineProperty(exports, 'TilingSprite', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TilingSprite).default; + } +}); + +var _TilingSpriteRenderer = require('./webgl/TilingSpriteRenderer'); + +Object.defineProperty(exports, 'TilingSpriteRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TilingSpriteRenderer).default; + } +}); + +var _BitmapText = require('./BitmapText'); + +Object.defineProperty(exports, 'BitmapText', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BitmapText).default; + } +}); + +require('./cacheAsBitmap'); + +require('./getChildByName'); + +require('./getGlobalPosition'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// imported for side effect of extending the prototype only, contains no exports + +},{"./AnimatedSprite":134,"./BitmapText":135,"./TextureTransform":136,"./TilingSprite":137,"./cacheAsBitmap":138,"./getChildByName":139,"./getGlobalPosition":140,"./webgl/TilingSpriteRenderer":142}],142:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _const = require('../../core/const'); + +var _path = require('path'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var tempMat = new core.Matrix(); + +/** + * WebGL renderer plugin for tiling sprites + * + * @class + * @memberof PIXI.extras + * @extends PIXI.ObjectRenderer + */ + +var TilingSpriteRenderer = function (_core$ObjectRenderer) { + _inherits(TilingSpriteRenderer, _core$ObjectRenderer); + + /** + * constructor for renderer + * + * @param {WebGLRenderer} renderer The renderer this tiling awesomeness works for. + */ + function TilingSpriteRenderer(renderer) { + _classCallCheck(this, TilingSpriteRenderer); + + var _this = _possibleConstructorReturn(this, _core$ObjectRenderer.call(this, renderer)); + + _this.shader = null; + _this.simpleShader = null; + _this.quad = null; + return _this; + } + + /** + * Sets up the renderer context and necessary buffers. + * + * @private + */ + + + TilingSpriteRenderer.prototype.onContextChange = function onContextChange() { + var gl = this.renderer.gl; + + this.shader = new core.Shader(gl, 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTransform;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n', 'varying vec2 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\nuniform vec4 uColor;\r\nuniform mat3 uMapCoord;\r\nuniform vec4 uClampFrame;\r\nuniform vec2 uClampOffset;\r\n\r\nvoid main(void)\r\n{\r\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\r\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\r\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\r\n\r\n vec4 sample = texture2D(uSampler, coord);\r\n gl_FragColor = sample * uColor;\r\n}\r\n'); + this.simpleShader = new core.Shader(gl, 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTransform;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n', 'varying vec2 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\nuniform vec4 uColor;\r\n\r\nvoid main(void)\r\n{\r\n vec4 sample = texture2D(uSampler, vTextureCoord);\r\n gl_FragColor = sample * uColor;\r\n}\r\n'); + + this.renderer.bindVao(null); + this.quad = new core.Quad(gl, this.renderer.state.attribState); + this.quad.initVao(this.shader); + }; + + /** + * + * @param {PIXI.extras.TilingSprite} ts tilingSprite to be rendered + */ + + + TilingSpriteRenderer.prototype.render = function render(ts) { + var renderer = this.renderer; + var quad = this.quad; + + renderer.bindVao(quad.vao); + + var vertices = quad.vertices; + + vertices[0] = vertices[6] = ts._width * -ts.anchor.x; + vertices[1] = vertices[3] = ts._height * -ts.anchor.y; + + vertices[2] = vertices[4] = ts._width * (1.0 - ts.anchor.x); + vertices[5] = vertices[7] = ts._height * (1.0 - ts.anchor.y); + + if (ts.uvRespectAnchor) { + vertices = quad.uvs; + + vertices[0] = vertices[6] = -ts.anchor.x; + vertices[1] = vertices[3] = -ts.anchor.y; + + vertices[2] = vertices[4] = 1.0 - ts.anchor.x; + vertices[5] = vertices[7] = 1.0 - ts.anchor.y; + } + + quad.upload(); + + var tex = ts._texture; + var baseTex = tex.baseTexture; + var lt = ts.tileTransform.localTransform; + var uv = ts.uvTransform; + var isSimple = baseTex.isPowerOfTwo && tex.frame.width === baseTex.width && tex.frame.height === baseTex.height; + + // auto, force repeat wrapMode for big tiling textures + if (isSimple) { + if (!baseTex._glTextures[renderer.CONTEXT_UID]) { + if (baseTex.wrapMode === _const.WRAP_MODES.CLAMP) { + baseTex.wrapMode = _const.WRAP_MODES.REPEAT; + } + } else { + isSimple = baseTex.wrapMode !== _const.WRAP_MODES.CLAMP; + } + } + + var shader = isSimple ? this.simpleShader : this.shader; + + renderer.bindShader(shader); + + var w = tex.width; + var h = tex.height; + var W = ts._width; + var H = ts._height; + + tempMat.set(lt.a * w / W, lt.b * w / H, lt.c * h / W, lt.d * h / H, lt.tx / W, lt.ty / H); + + // that part is the same as above: + // tempMat.identity(); + // tempMat.scale(tex.width, tex.height); + // tempMat.prepend(lt); + // tempMat.scale(1.0 / ts._width, 1.0 / ts._height); + + tempMat.invert(); + if (isSimple) { + tempMat.prepend(uv.mapCoord); + } else { + shader.uniforms.uMapCoord = uv.mapCoord.toArray(true); + shader.uniforms.uClampFrame = uv.uClampFrame; + shader.uniforms.uClampOffset = uv.uClampOffset; + } + + shader.uniforms.uTransform = tempMat.toArray(true); + shader.uniforms.uColor = core.utils.premultiplyTintToRgba(ts.tint, ts.worldAlpha, shader.uniforms.uColor, baseTex.premultipliedAlpha); + shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true); + + shader.uniforms.uSampler = renderer.bindTexture(tex); + + renderer.setBlendMode(core.utils.correctBlendMode(ts.blendMode, baseTex.premultipliedAlpha)); + + quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0); + }; + + return TilingSpriteRenderer; +}(core.ObjectRenderer); + +exports.default = TilingSpriteRenderer; + + +core.WebGLRenderer.registerPlugin('tilingSprite', TilingSpriteRenderer); + +},{"../../core":65,"../../core/const":46,"path":25}],143:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _BlurXFilter = require('./BlurXFilter'); + +var _BlurXFilter2 = _interopRequireDefault(_BlurXFilter); + +var _BlurYFilter = require('./BlurYFilter'); + +var _BlurYFilter2 = _interopRequireDefault(_BlurYFilter); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The BlurFilter applies a Gaussian blur to an object. + * The strength of the blur can be set for x- and y-axis separately. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var BlurFilter = function (_core$Filter) { + _inherits(BlurFilter, _core$Filter); + + /** + * @param {number} strength - The strength of the blur filter. + * @param {number} quality - The quality of the blur filter. + * @param {number} resolution - The resolution of the blur filter. + * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. + */ + function BlurFilter(strength, quality, resolution, kernelSize) { + _classCallCheck(this, BlurFilter); + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this)); + + _this.blurXFilter = new _BlurXFilter2.default(strength, quality, resolution, kernelSize); + _this.blurYFilter = new _BlurYFilter2.default(strength, quality, resolution, kernelSize); + + _this.padding = 0; + _this.resolution = resolution || core.settings.RESOLUTION; + _this.quality = quality || 4; + _this.blur = strength || 8; + return _this; + } + + /** + * Applies the filter. + * + * @param {PIXI.FilterManager} filterManager - The manager. + * @param {PIXI.RenderTarget} input - The input target. + * @param {PIXI.RenderTarget} output - The output target. + */ + + + BlurFilter.prototype.apply = function apply(filterManager, input, output) { + var renderTarget = filterManager.getRenderTarget(true); + + this.blurXFilter.apply(filterManager, input, renderTarget, true); + this.blurYFilter.apply(filterManager, renderTarget, output, false); + + filterManager.returnRenderTarget(renderTarget); + }; + + /** + * Sets the strength of both the blurX and blurY properties simultaneously + * + * @member {number} + * @default 2 + */ + + + _createClass(BlurFilter, [{ + key: 'blur', + get: function get() { + return this.blurXFilter.blur; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.blurXFilter.blur = this.blurYFilter.blur = value; + this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2; + } + + /** + * Sets the number of passes for blur. More passes means higher quaility bluring. + * + * @member {number} + * @default 1 + */ + + }, { + key: 'quality', + get: function get() { + return this.blurXFilter.quality; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.blurXFilter.quality = this.blurYFilter.quality = value; + } + + /** + * Sets the strength of the blurX property + * + * @member {number} + * @default 2 + */ + + }, { + key: 'blurX', + get: function get() { + return this.blurXFilter.blur; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.blurXFilter.blur = value; + this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2; + } + + /** + * Sets the strength of the blurY property + * + * @member {number} + * @default 2 + */ + + }, { + key: 'blurY', + get: function get() { + return this.blurYFilter.blur; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.blurYFilter.blur = value; + this.padding = Math.max(Math.abs(this.blurXFilter.strength), Math.abs(this.blurYFilter.strength)) * 2; + } + + /** + * Sets the blendmode of the filter + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + */ + + }, { + key: 'blendMode', + get: function get() { + return this.blurYFilter._blendMode; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.blurYFilter._blendMode = value; + } + }]); + + return BlurFilter; +}(core.Filter); + +exports.default = BlurFilter; + +},{"../../core":65,"./BlurXFilter":144,"./BlurYFilter":145}],144:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _generateBlurVertSource = require('./generateBlurVertSource'); + +var _generateBlurVertSource2 = _interopRequireDefault(_generateBlurVertSource); + +var _generateBlurFragSource = require('./generateBlurFragSource'); + +var _generateBlurFragSource2 = _interopRequireDefault(_generateBlurFragSource); + +var _getMaxBlurKernelSize = require('./getMaxBlurKernelSize'); + +var _getMaxBlurKernelSize2 = _interopRequireDefault(_getMaxBlurKernelSize); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The BlurXFilter applies a horizontal Gaussian blur to an object. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var BlurXFilter = function (_core$Filter) { + _inherits(BlurXFilter, _core$Filter); + + /** + * @param {number} strength - The strength of the blur filter. + * @param {number} quality - The quality of the blur filter. + * @param {number} resolution - The resolution of the blur filter. + * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. + */ + function BlurXFilter(strength, quality, resolution, kernelSize) { + _classCallCheck(this, BlurXFilter); + + kernelSize = kernelSize || 5; + var vertSrc = (0, _generateBlurVertSource2.default)(kernelSize, true); + var fragSrc = (0, _generateBlurFragSource2.default)(kernelSize); + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + vertSrc, + // fragment shader + fragSrc)); + + _this.resolution = resolution || core.settings.RESOLUTION; + + _this._quality = 0; + + _this.quality = quality || 4; + _this.strength = strength || 8; + + _this.firstRun = true; + return _this; + } + + /** + * Applies the filter. + * + * @param {PIXI.FilterManager} filterManager - The manager. + * @param {PIXI.RenderTarget} input - The input target. + * @param {PIXI.RenderTarget} output - The output target. + * @param {boolean} clear - Should the output be cleared before rendering? + */ + + + BlurXFilter.prototype.apply = function apply(filterManager, input, output, clear) { + if (this.firstRun) { + var gl = filterManager.renderer.gl; + var kernelSize = (0, _getMaxBlurKernelSize2.default)(gl); + + this.vertexSrc = (0, _generateBlurVertSource2.default)(kernelSize, true); + this.fragmentSrc = (0, _generateBlurFragSource2.default)(kernelSize); + + this.firstRun = false; + } + + this.uniforms.strength = 1 / output.size.width * (output.size.width / input.size.width); + + // screen space! + this.uniforms.strength *= this.strength; + this.uniforms.strength /= this.passes; // / this.passes//Math.pow(1, this.passes); + + if (this.passes === 1) { + filterManager.applyFilter(this, input, output, clear); + } else { + var renderTarget = filterManager.getRenderTarget(true); + var flip = input; + var flop = renderTarget; + + for (var i = 0; i < this.passes - 1; i++) { + filterManager.applyFilter(this, flip, flop, true); + + var temp = flop; + + flop = flip; + flip = temp; + } + + filterManager.applyFilter(this, flip, output, clear); + + filterManager.returnRenderTarget(renderTarget); + } + }; + + /** + * Sets the strength of both the blur. + * + * @member {number} + * @default 16 + */ + + + _createClass(BlurXFilter, [{ + key: 'blur', + get: function get() { + return this.strength; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.padding = Math.abs(value) * 2; + this.strength = value; + } + + /** + * Sets the quality of the blur by modifying the number of passes. More passes means higher + * quaility bluring but the lower the performance. + * + * @member {number} + * @default 4 + */ + + }, { + key: 'quality', + get: function get() { + return this._quality; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._quality = value; + this.passes = value; + } + }]); + + return BlurXFilter; +}(core.Filter); + +exports.default = BlurXFilter; + +},{"../../core":65,"./generateBlurFragSource":146,"./generateBlurVertSource":147,"./getMaxBlurKernelSize":148}],145:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _generateBlurVertSource = require('./generateBlurVertSource'); + +var _generateBlurVertSource2 = _interopRequireDefault(_generateBlurVertSource); + +var _generateBlurFragSource = require('./generateBlurFragSource'); + +var _generateBlurFragSource2 = _interopRequireDefault(_generateBlurFragSource); + +var _getMaxBlurKernelSize = require('./getMaxBlurKernelSize'); + +var _getMaxBlurKernelSize2 = _interopRequireDefault(_getMaxBlurKernelSize); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The BlurYFilter applies a horizontal Gaussian blur to an object. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var BlurYFilter = function (_core$Filter) { + _inherits(BlurYFilter, _core$Filter); + + /** + * @param {number} strength - The strength of the blur filter. + * @param {number} quality - The quality of the blur filter. + * @param {number} resolution - The resolution of the blur filter. + * @param {number} [kernelSize=5] - The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15. + */ + function BlurYFilter(strength, quality, resolution, kernelSize) { + _classCallCheck(this, BlurYFilter); + + kernelSize = kernelSize || 5; + var vertSrc = (0, _generateBlurVertSource2.default)(kernelSize, false); + var fragSrc = (0, _generateBlurFragSource2.default)(kernelSize); + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + vertSrc, + // fragment shader + fragSrc)); + + _this.resolution = resolution || core.settings.RESOLUTION; + + _this._quality = 0; + + _this.quality = quality || 4; + _this.strength = strength || 8; + + _this.firstRun = true; + return _this; + } + + /** + * Applies the filter. + * + * @param {PIXI.FilterManager} filterManager - The manager. + * @param {PIXI.RenderTarget} input - The input target. + * @param {PIXI.RenderTarget} output - The output target. + * @param {boolean} clear - Should the output be cleared before rendering? + */ + + + BlurYFilter.prototype.apply = function apply(filterManager, input, output, clear) { + if (this.firstRun) { + var gl = filterManager.renderer.gl; + var kernelSize = (0, _getMaxBlurKernelSize2.default)(gl); + + this.vertexSrc = (0, _generateBlurVertSource2.default)(kernelSize, false); + this.fragmentSrc = (0, _generateBlurFragSource2.default)(kernelSize); + + this.firstRun = false; + } + + this.uniforms.strength = 1 / output.size.height * (output.size.height / input.size.height); + + this.uniforms.strength *= this.strength; + this.uniforms.strength /= this.passes; + + if (this.passes === 1) { + filterManager.applyFilter(this, input, output, clear); + } else { + var renderTarget = filterManager.getRenderTarget(true); + var flip = input; + var flop = renderTarget; + + for (var i = 0; i < this.passes - 1; i++) { + filterManager.applyFilter(this, flip, flop, true); + + var temp = flop; + + flop = flip; + flip = temp; + } + + filterManager.applyFilter(this, flip, output, clear); + + filterManager.returnRenderTarget(renderTarget); + } + }; + + /** + * Sets the strength of both the blur. + * + * @member {number} + * @default 2 + */ + + + _createClass(BlurYFilter, [{ + key: 'blur', + get: function get() { + return this.strength; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.padding = Math.abs(value) * 2; + this.strength = value; + } + + /** + * Sets the quality of the blur by modifying the number of passes. More passes means higher + * quaility bluring but the lower the performance. + * + * @member {number} + * @default 4 + */ + + }, { + key: 'quality', + get: function get() { + return this._quality; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._quality = value; + this.passes = value; + } + }]); + + return BlurYFilter; +}(core.Filter); + +exports.default = BlurYFilter; + +},{"../../core":65,"./generateBlurFragSource":146,"./generateBlurVertSource":147,"./getMaxBlurKernelSize":148}],146:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = generateFragBlurSource; +var GAUSSIAN_VALUES = { + 5: [0.153388, 0.221461, 0.250301], + 7: [0.071303, 0.131514, 0.189879, 0.214607], + 9: [0.028532, 0.067234, 0.124009, 0.179044, 0.20236], + 11: [0.0093, 0.028002, 0.065984, 0.121703, 0.175713, 0.198596], + 13: [0.002406, 0.009255, 0.027867, 0.065666, 0.121117, 0.174868, 0.197641], + 15: [0.000489, 0.002403, 0.009246, 0.02784, 0.065602, 0.120999, 0.174697, 0.197448] +}; + +var fragTemplate = ['varying vec2 vBlurTexCoords[%size%];', 'uniform sampler2D uSampler;', 'void main(void)', '{', ' gl_FragColor = vec4(0.0);', ' %blur%', '}'].join('\n'); + +function generateFragBlurSource(kernelSize) { + var kernel = GAUSSIAN_VALUES[kernelSize]; + var halfLength = kernel.length; + + var fragSource = fragTemplate; + + var blurLoop = ''; + var template = 'gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;'; + var value = void 0; + + for (var i = 0; i < kernelSize; i++) { + var blur = template.replace('%index%', i); + + value = i; + + if (i >= halfLength) { + value = kernelSize - i - 1; + } + + blur = blur.replace('%value%', kernel[value]); + + blurLoop += blur; + blurLoop += '\n'; + } + + fragSource = fragSource.replace('%blur%', blurLoop); + fragSource = fragSource.replace('%size%', kernelSize); + + return fragSource; +} + +},{}],147:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.default = generateVertBlurSource; +var vertTemplate = ['attribute vec2 aVertexPosition;', 'attribute vec2 aTextureCoord;', 'uniform float strength;', 'uniform mat3 projectionMatrix;', 'varying vec2 vBlurTexCoords[%size%];', 'void main(void)', '{', 'gl_Position = vec4((projectionMatrix * vec3((aVertexPosition), 1.0)).xy, 0.0, 1.0);', '%blur%', '}'].join('\n'); + +function generateVertBlurSource(kernelSize, x) { + var halfLength = Math.ceil(kernelSize / 2); + + var vertSource = vertTemplate; + + var blurLoop = ''; + var template = void 0; + // let value; + + if (x) { + template = 'vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);'; + } else { + template = 'vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);'; + } + + for (var i = 0; i < kernelSize; i++) { + var blur = template.replace('%index%', i); + + // value = i; + + // if(i >= halfLength) + // { + // value = kernelSize - i - 1; + // } + + blur = blur.replace('%sampleIndex%', i - (halfLength - 1) + '.0'); + + blurLoop += blur; + blurLoop += '\n'; + } + + vertSource = vertSource.replace('%blur%', blurLoop); + vertSource = vertSource.replace('%size%', kernelSize); + + return vertSource; +} + +},{}],148:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; +exports.default = getMaxKernelSize; +function getMaxKernelSize(gl) { + var maxVaryings = gl.getParameter(gl.MAX_VARYING_VECTORS); + var kernelSize = 15; + + while (kernelSize > maxVaryings) { + kernelSize -= 2; + } + + return kernelSize; +} + +},{}],149:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _path = require('path'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The ColorMatrixFilter class lets you apply a 5x4 matrix transformation on the RGBA + * color and alpha values of every pixel on your displayObject to produce a result + * with a new set of RGBA color and alpha values. It's pretty powerful! + * + * ```js + * let colorMatrix = new PIXI.ColorMatrixFilter(); + * container.filters = [colorMatrix]; + * colorMatrix.contrast(2); + * ``` + * @author Clément Chenebault + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var ColorMatrixFilter = function (_core$Filter) { + _inherits(ColorMatrixFilter, _core$Filter); + + /** + * + */ + function ColorMatrixFilter() { + _classCallCheck(this, ColorMatrixFilter); + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n vTextureCoord = aTextureCoord;\r\n}', + // fragment shader + 'varying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\nuniform float m[20];\r\nuniform float uAlpha;\r\n\r\nvoid main(void)\r\n{\r\n vec4 c = texture2D(uSampler, vTextureCoord);\r\n\r\n if (uAlpha == 0.0) {\r\n gl_FragColor = c;\r\n return;\r\n }\r\n\r\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\r\n if (c.a > 0.0) {\r\n c.rgb /= c.a;\r\n }\r\n\r\n vec4 result;\r\n\r\n result.r = (m[0] * c.r);\r\n result.r += (m[1] * c.g);\r\n result.r += (m[2] * c.b);\r\n result.r += (m[3] * c.a);\r\n result.r += m[4];\r\n\r\n result.g = (m[5] * c.r);\r\n result.g += (m[6] * c.g);\r\n result.g += (m[7] * c.b);\r\n result.g += (m[8] * c.a);\r\n result.g += m[9];\r\n\r\n result.b = (m[10] * c.r);\r\n result.b += (m[11] * c.g);\r\n result.b += (m[12] * c.b);\r\n result.b += (m[13] * c.a);\r\n result.b += m[14];\r\n\r\n result.a = (m[15] * c.r);\r\n result.a += (m[16] * c.g);\r\n result.a += (m[17] * c.b);\r\n result.a += (m[18] * c.a);\r\n result.a += m[19];\r\n\r\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\r\n\r\n // Premultiply alpha again.\r\n rgb *= result.a;\r\n\r\n gl_FragColor = vec4(rgb, result.a);\r\n}\r\n')); + + _this.uniforms.m = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; + + _this.alpha = 1; + return _this; + } + + /** + * Transforms current matrix and set the new one + * + * @param {number[]} matrix - 5x4 matrix + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype._loadMatrix = function _loadMatrix(matrix) { + var multiply = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var newMatrix = matrix; + + if (multiply) { + this._multiply(newMatrix, this.uniforms.m, matrix); + newMatrix = this._colorMatrix(newMatrix); + } + + // set the new matrix + this.uniforms.m = newMatrix; + }; + + /** + * Multiplies two mat5's + * + * @private + * @param {number[]} out - 5x4 matrix the receiving matrix + * @param {number[]} a - 5x4 matrix the first operand + * @param {number[]} b - 5x4 matrix the second operand + * @returns {number[]} 5x4 matrix + */ + + + ColorMatrixFilter.prototype._multiply = function _multiply(out, a, b) { + // Red Channel + out[0] = a[0] * b[0] + a[1] * b[5] + a[2] * b[10] + a[3] * b[15]; + out[1] = a[0] * b[1] + a[1] * b[6] + a[2] * b[11] + a[3] * b[16]; + out[2] = a[0] * b[2] + a[1] * b[7] + a[2] * b[12] + a[3] * b[17]; + out[3] = a[0] * b[3] + a[1] * b[8] + a[2] * b[13] + a[3] * b[18]; + out[4] = a[0] * b[4] + a[1] * b[9] + a[2] * b[14] + a[3] * b[19] + a[4]; + + // Green Channel + out[5] = a[5] * b[0] + a[6] * b[5] + a[7] * b[10] + a[8] * b[15]; + out[6] = a[5] * b[1] + a[6] * b[6] + a[7] * b[11] + a[8] * b[16]; + out[7] = a[5] * b[2] + a[6] * b[7] + a[7] * b[12] + a[8] * b[17]; + out[8] = a[5] * b[3] + a[6] * b[8] + a[7] * b[13] + a[8] * b[18]; + out[9] = a[5] * b[4] + a[6] * b[9] + a[7] * b[14] + a[8] * b[19] + a[9]; + + // Blue Channel + out[10] = a[10] * b[0] + a[11] * b[5] + a[12] * b[10] + a[13] * b[15]; + out[11] = a[10] * b[1] + a[11] * b[6] + a[12] * b[11] + a[13] * b[16]; + out[12] = a[10] * b[2] + a[11] * b[7] + a[12] * b[12] + a[13] * b[17]; + out[13] = a[10] * b[3] + a[11] * b[8] + a[12] * b[13] + a[13] * b[18]; + out[14] = a[10] * b[4] + a[11] * b[9] + a[12] * b[14] + a[13] * b[19] + a[14]; + + // Alpha Channel + out[15] = a[15] * b[0] + a[16] * b[5] + a[17] * b[10] + a[18] * b[15]; + out[16] = a[15] * b[1] + a[16] * b[6] + a[17] * b[11] + a[18] * b[16]; + out[17] = a[15] * b[2] + a[16] * b[7] + a[17] * b[12] + a[18] * b[17]; + out[18] = a[15] * b[3] + a[16] * b[8] + a[17] * b[13] + a[18] * b[18]; + out[19] = a[15] * b[4] + a[16] * b[9] + a[17] * b[14] + a[18] * b[19] + a[19]; + + return out; + }; + + /** + * Create a Float32 Array and normalize the offset component to 0-1 + * + * @private + * @param {number[]} matrix - 5x4 matrix + * @return {number[]} 5x4 matrix with all values between 0-1 + */ + + + ColorMatrixFilter.prototype._colorMatrix = function _colorMatrix(matrix) { + // Create a Float32 Array and normalize the offset component to 0-1 + var m = new Float32Array(matrix); + + m[4] /= 255; + m[9] /= 255; + m[14] /= 255; + m[19] /= 255; + + return m; + }; + + /** + * Adjusts brightness + * + * @param {number} b - value of the brigthness (0-1, where 0 is black) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.brightness = function brightness(b, multiply) { + var matrix = [b, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, b, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the matrices in grey scales + * + * @param {number} scale - value of the grey (0-1, where 0 is black) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.greyscale = function greyscale(scale, multiply) { + var matrix = [scale, scale, scale, 0, 0, scale, scale, scale, 0, 0, scale, scale, scale, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the black and white matrice. + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.blackAndWhite = function blackAndWhite(multiply) { + var matrix = [0.3, 0.6, 0.1, 0, 0, 0.3, 0.6, 0.1, 0, 0, 0.3, 0.6, 0.1, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the hue property of the color + * + * @param {number} rotation - in degrees + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.hue = function hue(rotation, multiply) { + rotation = (rotation || 0) / 180 * Math.PI; + + var cosR = Math.cos(rotation); + var sinR = Math.sin(rotation); + var sqrt = Math.sqrt; + + /* a good approximation for hue rotation + This matrix is far better than the versions with magic luminance constants + formerly used here, but also used in the starling framework (flash) and known from this + old part of the internet: quasimondo.com/archives/000565.php + This new matrix is based on rgb cube rotation in space. Look here for a more descriptive + implementation as a shader not a general matrix: + https://github.com/evanw/glfx.js/blob/58841c23919bd59787effc0333a4897b43835412/src/filters/adjust/huesaturation.js + This is the source for the code: + see http://stackoverflow.com/questions/8507885/shift-hue-of-an-rgb-color/8510751#8510751 + */ + + var w = 1 / 3; + var sqrW = sqrt(w); // weight is + + var a00 = cosR + (1.0 - cosR) * w; + var a01 = w * (1.0 - cosR) - sqrW * sinR; + var a02 = w * (1.0 - cosR) + sqrW * sinR; + + var a10 = w * (1.0 - cosR) + sqrW * sinR; + var a11 = cosR + w * (1.0 - cosR); + var a12 = w * (1.0 - cosR) - sqrW * sinR; + + var a20 = w * (1.0 - cosR) - sqrW * sinR; + var a21 = w * (1.0 - cosR) + sqrW * sinR; + var a22 = cosR + w * (1.0 - cosR); + + var matrix = [a00, a01, a02, 0, 0, a10, a11, a12, 0, 0, a20, a21, a22, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the contrast matrix, increase the separation between dark and bright + * Increase contrast : shadows darker and highlights brighter + * Decrease contrast : bring the shadows up and the highlights down + * + * @param {number} amount - value of the contrast (0-1) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.contrast = function contrast(amount, multiply) { + var v = (amount || 0) + 1; + var o = -0.5 * (v - 1); + + var matrix = [v, 0, 0, 0, o, 0, v, 0, 0, o, 0, 0, v, 0, o, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Set the saturation matrix, increase the separation between colors + * Increase saturation : increase contrast, brightness, and sharpness + * + * @param {number} amount - The saturation amount (0-1) + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.saturate = function saturate() { + var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var multiply = arguments[1]; + + var x = amount * 2 / 3 + 1; + var y = (x - 1) * -0.5; + + var matrix = [x, y, y, 0, 0, y, x, y, 0, 0, y, y, x, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Desaturate image (remove color) + * + * Call the saturate function + * + */ + + + ColorMatrixFilter.prototype.desaturate = function desaturate() // eslint-disable-line no-unused-vars + { + this.saturate(-1); + }; + + /** + * Negative image (inverse of classic rgb matrix) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.negative = function negative(multiply) { + var matrix = [0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Sepia image + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.sepia = function sepia(multiply) { + var matrix = [0.393, 0.7689999, 0.18899999, 0, 0, 0.349, 0.6859999, 0.16799999, 0, 0, 0.272, 0.5339999, 0.13099999, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Color motion picture process invented in 1916 (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.technicolor = function technicolor(multiply) { + var matrix = [1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337, -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398, -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Polaroid filter + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.polaroid = function polaroid(multiply) { + var matrix = [1.438, -0.062, -0.062, 0, 0, -0.122, 1.378, -0.122, 0, 0, -0.016, -0.016, 1.483, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Filter who transforms : Red -> Blue and Blue -> Red + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.toBGR = function toBGR(multiply) { + var matrix = [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.kodachrome = function kodachrome(multiply) { + var matrix = [1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502, -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203, -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Brown delicious browni filter (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.browni = function browni(multiply) { + var matrix = [0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873, -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127, 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Vintage filter (thanks Dominic Szablewski) + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.vintage = function vintage(multiply) { + var matrix = [0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123, 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591, 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * We don't know exactly what it does, kind of gradient map, but funny to play with! + * + * @param {number} desaturation - Tone values. + * @param {number} toned - Tone values. + * @param {string} lightColor - Tone values, example: `0xFFE580` + * @param {string} darkColor - Tone values, example: `0xFFE580` + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.colorTone = function colorTone(desaturation, toned, lightColor, darkColor, multiply) { + desaturation = desaturation || 0.2; + toned = toned || 0.15; + lightColor = lightColor || 0xFFE580; + darkColor = darkColor || 0x338000; + + var lR = (lightColor >> 16 & 0xFF) / 255; + var lG = (lightColor >> 8 & 0xFF) / 255; + var lB = (lightColor & 0xFF) / 255; + + var dR = (darkColor >> 16 & 0xFF) / 255; + var dG = (darkColor >> 8 & 0xFF) / 255; + var dB = (darkColor & 0xFF) / 255; + + var matrix = [0.3, 0.59, 0.11, 0, 0, lR, lG, lB, desaturation, 0, dR, dG, dB, toned, 0, lR - dR, lG - dG, lB - dB, 0, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Night effect + * + * @param {number} intensity - The intensity of the night effect. + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.night = function night(intensity, multiply) { + intensity = intensity || 0.1; + var matrix = [intensity * -2.0, -intensity, 0, 0, 0, -intensity, 0, intensity, 0, 0, 0, intensity, intensity * 2.0, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Predator effect + * + * Erase the current matrix by setting a new indepent one + * + * @param {number} amount - how much the predator feels his future victim + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.predator = function predator(amount, multiply) { + var matrix = [ + // row 1 + 11.224130630493164 * amount, -4.794486999511719 * amount, -2.8746118545532227 * amount, 0 * amount, 0.40342438220977783 * amount, + // row 2 + -3.6330697536468506 * amount, 9.193157196044922 * amount, -2.951810836791992 * amount, 0 * amount, -1.316135048866272 * amount, + // row 3 + -3.2184197902679443 * amount, -4.2375030517578125 * amount, 7.476448059082031 * amount, 0 * amount, 0.8044459223747253 * amount, + // row 4 + 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * LSD effect + * + * Multiply the current matrix + * + * @param {boolean} multiply - if true, current matrix and matrix are multiplied. If false, + * just set the current matrix with @param matrix + */ + + + ColorMatrixFilter.prototype.lsd = function lsd(multiply) { + var matrix = [2, -0.4, 0.5, 0, 0, -0.5, 2, -0.4, 0, 0, -0.4, -0.5, 3, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, multiply); + }; + + /** + * Erase the current matrix by setting the default one + * + */ + + + ColorMatrixFilter.prototype.reset = function reset() { + var matrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; + + this._loadMatrix(matrix, false); + }; + + /** + * The matrix of the color matrix filter + * + * @member {number[]} + * @default [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0] + */ + + + _createClass(ColorMatrixFilter, [{ + key: 'matrix', + get: function get() { + return this.uniforms.m; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.uniforms.m = value; + } + + /** + * The opacity value to use when mixing the original and resultant colors. + * + * When the value is 0, the original color is used without modification. + * When the value is 1, the result color is used. + * When in the range (0, 1) the color is interpolated between the original and result by this amount. + * + * @member {number} + * @default 1 + */ + + }, { + key: 'alpha', + get: function get() { + return this.uniforms.uAlpha; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.uniforms.uAlpha = value; + } + }]); + + return ColorMatrixFilter; +}(core.Filter); + +// Americanized alias + + +exports.default = ColorMatrixFilter; +ColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale; + +},{"../../core":65,"path":25}],150:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _path = require('path'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The DisplacementFilter class uses the pixel values from the specified texture + * (called the displacement map) to perform a displacement of an object. You can + * use this filter to apply all manor of crazy warping effects. Currently the r + * property of the texture is used to offset the x and the g property of the texture + * is used to offset the y. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var DisplacementFilter = function (_core$Filter) { + _inherits(DisplacementFilter, _core$Filter); + + /** + * @param {PIXI.Sprite} sprite - The sprite used for the displacement map. (make sure its added to the scene!) + * @param {number} scale - The scale of the displacement + */ + function DisplacementFilter(sprite, scale) { + _classCallCheck(this, DisplacementFilter); + + var maskMatrix = new core.Matrix(); + + sprite.renderable = false; + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 filterMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\nvarying vec2 vFilterCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;\r\n vTextureCoord = aTextureCoord;\r\n}', + // fragment shader + 'varying vec2 vFilterCoord;\r\nvarying vec2 vTextureCoord;\r\n\r\nuniform vec2 scale;\r\n\r\nuniform sampler2D uSampler;\r\nuniform sampler2D mapSampler;\r\n\r\nuniform vec4 filterClamp;\r\n\r\nvoid main(void)\r\n{\r\n vec4 map = texture2D(mapSampler, vFilterCoord);\r\n\r\n map -= 0.5;\r\n map.xy *= scale;\r\n\r\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), filterClamp.xy, filterClamp.zw));\r\n}\r\n')); + + _this.maskSprite = sprite; + _this.maskMatrix = maskMatrix; + + _this.uniforms.mapSampler = sprite._texture; + _this.uniforms.filterMatrix = maskMatrix; + _this.uniforms.scale = { x: 1, y: 1 }; + + if (scale === null || scale === undefined) { + scale = 20; + } + + _this.scale = new core.Point(scale, scale); + return _this; + } + + /** + * Applies the filter. + * + * @param {PIXI.FilterManager} filterManager - The manager. + * @param {PIXI.RenderTarget} input - The input target. + * @param {PIXI.RenderTarget} output - The output target. + */ + + + DisplacementFilter.prototype.apply = function apply(filterManager, input, output) { + var ratio = 1 / output.destinationFrame.width * (output.size.width / input.size.width); + + this.uniforms.filterMatrix = filterManager.calculateSpriteMatrix(this.maskMatrix, this.maskSprite); + this.uniforms.scale.x = this.scale.x * ratio; + this.uniforms.scale.y = this.scale.y * ratio; + + // draw the filter... + filterManager.applyFilter(this, input, output); + }; + + /** + * The texture used for the displacement map. Must be power of 2 sized texture. + * + * @member {PIXI.Texture} + */ + + + _createClass(DisplacementFilter, [{ + key: 'map', + get: function get() { + return this.uniforms.mapSampler; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.uniforms.mapSampler = value; + } + }]); + + return DisplacementFilter; +}(core.Filter); + +exports.default = DisplacementFilter; + +},{"../../core":65,"path":25}],151:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _path = require('path'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * + * Basic FXAA implementation based on the code on geeks3d.com with the + * modification that the texture2DLod stuff was removed since it's + * unsupported by WebGL. + * + * @see https://github.com/mitsuhiko/webgl-meincraft + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + * + */ +var FXAAFilter = function (_core$Filter) { + _inherits(FXAAFilter, _core$Filter); + + /** + * + */ + function FXAAFilter() { + _classCallCheck(this, FXAAFilter); + + // TODO - needs work + return _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + '\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\n\r\nvarying vec2 v_rgbNW;\r\nvarying vec2 v_rgbNE;\r\nvarying vec2 v_rgbSW;\r\nvarying vec2 v_rgbSE;\r\nvarying vec2 v_rgbM;\r\n\r\nuniform vec4 filterArea;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvec2 mapCoord( vec2 coord )\r\n{\r\n coord *= filterArea.xy;\r\n coord += filterArea.zw;\r\n\r\n return coord;\r\n}\r\n\r\nvec2 unmapCoord( vec2 coord )\r\n{\r\n coord -= filterArea.zw;\r\n coord /= filterArea.xy;\r\n\r\n return coord;\r\n}\r\n\r\nvoid texcoords(vec2 fragCoord, vec2 resolution,\r\n out vec2 v_rgbNW, out vec2 v_rgbNE,\r\n out vec2 v_rgbSW, out vec2 v_rgbSE,\r\n out vec2 v_rgbM) {\r\n vec2 inverseVP = 1.0 / resolution.xy;\r\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\r\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\r\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\r\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\r\n v_rgbM = vec2(fragCoord * inverseVP);\r\n}\r\n\r\nvoid main(void) {\r\n\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = aTextureCoord;\r\n\r\n vec2 fragCoord = vTextureCoord * filterArea.xy;\r\n\r\n texcoords(fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\r\n}', + // fragment shader + 'varying vec2 v_rgbNW;\r\nvarying vec2 v_rgbNE;\r\nvarying vec2 v_rgbSW;\r\nvarying vec2 v_rgbSE;\r\nvarying vec2 v_rgbM;\r\n\r\nvarying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\nuniform vec4 filterArea;\r\n\r\n/**\r\n Basic FXAA implementation based on the code on geeks3d.com with the\r\n modification that the texture2DLod stuff was removed since it\'s\r\n unsupported by WebGL.\r\n \r\n --\r\n \r\n From:\r\n https://github.com/mitsuhiko/webgl-meincraft\r\n \r\n Copyright (c) 2011 by Armin Ronacher.\r\n \r\n Some rights reserved.\r\n \r\n Redistribution and use in source and binary forms, with or without\r\n modification, are permitted provided that the following conditions are\r\n met:\r\n \r\n * Redistributions of source code must retain the above copyright\r\n notice, this list of conditions and the following disclaimer.\r\n \r\n * Redistributions in binary form must reproduce the above\r\n copyright notice, this list of conditions and the following\r\n disclaimer in the documentation and/or other materials provided\r\n with the distribution.\r\n \r\n * The names of the contributors may not be used to endorse or\r\n promote products derived from this software without specific\r\n prior written permission.\r\n \r\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n */\r\n\r\n#ifndef FXAA_REDUCE_MIN\r\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\r\n#endif\r\n#ifndef FXAA_REDUCE_MUL\r\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\r\n#endif\r\n#ifndef FXAA_SPAN_MAX\r\n#define FXAA_SPAN_MAX 8.0\r\n#endif\r\n\r\n//optimized version for mobile, where dependent\r\n//texture reads can be a bottleneck\r\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,\r\n vec2 v_rgbNW, vec2 v_rgbNE,\r\n vec2 v_rgbSW, vec2 v_rgbSE,\r\n vec2 v_rgbM) {\r\n vec4 color;\r\n mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);\r\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\r\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\r\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\r\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\r\n vec4 texColor = texture2D(tex, v_rgbM);\r\n vec3 rgbM = texColor.xyz;\r\n vec3 luma = vec3(0.299, 0.587, 0.114);\r\n float lumaNW = dot(rgbNW, luma);\r\n float lumaNE = dot(rgbNE, luma);\r\n float lumaSW = dot(rgbSW, luma);\r\n float lumaSE = dot(rgbSE, luma);\r\n float lumaM = dot(rgbM, luma);\r\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\r\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\r\n \r\n mediump vec2 dir;\r\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\r\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\r\n \r\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\r\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\r\n \r\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\r\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\r\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\r\n dir * rcpDirMin)) * inverseVP;\r\n \r\n vec3 rgbA = 0.5 * (\r\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\r\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\r\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\r\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\r\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\r\n \r\n float lumaB = dot(rgbB, luma);\r\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\r\n color = vec4(rgbA, texColor.a);\r\n else\r\n color = vec4(rgbB, texColor.a);\r\n return color;\r\n}\r\n\r\nvoid main() {\r\n\r\n vec2 fragCoord = vTextureCoord * filterArea.xy;\r\n\r\n vec4 color;\r\n\r\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\r\n\r\n gl_FragColor = color;\r\n}\r\n')); + } + + return FXAAFilter; +}(core.Filter); + +exports.default = FXAAFilter; + +},{"../../core":65,"path":25}],152:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _FXAAFilter = require('./fxaa/FXAAFilter'); + +Object.defineProperty(exports, 'FXAAFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_FXAAFilter).default; + } +}); + +var _NoiseFilter = require('./noise/NoiseFilter'); + +Object.defineProperty(exports, 'NoiseFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_NoiseFilter).default; + } +}); + +var _DisplacementFilter = require('./displacement/DisplacementFilter'); + +Object.defineProperty(exports, 'DisplacementFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_DisplacementFilter).default; + } +}); + +var _BlurFilter = require('./blur/BlurFilter'); + +Object.defineProperty(exports, 'BlurFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BlurFilter).default; + } +}); + +var _BlurXFilter = require('./blur/BlurXFilter'); + +Object.defineProperty(exports, 'BlurXFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BlurXFilter).default; + } +}); + +var _BlurYFilter = require('./blur/BlurYFilter'); + +Object.defineProperty(exports, 'BlurYFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BlurYFilter).default; + } +}); + +var _ColorMatrixFilter = require('./colormatrix/ColorMatrixFilter'); + +Object.defineProperty(exports, 'ColorMatrixFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_ColorMatrixFilter).default; + } +}); + +var _VoidFilter = require('./void/VoidFilter'); + +Object.defineProperty(exports, 'VoidFilter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_VoidFilter).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./blur/BlurFilter":143,"./blur/BlurXFilter":144,"./blur/BlurYFilter":145,"./colormatrix/ColorMatrixFilter":149,"./displacement/DisplacementFilter":150,"./fxaa/FXAAFilter":151,"./noise/NoiseFilter":153,"./void/VoidFilter":154}],153:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _path = require('path'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * @author Vico @vicocotea + * original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js + */ + +/** + * A Noise effect filter. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var NoiseFilter = function (_core$Filter) { + _inherits(NoiseFilter, _core$Filter); + + /** + * @param {number} noise - The noise intensity, should be a normalized value in the range [0, 1]. + * @param {number} seed - A random seed for the noise generation. Default is `Math.random()`. + */ + function NoiseFilter() { + var noise = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.5; + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Math.random(); + + _classCallCheck(this, NoiseFilter); + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n vTextureCoord = aTextureCoord;\r\n}', + // fragment shader + 'precision highp float;\r\n\r\nvarying vec2 vTextureCoord;\r\nvarying vec4 vColor;\r\n\r\nuniform float uNoise;\r\nuniform float uSeed;\r\nuniform sampler2D uSampler;\r\n\r\nfloat rand(vec2 co)\r\n{\r\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\r\n}\r\n\r\nvoid main()\r\n{\r\n vec4 color = texture2D(uSampler, vTextureCoord);\r\n float randomValue = rand(gl_FragCoord.xy * uSeed);\r\n float diff = (randomValue - 0.5) * uNoise;\r\n\r\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\r\n if (color.a > 0.0) {\r\n color.rgb /= color.a;\r\n }\r\n\r\n color.r += diff;\r\n color.g += diff;\r\n color.b += diff;\r\n\r\n // Premultiply alpha again.\r\n color.rgb *= color.a;\r\n\r\n gl_FragColor = color;\r\n}\r\n')); + + _this.noise = noise; + _this.seed = seed; + return _this; + } + + /** + * The amount of noise to apply, this value should be in the range (0, 1]. + * + * @member {number} + * @default 0.5 + */ + + + _createClass(NoiseFilter, [{ + key: 'noise', + get: function get() { + return this.uniforms.uNoise; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.uniforms.uNoise = value; + } + + /** + * A seed value to apply to the random noise generation. `Math.random()` is a good value to use. + * + * @member {number} + */ + + }, { + key: 'seed', + get: function get() { + return this.uniforms.uSeed; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.uniforms.uSeed = value; + } + }]); + + return NoiseFilter; +}(core.Filter); + +exports.default = NoiseFilter; + +},{"../../core":65,"path":25}],154:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _path = require('path'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * Does nothing. Very handy. + * + * @class + * @extends PIXI.Filter + * @memberof PIXI.filters + */ +var VoidFilter = function (_core$Filter) { + _inherits(VoidFilter, _core$Filter); + + /** + * + */ + function VoidFilter() { + _classCallCheck(this, VoidFilter); + + var _this = _possibleConstructorReturn(this, _core$Filter.call(this, + // vertex shader + 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n vTextureCoord = aTextureCoord;\r\n}', + // fragment shader + 'varying vec2 vTextureCoord;\r\n\r\nuniform sampler2D uSampler;\r\n\r\nvoid main(void)\r\n{\r\n gl_FragColor = texture2D(uSampler, vTextureCoord);\r\n}\r\n')); + + _this.glShaderKey = 'void'; + return _this; + } + + return VoidFilter; +}(core.Filter); + +exports.default = VoidFilter; + +},{"../../core":65,"path":25}],155:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Holds all information related to an Interaction event + * + * @class + * @memberof PIXI.interaction + */ +var InteractionData = function () { + /** + * + */ + function InteractionData() { + _classCallCheck(this, InteractionData); + + /** + * This point stores the global coords of where the touch/mouse event happened + * + * @member {PIXI.Point} + */ + this.global = new core.Point(); + + /** + * The target DisplayObject that was interacted with + * + * @member {PIXI.DisplayObject} + */ + this.target = null; + + /** + * When passed to an event handler, this will be the original DOM Event that was captured + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent + * @member {MouseEvent|TouchEvent|PointerEvent} + */ + this.originalEvent = null; + + /** + * Unique identifier for this interaction + * + * @member {number} + */ + this.identifier = null; + + /** + * Indicates whether or not the pointer device that created the event is the primary pointer. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary + * @type {Boolean} + */ + this.isPrimary = false; + + /** + * Indicates which button was pressed on the mouse or pointer device to trigger the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button + * @type {number} + */ + this.button = 0; + + /** + * Indicates which buttons are pressed on the mouse or pointer device when the event is triggered. + * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons + * @type {number} + */ + this.buttons = 0; + + /** + * The width of the pointer's contact along the x-axis, measured in CSS pixels. + * radiusX of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width + * @type {number} + */ + this.width = 0; + + /** + * The height of the pointer's contact along the y-axis, measured in CSS pixels. + * radiusY of TouchEvents will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height + * @type {number} + */ + this.height = 0; + + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX + * @type {number} + */ + this.tiltX = 0; + + /** + * The angle, in degrees, between the pointer device and the screen. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY + * @type {number} + */ + this.tiltY = 0; + + /** + * The type of pointer that triggered the event. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType + * @type {string} + */ + this.pointerType = null; + + /** + * Pressure applied by the pointing device during the event. A Touch's force property + * will be represented by this value. + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure + * @type {number} + */ + this.pressure = 0; + + /** + * From TouchEvents (not PointerEvents triggered by touches), the rotationAngle of the Touch. + * @see https://developer.mozilla.org/en-US/docs/Web/API/Touch/rotationAngle + * @type {number} + */ + this.rotationAngle = 0; + + /** + * Twist of a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + * @type {number} + */ + this.twist = 0; + + /** + * Barrel pressure on a stylus pointer. + * @see https://w3c.github.io/pointerevents/#pointerevent-interface + * @type {number} + */ + this.tangentialPressure = 0; + } + + /** + * The unique identifier of the pointer. It will be the same as `identifier`. + * @readonly + * @member {number} + * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId + */ + + + /** + * This will return the local coordinates of the specified displayObject for this InteractionData + * + * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local + * coords off + * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise + * will create a new point) + * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional + * (otherwise will use the current global coords) + * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative + * to the DisplayObject + */ + InteractionData.prototype.getLocalPosition = function getLocalPosition(displayObject, point, globalPos) { + return displayObject.worldTransform.applyInverse(globalPos || this.global, point); + }; + + /** + * Copies properties from normalized event data. + * + * @param {Touch|MouseEvent|PointerEvent} event The normalized event data + * @private + */ + + + InteractionData.prototype._copyEvent = function _copyEvent(event) { + // isPrimary should only change on touchstart/pointerdown, so we don't want to overwrite + // it with "false" on later events when our shim for it on touch events might not be + // accurate + if (event.isPrimary) { + this.isPrimary = true; + } + this.button = event.button; + this.buttons = event.buttons; + this.width = event.width; + this.height = event.height; + this.tiltX = event.tiltX; + this.tiltY = event.tiltY; + this.pointerType = event.pointerType; + this.pressure = event.pressure; + this.rotationAngle = event.rotationAngle; + this.twist = event.twist || 0; + this.tangentialPressure = event.tangentialPressure || 0; + }; + + /** + * Resets the data for pooling. + * + * @private + */ + + + InteractionData.prototype._reset = function _reset() { + // isPrimary is the only property that we really need to reset - everything else is + // guaranteed to be overwritten + this.isPrimary = false; + }; + + _createClass(InteractionData, [{ + key: 'pointerId', + get: function get() { + return this.identifier; + } + }]); + + return InteractionData; +}(); + +exports.default = InteractionData; + +},{"../core":65}],156:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Event class that mimics native DOM events. + * + * @class + * @memberof PIXI.interaction + */ +var InteractionEvent = function () { + /** + * + */ + function InteractionEvent() { + _classCallCheck(this, InteractionEvent); + + /** + * Whether this event will continue propagating in the tree + * + * @member {boolean} + */ + this.stopped = false; + + /** + * The object which caused this event to be dispatched. + * For listener callback see {@link PIXI.interaction.InteractionEvent.currentTarget}. + * + * @member {PIXI.DisplayObject} + */ + this.target = null; + + /** + * The object whose event listener’s callback is currently being invoked. + * + * @member {PIXI.DisplayObject} + */ + this.currentTarget = null; + + /** + * Type of the event + * + * @member {string} + */ + this.type = null; + + /** + * InteractionData related to this event + * + * @member {PIXI.interaction.InteractionData} + */ + this.data = null; + } + + /** + * Prevents event from reaching any objects other than the current object. + * + */ + + + InteractionEvent.prototype.stopPropagation = function stopPropagation() { + this.stopped = true; + }; + + /** + * Resets the event. + * + * @private + */ + + + InteractionEvent.prototype._reset = function _reset() { + this.stopped = false; + this.currentTarget = null; + this.target = null; + }; + + return InteractionEvent; +}(); + +exports.default = InteractionEvent; + +},{}],157:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _InteractionData = require('./InteractionData'); + +var _InteractionData2 = _interopRequireDefault(_InteractionData); + +var _InteractionEvent = require('./InteractionEvent'); + +var _InteractionEvent2 = _interopRequireDefault(_InteractionEvent); + +var _InteractionTrackingData = require('./InteractionTrackingData'); + +var _InteractionTrackingData2 = _interopRequireDefault(_InteractionTrackingData); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +var _interactiveTarget = require('./interactiveTarget'); + +var _interactiveTarget2 = _interopRequireDefault(_interactiveTarget); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +// Mix interactiveTarget into core.DisplayObject.prototype, after deprecation has been handled +core.utils.mixins.delayMixin(core.DisplayObject.prototype, _interactiveTarget2.default); + +var MOUSE_POINTER_ID = 'MOUSE'; + +// helpers for hitTest() - only used inside hitTest() +var hitTestEvent = { + target: null, + data: { + global: null + } +}; + +/** + * The interaction manager deals with mouse, touch and pointer events. Any DisplayObject can be interactive + * if its interactive parameter is set to true + * This manager also supports multitouch. + * + * An instance of this class is automatically created by default, and can be found at renderer.plugins.interaction + * + * @class + * @extends EventEmitter + * @memberof PIXI.interaction + */ + +var InteractionManager = function (_EventEmitter) { + _inherits(InteractionManager, _EventEmitter); + + /** + * @param {PIXI.CanvasRenderer|PIXI.WebGLRenderer} renderer - A reference to the current renderer + * @param {object} [options] - The options for the manager. + * @param {boolean} [options.autoPreventDefault=true] - Should the manager automatically prevent default browser actions. + * @param {number} [options.interactionFrequency=10] - Frequency increases the interaction events will be checked. + */ + function InteractionManager(renderer, options) { + _classCallCheck(this, InteractionManager); + + var _this = _possibleConstructorReturn(this, _EventEmitter.call(this)); + + options = options || {}; + + /** + * The renderer this interaction manager works for. + * + * @member {PIXI.SystemRenderer} + */ + _this.renderer = renderer; + + /** + * Should default browser actions automatically be prevented. + * Does not apply to pointer events for backwards compatibility + * preventDefault on pointer events stops mouse events from firing + * Thus, for every pointer event, there will always be either a mouse of touch event alongside it. + * + * @member {boolean} + * @default true + */ + _this.autoPreventDefault = options.autoPreventDefault !== undefined ? options.autoPreventDefault : true; + + /** + * Frequency in milliseconds that the mousemove, moveover & mouseout interaction events will be checked. + * + * @member {number} + * @default 10 + */ + _this.interactionFrequency = options.interactionFrequency || 10; + + /** + * The mouse data + * + * @member {PIXI.interaction.InteractionData} + */ + _this.mouse = new _InteractionData2.default(); + _this.mouse.identifier = MOUSE_POINTER_ID; + + // setting the mouse to start off far off screen will mean that mouse over does + // not get called before we even move the mouse. + _this.mouse.global.set(-999999); + + /** + * Actively tracked InteractionData + * + * @private + * @member {Object.} + */ + _this.activeInteractionData = {}; + _this.activeInteractionData[MOUSE_POINTER_ID] = _this.mouse; + + /** + * Pool of unused InteractionData + * + * @private + * @member {PIXI.interation.InteractionData[]} + */ + _this.interactionDataPool = []; + + /** + * An event data object to handle all the event tracking/dispatching + * + * @member {object} + */ + _this.eventData = new _InteractionEvent2.default(); + + /** + * The DOM element to bind to. + * + * @private + * @member {HTMLElement} + */ + _this.interactionDOMElement = null; + + /** + * This property determines if mousemove and touchmove events are fired only when the cursor + * is over the object. + * Setting to true will make things work more in line with how the DOM verison works. + * Setting to false can make things easier for things like dragging + * It is currently set to false as this is how PixiJS used to work. This will be set to true in + * future versions of pixi. + * + * @member {boolean} + * @default false + */ + _this.moveWhenInside = false; + + /** + * Have events been attached to the dom element? + * + * @private + * @member {boolean} + */ + _this.eventsAdded = false; + + /** + * Is the mouse hovering over the renderer? + * + * @private + * @member {boolean} + */ + _this.mouseOverRenderer = false; + + /** + * Does the device support touch events + * https://www.w3.org/TR/touch-events/ + * + * @readonly + * @member {boolean} + */ + _this.supportsTouchEvents = 'ontouchstart' in window; + + /** + * Does the device support pointer events + * https://www.w3.org/Submission/pointer-events/ + * + * @readonly + * @member {boolean} + */ + _this.supportsPointerEvents = !!window.PointerEvent; + + // this will make it so that you don't have to call bind all the time + + /** + * @private + * @member {Function} + */ + _this.onPointerUp = _this.onPointerUp.bind(_this); + _this.processPointerUp = _this.processPointerUp.bind(_this); + + /** + * @private + * @member {Function} + */ + _this.onPointerCancel = _this.onPointerCancel.bind(_this); + _this.processPointerCancel = _this.processPointerCancel.bind(_this); + + /** + * @private + * @member {Function} + */ + _this.onPointerDown = _this.onPointerDown.bind(_this); + _this.processPointerDown = _this.processPointerDown.bind(_this); + + /** + * @private + * @member {Function} + */ + _this.onPointerMove = _this.onPointerMove.bind(_this); + _this.processPointerMove = _this.processPointerMove.bind(_this); + + /** + * @private + * @member {Function} + */ + _this.onPointerOut = _this.onPointerOut.bind(_this); + _this.processPointerOverOut = _this.processPointerOverOut.bind(_this); + + /** + * @private + * @member {Function} + */ + _this.onPointerOver = _this.onPointerOver.bind(_this); + + /** + * Dictionary of how different cursor modes are handled. Strings are handled as CSS cursor + * values, objects are handled as dictionaries of CSS values for interactionDOMElement, + * and functions are called instead of changing the CSS. + * Default CSS cursor values are provided for 'default' and 'pointer' modes. + * @member {Object.)>} + */ + _this.cursorStyles = { + default: 'inherit', + pointer: 'pointer' + }; + + /** + * The mode of the cursor that is being used. + * The value of this is a key from the cursorStyles dictionary. + * + * @member {string} + */ + _this.currentCursorMode = null; + + /** + * Internal cached let. + * + * @private + * @member {string} + */ + _this.cursor = null; + + /** + * Internal cached let. + * + * @private + * @member {PIXI.Point} + */ + _this._tempPoint = new core.Point(); + + /** + * The current resolution / device pixel ratio. + * + * @member {number} + * @default 1 + */ + _this.resolution = 1; + + _this.setTargetElement(_this.renderer.view, _this.renderer.resolution); + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed on the display + * object. + * + * @event PIXI.interaction.InteractionManager#mousedown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * on the display object. + * + * @event PIXI.interaction.InteractionManager#rightdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released over the display + * object. + * + * @event PIXI.interaction.InteractionManager#mouseup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * over the display object. + * + * @event PIXI.interaction.InteractionManager#rightup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed and released on + * the display object. + * + * @event PIXI.interaction.InteractionManager#click + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * and released on the display object. + * + * @event PIXI.interaction.InteractionManager#rightclick + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released outside the + * display object that initially registered a + * [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown}. + * + * @event PIXI.interaction.InteractionManager#mouseupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * outside the display object that initially registered a + * [rightdown]{@link PIXI.interaction.InteractionManager#event:rightdown}. + * + * @event PIXI.interaction.InteractionManager#rightupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved while over the display object + * + * @event PIXI.interaction.InteractionManager#mousemove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved onto the display object + * + * @event PIXI.interaction.InteractionManager#mouseover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved off the display object + * + * @event PIXI.interaction.InteractionManager#mouseout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed on the display object. + * + * @event PIXI.interaction.InteractionManager#pointerdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released over the display object. + * + * @event PIXI.interaction.InteractionManager#pointerup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a pointer event + * + * @event PIXI.interaction.InteractionManager#pointercancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed and released on the display object. + * + * @event PIXI.interaction.InteractionManager#pointertap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released outside the display object that initially + * registered a [pointerdown]{@link PIXI.interaction.InteractionManager#event:pointerdown}. + * + * @event PIXI.interaction.InteractionManager#pointerupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved while over the display object + * + * @event PIXI.interaction.InteractionManager#pointermove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved onto the display object + * + * @event PIXI.interaction.InteractionManager#pointerover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved off the display object + * + * @event PIXI.interaction.InteractionManager#pointerout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed on the display object. + * + * @event PIXI.interaction.InteractionManager#touchstart + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed from the display object. + * + * @event PIXI.interaction.InteractionManager#touchend + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a touch + * + * @event PIXI.interaction.InteractionManager#touchcancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed and removed from the display object. + * + * @event PIXI.interaction.InteractionManager#tap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed outside of the display object that initially + * registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}. + * + * @event PIXI.interaction.InteractionManager#touchendoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is moved along the display object. + * + * @event PIXI.interaction.InteractionManager#touchmove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed on the display. + * object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mousedown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * on the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released over the display + * object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * over the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is pressed and released on + * the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#click + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * and released on the display object. DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightclick + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button (usually a mouse left-button) is released outside the + * display object that initially registered a + * [mousedown]{@link PIXI.DisplayObject#event:mousedown}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * outside the display object that initially registered a + * [rightdown]{@link PIXI.DisplayObject#event:rightdown}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#rightupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved while over the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mousemove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved onto the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device (usually a mouse) is moved off the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#mouseout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed on the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerdown + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released over the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerup + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a pointer event. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointercancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is pressed and released on the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointertap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device button is released outside the display object that initially + * registered a [pointerdown]{@link PIXI.DisplayObject#event:pointerdown}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerupoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved while over the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointermove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved onto the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerover + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a pointer device is moved off the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#pointerout + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed on the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchstart + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed from the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchend + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when the operating system cancels a touch. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchcancel + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is placed and removed from the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#tap + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is removed outside of the display object that initially + * registered a [touchstart]{@link PIXI.DisplayObject#event:touchstart}. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchendoutside + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + + /** + * Fired when a touch point is moved along the display object. + * DisplayObject's `interactive` property must be set to `true` to fire event. + * + * @event PIXI.DisplayObject#touchmove + * @param {PIXI.interaction.InteractionEvent} event - Interaction event + */ + return _this; + } + + /** + * Hit tests a point against the display tree, returning the first interactive object that is hit. + * + * @param {PIXI.Point} globalPoint - A point to hit test with, in global space. + * @param {PIXI.Container} [root] - The root display object to start from. If omitted, defaults + * to the last rendered root of the associated renderer. + * @return {PIXI.DisplayObject} The hit display object, if any. + */ + + + InteractionManager.prototype.hitTest = function hitTest(globalPoint, root) { + // clear the target for our hit test + hitTestEvent.target = null; + // assign the global point + hitTestEvent.data.global = globalPoint; + // ensure safety of the root + if (!root) { + root = this.renderer._lastObjectRendered; + } + // run the hit test + this.processInteractive(hitTestEvent, root, null, true); + // return our found object - it'll be null if we didn't hit anything + + return hitTestEvent.target; + }; + + /** + * Sets the DOM element which will receive mouse/touch events. This is useful for when you have + * other DOM elements on top of the renderers Canvas element. With this you'll be bale to deletegate + * another DOM element to receive those events. + * + * @param {HTMLCanvasElement} element - the DOM element which will receive mouse and touch events. + * @param {number} [resolution=1] - The resolution / device pixel ratio of the new element (relative to the canvas). + * @private + */ + + + InteractionManager.prototype.setTargetElement = function setTargetElement(element) { + var resolution = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + + this.removeEvents(); + + this.interactionDOMElement = element; + + this.resolution = resolution; + + this.addEvents(); + }; + + /** + * Registers all the DOM events + * + * @private + */ + + + InteractionManager.prototype.addEvents = function addEvents() { + if (!this.interactionDOMElement) { + return; + } + + core.ticker.shared.add(this.update, this, core.UPDATE_PRIORITY.INTERACTION); + + if (window.navigator.msPointerEnabled) { + this.interactionDOMElement.style['-ms-content-zooming'] = 'none'; + this.interactionDOMElement.style['-ms-touch-action'] = 'none'; + } else if (this.supportsPointerEvents) { + this.interactionDOMElement.style['touch-action'] = 'none'; + } + + /** + * These events are added first, so that if pointer events are normalised, they are fired + * in the same order as non-normalised events. ie. pointer event 1st, mouse / touch 2nd + */ + if (this.supportsPointerEvents) { + window.document.addEventListener('pointermove', this.onPointerMove, true); + this.interactionDOMElement.addEventListener('pointerdown', this.onPointerDown, true); + // pointerout is fired in addition to pointerup (for touch events) and pointercancel + // we already handle those, so for the purposes of what we do in onPointerOut, we only + // care about the pointerleave event + this.interactionDOMElement.addEventListener('pointerleave', this.onPointerOut, true); + this.interactionDOMElement.addEventListener('pointerover', this.onPointerOver, true); + window.addEventListener('pointercancel', this.onPointerCancel, true); + window.addEventListener('pointerup', this.onPointerUp, true); + } else { + window.document.addEventListener('mousemove', this.onPointerMove, true); + this.interactionDOMElement.addEventListener('mousedown', this.onPointerDown, true); + this.interactionDOMElement.addEventListener('mouseout', this.onPointerOut, true); + this.interactionDOMElement.addEventListener('mouseover', this.onPointerOver, true); + window.addEventListener('mouseup', this.onPointerUp, true); + } + + // always look directly for touch events so that we can provide original data + // In a future version we should change this to being just a fallback and rely solely on + // PointerEvents whenever available + if (this.supportsTouchEvents) { + this.interactionDOMElement.addEventListener('touchstart', this.onPointerDown, true); + this.interactionDOMElement.addEventListener('touchcancel', this.onPointerCancel, true); + this.interactionDOMElement.addEventListener('touchend', this.onPointerUp, true); + this.interactionDOMElement.addEventListener('touchmove', this.onPointerMove, true); + } + + this.eventsAdded = true; + }; + + /** + * Removes all the DOM events that were previously registered + * + * @private + */ + + + InteractionManager.prototype.removeEvents = function removeEvents() { + if (!this.interactionDOMElement) { + return; + } + + core.ticker.shared.remove(this.update, this); + + if (window.navigator.msPointerEnabled) { + this.interactionDOMElement.style['-ms-content-zooming'] = ''; + this.interactionDOMElement.style['-ms-touch-action'] = ''; + } else if (this.supportsPointerEvents) { + this.interactionDOMElement.style['touch-action'] = ''; + } + + if (this.supportsPointerEvents) { + window.document.removeEventListener('pointermove', this.onPointerMove, true); + this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true); + this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true); + this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true); + window.removeEventListener('pointercancel', this.onPointerCancel, true); + window.removeEventListener('pointerup', this.onPointerUp, true); + } else { + window.document.removeEventListener('mousemove', this.onPointerMove, true); + this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true); + this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true); + this.interactionDOMElement.removeEventListener('mouseover', this.onPointerOver, true); + window.removeEventListener('mouseup', this.onPointerUp, true); + } + + if (this.supportsTouchEvents) { + this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true); + this.interactionDOMElement.removeEventListener('touchcancel', this.onPointerCancel, true); + this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true); + this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true); + } + + this.interactionDOMElement = null; + + this.eventsAdded = false; + }; + + /** + * Updates the state of interactive objects. + * Invoked by a throttled ticker update from {@link PIXI.ticker.shared}. + * + * @param {number} deltaTime - time delta since last tick + */ + + + InteractionManager.prototype.update = function update(deltaTime) { + this._deltaTime += deltaTime; + + if (this._deltaTime < this.interactionFrequency) { + return; + } + + this._deltaTime = 0; + + if (!this.interactionDOMElement) { + return; + } + + // if the user move the mouse this check has already been done using the mouse move! + if (this.didMove) { + this.didMove = false; + + return; + } + + this.cursor = null; + + // Resets the flag as set by a stopPropagation call. This flag is usually reset by a user interaction of any kind, + // but there was a scenario of a display object moving under a static mouse cursor. + // In this case, mouseover and mouseevents would not pass the flag test in dispatchEvent function + for (var k in this.activeInteractionData) { + // eslint-disable-next-line no-prototype-builtins + if (this.activeInteractionData.hasOwnProperty(k)) { + var interactionData = this.activeInteractionData[k]; + + if (interactionData.originalEvent && interactionData.pointerType !== 'touch') { + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, interactionData.originalEvent, interactionData); + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerOverOut, true); + } + } + } + + this.setCursorMode(this.cursor); + + // TODO + }; + + /** + * Sets the current cursor mode, handling any callbacks or CSS style changes. + * + * @param {string} mode - cursor mode, a key from the cursorStyles dictionary + */ + + + InteractionManager.prototype.setCursorMode = function setCursorMode(mode) { + mode = mode || 'default'; + // if the mode didn't actually change, bail early + if (this.currentCursorMode === mode) { + return; + } + this.currentCursorMode = mode; + var style = this.cursorStyles[mode]; + + // only do things if there is a cursor style for it + if (style) { + switch (typeof style === 'undefined' ? 'undefined' : _typeof(style)) { + case 'string': + // string styles are handled as cursor CSS + this.interactionDOMElement.style.cursor = style; + break; + case 'function': + // functions are just called, and passed the cursor mode + style(mode); + break; + case 'object': + // if it is an object, assume that it is a dictionary of CSS styles, + // apply it to the interactionDOMElement + Object.assign(this.interactionDOMElement.style, style); + break; + } + } else if (typeof mode === 'string' && !Object.prototype.hasOwnProperty.call(this.cursorStyles, mode)) { + // if it mode is a string (not a Symbol) and cursorStyles doesn't have any entry + // for the mode, then assume that the dev wants it to be CSS for the cursor. + this.interactionDOMElement.style.cursor = mode; + } + }; + + /** + * Dispatches an event on the display object that was interacted with + * + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - the display object in question + * @param {string} eventString - the name of the event (e.g, mousedown) + * @param {object} eventData - the event data object + * @private + */ + + + InteractionManager.prototype.dispatchEvent = function dispatchEvent(displayObject, eventString, eventData) { + if (!eventData.stopped) { + eventData.currentTarget = displayObject; + eventData.type = eventString; + + displayObject.emit(eventString, eventData); + + if (displayObject[eventString]) { + displayObject[eventString](eventData); + } + } + }; + + /** + * Maps x and y coords from a DOM object and maps them correctly to the PixiJS view. The + * resulting value is stored in the point. This takes into account the fact that the DOM + * element could be scaled and positioned anywhere on the screen. + * + * @param {PIXI.Point} point - the point that the result will be stored in + * @param {number} x - the x coord of the position to map + * @param {number} y - the y coord of the position to map + */ + + + InteractionManager.prototype.mapPositionToPoint = function mapPositionToPoint(point, x, y) { + var rect = void 0; + + // IE 11 fix + if (!this.interactionDOMElement.parentElement) { + rect = { x: 0, y: 0, width: 0, height: 0 }; + } else { + rect = this.interactionDOMElement.getBoundingClientRect(); + } + + var resolutionMultiplier = navigator.isCocoonJS ? this.resolution : 1.0 / this.resolution; + + point.x = (x - rect.left) * (this.interactionDOMElement.width / rect.width) * resolutionMultiplier; + point.y = (y - rect.top) * (this.interactionDOMElement.height / rect.height) * resolutionMultiplier; + }; + + /** + * This function is provides a neat way of crawling through the scene graph and running a + * specified function on all interactive objects it finds. It will also take care of hit + * testing the interactive objects and passes the hit across in the function. + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - event containing the point that + * is tested for collision + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - the displayObject + * that will be hit test (recursively crawls its children) + * @param {Function} [func] - the function that will be called on each interactive object. The + * interactionEvent, displayObject and hit will be passed to the function + * @param {boolean} [hitTest] - this indicates if the objects inside should be hit test against the point + * @param {boolean} [interactive] - Whether the displayObject is interactive + * @return {boolean} returns true if the displayObject hit the point + */ + + + InteractionManager.prototype.processInteractive = function processInteractive(interactionEvent, displayObject, func, hitTest, interactive) { + if (!displayObject || !displayObject.visible) { + return false; + } + + var point = interactionEvent.data.global; + + // Took a little while to rework this function correctly! But now it is done and nice and optimised. ^_^ + // + // This function will now loop through all objects and then only hit test the objects it HAS + // to, not all of them. MUCH faster.. + // An object will be hit test if the following is true: + // + // 1: It is interactive. + // 2: It belongs to a parent that is interactive AND one of the parents children have not already been hit. + // + // As another little optimisation once an interactive object has been hit we can carry on + // through the scenegraph, but we know that there will be no more hits! So we can avoid extra hit tests + // A final optimisation is that an object is not hit test directly if a child has already been hit. + + interactive = displayObject.interactive || interactive; + + var hit = false; + var interactiveParent = interactive; + + // if the displayobject has a hitArea, then it does not need to hitTest children. + if (displayObject.hitArea) { + interactiveParent = false; + } + // it has a mask! Then lets hit test that before continuing + else if (hitTest && displayObject._mask) { + if (!displayObject._mask.containsPoint(point)) { + hitTest = false; + } + } + + // ** FREE TIP **! If an object is not interactive or has no buttons in it + // (such as a game scene!) set interactiveChildren to false for that displayObject. + // This will allow PixiJS to completely ignore and bypass checking the displayObjects children. + if (displayObject.interactiveChildren && displayObject.children) { + var children = displayObject.children; + + for (var i = children.length - 1; i >= 0; i--) { + var child = children[i]; + + // time to get recursive.. if this function will return if something is hit.. + var childHit = this.processInteractive(interactionEvent, child, func, hitTest, interactiveParent); + + if (childHit) { + // its a good idea to check if a child has lost its parent. + // this means it has been removed whilst looping so its best + if (!child.parent) { + continue; + } + + // we no longer need to hit test any more objects in this container as we we + // now know the parent has been hit + interactiveParent = false; + + // If the child is interactive , that means that the object hit was actually + // interactive and not just the child of an interactive object. + // This means we no longer need to hit test anything else. We still need to run + // through all objects, but we don't need to perform any hit tests. + + if (childHit) { + if (interactionEvent.target) { + hitTest = false; + } + hit = true; + } + } + } + } + + // no point running this if the item is not interactive or does not have an interactive parent. + if (interactive) { + // if we are hit testing (as in we have no hit any objects yet) + // We also don't need to worry about hit testing if once of the displayObjects children + // has already been hit - but only if it was interactive, otherwise we need to keep + // looking for an interactive child, just in case we hit one + if (hitTest && !interactionEvent.target) { + if (displayObject.hitArea) { + displayObject.worldTransform.applyInverse(point, this._tempPoint); + if (displayObject.hitArea.contains(this._tempPoint.x, this._tempPoint.y)) { + hit = true; + } + } else if (displayObject.containsPoint) { + if (displayObject.containsPoint(point)) { + hit = true; + } + } + } + + if (displayObject.interactive) { + if (hit && !interactionEvent.target) { + interactionEvent.target = displayObject; + } + + if (func) { + func(interactionEvent, displayObject, !!hit); + } + } + } + + return hit; + }; + + /** + * Is called when the pointer button is pressed down on the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer button being pressed down + */ + + + InteractionManager.prototype.onPointerDown = function onPointerDown(originalEvent) { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return; + + var events = this.normalizeToPointerData(originalEvent); + + /** + * No need to prevent default on natural pointer events, as there are no side effects + * Normalized events, however, may have the double mousedown/touchstart issue on the native android browser, + * so still need to be prevented. + */ + + // Guaranteed that there will be at least one event in events, and all events must have the same pointer type + + if (this.autoPreventDefault && events[0].isNormalized) { + originalEvent.preventDefault(); + } + + var eventLen = events.length; + + for (var i = 0; i < eventLen; i++) { + var event = events[i]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = originalEvent; + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerDown, true); + + this.emit('pointerdown', interactionEvent); + if (event.pointerType === 'touch') { + this.emit('touchstart', interactionEvent); + } + // emit a mouse event for "pen" pointers, the way a browser would emit a fallback event + else if (event.pointerType === 'mouse' || event.pointerType === 'pen') { + var isRightButton = event.button === 2; + + this.emit(isRightButton ? 'rightdown' : 'mousedown', this.eventData); + } + } + }; + + /** + * Processes the result of the pointer down check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + + + InteractionManager.prototype.processPointerDown = function processPointerDown(interactionEvent, displayObject, hit) { + var data = interactionEvent.data; + var id = interactionEvent.data.identifier; + + if (hit) { + if (!displayObject.trackedPointers[id]) { + displayObject.trackedPointers[id] = new _InteractionTrackingData2.default(id); + } + this.dispatchEvent(displayObject, 'pointerdown', interactionEvent); + + if (data.pointerType === 'touch') { + this.dispatchEvent(displayObject, 'touchstart', interactionEvent); + } else if (data.pointerType === 'mouse' || data.pointerType === 'pen') { + var isRightButton = data.button === 2; + + if (isRightButton) { + displayObject.trackedPointers[id].rightDown = true; + } else { + displayObject.trackedPointers[id].leftDown = true; + } + + this.dispatchEvent(displayObject, isRightButton ? 'rightdown' : 'mousedown', interactionEvent); + } + } + }; + + /** + * Is called when the pointer button is released on the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer button being released + * @param {boolean} cancelled - true if the pointer is cancelled + * @param {Function} func - Function passed to {@link processInteractive} + */ + + + InteractionManager.prototype.onPointerComplete = function onPointerComplete(originalEvent, cancelled, func) { + var events = this.normalizeToPointerData(originalEvent); + + var eventLen = events.length; + + // if the event wasn't targeting our canvas, then consider it to be pointerupoutside + // in all cases (unless it was a pointercancel) + var eventAppend = originalEvent.target !== this.interactionDOMElement ? 'outside' : ''; + + for (var i = 0; i < eventLen; i++) { + var event = events[i]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = originalEvent; + + // perform hit testing for events targeting our canvas or cancel events + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, func, cancelled || !eventAppend); + + this.emit(cancelled ? 'pointercancel' : 'pointerup' + eventAppend, interactionEvent); + + if (event.pointerType === 'mouse' || event.pointerType === 'pen') { + var isRightButton = event.button === 2; + + this.emit(isRightButton ? 'rightup' + eventAppend : 'mouseup' + eventAppend, interactionEvent); + } else if (event.pointerType === 'touch') { + this.emit(cancelled ? 'touchcancel' : 'touchend' + eventAppend, interactionEvent); + this.releaseInteractionDataForPointerId(event.pointerId, interactionData); + } + } + }; + + /** + * Is called when the pointer button is cancelled + * + * @private + * @param {PointerEvent} event - The DOM event of a pointer button being released + */ + + + InteractionManager.prototype.onPointerCancel = function onPointerCancel(event) { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && event.pointerType === 'touch') return; + + this.onPointerComplete(event, true, this.processPointerCancel); + }; + + /** + * Processes the result of the pointer cancel check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested + */ + + + InteractionManager.prototype.processPointerCancel = function processPointerCancel(interactionEvent, displayObject) { + var data = interactionEvent.data; + + var id = interactionEvent.data.identifier; + + if (displayObject.trackedPointers[id] !== undefined) { + delete displayObject.trackedPointers[id]; + this.dispatchEvent(displayObject, 'pointercancel', interactionEvent); + + if (data.pointerType === 'touch') { + this.dispatchEvent(displayObject, 'touchcancel', interactionEvent); + } + } + }; + + /** + * Is called when the pointer button is released on the renderer element + * + * @private + * @param {PointerEvent} event - The DOM event of a pointer button being released + */ + + + InteractionManager.prototype.onPointerUp = function onPointerUp(event) { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && event.pointerType === 'touch') return; + + this.onPointerComplete(event, false, this.processPointerUp); + }; + + /** + * Processes the result of the pointer up check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + + + InteractionManager.prototype.processPointerUp = function processPointerUp(interactionEvent, displayObject, hit) { + var data = interactionEvent.data; + + var id = interactionEvent.data.identifier; + + var trackingData = displayObject.trackedPointers[id]; + + var isTouch = data.pointerType === 'touch'; + + var isMouse = data.pointerType === 'mouse' || data.pointerType === 'pen'; + + // Mouse only + if (isMouse) { + var isRightButton = data.button === 2; + + var flags = _InteractionTrackingData2.default.FLAGS; + + var test = isRightButton ? flags.RIGHT_DOWN : flags.LEFT_DOWN; + + var isDown = trackingData !== undefined && trackingData.flags & test; + + if (hit) { + this.dispatchEvent(displayObject, isRightButton ? 'rightup' : 'mouseup', interactionEvent); + + if (isDown) { + this.dispatchEvent(displayObject, isRightButton ? 'rightclick' : 'click', interactionEvent); + } + } else if (isDown) { + this.dispatchEvent(displayObject, isRightButton ? 'rightupoutside' : 'mouseupoutside', interactionEvent); + } + // update the down state of the tracking data + if (trackingData) { + if (isRightButton) { + trackingData.rightDown = false; + } else { + trackingData.leftDown = false; + } + } + } + + // Pointers and Touches, and Mouse + if (hit) { + this.dispatchEvent(displayObject, 'pointerup', interactionEvent); + if (isTouch) this.dispatchEvent(displayObject, 'touchend', interactionEvent); + + if (trackingData) { + this.dispatchEvent(displayObject, 'pointertap', interactionEvent); + if (isTouch) { + this.dispatchEvent(displayObject, 'tap', interactionEvent); + // touches are no longer over (if they ever were) when we get the touchend + // so we should ensure that we don't keep pretending that they are + trackingData.over = false; + } + } + } else if (trackingData) { + this.dispatchEvent(displayObject, 'pointerupoutside', interactionEvent); + if (isTouch) this.dispatchEvent(displayObject, 'touchendoutside', interactionEvent); + } + // Only remove the tracking data if there is no over/down state still associated with it + if (trackingData && trackingData.none) { + delete displayObject.trackedPointers[id]; + } + }; + + /** + * Is called when the pointer moves across the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer moving + */ + + + InteractionManager.prototype.onPointerMove = function onPointerMove(originalEvent) { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return; + + var events = this.normalizeToPointerData(originalEvent); + + if (events[0].pointerType === 'mouse') { + this.didMove = true; + + this.cursor = null; + } + + var eventLen = events.length; + + for (var i = 0; i < eventLen; i++) { + var event = events[i]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = originalEvent; + + var interactive = event.pointerType === 'touch' ? this.moveWhenInside : true; + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerMove, interactive); + this.emit('pointermove', interactionEvent); + if (event.pointerType === 'touch') this.emit('touchmove', interactionEvent); + if (event.pointerType === 'mouse' || event.pointerType === 'pen') this.emit('mousemove', interactionEvent); + } + + if (events[0].pointerType === 'mouse') { + this.setCursorMode(this.cursor); + + // TODO BUG for parents interactive object (border order issue) + } + }; + + /** + * Processes the result of the pointer move check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + + + InteractionManager.prototype.processPointerMove = function processPointerMove(interactionEvent, displayObject, hit) { + var data = interactionEvent.data; + + var isTouch = data.pointerType === 'touch'; + + var isMouse = data.pointerType === 'mouse' || data.pointerType === 'pen'; + + if (isMouse) { + this.processPointerOverOut(interactionEvent, displayObject, hit); + } + + if (!this.moveWhenInside || hit) { + this.dispatchEvent(displayObject, 'pointermove', interactionEvent); + if (isTouch) this.dispatchEvent(displayObject, 'touchmove', interactionEvent); + if (isMouse) this.dispatchEvent(displayObject, 'mousemove', interactionEvent); + } + }; + + /** + * Is called when the pointer is moved out of the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer being moved out + */ + + + InteractionManager.prototype.onPointerOut = function onPointerOut(originalEvent) { + // if we support touch events, then only use those for touch events, not pointer events + if (this.supportsTouchEvents && originalEvent.pointerType === 'touch') return; + + var events = this.normalizeToPointerData(originalEvent); + + // Only mouse and pointer can call onPointerOut, so events will always be length 1 + var event = events[0]; + + if (event.pointerType === 'mouse') { + this.mouseOverRenderer = false; + this.setCursorMode(null); + } + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = event; + + this.processInteractive(interactionEvent, this.renderer._lastObjectRendered, this.processPointerOverOut, false); + + this.emit('pointerout', interactionEvent); + if (event.pointerType === 'mouse' || event.pointerType === 'pen') { + this.emit('mouseout', interactionEvent); + } else { + // we can get touchleave events after touchend, so we want to make sure we don't + // introduce memory leaks + this.releaseInteractionDataForPointerId(interactionData.identifier); + } + }; + + /** + * Processes the result of the pointer over/out check and dispatches the event if need be + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The interaction event wrapping the DOM event + * @param {PIXI.Container|PIXI.Sprite|PIXI.extras.TilingSprite} displayObject - The display object that was tested + * @param {boolean} hit - the result of the hit test on the display object + */ + + + InteractionManager.prototype.processPointerOverOut = function processPointerOverOut(interactionEvent, displayObject, hit) { + var data = interactionEvent.data; + + var id = interactionEvent.data.identifier; + + var isMouse = data.pointerType === 'mouse' || data.pointerType === 'pen'; + + var trackingData = displayObject.trackedPointers[id]; + + // if we just moused over the display object, then we need to track that state + if (hit && !trackingData) { + trackingData = displayObject.trackedPointers[id] = new _InteractionTrackingData2.default(id); + } + + if (trackingData === undefined) return; + + if (hit && this.mouseOverRenderer) { + if (!trackingData.over) { + trackingData.over = true; + this.dispatchEvent(displayObject, 'pointerover', interactionEvent); + if (isMouse) { + this.dispatchEvent(displayObject, 'mouseover', interactionEvent); + } + } + + // only change the cursor if it has not already been changed (by something deeper in the + // display tree) + if (isMouse && this.cursor === null) { + this.cursor = displayObject.cursor; + } + } else if (trackingData.over) { + trackingData.over = false; + this.dispatchEvent(displayObject, 'pointerout', this.eventData); + if (isMouse) { + this.dispatchEvent(displayObject, 'mouseout', interactionEvent); + } + // if there is no mouse down information for the pointer, then it is safe to delete + if (trackingData.none) { + delete displayObject.trackedPointers[id]; + } + } + }; + + /** + * Is called when the pointer is moved into the renderer element + * + * @private + * @param {PointerEvent} originalEvent - The DOM event of a pointer button being moved into the renderer view + */ + + + InteractionManager.prototype.onPointerOver = function onPointerOver(originalEvent) { + var events = this.normalizeToPointerData(originalEvent); + + // Only mouse and pointer can call onPointerOver, so events will always be length 1 + var event = events[0]; + + var interactionData = this.getInteractionDataForPointerId(event); + + var interactionEvent = this.configureInteractionEventForDOMEvent(this.eventData, event, interactionData); + + interactionEvent.data.originalEvent = event; + + if (event.pointerType === 'mouse') { + this.mouseOverRenderer = true; + } + + this.emit('pointerover', interactionEvent); + if (event.pointerType === 'mouse' || event.pointerType === 'pen') { + this.emit('mouseover', interactionEvent); + } + }; + + /** + * Get InteractionData for a given pointerId. Store that data as well + * + * @private + * @param {PointerEvent} event - Normalized pointer event, output from normalizeToPointerData + * @return {PIXI.interaction.InteractionData} - Interaction data for the given pointer identifier + */ + + + InteractionManager.prototype.getInteractionDataForPointerId = function getInteractionDataForPointerId(event) { + var pointerId = event.pointerId; + + var interactionData = void 0; + + if (pointerId === MOUSE_POINTER_ID || event.pointerType === 'mouse') { + interactionData = this.mouse; + } else if (this.activeInteractionData[pointerId]) { + interactionData = this.activeInteractionData[pointerId]; + } else { + interactionData = this.interactionDataPool.pop() || new _InteractionData2.default(); + interactionData.identifier = pointerId; + this.activeInteractionData[pointerId] = interactionData; + } + // copy properties from the event, so that we can make sure that touch/pointer specific + // data is available + interactionData._copyEvent(event); + + return interactionData; + }; + + /** + * Return unused InteractionData to the pool, for a given pointerId + * + * @private + * @param {number} pointerId - Identifier from a pointer event + */ + + + InteractionManager.prototype.releaseInteractionDataForPointerId = function releaseInteractionDataForPointerId(pointerId) { + var interactionData = this.activeInteractionData[pointerId]; + + if (interactionData) { + delete this.activeInteractionData[pointerId]; + interactionData._reset(); + this.interactionDataPool.push(interactionData); + } + }; + + /** + * Configure an InteractionEvent to wrap a DOM PointerEvent and InteractionData + * + * @private + * @param {PIXI.interaction.InteractionEvent} interactionEvent - The event to be configured + * @param {PointerEvent} pointerEvent - The DOM event that will be paired with the InteractionEvent + * @param {PIXI.interaction.InteractionData} interactionData - The InteractionData that will be paired + * with the InteractionEvent + * @return {PIXI.interaction.InteractionEvent} the interaction event that was passed in + */ + + + InteractionManager.prototype.configureInteractionEventForDOMEvent = function configureInteractionEventForDOMEvent(interactionEvent, pointerEvent, interactionData) { + interactionEvent.data = interactionData; + + this.mapPositionToPoint(interactionData.global, pointerEvent.clientX, pointerEvent.clientY); + + // This is the way InteractionManager processed touch events before the refactoring, so I've kept + // it here. But it doesn't make that much sense to me, since mapPositionToPoint already factors + // in this.resolution, so this just divides by this.resolution twice for touch events... + if (navigator.isCocoonJS && pointerEvent.pointerType === 'touch') { + interactionData.global.x = interactionData.global.x / this.resolution; + interactionData.global.y = interactionData.global.y / this.resolution; + } + + // Not really sure why this is happening, but it's how a previous version handled things + if (pointerEvent.pointerType === 'touch') { + pointerEvent.globalX = interactionData.global.x; + pointerEvent.globalY = interactionData.global.y; + } + + interactionData.originalEvent = pointerEvent; + interactionEvent._reset(); + + return interactionEvent; + }; + + /** + * Ensures that the original event object contains all data that a regular pointer event would have + * + * @private + * @param {TouchEvent|MouseEvent|PointerEvent} event - The original event data from a touch or mouse event + * @return {PointerEvent[]} An array containing a single normalized pointer event, in the case of a pointer + * or mouse event, or a multiple normalized pointer events if there are multiple changed touches + */ + + + InteractionManager.prototype.normalizeToPointerData = function normalizeToPointerData(event) { + var normalizedEvents = []; + + if (this.supportsTouchEvents && event instanceof TouchEvent) { + for (var i = 0, li = event.changedTouches.length; i < li; i++) { + var touch = event.changedTouches[i]; + + if (typeof touch.button === 'undefined') touch.button = event.touches.length ? 1 : 0; + if (typeof touch.buttons === 'undefined') touch.buttons = event.touches.length ? 1 : 0; + if (typeof touch.isPrimary === 'undefined') { + touch.isPrimary = event.touches.length === 1 && event.type === 'touchstart'; + } + if (typeof touch.width === 'undefined') touch.width = touch.radiusX || 1; + if (typeof touch.height === 'undefined') touch.height = touch.radiusY || 1; + if (typeof touch.tiltX === 'undefined') touch.tiltX = 0; + if (typeof touch.tiltY === 'undefined') touch.tiltY = 0; + if (typeof touch.pointerType === 'undefined') touch.pointerType = 'touch'; + if (typeof touch.pointerId === 'undefined') touch.pointerId = touch.identifier || 0; + if (typeof touch.pressure === 'undefined') touch.pressure = touch.force || 0.5; + touch.twist = 0; + touch.tangentialPressure = 0; + // TODO: Remove these, as layerX/Y is not a standard, is deprecated, has uneven + // support, and the fill ins are not quite the same + // offsetX/Y might be okay, but is not the same as clientX/Y when the canvas's top + // left is not 0,0 on the page + if (typeof touch.layerX === 'undefined') touch.layerX = touch.offsetX = touch.clientX; + if (typeof touch.layerY === 'undefined') touch.layerY = touch.offsetY = touch.clientY; + + // mark the touch as normalized, just so that we know we did it + touch.isNormalized = true; + + normalizedEvents.push(touch); + } + } + // apparently PointerEvent subclasses MouseEvent, so yay + else if (event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof window.PointerEvent))) { + if (typeof event.isPrimary === 'undefined') event.isPrimary = true; + if (typeof event.width === 'undefined') event.width = 1; + if (typeof event.height === 'undefined') event.height = 1; + if (typeof event.tiltX === 'undefined') event.tiltX = 0; + if (typeof event.tiltY === 'undefined') event.tiltY = 0; + if (typeof event.pointerType === 'undefined') event.pointerType = 'mouse'; + if (typeof event.pointerId === 'undefined') event.pointerId = MOUSE_POINTER_ID; + if (typeof event.pressure === 'undefined') event.pressure = 0.5; + event.twist = 0; + event.tangentialPressure = 0; + + // mark the mouse event as normalized, just so that we know we did it + event.isNormalized = true; + + normalizedEvents.push(event); + } else { + normalizedEvents.push(event); + } + + return normalizedEvents; + }; + + /** + * Destroys the interaction manager + * + */ + + + InteractionManager.prototype.destroy = function destroy() { + this.removeEvents(); + + this.removeAllListeners(); + + this.renderer = null; + + this.mouse = null; + + this.eventData = null; + + this.interactionDOMElement = null; + + this.onPointerDown = null; + this.processPointerDown = null; + + this.onPointerUp = null; + this.processPointerUp = null; + + this.onPointerCancel = null; + this.processPointerCancel = null; + + this.onPointerMove = null; + this.processPointerMove = null; + + this.onPointerOut = null; + this.processPointerOverOut = null; + + this.onPointerOver = null; + + this._tempPoint = null; + }; + + return InteractionManager; +}(_eventemitter2.default); + +exports.default = InteractionManager; + + +core.WebGLRenderer.registerPlugin('interaction', InteractionManager); +core.CanvasRenderer.registerPlugin('interaction', InteractionManager); + +},{"../core":65,"./InteractionData":155,"./InteractionEvent":156,"./InteractionTrackingData":158,"./interactiveTarget":160,"eventemitter3":20}],158:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * DisplayObjects with the {@link PIXI.interaction.interactiveTarget} mixin use this class to track interactions + * + * @class + * @private + * @memberof PIXI.interaction + */ +var InteractionTrackingData = function () { + /** + * @param {number} pointerId - Unique pointer id of the event + */ + function InteractionTrackingData(pointerId) { + _classCallCheck(this, InteractionTrackingData); + + this._pointerId = pointerId; + this._flags = InteractionTrackingData.FLAGS.NONE; + } + + /** + * + * @private + * @param {number} flag - The interaction flag to set + * @param {boolean} yn - Should the flag be set or unset + */ + + + InteractionTrackingData.prototype._doSet = function _doSet(flag, yn) { + if (yn) { + this._flags = this._flags | flag; + } else { + this._flags = this._flags & ~flag; + } + }; + + /** + * Unique pointer id of the event + * + * @readonly + * @member {number} + */ + + + _createClass(InteractionTrackingData, [{ + key: "pointerId", + get: function get() { + return this._pointerId; + } + + /** + * State of the tracking data, expressed as bit flags + * + * @member {number} + * @memberof PIXI.interaction.InteractionTrackingData# + */ + + }, { + key: "flags", + get: function get() { + return this._flags; + } + + /** + * Set the flags for the tracking data + * + * @param {number} flags - Flags to set + */ + , + set: function set(flags) { + this._flags = flags; + } + + /** + * Is the tracked event inactive (not over or down)? + * + * @member {number} + * @memberof PIXI.interaction.InteractionTrackingData# + */ + + }, { + key: "none", + get: function get() { + return this._flags === this.constructor.FLAGS.NONE; + } + + /** + * Is the tracked event over the DisplayObject? + * + * @member {boolean} + * @memberof PIXI.interaction.InteractionTrackingData# + */ + + }, { + key: "over", + get: function get() { + return (this._flags & this.constructor.FLAGS.OVER) !== 0; + } + + /** + * Set the over flag + * + * @param {boolean} yn - Is the event over? + */ + , + set: function set(yn) { + this._doSet(this.constructor.FLAGS.OVER, yn); + } + + /** + * Did the right mouse button come down in the DisplayObject? + * + * @member {boolean} + * @memberof PIXI.interaction.InteractionTrackingData# + */ + + }, { + key: "rightDown", + get: function get() { + return (this._flags & this.constructor.FLAGS.RIGHT_DOWN) !== 0; + } + + /** + * Set the right down flag + * + * @param {boolean} yn - Is the right mouse button down? + */ + , + set: function set(yn) { + this._doSet(this.constructor.FLAGS.RIGHT_DOWN, yn); + } + + /** + * Did the left mouse button come down in the DisplayObject? + * + * @member {boolean} + * @memberof PIXI.interaction.InteractionTrackingData# + */ + + }, { + key: "leftDown", + get: function get() { + return (this._flags & this.constructor.FLAGS.LEFT_DOWN) !== 0; + } + + /** + * Set the left down flag + * + * @param {boolean} yn - Is the left mouse button down? + */ + , + set: function set(yn) { + this._doSet(this.constructor.FLAGS.LEFT_DOWN, yn); + } + }]); + + return InteractionTrackingData; +}(); + +exports.default = InteractionTrackingData; + + +InteractionTrackingData.FLAGS = Object.freeze({ + NONE: 0, + OVER: 1 << 0, + LEFT_DOWN: 1 << 1, + RIGHT_DOWN: 1 << 2 +}); + +},{}],159:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _InteractionData = require('./InteractionData'); + +Object.defineProperty(exports, 'InteractionData', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_InteractionData).default; + } +}); + +var _InteractionManager = require('./InteractionManager'); + +Object.defineProperty(exports, 'InteractionManager', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_InteractionManager).default; + } +}); + +var _interactiveTarget = require('./interactiveTarget'); + +Object.defineProperty(exports, 'interactiveTarget', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_interactiveTarget).default; + } +}); + +var _InteractionTrackingData = require('./InteractionTrackingData'); + +Object.defineProperty(exports, 'InteractionTrackingData', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_InteractionTrackingData).default; + } +}); + +var _InteractionEvent = require('./InteractionEvent'); + +Object.defineProperty(exports, 'InteractionEvent', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_InteractionEvent).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./InteractionData":155,"./InteractionEvent":156,"./InteractionManager":157,"./InteractionTrackingData":158,"./interactiveTarget":160}],160:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +/** + * Default property values of interactive objects + * Used by {@link PIXI.interaction.InteractionManager} to automatically give all DisplayObjects these properties + * + * @private + * @name interactiveTarget + * @memberof PIXI.interaction + * @example + * function MyObject() {} + * + * Object.assign( + * core.DisplayObject.prototype, + * PIXI.interaction.interactiveTarget + * ); + */ +exports.default = { + + /** + * Enable interaction events for the DisplayObject. Touch, pointer and mouse + * events will not be emitted unless `interactive` is set to `true`. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.on('tap', (event) => { + * //handle event + * }); + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + interactive: false, + + /** + * Determines if the children to the displayObject can be clicked/touched + * Setting this to false allows PixiJS to bypass a recursive `hitTest` function + * + * @member {boolean} + * @memberof PIXI.Container# + */ + interactiveChildren: true, + + /** + * Interaction shape. Children will be hit first, then this shape will be checked. + * Setting this will cause this shape to be checked in hit tests rather than the displayObject's bounds. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.hitArea = new PIXI.Rectangle(0, 0, 100, 100); + * @member {PIXI.Rectangle|PIXI.Circle|PIXI.Ellipse|PIXI.Polygon|PIXI.RoundedRectangle} + * @memberof PIXI.DisplayObject# + */ + hitArea: null, + + /** + * If enabled, the mouse cursor use the pointer behavior when hovered over the displayObject if it is interactive + * Setting this changes the 'cursor' property to `'pointer'`. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.buttonMode = true; + * @member {boolean} + * @memberof PIXI.DisplayObject# + */ + get buttonMode() { + return this.cursor === 'pointer'; + }, + set buttonMode(value) { + if (value) { + this.cursor = 'pointer'; + } else if (this.cursor === 'pointer') { + this.cursor = null; + } + }, + + /** + * This defines what cursor mode is used when the mouse cursor + * is hovered over the displayObject. + * + * @example + * const sprite = new PIXI.Sprite(texture); + * sprite.interactive = true; + * sprite.cursor = 'wait'; + * @see https://developer.mozilla.org/en/docs/Web/CSS/cursor + * + * @member {string} + * @memberof PIXI.DisplayObject# + */ + cursor: null, + + /** + * Internal set of all active pointers, by identifier + * + * @member {Map} + * @memberof PIXI.DisplayObject# + * @private + */ + get trackedPointers() { + if (this._trackedPointers === undefined) this._trackedPointers = {}; + + return this._trackedPointers; + }, + + /** + * Map of all tracked pointers, by identifier. Use trackedPointers to access. + * + * @private + * @type {Map} + */ + _trackedPointers: undefined +}; + +},{}],161:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.parse = parse; + +exports.default = function () { + return function bitmapFontParser(resource, next) { + // skip if no data or not xml data + if (!resource.data || resource.type !== _resourceLoader.Resource.TYPE.XML) { + next(); + + return; + } + + // skip if not bitmap font data, using some silly duck-typing + if (resource.data.getElementsByTagName('page').length === 0 || resource.data.getElementsByTagName('info').length === 0 || resource.data.getElementsByTagName('info')[0].getAttribute('face') === null) { + next(); + + return; + } + + var xmlUrl = !resource.isDataUrl ? path.dirname(resource.url) : ''; + + if (resource.isDataUrl) { + if (xmlUrl === '.') { + xmlUrl = ''; + } + + if (this.baseUrl && xmlUrl) { + // if baseurl has a trailing slash then add one to xmlUrl so the replace works below + if (this.baseUrl.charAt(this.baseUrl.length - 1) === '/') { + xmlUrl += '/'; + } + } + } + + // remove baseUrl from xmlUrl + xmlUrl = xmlUrl.replace(this.baseUrl, ''); + + // if there is an xmlUrl now, it needs a trailing slash. Ensure that it does if the string isn't empty. + if (xmlUrl && xmlUrl.charAt(xmlUrl.length - 1) !== '/') { + xmlUrl += '/'; + } + + var textureUrl = xmlUrl + resource.data.getElementsByTagName('page')[0].getAttribute('file'); + + if (_core.utils.TextureCache[textureUrl]) { + // reuse existing texture + parse(resource, _core.utils.TextureCache[textureUrl]); + next(); + } else { + var loadOptions = { + crossOrigin: resource.crossOrigin, + loadType: _resourceLoader.Resource.LOAD_TYPE.IMAGE, + metadata: resource.metadata.imageMetadata, + parentResource: resource + }; + + // load the texture for the font + this.add(resource.name + '_image', textureUrl, loadOptions, function (res) { + parse(resource, res.texture); + next(); + }); + } + }; +}; + +var _path = require('path'); + +var path = _interopRequireWildcard(_path); + +var _core = require('../core'); + +var _resourceLoader = require('resource-loader'); + +var _extras = require('../extras'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +/** + * Register a BitmapText font from loader resource. + * + * @function parseBitmapFontData + * @memberof PIXI.loaders + * @param {PIXI.loaders.Resource} resource - Loader resource. + * @param {PIXI.Texture} texture - Reference to texture. + */ +function parse(resource, texture) { + resource.bitmapFont = _extras.BitmapText.registerFont(resource.data, texture); +} + +},{"../core":65,"../extras":141,"path":25,"resource-loader":36}],162:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.shared = exports.Resource = exports.textureParser = exports.getResourcePath = exports.spritesheetParser = exports.parseBitmapFontData = exports.bitmapFontParser = exports.Loader = undefined; + +var _bitmapFontParser = require('./bitmapFontParser'); + +Object.defineProperty(exports, 'bitmapFontParser', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_bitmapFontParser).default; + } +}); +Object.defineProperty(exports, 'parseBitmapFontData', { + enumerable: true, + get: function get() { + return _bitmapFontParser.parse; + } +}); + +var _spritesheetParser = require('./spritesheetParser'); + +Object.defineProperty(exports, 'spritesheetParser', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_spritesheetParser).default; + } +}); +Object.defineProperty(exports, 'getResourcePath', { + enumerable: true, + get: function get() { + return _spritesheetParser.getResourcePath; + } +}); + +var _textureParser = require('./textureParser'); + +Object.defineProperty(exports, 'textureParser', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_textureParser).default; + } +}); + +var _resourceLoader = require('resource-loader'); + +Object.defineProperty(exports, 'Resource', { + enumerable: true, + get: function get() { + return _resourceLoader.Resource; + } +}); + +var _Application = require('../core/Application'); + +var _Application2 = _interopRequireDefault(_Application); + +var _loader = require('./loader'); + +var _loader2 = _interopRequireDefault(_loader); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * This namespace contains APIs which extends the {@link https://github.com/englercj/resource-loader resource-loader} module + * for loading assets, data, and other resources dynamically. + * @example + * const loader = new PIXI.loaders.Loader(); + * loader.add('bunny', 'data/bunny.png') + * .add('spaceship', 'assets/spritesheet.json'); + * loader.load((loader, resources) => { + * // resources.bunny + * // resources.spaceship + * }); + * @namespace PIXI.loaders + */ +exports.Loader = _loader2.default; + + +/** + * A premade instance of the loader that can be used to load resources. + * @name shared + * @memberof PIXI.loaders + * @type {PIXI.loaders.Loader} + */ +var shared = new _loader2.default(); + +shared.destroy = function () { + // protect destroying shared loader +}; + +exports.shared = shared; + +// Mixin the loader construction + +var AppPrototype = _Application2.default.prototype; + +AppPrototype._loader = null; + +/** + * Loader instance to help with asset loading. + * @name PIXI.Application#loader + * @type {PIXI.loaders.Loader} + */ +Object.defineProperty(AppPrototype, 'loader', { + get: function get() { + if (!this._loader) { + var sharedLoader = this._options.sharedLoader; + + this._loader = sharedLoader ? shared : new _loader2.default(); + } + + return this._loader; + } +}); + +// Override the destroy function +// making sure to destroy the current Loader +AppPrototype._parentDestroy = AppPrototype.destroy; +AppPrototype.destroy = function destroy(removeView) { + if (this._loader) { + this._loader.destroy(); + this._loader = null; + } + this._parentDestroy(removeView); +}; + +},{"../core/Application":43,"./bitmapFontParser":161,"./loader":163,"./spritesheetParser":164,"./textureParser":165,"resource-loader":36}],163:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _resourceLoader = require('resource-loader'); + +var _resourceLoader2 = _interopRequireDefault(_resourceLoader); + +var _blob = require('resource-loader/lib/middlewares/parsing/blob'); + +var _eventemitter = require('eventemitter3'); + +var _eventemitter2 = _interopRequireDefault(_eventemitter); + +var _textureParser = require('./textureParser'); + +var _textureParser2 = _interopRequireDefault(_textureParser); + +var _spritesheetParser = require('./spritesheetParser'); + +var _spritesheetParser2 = _interopRequireDefault(_spritesheetParser); + +var _bitmapFontParser = require('./bitmapFontParser'); + +var _bitmapFontParser2 = _interopRequireDefault(_bitmapFontParser); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * + * The new loader, extends Resource Loader by Chad Engler: https://github.com/englercj/resource-loader + * + * ```js + * const loader = PIXI.loader; // PixiJS exposes a premade instance for you to use. + * //or + * const loader = new PIXI.loaders.Loader(); // you can also create your own if you want + * + * const sprites = {}; + * + * // Chainable `add` to enqueue a resource + * loader.add('bunny', 'data/bunny.png') + * .add('spaceship', 'assets/spritesheet.json'); + * loader.add('scoreFont', 'assets/score.fnt'); + * + * // Chainable `pre` to add a middleware that runs for each resource, *before* loading that resource. + * // This is useful to implement custom caching modules (using filesystem, indexeddb, memory, etc). + * loader.pre(cachingMiddleware); + * + * // Chainable `use` to add a middleware that runs for each resource, *after* loading that resource. + * // This is useful to implement custom parsing modules (like spritesheet parsers, spine parser, etc). + * loader.use(parsingMiddleware); + * + * // The `load` method loads the queue of resources, and calls the passed in callback called once all + * // resources have loaded. + * loader.load((loader, resources) => { + * // resources is an object where the key is the name of the resource loaded and the value is the resource object. + * // They have a couple default properties: + * // - `url`: The URL that the resource was loaded from + * // - `error`: The error that happened when trying to load (if any) + * // - `data`: The raw data that was loaded + * // also may contain other properties based on the middleware that runs. + * sprites.bunny = new PIXI.TilingSprite(resources.bunny.texture); + * sprites.spaceship = new PIXI.TilingSprite(resources.spaceship.texture); + * sprites.scoreFont = new PIXI.TilingSprite(resources.scoreFont.texture); + * }); + * + * // throughout the process multiple signals can be dispatched. + * loader.onProgress.add(() => {}); // called once per loaded/errored file + * loader.onError.add(() => {}); // called once per errored file + * loader.onLoad.add(() => {}); // called once per loaded file + * loader.onComplete.add(() => {}); // called once when the queued resources all load. + * ``` + * + * @see https://github.com/englercj/resource-loader + * + * @class + * @extends module:resource-loader.ResourceLoader + * @memberof PIXI.loaders + */ +var Loader = function (_ResourceLoader) { + _inherits(Loader, _ResourceLoader); + + /** + * @param {string} [baseUrl=''] - The base url for all resources loaded by this loader. + * @param {number} [concurrency=10] - The number of resources to load concurrently. + */ + function Loader(baseUrl, concurrency) { + _classCallCheck(this, Loader); + + var _this = _possibleConstructorReturn(this, _ResourceLoader.call(this, baseUrl, concurrency)); + + _eventemitter2.default.call(_this); + + for (var i = 0; i < Loader._pixiMiddleware.length; ++i) { + _this.use(Loader._pixiMiddleware[i]()); + } + + // Compat layer, translate the new v2 signals into old v1 events. + _this.onStart.add(function (l) { + return _this.emit('start', l); + }); + _this.onProgress.add(function (l, r) { + return _this.emit('progress', l, r); + }); + _this.onError.add(function (e, l, r) { + return _this.emit('error', e, l, r); + }); + _this.onLoad.add(function (l, r) { + return _this.emit('load', l, r); + }); + _this.onComplete.add(function (l, r) { + return _this.emit('complete', l, r); + }); + return _this; + } + + /** + * Adds a default middleware to the PixiJS loader. + * + * @static + * @param {Function} fn - The middleware to add. + */ + + + Loader.addPixiMiddleware = function addPixiMiddleware(fn) { + Loader._pixiMiddleware.push(fn); + }; + + /** + * Destroy the loader, removes references. + */ + + + Loader.prototype.destroy = function destroy() { + this.removeAllListeners(); + this.reset(); + }; + + return Loader; +}(_resourceLoader2.default); + +// Copy EE3 prototype (mixin) + + +exports.default = Loader; +for (var k in _eventemitter2.default.prototype) { + Loader.prototype[k] = _eventemitter2.default.prototype[k]; +} + +Loader._pixiMiddleware = [ +// parse any blob into more usable objects (e.g. Image) +_blob.blobMiddlewareFactory, +// parse any Image objects into textures +_textureParser2.default, +// parse any spritesheet data into multiple textures +_spritesheetParser2.default, +// parse bitmap font data into multiple textures +_bitmapFontParser2.default]; + +// Add custom extentions +var Resource = _resourceLoader2.default.Resource; + +Resource.setExtensionXhrType('fnt', Resource.XHR_RESPONSE_TYPE.DOCUMENT); + +},{"./bitmapFontParser":161,"./spritesheetParser":164,"./textureParser":165,"eventemitter3":20,"resource-loader":36,"resource-loader/lib/middlewares/parsing/blob":37}],164:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +exports.default = function () { + return function spritesheetParser(resource, next) { + var imageResourceName = resource.name + '_image'; + + // skip if no data, its not json, it isn't spritesheet data, or the image resource already exists + if (!resource.data || resource.type !== _resourceLoader.Resource.TYPE.JSON || !resource.data.frames || this.resources[imageResourceName]) { + next(); + + return; + } + + var loadOptions = { + crossOrigin: resource.crossOrigin, + loadType: _resourceLoader.Resource.LOAD_TYPE.IMAGE, + metadata: resource.metadata.imageMetadata, + parentResource: resource + }; + + var resourcePath = getResourcePath(resource, this.baseUrl); + + // load the image for this sheet + this.add(imageResourceName, resourcePath, loadOptions, function onImageLoad(res) { + var spritesheet = new _core.Spritesheet(res.texture.baseTexture, resource.data, resource.url); + + spritesheet.parse(function () { + resource.spritesheet = spritesheet; + resource.textures = spritesheet.textures; + next(); + }); + }); + }; +}; + +exports.getResourcePath = getResourcePath; + +var _resourceLoader = require('resource-loader'); + +var _url = require('url'); + +var _url2 = _interopRequireDefault(_url); + +var _core = require('../core'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getResourcePath(resource, baseUrl) { + // Prepend url path unless the resource image is a data url + if (resource.isDataUrl) { + return resource.data.meta.image; + } + + return _url2.default.resolve(resource.url.replace(baseUrl, ''), resource.data.meta.image); +} + +},{"../core":65,"resource-loader":36,"url":38}],165:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +exports.default = function () { + return function textureParser(resource, next) { + // create a new texture if the data is an Image object + if (resource.data && resource.type === _resourceLoader.Resource.TYPE.IMAGE) { + resource.texture = _Texture2.default.fromLoader(resource.data, resource.url, resource.name); + } + next(); + }; +}; + +var _resourceLoader = require('resource-loader'); + +var _Texture = require('../core/textures/Texture'); + +var _Texture2 = _interopRequireDefault(_Texture); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"../core/textures/Texture":115,"resource-loader":36}],166:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _TextureTransform = require('../extras/TextureTransform'); + +var _TextureTransform2 = _interopRequireDefault(_TextureTransform); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var tempPoint = new core.Point(); +var tempPolygon = new core.Polygon(); + +/** + * Base mesh class + * @class + * @extends PIXI.Container + * @memberof PIXI.mesh + */ + +var Mesh = function (_core$Container) { + _inherits(Mesh, _core$Container); + + /** + * @param {PIXI.Texture} texture - The texture to use + * @param {Float32Array} [vertices] - if you want to specify the vertices + * @param {Float32Array} [uvs] - if you want to specify the uvs + * @param {Uint16Array} [indices] - if you want to specify the indices + * @param {number} [drawMode] - the drawMode, can be any of the Mesh.DRAW_MODES consts + */ + function Mesh(texture, vertices, uvs, indices, drawMode) { + _classCallCheck(this, Mesh); + + /** + * The texture of the Mesh + * + * @member {PIXI.Texture} + * @private + */ + var _this = _possibleConstructorReturn(this, _core$Container.call(this)); + + _this._texture = texture; + + /** + * The Uvs of the Mesh + * + * @member {Float32Array} + */ + _this.uvs = uvs || new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]); + + /** + * An array of vertices + * + * @member {Float32Array} + */ + _this.vertices = vertices || new Float32Array([0, 0, 100, 0, 100, 100, 0, 100]); + + /** + * An array containing the indices of the vertices + * + * @member {Uint16Array} + */ + // TODO auto generate this based on draw mode! + _this.indices = indices || new Uint16Array([0, 1, 3, 2]); + + /** + * Version of mesh uvs are dirty or not + * + * @member {number} + */ + _this.dirty = 0; + + /** + * Version of mesh indices + * + * @member {number} + */ + _this.indexDirty = 0; + + /** + * The blend mode to be applied to the sprite. Set to `PIXI.BLEND_MODES.NORMAL` to remove + * any blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + * @see PIXI.BLEND_MODES + */ + _this.blendMode = core.BLEND_MODES.NORMAL; + + /** + * Triangles in canvas mode are automatically antialiased, use this value to force triangles + * to overlap a bit with each other. + * + * @member {number} + */ + _this.canvasPadding = 0; + + /** + * The way the Mesh should be drawn, can be any of the {@link PIXI.mesh.Mesh.DRAW_MODES} consts + * + * @member {number} + * @see PIXI.mesh.Mesh.DRAW_MODES + */ + _this.drawMode = drawMode || Mesh.DRAW_MODES.TRIANGLE_MESH; + + /** + * The default shader that is used if a mesh doesn't have a more specific one. + * + * @member {PIXI.Shader} + */ + _this.shader = null; + + /** + * The tint applied to the mesh. This is a [r,g,b] value. A value of [1,1,1] will remove any + * tint effect. + * + * @member {number} + */ + _this.tintRgb = new Float32Array([1, 1, 1]); + + /** + * A map of renderer IDs to webgl render data + * + * @private + * @member {object} + */ + _this._glDatas = {}; + + /** + * transform that is applied to UV to get the texture coords + * its updated independently from texture uvTransform + * updates of uvs are tied to that thing + * + * @member {PIXI.extras.TextureTransform} + * @private + */ + _this._uvTransform = new _TextureTransform2.default(texture); + + /** + * whether or not upload uvTransform to shader + * if its false, then uvs should be pre-multiplied + * if you change it for generated mesh, please call 'refresh(true)' + * @member {boolean} + * @default false + */ + _this.uploadUvTransform = false; + + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_renderWebGL' & '_renderCanvas' methods. + * @member {string} + * @default 'mesh' + */ + _this.pluginName = 'mesh'; + return _this; + } + + /** + * Renders the object using the WebGL renderer + * + * @private + * @param {PIXI.WebGLRenderer} renderer - a reference to the WebGL renderer + */ + + + Mesh.prototype._renderWebGL = function _renderWebGL(renderer) { + this.refresh(); + renderer.setObjectRenderer(renderer.plugins[this.pluginName]); + renderer.plugins[this.pluginName].render(this); + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The canvas renderer. + */ + + + Mesh.prototype._renderCanvas = function _renderCanvas(renderer) { + this.refresh(); + renderer.plugins[this.pluginName].render(this); + }; + + /** + * When the texture is updated, this event will fire to update the scale and frame + * + * @private + */ + + + Mesh.prototype._onTextureUpdate = function _onTextureUpdate() { + this._uvTransform.texture = this._texture; + this.refresh(); + }; + + /** + * multiplies uvs only if uploadUvTransform is false + * call it after you change uvs manually + * make sure that texture is valid + */ + + + Mesh.prototype.multiplyUvs = function multiplyUvs() { + if (!this.uploadUvTransform) { + this._uvTransform.multiplyUvs(this.uvs); + } + }; + + /** + * Refreshes uvs for generated meshes (rope, plane) + * sometimes refreshes vertices too + * + * @param {boolean} [forceUpdate=false] if true, matrices will be updated any case + */ + + + Mesh.prototype.refresh = function refresh(forceUpdate) { + if (this._uvTransform.update(forceUpdate)) { + this._refresh(); + } + }; + + /** + * re-calculates mesh coords + * @protected + */ + + + Mesh.prototype._refresh = function _refresh() {} + /* empty */ + + + /** + * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. + * + */ + ; + + Mesh.prototype._calculateBounds = function _calculateBounds() { + // TODO - we can cache local bounds and use them if they are dirty (like graphics) + this._bounds.addVertices(this.transform, this.vertices, 0, this.vertices.length); + }; + + /** + * Tests if a point is inside this mesh. Works only for TRIANGLE_MESH + * + * @param {PIXI.Point} point - the point to test + * @return {boolean} the result of the test + */ + + + Mesh.prototype.containsPoint = function containsPoint(point) { + if (!this.getBounds().contains(point.x, point.y)) { + return false; + } + + this.worldTransform.applyInverse(point, tempPoint); + + var vertices = this.vertices; + var points = tempPolygon.points; + var indices = this.indices; + var len = this.indices.length; + var step = this.drawMode === Mesh.DRAW_MODES.TRIANGLES ? 3 : 1; + + for (var i = 0; i + 2 < len; i += step) { + var ind0 = indices[i] * 2; + var ind1 = indices[i + 1] * 2; + var ind2 = indices[i + 2] * 2; + + points[0] = vertices[ind0]; + points[1] = vertices[ind0 + 1]; + points[2] = vertices[ind1]; + points[3] = vertices[ind1 + 1]; + points[4] = vertices[ind2]; + points[5] = vertices[ind2 + 1]; + + if (tempPolygon.contains(tempPoint.x, tempPoint.y)) { + return true; + } + } + + return false; + }; + + /** + * The texture that the mesh uses. + * + * @member {PIXI.Texture} + */ + + + _createClass(Mesh, [{ + key: 'texture', + get: function get() { + return this._texture; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + if (this._texture === value) { + return; + } + + this._texture = value; + + if (value) { + // wait for the texture to load + if (value.baseTexture.hasLoaded) { + this._onTextureUpdate(); + } else { + value.once('update', this._onTextureUpdate, this); + } + } + } + + /** + * The tint applied to the mesh. This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * + * @member {number} + * @default 0xFFFFFF + */ + + }, { + key: 'tint', + get: function get() { + return core.utils.rgb2hex(this.tintRgb); + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this.tintRgb = core.utils.hex2rgb(value, this.tintRgb); + } + }]); + + return Mesh; +}(core.Container); + +/** + * Different drawing buffer modes supported + * + * @static + * @constant + * @type {object} + * @property {number} TRIANGLE_MESH + * @property {number} TRIANGLES + */ + + +exports.default = Mesh; +Mesh.DRAW_MODES = { + TRIANGLE_MESH: 0, + TRIANGLES: 1 +}; + +},{"../core":65,"../extras/TextureTransform":136}],167:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _Plane2 = require('./Plane'); + +var _Plane3 = _interopRequireDefault(_Plane2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var DEFAULT_BORDER_SIZE = 10; + +/** + * The NineSlicePlane allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful + * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically + * + *```js + * let Plane9 = new PIXI.NineSlicePlane(PIXI.Texture.fromImage('BoxWithRoundedCorners.png'), 15, 15, 15, 15); + * ``` + *
+ *      A                          B
+ *    +---+----------------------+---+
+ *  C | 1 |          2           | 3 |
+ *    +---+----------------------+---+
+ *    |   |                      |   |
+ *    | 4 |          5           | 6 |
+ *    |   |                      |   |
+ *    +---+----------------------+---+
+ *  D | 7 |          8           | 9 |
+ *    +---+----------------------+---+
+
+ *  When changing this objects width and/or height:
+ *     areas 1 3 7 and 9 will remain unscaled.
+ *     areas 2 and 8 will be stretched horizontally
+ *     areas 4 and 6 will be stretched vertically
+ *     area 5 will be stretched both horizontally and vertically
+ * 
+ * + * @class + * @extends PIXI.mesh.Plane + * @memberof PIXI.mesh + * + */ + +var NineSlicePlane = function (_Plane) { + _inherits(NineSlicePlane, _Plane); + + /** + * @param {PIXI.Texture} texture - The texture to use on the NineSlicePlane. + * @param {int} [leftWidth=10] size of the left vertical bar (A) + * @param {int} [topHeight=10] size of the top horizontal bar (C) + * @param {int} [rightWidth=10] size of the right vertical bar (B) + * @param {int} [bottomHeight=10] size of the bottom horizontal bar (D) + */ + function NineSlicePlane(texture, leftWidth, topHeight, rightWidth, bottomHeight) { + _classCallCheck(this, NineSlicePlane); + + var _this = _possibleConstructorReturn(this, _Plane.call(this, texture, 4, 4)); + + _this._origWidth = texture.orig.width; + _this._origHeight = texture.orig.height; + + /** + * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + * @memberof PIXI.NineSlicePlane# + * @override + */ + _this._width = _this._origWidth; + + /** + * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + * @memberof PIXI.NineSlicePlane# + * @override + */ + _this._height = _this._origHeight; + + /** + * The width of the left column (a) + * + * @member {number} + * @memberof PIXI.NineSlicePlane# + * @override + */ + _this.leftWidth = typeof leftWidth !== 'undefined' ? leftWidth : DEFAULT_BORDER_SIZE; + + /** + * The width of the right column (b) + * + * @member {number} + * @memberof PIXI.NineSlicePlane# + * @override + */ + _this.rightWidth = typeof rightWidth !== 'undefined' ? rightWidth : DEFAULT_BORDER_SIZE; + + /** + * The height of the top row (c) + * + * @member {number} + * @memberof PIXI.NineSlicePlane# + * @override + */ + _this.topHeight = typeof topHeight !== 'undefined' ? topHeight : DEFAULT_BORDER_SIZE; + + /** + * The height of the bottom row (d) + * + * @member {number} + * @memberof PIXI.NineSlicePlane# + * @override + */ + _this.bottomHeight = typeof bottomHeight !== 'undefined' ? bottomHeight : DEFAULT_BORDER_SIZE; + + _this.refresh(true); + return _this; + } + + /** + * Updates the horizontal vertices. + * + */ + + + NineSlicePlane.prototype.updateHorizontalVertices = function updateHorizontalVertices() { + var vertices = this.vertices; + + vertices[9] = vertices[11] = vertices[13] = vertices[15] = this._topHeight; + vertices[17] = vertices[19] = vertices[21] = vertices[23] = this._height - this._bottomHeight; + vertices[25] = vertices[27] = vertices[29] = vertices[31] = this._height; + }; + + /** + * Updates the vertical vertices. + * + */ + + + NineSlicePlane.prototype.updateVerticalVertices = function updateVerticalVertices() { + var vertices = this.vertices; + + vertices[2] = vertices[10] = vertices[18] = vertices[26] = this._leftWidth; + vertices[4] = vertices[12] = vertices[20] = vertices[28] = this._width - this._rightWidth; + vertices[6] = vertices[14] = vertices[22] = vertices[30] = this._width; + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The canvas renderer to render with. + */ + + + NineSlicePlane.prototype._renderCanvas = function _renderCanvas(renderer) { + var context = renderer.context; + + context.globalAlpha = this.worldAlpha; + + var transform = this.worldTransform; + var res = renderer.resolution; + + if (renderer.roundPixels) { + context.setTransform(transform.a * res, transform.b * res, transform.c * res, transform.d * res, transform.tx * res | 0, transform.ty * res | 0); + } else { + context.setTransform(transform.a * res, transform.b * res, transform.c * res, transform.d * res, transform.tx * res, transform.ty * res); + } + + var base = this._texture.baseTexture; + var textureSource = base.source; + var w = base.width; + var h = base.height; + + this.drawSegment(context, textureSource, w, h, 0, 1, 10, 11); + this.drawSegment(context, textureSource, w, h, 2, 3, 12, 13); + this.drawSegment(context, textureSource, w, h, 4, 5, 14, 15); + this.drawSegment(context, textureSource, w, h, 8, 9, 18, 19); + this.drawSegment(context, textureSource, w, h, 10, 11, 20, 21); + this.drawSegment(context, textureSource, w, h, 12, 13, 22, 23); + this.drawSegment(context, textureSource, w, h, 16, 17, 26, 27); + this.drawSegment(context, textureSource, w, h, 18, 19, 28, 29); + this.drawSegment(context, textureSource, w, h, 20, 21, 30, 31); + }; + + /** + * Renders one segment of the plane. + * to mimic the exact drawing behavior of stretching the image like WebGL does, we need to make sure + * that the source area is at least 1 pixel in size, otherwise nothing gets drawn when a slice size of 0 is used. + * + * @private + * @param {CanvasRenderingContext2D} context - The context to draw with. + * @param {CanvasImageSource} textureSource - The source to draw. + * @param {number} w - width of the texture + * @param {number} h - height of the texture + * @param {number} x1 - x index 1 + * @param {number} y1 - y index 1 + * @param {number} x2 - x index 2 + * @param {number} y2 - y index 2 + */ + + + NineSlicePlane.prototype.drawSegment = function drawSegment(context, textureSource, w, h, x1, y1, x2, y2) { + // otherwise you get weird results when using slices of that are 0 wide or high. + var uvs = this.uvs; + var vertices = this.vertices; + + var sw = (uvs[x2] - uvs[x1]) * w; + var sh = (uvs[y2] - uvs[y1]) * h; + var dw = vertices[x2] - vertices[x1]; + var dh = vertices[y2] - vertices[y1]; + + // make sure the source is at least 1 pixel wide and high, otherwise nothing will be drawn. + if (sw < 1) { + sw = 1; + } + + if (sh < 1) { + sh = 1; + } + + // make sure destination is at least 1 pixel wide and high, otherwise you get + // lines when rendering close to original size. + if (dw < 1) { + dw = 1; + } + + if (dh < 1) { + dh = 1; + } + + context.drawImage(textureSource, uvs[x1] * w, uvs[y1] * h, sw, sh, vertices[x1], vertices[y1], dw, dh); + }; + + /** + * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + */ + + + /** + * Refreshes NineSlicePlane coords. All of them. + */ + NineSlicePlane.prototype._refresh = function _refresh() { + _Plane.prototype._refresh.call(this); + + var uvs = this.uvs; + var texture = this._texture; + + this._origWidth = texture.orig.width; + this._origHeight = texture.orig.height; + + var _uvw = 1.0 / this._origWidth; + var _uvh = 1.0 / this._origHeight; + + uvs[0] = uvs[8] = uvs[16] = uvs[24] = 0; + uvs[1] = uvs[3] = uvs[5] = uvs[7] = 0; + uvs[6] = uvs[14] = uvs[22] = uvs[30] = 1; + uvs[25] = uvs[27] = uvs[29] = uvs[31] = 1; + + uvs[2] = uvs[10] = uvs[18] = uvs[26] = _uvw * this._leftWidth; + uvs[4] = uvs[12] = uvs[20] = uvs[28] = 1 - _uvw * this._rightWidth; + uvs[9] = uvs[11] = uvs[13] = uvs[15] = _uvh * this._topHeight; + uvs[17] = uvs[19] = uvs[21] = uvs[23] = 1 - _uvh * this._bottomHeight; + + this.updateHorizontalVertices(); + this.updateVerticalVertices(); + + this.dirty = true; + + this.multiplyUvs(); + }; + + _createClass(NineSlicePlane, [{ + key: 'width', + get: function get() { + return this._width; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._width = value; + this._refresh(); + } + + /** + * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane + * + * @member {number} + */ + + }, { + key: 'height', + get: function get() { + return this._height; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._height = value; + this._refresh(); + } + + /** + * The width of the left column + * + * @member {number} + */ + + }, { + key: 'leftWidth', + get: function get() { + return this._leftWidth; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._leftWidth = value; + this._refresh(); + } + + /** + * The width of the right column + * + * @member {number} + */ + + }, { + key: 'rightWidth', + get: function get() { + return this._rightWidth; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._rightWidth = value; + this._refresh(); + } + + /** + * The height of the top row + * + * @member {number} + */ + + }, { + key: 'topHeight', + get: function get() { + return this._topHeight; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._topHeight = value; + this._refresh(); + } + + /** + * The height of the bottom row + * + * @member {number} + */ + + }, { + key: 'bottomHeight', + get: function get() { + return this._bottomHeight; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._bottomHeight = value; + this._refresh(); + } + }]); + + return NineSlicePlane; +}(_Plane3.default); + +exports.default = NineSlicePlane; + +},{"./Plane":168}],168:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Mesh2 = require('./Mesh'); + +var _Mesh3 = _interopRequireDefault(_Mesh2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The Plane allows you to draw a texture across several points and them manipulate these points + * + *```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * let Plane = new PIXI.Plane(PIXI.Texture.fromImage("snake.png"), points); + * ``` + * + * @class + * @extends PIXI.mesh.Mesh + * @memberof PIXI.mesh + * + */ +var Plane = function (_Mesh) { + _inherits(Plane, _Mesh); + + /** + * @param {PIXI.Texture} texture - The texture to use on the Plane. + * @param {number} verticesX - The number of vertices in the x-axis + * @param {number} verticesY - The number of vertices in the y-axis + */ + function Plane(texture, verticesX, verticesY) { + _classCallCheck(this, Plane); + + /** + * Tracker for if the Plane is ready to be drawn. Needed because Mesh ctor can + * call _onTextureUpdated which could call refresh too early. + * + * @member {boolean} + * @private + */ + var _this = _possibleConstructorReturn(this, _Mesh.call(this, texture)); + + _this._ready = true; + + _this.verticesX = verticesX || 10; + _this.verticesY = verticesY || 10; + + _this.drawMode = _Mesh3.default.DRAW_MODES.TRIANGLES; + _this.refresh(); + return _this; + } + + /** + * Refreshes plane coordinates + * + */ + + + Plane.prototype._refresh = function _refresh() { + var texture = this._texture; + var total = this.verticesX * this.verticesY; + var verts = []; + var colors = []; + var uvs = []; + var indices = []; + + var segmentsX = this.verticesX - 1; + var segmentsY = this.verticesY - 1; + + var sizeX = texture.width / segmentsX; + var sizeY = texture.height / segmentsY; + + for (var i = 0; i < total; i++) { + var x = i % this.verticesX; + var y = i / this.verticesX | 0; + + verts.push(x * sizeX, y * sizeY); + + uvs.push(x / segmentsX, y / segmentsY); + } + + // cons + + var totalSub = segmentsX * segmentsY; + + for (var _i = 0; _i < totalSub; _i++) { + var xpos = _i % segmentsX; + var ypos = _i / segmentsX | 0; + + var value = ypos * this.verticesX + xpos; + var value2 = ypos * this.verticesX + xpos + 1; + var value3 = (ypos + 1) * this.verticesX + xpos; + var value4 = (ypos + 1) * this.verticesX + xpos + 1; + + indices.push(value, value2, value3); + indices.push(value2, value4, value3); + } + + // console.log(indices) + this.vertices = new Float32Array(verts); + this.uvs = new Float32Array(uvs); + this.colors = new Float32Array(colors); + this.indices = new Uint16Array(indices); + this.indexDirty = true; + + this.multiplyUvs(); + }; + + /** + * Clear texture UVs when new texture is set + * + * @private + */ + + + Plane.prototype._onTextureUpdate = function _onTextureUpdate() { + _Mesh3.default.prototype._onTextureUpdate.call(this); + + // wait for the Plane ctor to finish before calling refresh + if (this._ready) { + this.refresh(); + } + }; + + return Plane; +}(_Mesh3.default); + +exports.default = Plane; + +},{"./Mesh":166}],169:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Mesh2 = require('./Mesh'); + +var _Mesh3 = _interopRequireDefault(_Mesh2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The rope allows you to draw a texture across several points and them manipulate these points + * + *```js + * for (let i = 0; i < 20; i++) { + * points.push(new PIXI.Point(i * 50, 0)); + * }; + * let rope = new PIXI.Rope(PIXI.Texture.fromImage("snake.png"), points); + * ``` + * + * @class + * @extends PIXI.mesh.Mesh + * @memberof PIXI.mesh + * + */ +var Rope = function (_Mesh) { + _inherits(Rope, _Mesh); + + /** + * @param {PIXI.Texture} texture - The texture to use on the rope. + * @param {PIXI.Point[]} points - An array of {@link PIXI.Point} objects to construct this rope. + */ + function Rope(texture, points) { + _classCallCheck(this, Rope); + + /** + * An array of points that determine the rope + * + * @member {PIXI.Point[]} + */ + var _this = _possibleConstructorReturn(this, _Mesh.call(this, texture)); + + _this.points = points; + + /** + * An array of vertices used to construct this rope. + * + * @member {Float32Array} + */ + _this.vertices = new Float32Array(points.length * 4); + + /** + * The WebGL Uvs of the rope. + * + * @member {Float32Array} + */ + _this.uvs = new Float32Array(points.length * 4); + + /** + * An array containing the color components + * + * @member {Float32Array} + */ + _this.colors = new Float32Array(points.length * 2); + + /** + * An array containing the indices of the vertices + * + * @member {Uint16Array} + */ + _this.indices = new Uint16Array(points.length * 2); + + /** + * refreshes vertices on every updateTransform + * @member {boolean} + * @default true + */ + _this.autoUpdate = true; + + _this.refresh(); + return _this; + } + + /** + * Refreshes + * + */ + + + Rope.prototype._refresh = function _refresh() { + var points = this.points; + + // if too little points, or texture hasn't got UVs set yet just move on. + if (points.length < 1 || !this._texture._uvs) { + return; + } + + // if the number of points has changed we will need to recreate the arraybuffers + if (this.vertices.length / 4 !== points.length) { + this.vertices = new Float32Array(points.length * 4); + this.uvs = new Float32Array(points.length * 4); + this.colors = new Float32Array(points.length * 2); + this.indices = new Uint16Array(points.length * 2); + } + + var uvs = this.uvs; + + var indices = this.indices; + var colors = this.colors; + + uvs[0] = 0; + uvs[1] = 0; + uvs[2] = 0; + uvs[3] = 1; + + colors[0] = 1; + colors[1] = 1; + + indices[0] = 0; + indices[1] = 1; + + var total = points.length; + + for (var i = 1; i < total; i++) { + // time to do some smart drawing! + var index = i * 4; + var amount = i / (total - 1); + + uvs[index] = amount; + uvs[index + 1] = 0; + + uvs[index + 2] = amount; + uvs[index + 3] = 1; + + index = i * 2; + colors[index] = 1; + colors[index + 1] = 1; + + index = i * 2; + indices[index] = index; + indices[index + 1] = index + 1; + } + + // ensure that the changes are uploaded + this.dirty++; + this.indexDirty++; + + this.multiplyUvs(); + this.refreshVertices(); + }; + + /** + * refreshes vertices of Rope mesh + */ + + + Rope.prototype.refreshVertices = function refreshVertices() { + var points = this.points; + + if (points.length < 1) { + return; + } + + var lastPoint = points[0]; + var nextPoint = void 0; + var perpX = 0; + var perpY = 0; + + // this.count -= 0.2; + + var vertices = this.vertices; + var total = points.length; + + for (var i = 0; i < total; i++) { + var point = points[i]; + var index = i * 4; + + if (i < points.length - 1) { + nextPoint = points[i + 1]; + } else { + nextPoint = point; + } + + perpY = -(nextPoint.x - lastPoint.x); + perpX = nextPoint.y - lastPoint.y; + + var ratio = (1 - i / (total - 1)) * 10; + + if (ratio > 1) { + ratio = 1; + } + + var perpLength = Math.sqrt(perpX * perpX + perpY * perpY); + var num = this._texture.height / 2; // (20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio; + + perpX /= perpLength; + perpY /= perpLength; + + perpX *= num; + perpY *= num; + + vertices[index] = point.x + perpX; + vertices[index + 1] = point.y + perpY; + vertices[index + 2] = point.x - perpX; + vertices[index + 3] = point.y - perpY; + + lastPoint = point; + } + }; + + /** + * Updates the object transform for rendering + * + * @private + */ + + + Rope.prototype.updateTransform = function updateTransform() { + if (this.autoUpdate) { + this.refreshVertices(); + } + this.containerUpdateTransform(); + }; + + return Rope; +}(_Mesh3.default); + +exports.default = Rope; + +},{"./Mesh":166}],170:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _Mesh = require('../Mesh'); + +var _Mesh2 = _interopRequireDefault(_Mesh); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Renderer dedicated to meshes. + * + * @class + * @private + * @memberof PIXI + */ +var MeshSpriteRenderer = function () { + /** + * @param {PIXI.CanvasRenderer} renderer - The renderer this downport works for + */ + function MeshSpriteRenderer(renderer) { + _classCallCheck(this, MeshSpriteRenderer); + + this.renderer = renderer; + } + + /** + * Renders the Mesh + * + * @param {PIXI.mesh.Mesh} mesh - the Mesh to render + */ + + + MeshSpriteRenderer.prototype.render = function render(mesh) { + var renderer = this.renderer; + var context = renderer.context; + + var transform = mesh.worldTransform; + var res = renderer.resolution; + + if (renderer.roundPixels) { + context.setTransform(transform.a * res, transform.b * res, transform.c * res, transform.d * res, transform.tx * res | 0, transform.ty * res | 0); + } else { + context.setTransform(transform.a * res, transform.b * res, transform.c * res, transform.d * res, transform.tx * res, transform.ty * res); + } + + renderer.setBlendMode(mesh.blendMode); + + if (mesh.drawMode === _Mesh2.default.DRAW_MODES.TRIANGLE_MESH) { + this._renderTriangleMesh(mesh); + } else { + this._renderTriangles(mesh); + } + }; + + /** + * Draws the object in Triangle Mesh mode + * + * @private + * @param {PIXI.mesh.Mesh} mesh - the Mesh to render + */ + + + MeshSpriteRenderer.prototype._renderTriangleMesh = function _renderTriangleMesh(mesh) { + // draw triangles!! + var length = mesh.vertices.length / 2; + + for (var i = 0; i < length - 2; i++) { + // draw some triangles! + var index = i * 2; + + this._renderDrawTriangle(mesh, index, index + 2, index + 4); + } + }; + + /** + * Draws the object in triangle mode using canvas + * + * @private + * @param {PIXI.mesh.Mesh} mesh - the current mesh + */ + + + MeshSpriteRenderer.prototype._renderTriangles = function _renderTriangles(mesh) { + // draw triangles!! + var indices = mesh.indices; + var length = indices.length; + + for (var i = 0; i < length; i += 3) { + // draw some triangles! + var index0 = indices[i] * 2; + var index1 = indices[i + 1] * 2; + var index2 = indices[i + 2] * 2; + + this._renderDrawTriangle(mesh, index0, index1, index2); + } + }; + + /** + * Draws one of the triangles that from the Mesh + * + * @private + * @param {PIXI.mesh.Mesh} mesh - the current mesh + * @param {number} index0 - the index of the first vertex + * @param {number} index1 - the index of the second vertex + * @param {number} index2 - the index of the third vertex + */ + + + MeshSpriteRenderer.prototype._renderDrawTriangle = function _renderDrawTriangle(mesh, index0, index1, index2) { + var context = this.renderer.context; + var uvs = mesh.uvs; + var vertices = mesh.vertices; + var texture = mesh._texture; + + if (!texture.valid) { + return; + } + + var base = texture.baseTexture; + var textureSource = base.source; + var textureWidth = base.width; + var textureHeight = base.height; + + var u0 = void 0; + var u1 = void 0; + var u2 = void 0; + var v0 = void 0; + var v1 = void 0; + var v2 = void 0; + + if (mesh.uploadUvTransform) { + var ut = mesh._uvTransform.mapCoord; + + u0 = (uvs[index0] * ut.a + uvs[index0 + 1] * ut.c + ut.tx) * base.width; + u1 = (uvs[index1] * ut.a + uvs[index1 + 1] * ut.c + ut.tx) * base.width; + u2 = (uvs[index2] * ut.a + uvs[index2 + 1] * ut.c + ut.tx) * base.width; + v0 = (uvs[index0] * ut.b + uvs[index0 + 1] * ut.d + ut.ty) * base.height; + v1 = (uvs[index1] * ut.b + uvs[index1 + 1] * ut.d + ut.ty) * base.height; + v2 = (uvs[index2] * ut.b + uvs[index2 + 1] * ut.d + ut.ty) * base.height; + } else { + u0 = uvs[index0] * base.width; + u1 = uvs[index1] * base.width; + u2 = uvs[index2] * base.width; + v0 = uvs[index0 + 1] * base.height; + v1 = uvs[index1 + 1] * base.height; + v2 = uvs[index2 + 1] * base.height; + } + + var x0 = vertices[index0]; + var x1 = vertices[index1]; + var x2 = vertices[index2]; + var y0 = vertices[index0 + 1]; + var y1 = vertices[index1 + 1]; + var y2 = vertices[index2 + 1]; + + if (mesh.canvasPadding > 0) { + var paddingX = mesh.canvasPadding / mesh.worldTransform.a; + var paddingY = mesh.canvasPadding / mesh.worldTransform.d; + var centerX = (x0 + x1 + x2) / 3; + var centerY = (y0 + y1 + y2) / 3; + + var normX = x0 - centerX; + var normY = y0 - centerY; + + var dist = Math.sqrt(normX * normX + normY * normY); + + x0 = centerX + normX / dist * (dist + paddingX); + y0 = centerY + normY / dist * (dist + paddingY); + + // + + normX = x1 - centerX; + normY = y1 - centerY; + + dist = Math.sqrt(normX * normX + normY * normY); + x1 = centerX + normX / dist * (dist + paddingX); + y1 = centerY + normY / dist * (dist + paddingY); + + normX = x2 - centerX; + normY = y2 - centerY; + + dist = Math.sqrt(normX * normX + normY * normY); + x2 = centerX + normX / dist * (dist + paddingX); + y2 = centerY + normY / dist * (dist + paddingY); + } + + context.save(); + context.beginPath(); + + context.moveTo(x0, y0); + context.lineTo(x1, y1); + context.lineTo(x2, y2); + + context.closePath(); + + context.clip(); + + // Compute matrix transform + var delta = u0 * v1 + v0 * u2 + u1 * v2 - v1 * u2 - v0 * u1 - u0 * v2; + var deltaA = x0 * v1 + v0 * x2 + x1 * v2 - v1 * x2 - v0 * x1 - x0 * v2; + var deltaB = u0 * x1 + x0 * u2 + u1 * x2 - x1 * u2 - x0 * u1 - u0 * x2; + var deltaC = u0 * v1 * x2 + v0 * x1 * u2 + x0 * u1 * v2 - x0 * v1 * u2 - v0 * u1 * x2 - u0 * x1 * v2; + var deltaD = y0 * v1 + v0 * y2 + y1 * v2 - v1 * y2 - v0 * y1 - y0 * v2; + var deltaE = u0 * y1 + y0 * u2 + u1 * y2 - y1 * u2 - y0 * u1 - u0 * y2; + var deltaF = u0 * v1 * y2 + v0 * y1 * u2 + y0 * u1 * v2 - y0 * v1 * u2 - v0 * u1 * y2 - u0 * y1 * v2; + + context.transform(deltaA / delta, deltaD / delta, deltaB / delta, deltaE / delta, deltaC / delta, deltaF / delta); + + context.drawImage(textureSource, 0, 0, textureWidth * base.resolution, textureHeight * base.resolution, 0, 0, textureWidth, textureHeight); + + context.restore(); + this.renderer.invalidateBlendMode(); + }; + + /** + * Renders a flat Mesh + * + * @private + * @param {PIXI.mesh.Mesh} mesh - The Mesh to render + */ + + + MeshSpriteRenderer.prototype.renderMeshFlat = function renderMeshFlat(mesh) { + var context = this.renderer.context; + var vertices = mesh.vertices; + var length = vertices.length / 2; + + // this.count++; + + context.beginPath(); + + for (var i = 1; i < length - 2; ++i) { + // draw some triangles! + var index = i * 2; + + var x0 = vertices[index]; + var y0 = vertices[index + 1]; + + var x1 = vertices[index + 2]; + var y1 = vertices[index + 3]; + + var x2 = vertices[index + 4]; + var y2 = vertices[index + 5]; + + context.moveTo(x0, y0); + context.lineTo(x1, y1); + context.lineTo(x2, y2); + } + + context.fillStyle = '#FF0000'; + context.fill(); + context.closePath(); + }; + + /** + * destroy the the renderer. + * + */ + + + MeshSpriteRenderer.prototype.destroy = function destroy() { + this.renderer = null; + }; + + return MeshSpriteRenderer; +}(); + +exports.default = MeshSpriteRenderer; + + +core.CanvasRenderer.registerPlugin('mesh', MeshSpriteRenderer); + +},{"../../core":65,"../Mesh":166}],171:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Mesh = require('./Mesh'); + +Object.defineProperty(exports, 'Mesh', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Mesh).default; + } +}); + +var _MeshRenderer = require('./webgl/MeshRenderer'); + +Object.defineProperty(exports, 'MeshRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_MeshRenderer).default; + } +}); + +var _CanvasMeshRenderer = require('./canvas/CanvasMeshRenderer'); + +Object.defineProperty(exports, 'CanvasMeshRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasMeshRenderer).default; + } +}); + +var _Plane = require('./Plane'); + +Object.defineProperty(exports, 'Plane', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Plane).default; + } +}); + +var _NineSlicePlane = require('./NineSlicePlane'); + +Object.defineProperty(exports, 'NineSlicePlane', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_NineSlicePlane).default; + } +}); + +var _Rope = require('./Rope'); + +Object.defineProperty(exports, 'Rope', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_Rope).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./Mesh":166,"./NineSlicePlane":167,"./Plane":168,"./Rope":169,"./canvas/CanvasMeshRenderer":170,"./webgl/MeshRenderer":172}],172:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +var _Mesh = require('../Mesh'); + +var _Mesh2 = _interopRequireDefault(_Mesh); + +var _path = require('path'); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var matrixIdentity = core.Matrix.IDENTITY; + +/** + * WebGL renderer plugin for tiling sprites + * + * @class + * @memberof PIXI + * @extends PIXI.ObjectRenderer + */ + +var MeshRenderer = function (_core$ObjectRenderer) { + _inherits(MeshRenderer, _core$ObjectRenderer); + + /** + * constructor for renderer + * + * @param {WebGLRenderer} renderer The renderer this tiling awesomeness works for. + */ + function MeshRenderer(renderer) { + _classCallCheck(this, MeshRenderer); + + var _this = _possibleConstructorReturn(this, _core$ObjectRenderer.call(this, renderer)); + + _this.shader = null; + return _this; + } + + /** + * Sets up the renderer context and necessary buffers. + * + * @private + */ + + + MeshRenderer.prototype.onContextChange = function onContextChange() { + var gl = this.renderer.gl; + + this.shader = new core.Shader(gl, 'attribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTransform;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n', 'varying vec2 vTextureCoord;\r\nuniform vec4 uColor;\r\n\r\nuniform sampler2D uSampler;\r\n\r\nvoid main(void)\r\n{\r\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\r\n}\r\n'); + }; + + /** + * renders mesh + * + * @param {PIXI.mesh.Mesh} mesh mesh instance + */ + + + MeshRenderer.prototype.render = function render(mesh) { + var renderer = this.renderer; + var gl = renderer.gl; + var texture = mesh._texture; + + if (!texture.valid) { + return; + } + + var glData = mesh._glDatas[renderer.CONTEXT_UID]; + + if (!glData) { + renderer.bindVao(null); + + glData = { + shader: this.shader, + vertexBuffer: _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, mesh.vertices, gl.STREAM_DRAW), + uvBuffer: _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, mesh.uvs, gl.STREAM_DRAW), + indexBuffer: _pixiGlCore2.default.GLBuffer.createIndexBuffer(gl, mesh.indices, gl.STATIC_DRAW), + // build the vao object that will render.. + vao: null, + dirty: mesh.dirty, + indexDirty: mesh.indexDirty + }; + + // build the vao object that will render.. + glData.vao = new _pixiGlCore2.default.VertexArrayObject(gl).addIndex(glData.indexBuffer).addAttribute(glData.vertexBuffer, glData.shader.attributes.aVertexPosition, gl.FLOAT, false, 2 * 4, 0).addAttribute(glData.uvBuffer, glData.shader.attributes.aTextureCoord, gl.FLOAT, false, 2 * 4, 0); + + mesh._glDatas[renderer.CONTEXT_UID] = glData; + } + + renderer.bindVao(glData.vao); + + if (mesh.dirty !== glData.dirty) { + glData.dirty = mesh.dirty; + glData.uvBuffer.upload(mesh.uvs); + } + + if (mesh.indexDirty !== glData.indexDirty) { + glData.indexDirty = mesh.indexDirty; + glData.indexBuffer.upload(mesh.indices); + } + + glData.vertexBuffer.upload(mesh.vertices); + + renderer.bindShader(glData.shader); + + glData.shader.uniforms.uSampler = renderer.bindTexture(texture); + + renderer.state.setBlendMode(core.utils.correctBlendMode(mesh.blendMode, texture.baseTexture.premultipliedAlpha)); + + if (glData.shader.uniforms.uTransform) { + if (mesh.uploadUvTransform) { + glData.shader.uniforms.uTransform = mesh._uvTransform.mapCoord.toArray(true); + } else { + glData.shader.uniforms.uTransform = matrixIdentity.toArray(true); + } + } + glData.shader.uniforms.translationMatrix = mesh.worldTransform.toArray(true); + + glData.shader.uniforms.uColor = core.utils.premultiplyRgba(mesh.tintRgb, mesh.worldAlpha, glData.shader.uniforms.uColor, texture.baseTexture.premultipliedAlpha); + + var drawMode = mesh.drawMode === _Mesh2.default.DRAW_MODES.TRIANGLE_MESH ? gl.TRIANGLE_STRIP : gl.TRIANGLES; + + glData.vao.draw(drawMode, mesh.indices.length, 0); + }; + + return MeshRenderer; +}(core.ObjectRenderer); + +exports.default = MeshRenderer; + + +core.WebGLRenderer.registerPlugin('mesh', MeshRenderer); + +},{"../../core":65,"../Mesh":166,"path":25,"pixi-gl-core":7}],173:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _utils = require('../core/utils'); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The ParticleContainer class is a really fast version of the Container built solely for speed, + * so use when you need a lot of sprites or particles. The tradeoff of the ParticleContainer is that advanced + * functionality will not work. ParticleContainer implements only the basic object transform (position, scale, rotation). + * Any other functionality like tinting, masking, etc will not work on sprites in this batch. + * + * It's extremely easy to use : + * + * ```js + * let container = new ParticleContainer(); + * + * for (let i = 0; i < 100; ++i) + * { + * let sprite = new PIXI.Sprite.fromImage("myImage.png"); + * container.addChild(sprite); + * } + * ``` + * + * And here you have a hundred sprites that will be rendered at the speed of light. + * + * @class + * @extends PIXI.Container + * @memberof PIXI.particles + */ +var ParticleContainer = function (_core$Container) { + _inherits(ParticleContainer, _core$Container); + + /** + * @param {number} [maxSize=15000] - The maximum number of particles that can be renderer by the container. + * @param {object} [properties] - The properties of children that should be uploaded to the gpu and applied. + * @param {boolean} [properties.scale=false] - When true, scale be uploaded and applied. + * @param {boolean} [properties.position=true] - When true, position be uploaded and applied. + * @param {boolean} [properties.rotation=false] - When true, rotation be uploaded and applied. + * @param {boolean} [properties.uvs=false] - When true, uvs be uploaded and applied. + * @param {boolean} [properties.alpha=false] - When true, alpha be uploaded and applied. + * @param {number} [batchSize=15000] - Number of particles per batch. + */ + function ParticleContainer() { + var maxSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1500; + var properties = arguments[1]; + var batchSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 16384; + + _classCallCheck(this, ParticleContainer); + + // Making sure the batch size is valid + // 65535 is max vertex index in the index buffer (see ParticleRenderer) + // so max number of particles is 65536 / 4 = 16384 + var _this = _possibleConstructorReturn(this, _core$Container.call(this)); + + var maxBatchSize = 16384; + + if (batchSize > maxBatchSize) { + batchSize = maxBatchSize; + } + + if (batchSize > maxSize) { + batchSize = maxSize; + } + + /** + * Set properties to be dynamic (true) / static (false) + * + * @member {boolean[]} + * @private + */ + _this._properties = [false, true, false, false, false]; + + /** + * @member {number} + * @private + */ + _this._maxSize = maxSize; + + /** + * @member {number} + * @private + */ + _this._batchSize = batchSize; + + /** + * @member {object} + * @private + */ + _this._glBuffers = {}; + + /** + * @member {number} + * @private + */ + _this._bufferToUpdate = 0; + + /** + * @member {boolean} + * + */ + _this.interactiveChildren = false; + + /** + * The blend mode to be applied to the sprite. Apply a value of `PIXI.BLEND_MODES.NORMAL` + * to reset the blend mode. + * + * @member {number} + * @default PIXI.BLEND_MODES.NORMAL + * @see PIXI.BLEND_MODES + */ + _this.blendMode = core.BLEND_MODES.NORMAL; + + /** + * Used for canvas renderering. If true then the elements will be positioned at the + * nearest pixel. This provides a nice speed boost. + * + * @member {boolean} + * @default true; + */ + _this.roundPixels = true; + + /** + * The texture used to render the children. + * + * @readonly + * @member {BaseTexture} + */ + _this.baseTexture = null; + + _this.setProperties(properties); + + /** + * The tint applied to the container. + * This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * + * @private + * @member {number} + * @default 0xFFFFFF + */ + _this._tint = 0; + _this.tintRgb = new Float32Array(4); + _this.tint = 0xFFFFFF; + return _this; + } + + /** + * Sets the private properties array to dynamic / static based on the passed properties object + * + * @param {object} properties - The properties to be uploaded + */ + + + ParticleContainer.prototype.setProperties = function setProperties(properties) { + if (properties) { + this._properties[0] = 'scale' in properties ? !!properties.scale : this._properties[0]; + this._properties[1] = 'position' in properties ? !!properties.position : this._properties[1]; + this._properties[2] = 'rotation' in properties ? !!properties.rotation : this._properties[2]; + this._properties[3] = 'uvs' in properties ? !!properties.uvs : this._properties[3]; + this._properties[4] = 'alpha' in properties ? !!properties.alpha : this._properties[4]; + } + }; + + /** + * Updates the object transform for rendering + * + * @private + */ + + + ParticleContainer.prototype.updateTransform = function updateTransform() { + // TODO don't need to! + this.displayObjectUpdateTransform(); + // PIXI.Container.prototype.updateTransform.call( this ); + }; + + /** + * The tint applied to the container. This is a hex value. + * A value of 0xFFFFFF will remove any tint effect. + ** IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. + * @member {number} + * @default 0xFFFFFF + */ + + + /** + * Renders the container using the WebGL renderer + * + * @private + * @param {PIXI.WebGLRenderer} renderer - The webgl renderer + */ + ParticleContainer.prototype.renderWebGL = function renderWebGL(renderer) { + var _this2 = this; + + if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable) { + return; + } + + if (!this.baseTexture) { + this.baseTexture = this.children[0]._texture.baseTexture; + if (!this.baseTexture.hasLoaded) { + this.baseTexture.once('update', function () { + return _this2.onChildrenChange(0); + }); + } + } + + renderer.setObjectRenderer(renderer.plugins.particle); + renderer.plugins.particle.render(this); + }; + + /** + * Set the flag that static data should be updated to true + * + * @private + * @param {number} smallestChildIndex - The smallest child index + */ + + + ParticleContainer.prototype.onChildrenChange = function onChildrenChange(smallestChildIndex) { + var bufferIndex = Math.floor(smallestChildIndex / this._batchSize); + + if (bufferIndex < this._bufferToUpdate) { + this._bufferToUpdate = bufferIndex; + } + }; + + /** + * Renders the object using the Canvas renderer + * + * @private + * @param {PIXI.CanvasRenderer} renderer - The canvas renderer + */ + + + ParticleContainer.prototype.renderCanvas = function renderCanvas(renderer) { + if (!this.visible || this.worldAlpha <= 0 || !this.children.length || !this.renderable) { + return; + } + + var context = renderer.context; + var transform = this.worldTransform; + var isRotated = true; + + var positionX = 0; + var positionY = 0; + + var finalWidth = 0; + var finalHeight = 0; + + renderer.setBlendMode(this.blendMode); + + context.globalAlpha = this.worldAlpha; + + this.displayObjectUpdateTransform(); + + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i]; + + if (!child.visible) { + continue; + } + + var frame = child._texture.frame; + + context.globalAlpha = this.worldAlpha * child.alpha; + + if (child.rotation % (Math.PI * 2) === 0) { + // this is the fastest way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call + if (isRotated) { + context.setTransform(transform.a, transform.b, transform.c, transform.d, transform.tx * renderer.resolution, transform.ty * renderer.resolution); + + isRotated = false; + } + + positionX = child.anchor.x * (-frame.width * child.scale.x) + child.position.x + 0.5; + positionY = child.anchor.y * (-frame.height * child.scale.y) + child.position.y + 0.5; + + finalWidth = frame.width * child.scale.x; + finalHeight = frame.height * child.scale.y; + } else { + if (!isRotated) { + isRotated = true; + } + + child.displayObjectUpdateTransform(); + + var childTransform = child.worldTransform; + + if (renderer.roundPixels) { + context.setTransform(childTransform.a, childTransform.b, childTransform.c, childTransform.d, childTransform.tx * renderer.resolution | 0, childTransform.ty * renderer.resolution | 0); + } else { + context.setTransform(childTransform.a, childTransform.b, childTransform.c, childTransform.d, childTransform.tx * renderer.resolution, childTransform.ty * renderer.resolution); + } + + positionX = child.anchor.x * -frame.width + 0.5; + positionY = child.anchor.y * -frame.height + 0.5; + + finalWidth = frame.width; + finalHeight = frame.height; + } + + var resolution = child._texture.baseTexture.resolution; + + context.drawImage(child._texture.baseTexture.source, frame.x * resolution, frame.y * resolution, frame.width * resolution, frame.height * resolution, positionX * renderer.resolution, positionY * renderer.resolution, finalWidth * renderer.resolution, finalHeight * renderer.resolution); + } + }; + + /** + * Destroys the container + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their + * destroy method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + + + ParticleContainer.prototype.destroy = function destroy(options) { + _core$Container.prototype.destroy.call(this, options); + + if (this._buffers) { + for (var i = 0; i < this._buffers.length; ++i) { + this._buffers[i].destroy(); + } + } + + this._properties = null; + this._buffers = null; + }; + + _createClass(ParticleContainer, [{ + key: 'tint', + get: function get() { + return this._tint; + }, + set: function set(value) // eslint-disable-line require-jsdoc + { + this._tint = value; + (0, _utils.hex2rgb)(value, this.tintRgb); + } + }]); + + return ParticleContainer; +}(core.Container); + +exports.default = ParticleContainer; + +},{"../core":65,"../core/utils":124}],174:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _ParticleContainer = require('./ParticleContainer'); + +Object.defineProperty(exports, 'ParticleContainer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_ParticleContainer).default; + } +}); + +var _ParticleRenderer = require('./webgl/ParticleRenderer'); + +Object.defineProperty(exports, 'ParticleRenderer', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_ParticleRenderer).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./ParticleContainer":173,"./webgl/ParticleRenderer":176}],175:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _pixiGlCore = require('pixi-gl-core'); + +var _pixiGlCore2 = _interopRequireDefault(_pixiGlCore); + +var _createIndicesForQuads = require('../../core/utils/createIndicesForQuads'); + +var _createIndicesForQuads2 = _interopRequireDefault(_createIndicesForQuads); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * @author Mat Groves + * + * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ + * for creating the original PixiJS version! + * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that + * they now share 4 bytes on the vertex buffer + * + * Heavily inspired by LibGDX's ParticleBuffer: + * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleBuffer.java + */ + +/** + * The particle buffer manages the static and dynamic buffers for a particle container. + * + * @class + * @private + * @memberof PIXI + */ +var ParticleBuffer = function () { + /** + * @param {WebGLRenderingContext} gl - The rendering context. + * @param {object} properties - The properties to upload. + * @param {boolean[]} dynamicPropertyFlags - Flags for which properties are dynamic. + * @param {number} size - The size of the batch. + */ + function ParticleBuffer(gl, properties, dynamicPropertyFlags, size) { + _classCallCheck(this, ParticleBuffer); + + /** + * The current WebGL drawing context. + * + * @member {WebGLRenderingContext} + */ + this.gl = gl; + + /** + * Size of a single vertex. + * + * @member {number} + */ + this.vertSize = 2; + + /** + * Size of a single vertex in bytes. + * + * @member {number} + */ + this.vertByteSize = this.vertSize * 4; + + /** + * The number of particles the buffer can hold + * + * @member {number} + */ + this.size = size; + + /** + * A list of the properties that are dynamic. + * + * @member {object[]} + */ + this.dynamicProperties = []; + + /** + * A list of the properties that are static. + * + * @member {object[]} + */ + this.staticProperties = []; + + for (var i = 0; i < properties.length; ++i) { + var property = properties[i]; + + // Make copy of properties object so that when we edit the offset it doesn't + // change all other instances of the object literal + property = { + attribute: property.attribute, + size: property.size, + uploadFunction: property.uploadFunction, + offset: property.offset + }; + + if (dynamicPropertyFlags[i]) { + this.dynamicProperties.push(property); + } else { + this.staticProperties.push(property); + } + } + + this.staticStride = 0; + this.staticBuffer = null; + this.staticData = null; + + this.dynamicStride = 0; + this.dynamicBuffer = null; + this.dynamicData = null; + + this.initBuffers(); + } + + /** + * Sets up the renderer context and necessary buffers. + * + * @private + */ + + + ParticleBuffer.prototype.initBuffers = function initBuffers() { + var gl = this.gl; + var dynamicOffset = 0; + + /** + * Holds the indices of the geometry (quads) to draw + * + * @member {Uint16Array} + */ + this.indices = (0, _createIndicesForQuads2.default)(this.size); + this.indexBuffer = _pixiGlCore2.default.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW); + + this.dynamicStride = 0; + + for (var i = 0; i < this.dynamicProperties.length; ++i) { + var property = this.dynamicProperties[i]; + + property.offset = dynamicOffset; + dynamicOffset += property.size; + this.dynamicStride += property.size; + } + + this.dynamicData = new Float32Array(this.size * this.dynamicStride * 4); + this.dynamicBuffer = _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, this.dynamicData, gl.STREAM_DRAW); + + // static // + var staticOffset = 0; + + this.staticStride = 0; + + for (var _i = 0; _i < this.staticProperties.length; ++_i) { + var _property = this.staticProperties[_i]; + + _property.offset = staticOffset; + staticOffset += _property.size; + this.staticStride += _property.size; + } + + this.staticData = new Float32Array(this.size * this.staticStride * 4); + this.staticBuffer = _pixiGlCore2.default.GLBuffer.createVertexBuffer(gl, this.staticData, gl.STATIC_DRAW); + + this.vao = new _pixiGlCore2.default.VertexArrayObject(gl).addIndex(this.indexBuffer); + + for (var _i2 = 0; _i2 < this.dynamicProperties.length; ++_i2) { + var _property2 = this.dynamicProperties[_i2]; + + this.vao.addAttribute(this.dynamicBuffer, _property2.attribute, gl.FLOAT, false, this.dynamicStride * 4, _property2.offset * 4); + } + + for (var _i3 = 0; _i3 < this.staticProperties.length; ++_i3) { + var _property3 = this.staticProperties[_i3]; + + this.vao.addAttribute(this.staticBuffer, _property3.attribute, gl.FLOAT, false, this.staticStride * 4, _property3.offset * 4); + } + }; + + /** + * Uploads the dynamic properties. + * + * @param {PIXI.DisplayObject[]} children - The children to upload. + * @param {number} startIndex - The index to start at. + * @param {number} amount - The number to upload. + */ + + + ParticleBuffer.prototype.uploadDynamic = function uploadDynamic(children, startIndex, amount) { + for (var i = 0; i < this.dynamicProperties.length; i++) { + var property = this.dynamicProperties[i]; + + property.uploadFunction(children, startIndex, amount, this.dynamicData, this.dynamicStride, property.offset); + } + + this.dynamicBuffer.upload(); + }; + + /** + * Uploads the static properties. + * + * @param {PIXI.DisplayObject[]} children - The children to upload. + * @param {number} startIndex - The index to start at. + * @param {number} amount - The number to upload. + */ + + + ParticleBuffer.prototype.uploadStatic = function uploadStatic(children, startIndex, amount) { + for (var i = 0; i < this.staticProperties.length; i++) { + var property = this.staticProperties[i]; + + property.uploadFunction(children, startIndex, amount, this.staticData, this.staticStride, property.offset); + } + + this.staticBuffer.upload(); + }; + + /** + * Destroys the ParticleBuffer. + * + */ + + + ParticleBuffer.prototype.destroy = function destroy() { + this.dynamicProperties = null; + this.dynamicData = null; + this.dynamicBuffer.destroy(); + + this.staticProperties = null; + this.staticData = null; + this.staticBuffer.destroy(); + }; + + return ParticleBuffer; +}(); + +exports.default = ParticleBuffer; + +},{"../../core/utils/createIndicesForQuads":122,"pixi-gl-core":7}],176:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _ParticleShader = require('./ParticleShader'); + +var _ParticleShader2 = _interopRequireDefault(_ParticleShader); + +var _ParticleBuffer = require('./ParticleBuffer'); + +var _ParticleBuffer2 = _interopRequireDefault(_ParticleBuffer); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * @author Mat Groves + * + * Big thanks to the very clever Matt DesLauriers https://github.com/mattdesl/ + * for creating the original PixiJS version! + * Also a thanks to https://github.com/bchevalier for tweaking the tint and alpha so that they now + * share 4 bytes on the vertex buffer + * + * Heavily inspired by LibGDX's ParticleRenderer: + * https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/ParticleRenderer.java + */ + +/** + * + * @class + * @private + * @memberof PIXI + */ +var ParticleRenderer = function (_core$ObjectRenderer) { + _inherits(ParticleRenderer, _core$ObjectRenderer); + + /** + * @param {PIXI.WebGLRenderer} renderer - The renderer this sprite batch works for. + */ + function ParticleRenderer(renderer) { + _classCallCheck(this, ParticleRenderer); + + // 65535 is max vertex index in the index buffer (see ParticleRenderer) + // so max number of particles is 65536 / 4 = 16384 + // and max number of element in the index buffer is 16384 * 6 = 98304 + // Creating a full index buffer, overhead is 98304 * 2 = 196Ko + // let numIndices = 98304; + + /** + * The default shader that is used if a sprite doesn't have a more specific one. + * + * @member {PIXI.Shader} + */ + var _this = _possibleConstructorReturn(this, _core$ObjectRenderer.call(this, renderer)); + + _this.shader = null; + + _this.indexBuffer = null; + + _this.properties = null; + + _this.tempMatrix = new core.Matrix(); + + _this.CONTEXT_UID = 0; + return _this; + } + + /** + * When there is a WebGL context change + * + * @private + */ + + + ParticleRenderer.prototype.onContextChange = function onContextChange() { + var gl = this.renderer.gl; + + this.CONTEXT_UID = this.renderer.CONTEXT_UID; + + // setup default shader + this.shader = new _ParticleShader2.default(gl); + + this.properties = [ + // verticesData + { + attribute: this.shader.attributes.aVertexPosition, + size: 2, + uploadFunction: this.uploadVertices, + offset: 0 + }, + // positionData + { + attribute: this.shader.attributes.aPositionCoord, + size: 2, + uploadFunction: this.uploadPosition, + offset: 0 + }, + // rotationData + { + attribute: this.shader.attributes.aRotation, + size: 1, + uploadFunction: this.uploadRotation, + offset: 0 + }, + // uvsData + { + attribute: this.shader.attributes.aTextureCoord, + size: 2, + uploadFunction: this.uploadUvs, + offset: 0 + }, + // alphaData + { + attribute: this.shader.attributes.aColor, + size: 1, + uploadFunction: this.uploadAlpha, + offset: 0 + }]; + }; + + /** + * Starts a new particle batch. + * + */ + + + ParticleRenderer.prototype.start = function start() { + this.renderer.bindShader(this.shader); + }; + + /** + * Renders the particle container object. + * + * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer + */ + + + ParticleRenderer.prototype.render = function render(container) { + var children = container.children; + var maxSize = container._maxSize; + var batchSize = container._batchSize; + var renderer = this.renderer; + var totalChildren = children.length; + + if (totalChildren === 0) { + return; + } else if (totalChildren > maxSize) { + totalChildren = maxSize; + } + + var buffers = container._glBuffers[renderer.CONTEXT_UID]; + + if (!buffers) { + buffers = container._glBuffers[renderer.CONTEXT_UID] = this.generateBuffers(container); + } + + var baseTexture = children[0]._texture.baseTexture; + + // if the uvs have not updated then no point rendering just yet! + this.renderer.setBlendMode(core.utils.correctBlendMode(container.blendMode, baseTexture.premultipliedAlpha)); + + var gl = renderer.gl; + + var m = container.worldTransform.copy(this.tempMatrix); + + m.prepend(renderer._activeRenderTarget.projectionMatrix); + + this.shader.uniforms.projectionMatrix = m.toArray(true); + + this.shader.uniforms.uColor = core.utils.premultiplyRgba(container.tintRgb, container.worldAlpha, this.shader.uniforms.uColor, baseTexture.premultipliedAlpha); + + // make sure the texture is bound.. + this.shader.uniforms.uSampler = renderer.bindTexture(baseTexture); + + // now lets upload and render the buffers.. + for (var i = 0, j = 0; i < totalChildren; i += batchSize, j += 1) { + var amount = totalChildren - i; + + if (amount > batchSize) { + amount = batchSize; + } + + var buffer = buffers[j]; + + // we always upload the dynamic + buffer.uploadDynamic(children, i, amount); + + // we only upload the static content when we have to! + if (container._bufferToUpdate === j) { + buffer.uploadStatic(children, i, amount); + container._bufferToUpdate = j + 1; + } + + // bind the buffer + renderer.bindVao(buffer.vao); + buffer.vao.draw(gl.TRIANGLES, amount * 6); + } + }; + + /** + * Creates one particle buffer for each child in the container we want to render and updates internal properties + * + * @param {PIXI.ParticleContainer} container - The container to render using this ParticleRenderer + * @return {PIXI.ParticleBuffer[]} The buffers + */ + + + ParticleRenderer.prototype.generateBuffers = function generateBuffers(container) { + var gl = this.renderer.gl; + var buffers = []; + var size = container._maxSize; + var batchSize = container._batchSize; + var dynamicPropertyFlags = container._properties; + + for (var i = 0; i < size; i += batchSize) { + buffers.push(new _ParticleBuffer2.default(gl, this.properties, dynamicPropertyFlags, batchSize)); + } + + return buffers; + }; + + /** + * Uploads the verticies. + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their vertices uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + + + ParticleRenderer.prototype.uploadVertices = function uploadVertices(children, startIndex, amount, array, stride, offset) { + var w0 = 0; + var w1 = 0; + var h0 = 0; + var h1 = 0; + + for (var i = 0; i < amount; ++i) { + var sprite = children[startIndex + i]; + var texture = sprite._texture; + var sx = sprite.scale.x; + var sy = sprite.scale.y; + var trim = texture.trim; + var orig = texture.orig; + + if (trim) { + // if the sprite is trimmed and is not a tilingsprite then we need to add the + // extra space before transforming the sprite coords.. + w1 = trim.x - sprite.anchor.x * orig.width; + w0 = w1 + trim.width; + + h1 = trim.y - sprite.anchor.y * orig.height; + h0 = h1 + trim.height; + } else { + w0 = orig.width * (1 - sprite.anchor.x); + w1 = orig.width * -sprite.anchor.x; + + h0 = orig.height * (1 - sprite.anchor.y); + h1 = orig.height * -sprite.anchor.y; + } + + array[offset] = w1 * sx; + array[offset + 1] = h1 * sy; + + array[offset + stride] = w0 * sx; + array[offset + stride + 1] = h1 * sy; + + array[offset + stride * 2] = w0 * sx; + array[offset + stride * 2 + 1] = h0 * sy; + + array[offset + stride * 3] = w1 * sx; + array[offset + stride * 3 + 1] = h0 * sy; + + offset += stride * 4; + } + }; + + /** + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their positions uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + + + ParticleRenderer.prototype.uploadPosition = function uploadPosition(children, startIndex, amount, array, stride, offset) { + for (var i = 0; i < amount; i++) { + var spritePosition = children[startIndex + i].position; + + array[offset] = spritePosition.x; + array[offset + 1] = spritePosition.y; + + array[offset + stride] = spritePosition.x; + array[offset + stride + 1] = spritePosition.y; + + array[offset + stride * 2] = spritePosition.x; + array[offset + stride * 2 + 1] = spritePosition.y; + + array[offset + stride * 3] = spritePosition.x; + array[offset + stride * 3 + 1] = spritePosition.y; + + offset += stride * 4; + } + }; + + /** + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their rotation uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + + + ParticleRenderer.prototype.uploadRotation = function uploadRotation(children, startIndex, amount, array, stride, offset) { + for (var i = 0; i < amount; i++) { + var spriteRotation = children[startIndex + i].rotation; + + array[offset] = spriteRotation; + array[offset + stride] = spriteRotation; + array[offset + stride * 2] = spriteRotation; + array[offset + stride * 3] = spriteRotation; + + offset += stride * 4; + } + }; + + /** + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their rotation uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + + + ParticleRenderer.prototype.uploadUvs = function uploadUvs(children, startIndex, amount, array, stride, offset) { + for (var i = 0; i < amount; ++i) { + var textureUvs = children[startIndex + i]._texture._uvs; + + if (textureUvs) { + array[offset] = textureUvs.x0; + array[offset + 1] = textureUvs.y0; + + array[offset + stride] = textureUvs.x1; + array[offset + stride + 1] = textureUvs.y1; + + array[offset + stride * 2] = textureUvs.x2; + array[offset + stride * 2 + 1] = textureUvs.y2; + + array[offset + stride * 3] = textureUvs.x3; + array[offset + stride * 3 + 1] = textureUvs.y3; + + offset += stride * 4; + } else { + // TODO you know this can be easier! + array[offset] = 0; + array[offset + 1] = 0; + + array[offset + stride] = 0; + array[offset + stride + 1] = 0; + + array[offset + stride * 2] = 0; + array[offset + stride * 2 + 1] = 0; + + array[offset + stride * 3] = 0; + array[offset + stride * 3 + 1] = 0; + + offset += stride * 4; + } + } + }; + + /** + * + * @param {PIXI.DisplayObject[]} children - the array of display objects to render + * @param {number} startIndex - the index to start from in the children array + * @param {number} amount - the amount of children that will have their rotation uploaded + * @param {number[]} array - The vertices to upload. + * @param {number} stride - Stride to use for iteration. + * @param {number} offset - Offset to start at. + */ + + + ParticleRenderer.prototype.uploadAlpha = function uploadAlpha(children, startIndex, amount, array, stride, offset) { + for (var i = 0; i < amount; i++) { + var spriteAlpha = children[startIndex + i].alpha; + + array[offset] = spriteAlpha; + array[offset + stride] = spriteAlpha; + array[offset + stride * 2] = spriteAlpha; + array[offset + stride * 3] = spriteAlpha; + + offset += stride * 4; + } + }; + + /** + * Destroys the ParticleRenderer. + * + */ + + + ParticleRenderer.prototype.destroy = function destroy() { + if (this.renderer.gl) { + this.renderer.gl.deleteBuffer(this.indexBuffer); + } + + _core$ObjectRenderer.prototype.destroy.call(this); + + this.shader.destroy(); + + this.indices = null; + this.tempMatrix = null; + }; + + return ParticleRenderer; +}(core.ObjectRenderer); + +exports.default = ParticleRenderer; + + +core.WebGLRenderer.registerPlugin('particle', ParticleRenderer); + +},{"../../core":65,"./ParticleBuffer":175,"./ParticleShader":177}],177:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _Shader2 = require('../../core/Shader'); + +var _Shader3 = _interopRequireDefault(_Shader2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * @class + * @extends PIXI.Shader + * @memberof PIXI + */ +var ParticleShader = function (_Shader) { + _inherits(ParticleShader, _Shader); + + /** + * @param {PIXI.Shader} gl - The webgl shader manager this shader works for. + */ + function ParticleShader(gl) { + _classCallCheck(this, ParticleShader); + + return _possibleConstructorReturn(this, _Shader.call(this, gl, + // vertex shader + ['attribute vec2 aVertexPosition;', 'attribute vec2 aTextureCoord;', 'attribute float aColor;', 'attribute vec2 aPositionCoord;', 'attribute vec2 aScale;', 'attribute float aRotation;', 'uniform mat3 projectionMatrix;', 'varying vec2 vTextureCoord;', 'varying float vColor;', 'void main(void){', ' vec2 v = aVertexPosition;', ' v.x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);', ' v.y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);', ' v = v + aPositionCoord;', ' gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);', ' vTextureCoord = aTextureCoord;', ' vColor = aColor;', '}'].join('\n'), + // hello + ['varying vec2 vTextureCoord;', 'varying float vColor;', 'uniform sampler2D uSampler;', 'uniform vec4 uColor;', 'void main(void){', ' vec4 color = texture2D(uSampler, vTextureCoord) * vColor * uColor;', ' if (color.a == 0.0) discard;', ' gl_FragColor = color;', '}'].join('\n'))); + } + + return ParticleShader; +}(_Shader3.default); + +exports.default = ParticleShader; + +},{"../../core/Shader":44}],178:[function(require,module,exports){ +"use strict"; + +// References: +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign + +if (!Math.sign) { + Math.sign = function mathSign(x) { + x = Number(x); + + if (x === 0 || isNaN(x)) { + return x; + } + + return x > 0 ? 1 : -1; + }; +} + +},{}],179:[function(require,module,exports){ +'use strict'; + +var _objectAssign = require('object-assign'); + +var _objectAssign2 = _interopRequireDefault(_objectAssign); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +if (!Object.assign) { + Object.assign = _objectAssign2.default; +} // References: +// https://github.com/sindresorhus/object-assign +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + +},{"object-assign":23}],180:[function(require,module,exports){ +'use strict'; + +require('./Object.assign'); + +require('./requestAnimationFrame'); + +require('./Math.sign'); + +if (!window.ArrayBuffer) { + window.ArrayBuffer = Array; +} + +if (!window.Float32Array) { + window.Float32Array = Array; +} + +if (!window.Uint32Array) { + window.Uint32Array = Array; +} + +if (!window.Uint16Array) { + window.Uint16Array = Array; +} + +},{"./Math.sign":178,"./Object.assign":179,"./requestAnimationFrame":181}],181:[function(require,module,exports){ +(function (global){ +'use strict'; + +// References: +// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ +// https://gist.github.com/1579671 +// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision +// https://gist.github.com/timhall/4078614 +// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame + +// Expected to be used with Browserfiy +// Browserify automatically detects the use of `global` and passes the +// correct reference of `global`, `self`, and finally `window` + +var ONE_FRAME_TIME = 16; + +// Date.now +if (!(Date.now && Date.prototype.getTime)) { + Date.now = function now() { + return new Date().getTime(); + }; +} + +// performance.now +if (!(global.performance && global.performance.now)) { + (function () { + var startTime = Date.now(); + + if (!global.performance) { + global.performance = {}; + } + + global.performance.now = function () { + return Date.now() - startTime; + }; + })(); +} + +// requestAnimationFrame +var lastTime = Date.now(); +var vendors = ['ms', 'moz', 'webkit', 'o']; + +for (var x = 0; x < vendors.length && !global.requestAnimationFrame; ++x) { + var p = vendors[x]; + + global.requestAnimationFrame = global[p + 'RequestAnimationFrame']; + global.cancelAnimationFrame = global[p + 'CancelAnimationFrame'] || global[p + 'CancelRequestAnimationFrame']; +} + +if (!global.requestAnimationFrame) { + global.requestAnimationFrame = function (callback) { + if (typeof callback !== 'function') { + throw new TypeError(callback + 'is not a function'); + } + + var currentTime = Date.now(); + var delay = ONE_FRAME_TIME + lastTime - currentTime; + + if (delay < 0) { + delay = 0; + } + + lastTime = currentTime; + + return setTimeout(function () { + lastTime = Date.now(); + callback(performance.now()); + }, delay); + }; +} + +if (!global.cancelAnimationFrame) { + global.cancelAnimationFrame = function (id) { + return clearTimeout(id); + }; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],182:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../core'); + +var core = _interopRequireWildcard(_core); + +var _CountLimiter = require('./limiters/CountLimiter'); + +var _CountLimiter2 = _interopRequireDefault(_CountLimiter); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var SharedTicker = core.ticker.shared; + +/** + * Default number of uploads per frame using prepare plugin. + * + * @static + * @memberof PIXI.settings + * @name UPLOADS_PER_FRAME + * @type {number} + * @default 4 + */ +core.settings.UPLOADS_PER_FRAME = 4; + +/** + * The prepare manager provides functionality to upload content to the GPU. BasePrepare handles + * basic queuing functionality and is extended by {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare} + * to provide preparation capabilities specific to their respective renderers. + * + * @example + * // Create a sprite + * const sprite = new PIXI.Sprite.fromImage('something.png'); + * + * // Load object into GPU + * app.renderer.plugins.prepare.upload(sprite, () => { + * + * //Texture(s) has been uploaded to GPU + * app.stage.addChild(sprite); + * + * }) + * + * @abstract + * @class + * @memberof PIXI.prepare + */ + +var BasePrepare = function () { + /** + * @param {PIXI.SystemRenderer} renderer - A reference to the current renderer + */ + function BasePrepare(renderer) { + var _this = this; + + _classCallCheck(this, BasePrepare); + + /** + * The limiter to be used to control how quickly items are prepared. + * @type {PIXI.prepare.CountLimiter|PIXI.prepare.TimeLimiter} + */ + this.limiter = new _CountLimiter2.default(core.settings.UPLOADS_PER_FRAME); + + /** + * Reference to the renderer. + * @type {PIXI.SystemRenderer} + * @protected + */ + this.renderer = renderer; + + /** + * The only real difference between CanvasPrepare and WebGLPrepare is what they pass + * to upload hooks. That different parameter is stored here. + * @type {PIXI.prepare.CanvasPrepare|PIXI.WebGLRenderer} + * @protected + */ + this.uploadHookHelper = null; + + /** + * Collection of items to uploads at once. + * @type {Array<*>} + * @private + */ + this.queue = []; + + /** + * Collection of additional hooks for finding assets. + * @type {Array} + * @private + */ + this.addHooks = []; + + /** + * Collection of additional hooks for processing assets. + * @type {Array} + * @private + */ + this.uploadHooks = []; + + /** + * Callback to call after completed. + * @type {Array} + * @private + */ + this.completes = []; + + /** + * If prepare is ticking (running). + * @type {boolean} + * @private + */ + this.ticking = false; + + /** + * 'bound' call for prepareItems(). + * @type {Function} + * @private + */ + this.delayedTick = function () { + // unlikely, but in case we were destroyed between tick() and delayedTick() + if (!_this.queue) { + return; + } + _this.prepareItems(); + }; + + // hooks to find the correct texture + this.registerFindHook(findText); + this.registerFindHook(findTextStyle); + this.registerFindHook(findMultipleBaseTextures); + this.registerFindHook(findBaseTexture); + this.registerFindHook(findTexture); + + // upload hooks + this.registerUploadHook(drawText); + this.registerUploadHook(calculateTextStyle); + } + + /** + * Upload all the textures and graphics to the GPU. + * + * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item - + * Either the container or display object to search for items to upload, the items to upload themselves, + * or the callback function, if items have been added using `prepare.add`. + * @param {Function} [done] - Optional callback when all queued uploads have completed + */ + + + BasePrepare.prototype.upload = function upload(item, done) { + if (typeof item === 'function') { + done = item; + item = null; + } + + // If a display object, search for items + // that we could upload + if (item) { + this.add(item); + } + + // Get the items for upload from the display + if (this.queue.length) { + if (done) { + this.completes.push(done); + } + + if (!this.ticking) { + this.ticking = true; + SharedTicker.addOnce(this.tick, this, core.UPDATE_PRIORITY.UTILITY); + } + } else if (done) { + done(); + } + }; + + /** + * Handle tick update + * + * @private + */ + + + BasePrepare.prototype.tick = function tick() { + setTimeout(this.delayedTick, 0); + }; + + /** + * Actually prepare items. This is handled outside of the tick because it will take a while + * and we do NOT want to block the current animation frame from rendering. + * + * @private + */ + + + BasePrepare.prototype.prepareItems = function prepareItems() { + this.limiter.beginFrame(); + // Upload the graphics + while (this.queue.length && this.limiter.allowedToUpload()) { + var item = this.queue[0]; + var uploaded = false; + + if (item && !item._destroyed) { + for (var i = 0, len = this.uploadHooks.length; i < len; i++) { + if (this.uploadHooks[i](this.uploadHookHelper, item)) { + this.queue.shift(); + uploaded = true; + break; + } + } + } + + if (!uploaded) { + this.queue.shift(); + } + } + + // We're finished + if (!this.queue.length) { + this.ticking = false; + + var completes = this.completes.slice(0); + + this.completes.length = 0; + + for (var _i = 0, _len = completes.length; _i < _len; _i++) { + completes[_i](); + } + } else { + // if we are not finished, on the next rAF do this again + SharedTicker.addOnce(this.tick, this, core.UPDATE_PRIORITY.UTILITY); + } + }; + + /** + * Adds hooks for finding items. + * + * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array` + * function must return `true` if it was able to add item to the queue. + * @return {PIXI.BasePrepare} Instance of plugin for chaining. + */ + + + BasePrepare.prototype.registerFindHook = function registerFindHook(addHook) { + if (addHook) { + this.addHooks.push(addHook); + } + + return this; + }; + + /** + * Adds hooks for uploading items. + * + * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and + * function must return `true` if it was able to handle upload of item. + * @return {PIXI.BasePrepare} Instance of plugin for chaining. + */ + + + BasePrepare.prototype.registerUploadHook = function registerUploadHook(uploadHook) { + if (uploadHook) { + this.uploadHooks.push(uploadHook); + } + + return this; + }; + + /** + * Manually add an item to the uploading queue. + * + * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to + * add to the queue + * @return {PIXI.CanvasPrepare} Instance of plugin for chaining. + */ + + + BasePrepare.prototype.add = function add(item) { + // Add additional hooks for finding elements on special + // types of objects that + for (var i = 0, len = this.addHooks.length; i < len; i++) { + if (this.addHooks[i](item, this.queue)) { + break; + } + } + + // Get childen recursively + if (item instanceof core.Container) { + for (var _i2 = item.children.length - 1; _i2 >= 0; _i2--) { + this.add(item.children[_i2]); + } + } + + return this; + }; + + /** + * Destroys the plugin, don't use after this. + * + */ + + + BasePrepare.prototype.destroy = function destroy() { + if (this.ticking) { + SharedTicker.remove(this.tick, this); + } + this.ticking = false; + this.addHooks = null; + this.uploadHooks = null; + this.renderer = null; + this.completes = null; + this.queue = null; + this.limiter = null; + this.uploadHookHelper = null; + }; + + return BasePrepare; +}(); + +/** + * Built-in hook to find multiple textures from objects like AnimatedSprites. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Texture object was found. + */ + + +exports.default = BasePrepare; +function findMultipleBaseTextures(item, queue) { + var result = false; + + // Objects with mutliple textures + if (item && item._textures && item._textures.length) { + for (var i = 0; i < item._textures.length; i++) { + if (item._textures[i] instanceof core.Texture) { + var baseTexture = item._textures[i].baseTexture; + + if (queue.indexOf(baseTexture) === -1) { + queue.push(baseTexture); + result = true; + } + } + } + } + + return result; +} + +/** + * Built-in hook to find BaseTextures from Sprites. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Texture object was found. + */ +function findBaseTexture(item, queue) { + // Objects with textures, like Sprites/Text + if (item instanceof core.BaseTexture) { + if (queue.indexOf(item) === -1) { + queue.push(item); + } + + return true; + } + + return false; +} + +/** + * Built-in hook to find textures from objects. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Texture object was found. + */ +function findTexture(item, queue) { + if (item._texture && item._texture instanceof core.Texture) { + var texture = item._texture.baseTexture; + + if (queue.indexOf(texture) === -1) { + queue.push(texture); + } + + return true; + } + + return false; +} + +/** + * Built-in hook to draw PIXI.Text to its texture. + * + * @private + * @param {PIXI.WebGLRenderer|PIXI.CanvasPrepare} helper - Not used by this upload handler + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ +function drawText(helper, item) { + if (item instanceof core.Text) { + // updating text will return early if it is not dirty + item.updateText(true); + + return true; + } + + return false; +} + +/** + * Built-in hook to calculate a text style for a PIXI.Text object. + * + * @private + * @param {PIXI.WebGLRenderer|PIXI.CanvasPrepare} helper - Not used by this upload handler + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ +function calculateTextStyle(helper, item) { + if (item instanceof core.TextStyle) { + var font = item.toFontString(); + + core.TextMetrics.measureFont(font); + + return true; + } + + return false; +} + +/** + * Built-in hook to find Text objects. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Text object was found. + */ +function findText(item, queue) { + if (item instanceof core.Text) { + // push the text style to prepare it - this can be really expensive + if (queue.indexOf(item.style) === -1) { + queue.push(item.style); + } + // also push the text object so that we can render it (to canvas/texture) if needed + if (queue.indexOf(item) === -1) { + queue.push(item); + } + // also push the Text's texture for upload to GPU + var texture = item._texture.baseTexture; + + if (queue.indexOf(texture) === -1) { + queue.push(texture); + } + + return true; + } + + return false; +} + +/** + * Built-in hook to find TextStyle objects. + * + * @private + * @param {PIXI.TextStyle} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.TextStyle object was found. + */ +function findTextStyle(item, queue) { + if (item instanceof core.TextStyle) { + if (queue.indexOf(item) === -1) { + queue.push(item); + } + + return true; + } + + return false; +} + +},{"../core":65,"./limiters/CountLimiter":185}],183:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _BasePrepare2 = require('../BasePrepare'); + +var _BasePrepare3 = _interopRequireDefault(_BasePrepare2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var CANVAS_START_SIZE = 16; + +/** + * The prepare manager provides functionality to upload content to the GPU + * This cannot be done directly for Canvas like in WebGL, but the effect can be achieved by drawing + * textures to an offline canvas. + * This draw call will force the texture to be moved onto the GPU. + * + * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare + * + * @class + * @extends PIXI.prepare.BasePrepare + * @memberof PIXI.prepare + */ + +var CanvasPrepare = function (_BasePrepare) { + _inherits(CanvasPrepare, _BasePrepare); + + /** + * @param {PIXI.CanvasRenderer} renderer - A reference to the current renderer + */ + function CanvasPrepare(renderer) { + _classCallCheck(this, CanvasPrepare); + + var _this = _possibleConstructorReturn(this, _BasePrepare.call(this, renderer)); + + _this.uploadHookHelper = _this; + + /** + * An offline canvas to render textures to + * @type {HTMLCanvasElement} + * @private + */ + _this.canvas = document.createElement('canvas'); + _this.canvas.width = CANVAS_START_SIZE; + _this.canvas.height = CANVAS_START_SIZE; + + /** + * The context to the canvas + * @type {CanvasRenderingContext2D} + * @private + */ + _this.ctx = _this.canvas.getContext('2d'); + + // Add textures to upload + _this.registerUploadHook(uploadBaseTextures); + return _this; + } + + /** + * Destroys the plugin, don't use after this. + * + */ + + + CanvasPrepare.prototype.destroy = function destroy() { + _BasePrepare.prototype.destroy.call(this); + this.ctx = null; + this.canvas = null; + }; + + return CanvasPrepare; +}(_BasePrepare3.default); + +/** + * Built-in hook to upload PIXI.Texture objects to the GPU. + * + * @private + * @param {*} prepare - Instance of CanvasPrepare + * @param {*} item - Item to check + * @return {boolean} If item was uploaded. + */ + + +exports.default = CanvasPrepare; +function uploadBaseTextures(prepare, item) { + if (item instanceof core.BaseTexture) { + var image = item.source; + + // Sometimes images (like atlas images) report a size of zero, causing errors on windows phone. + // So if the width or height is equal to zero then use the canvas size + // Otherwise use whatever is smaller, the image dimensions or the canvas dimensions. + var imageWidth = image.width === 0 ? prepare.canvas.width : Math.min(prepare.canvas.width, image.width); + var imageHeight = image.height === 0 ? prepare.canvas.height : Math.min(prepare.canvas.height, image.height); + + // Only a small subsections is required to be drawn to have the whole texture uploaded to the GPU + // A smaller draw can be faster. + prepare.ctx.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, prepare.canvas.width, prepare.canvas.height); + + return true; + } + + return false; +} + +core.CanvasRenderer.registerPlugin('prepare', CanvasPrepare); + +},{"../../core":65,"../BasePrepare":182}],184:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _WebGLPrepare = require('./webgl/WebGLPrepare'); + +Object.defineProperty(exports, 'webgl', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_WebGLPrepare).default; + } +}); + +var _CanvasPrepare = require('./canvas/CanvasPrepare'); + +Object.defineProperty(exports, 'canvas', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CanvasPrepare).default; + } +}); + +var _BasePrepare = require('./BasePrepare'); + +Object.defineProperty(exports, 'BasePrepare', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_BasePrepare).default; + } +}); + +var _CountLimiter = require('./limiters/CountLimiter'); + +Object.defineProperty(exports, 'CountLimiter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_CountLimiter).default; + } +}); + +var _TimeLimiter = require('./limiters/TimeLimiter'); + +Object.defineProperty(exports, 'TimeLimiter', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_TimeLimiter).default; + } +}); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +},{"./BasePrepare":182,"./canvas/CanvasPrepare":183,"./limiters/CountLimiter":185,"./limiters/TimeLimiter":186,"./webgl/WebGLPrepare":187}],185:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * CountLimiter limits the number of items handled by a {@link PIXI.prepare.BasePrepare} to a specified + * number of items per frame. + * + * @class + * @memberof PIXI + */ +var CountLimiter = function () { + /** + * @param {number} maxItemsPerFrame - The maximum number of items that can be prepared each frame. + */ + function CountLimiter(maxItemsPerFrame) { + _classCallCheck(this, CountLimiter); + + /** + * The maximum number of items that can be prepared each frame. + * @private + */ + this.maxItemsPerFrame = maxItemsPerFrame; + /** + * The number of items that can be prepared in the current frame. + * @type {number} + * @private + */ + this.itemsLeft = 0; + } + + /** + * Resets any counting properties to start fresh on a new frame. + */ + + + CountLimiter.prototype.beginFrame = function beginFrame() { + this.itemsLeft = this.maxItemsPerFrame; + }; + + /** + * Checks to see if another item can be uploaded. This should only be called once per item. + * @return {boolean} If the item is allowed to be uploaded. + */ + + + CountLimiter.prototype.allowedToUpload = function allowedToUpload() { + return this.itemsLeft-- > 0; + }; + + return CountLimiter; +}(); + +exports.default = CountLimiter; + +},{}],186:[function(require,module,exports){ +"use strict"; + +exports.__esModule = true; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified + * number of milliseconds per frame. + * + * @class + * @memberof PIXI + */ +var TimeLimiter = function () { + /** + * @param {number} maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame. + */ + function TimeLimiter(maxMilliseconds) { + _classCallCheck(this, TimeLimiter); + + /** + * The maximum milliseconds that can be spent preparing items each frame. + * @private + */ + this.maxMilliseconds = maxMilliseconds; + /** + * The start time of the current frame. + * @type {number} + * @private + */ + this.frameStart = 0; + } + + /** + * Resets any counting properties to start fresh on a new frame. + */ + + + TimeLimiter.prototype.beginFrame = function beginFrame() { + this.frameStart = Date.now(); + }; + + /** + * Checks to see if another item can be uploaded. This should only be called once per item. + * @return {boolean} If the item is allowed to be uploaded. + */ + + + TimeLimiter.prototype.allowedToUpload = function allowedToUpload() { + return Date.now() - this.frameStart < this.maxMilliseconds; + }; + + return TimeLimiter; +}(); + +exports.default = TimeLimiter; + +},{}],187:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _core = require('../../core'); + +var core = _interopRequireWildcard(_core); + +var _BasePrepare2 = require('../BasePrepare'); + +var _BasePrepare3 = _interopRequireDefault(_BasePrepare2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/** + * The prepare manager provides functionality to upload content to the GPU. + * + * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare + * + * @class + * @extends PIXI.prepare.BasePrepare + * @memberof PIXI.prepare + */ +var WebGLPrepare = function (_BasePrepare) { + _inherits(WebGLPrepare, _BasePrepare); + + /** + * @param {PIXI.WebGLRenderer} renderer - A reference to the current renderer + */ + function WebGLPrepare(renderer) { + _classCallCheck(this, WebGLPrepare); + + var _this = _possibleConstructorReturn(this, _BasePrepare.call(this, renderer)); + + _this.uploadHookHelper = _this.renderer; + + // Add textures and graphics to upload + _this.registerFindHook(findGraphics); + _this.registerUploadHook(uploadBaseTextures); + _this.registerUploadHook(uploadGraphics); + return _this; + } + + return WebGLPrepare; +}(_BasePrepare3.default); +/** + * Built-in hook to upload PIXI.Texture objects to the GPU. + * + * @private + * @param {PIXI.WebGLRenderer} renderer - instance of the webgl renderer + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ + + +exports.default = WebGLPrepare; +function uploadBaseTextures(renderer, item) { + if (item instanceof core.BaseTexture) { + // if the texture already has a GL texture, then the texture has been prepared or rendered + // before now. If the texture changed, then the changer should be calling texture.update() which + // reuploads the texture without need for preparing it again + if (!item._glTextures[renderer.CONTEXT_UID]) { + renderer.textureManager.updateTexture(item); + } + + return true; + } + + return false; +} + +/** + * Built-in hook to upload PIXI.Graphics to the GPU. + * + * @private + * @param {PIXI.WebGLRenderer} renderer - instance of the webgl renderer + * @param {PIXI.DisplayObject} item - Item to check + * @return {boolean} If item was uploaded. + */ +function uploadGraphics(renderer, item) { + if (item instanceof core.Graphics) { + // if the item is not dirty and already has webgl data, then it got prepared or rendered + // before now and we shouldn't waste time updating it again + if (item.dirty || item.clearDirty || !item._webGL[renderer.plugins.graphics.CONTEXT_UID]) { + renderer.plugins.graphics.updateGraphics(item); + } + + return true; + } + + return false; +} + +/** + * Built-in hook to find graphics. + * + * @private + * @param {PIXI.DisplayObject} item - Display object to check + * @param {Array<*>} queue - Collection of items to upload + * @return {boolean} if a PIXI.Graphics object was found. + */ +function findGraphics(item, queue) { + if (item instanceof core.Graphics) { + queue.push(item); + + return true; + } + + return false; +} + +core.WebGLRenderer.registerPlugin('prepare', WebGLPrepare); + +},{"../../core":65,"../BasePrepare":182}],188:[function(require,module,exports){ +(function (global){ +'use strict'; + +exports.__esModule = true; +exports.loader = exports.prepare = exports.particles = exports.mesh = exports.loaders = exports.interaction = exports.filters = exports.extras = exports.extract = exports.accessibility = undefined; + +var _polyfill = require('./polyfill'); + +Object.keys(_polyfill).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _polyfill[key]; + } + }); +}); + +var _core = require('./core'); + +Object.keys(_core).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _core[key]; + } + }); +}); + +var _deprecation = require('./deprecation'); + +var _deprecation2 = _interopRequireDefault(_deprecation); + +var _accessibility = require('./accessibility'); + +var accessibility = _interopRequireWildcard(_accessibility); + +var _extract = require('./extract'); + +var extract = _interopRequireWildcard(_extract); + +var _extras = require('./extras'); + +var extras = _interopRequireWildcard(_extras); + +var _filters = require('./filters'); + +var filters = _interopRequireWildcard(_filters); + +var _interaction = require('./interaction'); + +var interaction = _interopRequireWildcard(_interaction); + +var _loaders = require('./loaders'); + +var loaders = _interopRequireWildcard(_loaders); + +var _mesh = require('./mesh'); + +var mesh = _interopRequireWildcard(_mesh); + +var _particles = require('./particles'); + +var particles = _interopRequireWildcard(_particles); + +var _prepare = require('./prepare'); + +var prepare = _interopRequireWildcard(_prepare); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// export core +_core.utils.mixins.performMixins(); + +/** + * Alias for {@link PIXI.loaders.shared}. + * @name loader + * @memberof PIXI + * @type {PIXI.loader.Loader} + */ + + +// handle mixins now, after all code has been added, including deprecation + + +// export libs +// import polyfills. Done as an export to make sure polyfills are imported first +var loader = loaders.shared || null; + +exports.accessibility = accessibility; +exports.extract = extract; +exports.extras = extras; +exports.filters = filters; +exports.interaction = interaction; +exports.loaders = loaders; +exports.mesh = mesh; +exports.particles = particles; +exports.prepare = prepare; +exports.loader = loader; + +// Apply the deprecations + +if (typeof _deprecation2.default === 'function') { + (0, _deprecation2.default)(exports); +} + +// Always export PixiJS globally. +global.PIXI = exports; // eslint-disable-line + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./accessibility":42,"./core":65,"./deprecation":130,"./extract":132,"./extras":141,"./filters":152,"./interaction":159,"./loaders":162,"./mesh":171,"./particles":174,"./polyfill":180,"./prepare":184}]},{},[188])(188) +}); + + +//# sourceMappingURL=pixi.js.map diff --git a/js/lunalite-pixi-mv.d.ts b/js/lunalite-pixi-mv.d.ts new file mode 100644 index 0000000..0e85aab --- /dev/null +++ b/js/lunalite-pixi-mv.d.ts @@ -0,0 +1,22334 @@ +// Type definitions for Pixi.js 4.5 +// Project: https://github.com/pixijs/pixi.js/tree/dev +// Definitions by: clark-stevenson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare namespace PIXI { + // from CONST + const VERSION: typeof CONST.VERSION; + const PI_2: typeof CONST.PI_2; + const RAD_TO_DEG: typeof CONST.RAD_TO_DEG; + const DEG_TO_RAD: typeof CONST.DEG_TO_RAD; + const RENDERER_TYPE: typeof CONST.RENDERER_TYPE; + const BLEND_MODES: typeof CONST.BLEND_MODES; + const DRAW_MODES: typeof CONST.DRAW_MODES; + const SCALE_MODES: typeof CONST.SCALE_MODES; + const WRAP_MODES: typeof CONST.WRAP_MODES; + const TRANSFORM_MODE: typeof CONST.TRANSFORM_MODE; + const PRECISION: typeof CONST.PRECISION; + const GC_MODES: typeof CONST.GC_MODES; + const SHAPES: typeof CONST.SHAPES; + const TEXT_GRADIENT: typeof CONST.TEXT_GRADIENT; + const UPDATE_PRIORITY: typeof CONST.UPDATE_PRIORITY; + + function autoDetectRenderer(width: number, height: number, options?: PIXI.RendererOptions, forceCanvas?: boolean): PIXI.WebGLRenderer | PIXI.CanvasRenderer; + function autoDetectRenderer(options?: PIXI.RendererOptions): PIXI.WebGLRenderer | PIXI.CanvasRenderer; + const loader: PIXI.loaders.Loader; + + ////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////SETTINGS/////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace settings { + let TARGET_FPMS: number; + let MIPMAP_TEXTURES: boolean; + let RESOLUTION: number; + let FILTER_RESOLUTION: number; + let SPRITE_MAX_TEXTURES: number; + let SPRITE_BATCH_SIZE: number; + let RETINA_PREFIX: RegExp; + const RENDER_OPTIONS: { + view: HTMLCanvasElement | null, + antialias: boolean, + forceFXAA: boolean, + autoResize: boolean, + transparent: boolean, + backgroundColor: number, + clearBeforeRender: boolean, + preserveDrawingBuffer: boolean, + roundPixels: boolean + width: number, + height: number, + legacy: boolean, + }; + let TRANSFORM_MODE: number; + let GC_MODE: number; + let GC_MAX_IDLE: number; + let GC_MAX_CHECK_COUNT: number; + let WRAP_MODE: number; + let SCALE_MODE: number; + let PRECISION_VERTEX: string; + let PRECISION_FRAGMENT: string; + let PRECISION: string; + let UPLOADS_PER_FRAME: number; + let CAN_UPLOAD_SAME_BUFFER: boolean; + } + + ////////////////////////////////////////////////////////////////////////////// + /////////////////////////////ACCESSIBILITY//////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace accessibility { + // accessibility + class AccessibilityManager { + constructor(renderer: CanvasRenderer | WebGLRenderer); + activate(): void; + deactivate(): void; + protected div: HTMLElement; + protected pool: HTMLElement[]; + protected renderId: number; + debug: boolean; + renderer: SystemRenderer; + protected children: AccessibleTarget[]; + protected isActive: boolean; + + protected updateAccessibleObjects(displayObject: DisplayObject): void; + protected update(): void; + protected capHitArea(hitArea: HitArea): void; + protected addChild(displayObject: DisplayObject): void; + protected _onClick(e: interaction.InteractionEvent): void; + protected _onFocus(e: interaction.InteractionEvent): void; + protected _onFocusOut(e: interaction.InteractionEvent): void; + protected _onKeyDown(e: interaction.InteractionEvent): void; + protected _onMouseMove(): void; + + destroy(): void; + } + interface AccessibleTarget { + accessible: boolean; + accessibleTitle: string | null; + accessibleHint: string | null; + tabIndex: number; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////CORE////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + // const + + namespace CONST { + const VERSION: string; + const PI_2: number; + const RAD_TO_DEG: number; + const DEG_TO_RAD: number; + const TARGET_FPMS: number; + const RENDERER_TYPE: { + UNKNOWN: number; + WEBGL: number; + CANVAS: number; + }; + const BLEND_MODES: { + NORMAL: number; + ADD: number; + MULTIPLY: number; + SCREEN: number; + OVERLAY: number; + DARKEN: number; + LIGHTEN: number; + COLOR_DODGE: number; + COLOR_BURN: number; + HARD_LIGHT: number; + SOFT_LIGHT: number; + DIFFERENCE: number; + EXCLUSION: number; + HUE: number; + SATURATION: number; + COLOR: number; + LUMINOSITY: number; + NORMAL_NPM: number; + ADD_NPM: number; + SCREEN_NPM: number; + }; + const DRAW_MODES: { + POINTS: number; + LINES: number; + LINE_LOOP: number; + LINE_STRIP: number; + TRIANGLES: number; + TRIANGLE_STRIP: number; + TRIANGLE_FAN: number; + }; + const SCALE_MODES: { + LINEAR: number, + NEAREST: number + }; + const GC_MODES: { + AUTO: number; + MANUAL: number; + }; + const WRAP_MODES: { + CLAMP: number; + MIRRORED_REPEAT: number; + REPEAT: number; + }; + const TRANSFORM_MODE: { + DEFAULT: number; + DYNAMIC: number; + STATIC: number; + }; + const URL_FILE_EXTENSION: RegExp | string; + const DATA_URI: RegExp | string; + const SVG_SIZE: RegExp | string; + const SHAPES: { + POLY: number; + RECT: number; + CIRC: number; + ELIP: number; + RREC: number; + }; + const PRECISION: { + LOW: string; + MEDIUM: string; + HIGH: string; + }; + const TEXT_GRADIENT: { + LINEAR_VERTICAL: number; + LINEAR_HORIZONTAL: number; + }; + const UPDATE_PRIORITY: { + INTERACTION: number; + HIGH: number; + NORMAL: number; + LOW: number; + UTILITY: number; + }; + } + + // display + + class Application { + constructor(options?: ApplicationOptions) + constructor(width?: number, height?: number, options?: ApplicationOptions, noWebGL?: boolean, sharedTicker?: boolean, sharedLoader?: boolean); + + private _ticker: ticker.Ticker; + + renderer: PIXI.WebGLRenderer | PIXI.CanvasRenderer; + stage: Container; + ticker: ticker.Ticker; + readonly screen: Rectangle; + + stop(): void; + start(): void; + render(): void; + destroy(removeView?: boolean): void; + readonly view: HTMLCanvasElement; + } + + interface DestroyOptions { + children?: boolean; + texture?: boolean; + baseTexture?: boolean; + } + class Bounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + rect: Rectangle; + + isEmpty(): boolean; + clear(): void; + + getRectangle(rect?: Rectangle): Rectangle; + addPoint(point: Point): void; + addQuad(vertices: number[]): Bounds | undefined; + addFrame(transform: Transform, x0: number, y0: number, x1: number, y1: number): void; + addVertices(transform: Transform, vertices: number[], beginOffset: number, endOffset: number): void; + addBounds(bounds: Bounds): void; + addBoundsMask(bounds: Bounds, mask: Bounds): void; + addBoundsArea(bounds: Bounds, area: Rectangle): void; + } + class Container extends DisplayObject { + // begin extras.getChildByName + getChildByName(name: string): DisplayObject; + // end extras.getChildByName + + children: DisplayObject[]; + width: number; + height: number; + + protected onChildrenChange: (...args: any[]) => void; + addChild(child: T, ...additionalChildren: DisplayObject[]): T; + addChildAt(child: T, index: number): T; + swapChildren(child: DisplayObject, child2: DisplayObject): void; + getChildIndex(child: DisplayObject): number; + setChildIndex(child: DisplayObject, index: number): void; + getChildAt(index: number): DisplayObject; + removeChild(child: DisplayObject): DisplayObject; + removeChildAt(index: number): DisplayObject; + removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]; + updateTransform(): void; + calculateBounds(): void; + protected _calculateBounds(): void; + protected containerUpdateTransform(): void; + renderWebGL(renderer: WebGLRenderer): void; + renderAdvancedWebGL(renderer: WebGLRenderer): void; + protected _renderWebGL(renderer: WebGLRenderer): void; + protected _renderCanvas(renderer: CanvasRenderer): void; + renderCanvas(renderer: CanvasRenderer): void; + destroy(options?: DestroyOptions | boolean): void; + + once(event: "added" | "removed", fn: (displayObject: DisplayObject) => void, context?: any): this; + //tslint:disable-next-line:ban-types forbidden-types + once(event: string, fn: Function, context?: any): this; + on(event: "added" | "removed", fn: (displayObject: DisplayObject) => void, context?: any): this; + //tslint:disable-next-line:ban-types forbidden-types + on(event: string, fn: Function, context?: any): this; + //tslint:disable-next-line:ban-types forbidden-types + off(event: "added" | "removed" | string, fn?: Function, context?: any): this; + } + class DisplayObject extends utils.EventEmitter implements interaction.InteractiveTarget, accessibility.AccessibleTarget { + // begin extras.cacheAsBitmap + protected _cacheAsBitmap: boolean; + protected _cacheData: boolean; + cacheAsBitmap: boolean; + protected _renderCachedWebGL(renderer: WebGLRenderer): void; + protected _initCachedDisplayObject(renderer: WebGLRenderer): void; + protected _renderCachedCanvas(renderer: CanvasRenderer): void; + protected _initCachedDisplayObjectCanvas(renderer: CanvasRenderer): void; + protected _calculateCachedBounds(): Rectangle; + protected _getCachedLocalBounds(): Rectangle; + protected _destroyCachedDisplayObject(): void; + protected _cacheAsBitmapDestroy(options: boolean | any): void; + // end extras.cacheAsBitmap + + // begin extras.getChildByName + name: string | null; + // end extras.getChildByName + + // begin extras.getGlobalPosition + getGlobalPosition(point?: Point, skipUpdate?: boolean): Point; + // end extras.getGlobalPosition + + // begin accessible target + accessible: boolean; + accessibleTitle: string | null; + accessibleHint: string | null; + tabIndex: number; + // end accessible target + + // begin interactive target + interactive: boolean; + interactiveChildren: boolean; + hitArea: PIXI.Rectangle | PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.RoundedRectangle; + buttonMode: boolean; + cursor: string; + trackedPointers(): { [key: number]: interaction.InteractionTrackingData; }; + // depricated + defaultCursor: string; + // end interactive target + + transform: TransformBase; + alpha: number; + visible: boolean; + renderable: boolean; + parent: Container; + worldAlpha: number; + filterArea: Rectangle; + protected _filters: Filter[] | null; + protected _enabledFilters: Filter[] | null; + protected _bounds: Bounds; + protected _boundsID: number; + protected _lastBoundsID: number; + protected _boundsRect: Rectangle; + protected _localBoundsRect: Rectangle; + protected _mask: PIXI.Graphics | PIXI.Sprite; + protected readonly _destroyed: boolean; + x: number; + y: number; + worldTransform: Matrix; + localTransform: Matrix; + position: Point | ObservablePoint; + scale: Point | ObservablePoint; + pivot: Point | ObservablePoint; + skew: ObservablePoint; + rotation: number; + worldVisible: boolean; + mask: PIXI.Graphics | PIXI.Sprite; + filters: Filter[] | null; + + updateTransform(): void; + protected displayObjectUpdateTransform(): void; + protected _recursivePostUpdateTransform(): void; + getBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle; + getLocalBounds(rect?: Rectangle): Rectangle; + //creates and returns a new point + toGlobal(position: PointLike): Point; + //modifies the x and y of the passed point and returns it + toGlobal(position: PointLike, point?: T, skipUpdate?: boolean): T; + //creates and returns a new point + toLocal(position: PointLike, from?: DisplayObject): Point; + //modifies the x and y of the passed point and returns it + toLocal(position: PointLike, from?: DisplayObject, point?: T, skipUpdate?: boolean): T; + renderWebGL(renderer: WebGLRenderer): void; + renderCanvas(renderer: CanvasRenderer): void; + setParent(container: Container): Container; + setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): DisplayObject; + destroy(): void; + + on(event: interaction.InteractionEventTypes, fn: (event: interaction.InteractionEvent) => void, context?: any): this; + once(event: interaction.InteractionEventTypes, fn: (event: interaction.InteractionEvent) => void, context?: any): this; + removeListener(event: interaction.InteractionEventTypes, fn?: (event: interaction.InteractionEvent) => void, context?: any): this; + removeAllListeners(event: interaction.InteractionEventTypes): this; + off(event: interaction.InteractionEventTypes, fn?: (event: interaction.InteractionEvent) => void, context?: any): this; + addListener(event: interaction.InteractionEventTypes, fn: (event: interaction.InteractionEvent) => void, context?: any): this; + } + class TransformBase { + static IDENTITY: TransformBase; + + worldTransform: Matrix; + localTransform: Matrix; + protected _worldID: number; + updateLocalTransform(): void; + updateTransform(parentTransform: TransformBase): void; + updateWorldTransform(parentTransform: TransformBase): void; + } + class TransformStatic extends TransformBase { + position: ObservablePoint; + scale: ObservablePoint; + pivot: ObservablePoint; + skew: ObservablePoint; + + protected _rotation: number; + protected _sr?: number; + protected _cr?: number; + protected _cy?: number; + protected _sy?: number; + protected _nsx?: number; + protected _cx?: number; + protected _currentLocalID: number; + + protected onChange(): void; + updateSkew(): void; + updateLocalTransform(): void; + updateTransform(parentTransform: TransformBase): void; + setFromMatrix(matrix: Matrix): void; + rotation: number; + } + class Transform extends TransformBase { + constructor(); + + position: Point; + scale: Point; + skew: ObservablePoint; + pivot: Point; + + protected _rotation: number; + protected _sr?: number; + protected _cr?: number; + protected _cy?: number; + protected _sy?: number; + protected _nsx?: number; + protected _cx?: number; + + updateSkew(): void; + setFromMatrix(matrix: Matrix): void; + + rotation: number; + } + // graphics + class GraphicsData { + constructor( + lineWidth: number, + lineColor: number, + lineAlpha: number, + fillColor: number, + fillAlpha: number, + fill: boolean, + nativeLines: boolean, + shape: Circle | Rectangle | Ellipse | Polygon | RoundedRectangle | any); + lineWidth: number; + nativeLines: boolean; + lineColor: number; + lineAlpha: number; + protected _lineTint: number; + fillColor: number; + fillAlpha: number; + protected _fillTint: number; + fill: boolean; + protected holes: Circle[] | Rectangle[] | Ellipse[] | Polygon[] | RoundedRectangle[] | any[]; + shape: Circle | Rectangle | Ellipse | Polygon | RoundedRectangle | any; + type?: number; + clone(): GraphicsData; + addHole(shape: Circle | Rectangle | Ellipse | Polygon | RoundedRectangle | any): void; + destroy(options?: DestroyOptions | boolean): void; + } + class Graphics extends Container { + constructor(nativeLines?: boolean); + + fillAlpha: number; + lineWidth: number; + nativeLines: boolean; + lineColor: number; + protected graphicsData: GraphicsData[]; + tint: number; + protected _prevTint: number; + blendMode: number; + currentPath: GraphicsData; + protected _webGL: any; + isMask: boolean; + boundsPadding: number; + protected _localBounds: Bounds; + dirty: number; + fastRectDirty: number; + clearDirty: number; + boundsDirty: number; + protected cachedSpriteDirty: boolean; + protected _spriteRect: Rectangle; + protected _fastRect: boolean; + + static _SPRITE_TEXTURE: Texture; + + clone(): Graphics; + lineStyle(lineWidth?: number, color?: number, alpha?: number): Graphics; + moveTo(x: number, y: number): Graphics; + lineTo(x: number, y: number): Graphics; + quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): Graphics; + bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): Graphics; + arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics; + arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): Graphics; + beginFill(color: number, alpha?: number): Graphics; + endFill(): Graphics; + drawRect(x: number, y: number, width: number, height: number): Graphics; + drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): Graphics; + drawCircle(x: number, y: number, radius: number): Graphics; + drawEllipse(x: number, y: number, width: number, height: number): Graphics; + drawPolygon(path: number[] | Point[]): Graphics; + clear(): Graphics; + isFastRect(): boolean; + protected _renderCanvas(renderer: CanvasRenderer): void; + protected _calculateBounds(): Rectangle; + protected _renderSpriteRect(renderer: PIXI.SystemRenderer): void; + containsPoint(point: Point): boolean; + updateLocalBounds(): void; + drawShape(shape: Circle | Rectangle | Ellipse | Polygon | RoundedRectangle | any): GraphicsData; + generateCanvasTexture(scaleMode?: number, resolution?: number): Texture; + protected closePath(): Graphics; + protected addHole(): Graphics; + destroy(options?: DestroyOptions | boolean): void; + } + class CanvasGraphicsRenderer { + constructor(renderer: SystemRenderer); + render(graphics: Graphics): void; + protected updateGraphicsTint(graphics: Graphics): void; + protected renderPolygon(points: Point[], close: boolean, context: CanvasRenderingContext2D): void; + destroy(): void; + } + class GraphicsRenderer extends ObjectRenderer { + constructor(renderer: PIXI.CanvasRenderer); + + protected graphicsDataPool: GraphicsData[]; + protected primitiveShader: PrimitiveShader; + gl: WebGLRenderingContext; + + CONTEXT_UID: number; + + destroy(): void; + render(graphics: Graphics): void; + protected updateGraphics(graphics: PIXI.Graphics): void; + getWebGLData(webGL: WebGLRenderingContext, type: number, nativeLines: number): WebGLGraphicsData; + } + class WebGLGraphicsData { + constructor(gl: WebGLRenderingContext, shader: glCore.GLShader, attribsState: glCore.AttribState); + + gl: WebGLRenderingContext; + color: number[]; + points: Point[]; + indices: number[]; + buffer: WebGLBuffer; + indexBuffer: WebGLBuffer; + dirty: boolean; + glPoints: number[]; + glIndices: number[]; + shader: glCore.GLShader; + vao: glCore.VertexArrayObject; + nativeLines: boolean; + + reset(): void; + upload(): void; + destroy(): void; + } + class PrimitiveShader extends glCore.GLShader { } + + // math + + namespace GroupD8 { + const E: number; + const SE: number; + const S: number; + const SW: number; + const W: number; + const NW: number; + const N: number; + const NE: number; + const MIRROR_HORIZONTAL: number; + const MIRROR_VERTICAL: number; + function uX(ind: number): number; + function uY(ind: number): number; + function vX(ind: number): number; + function vY(ind: number): number; + function inv(rotation: number): number; + function add(rotationSecond: number, rotationFirst: number): number; + function sub(rotationSecond: number, rotationFirst: number): number; + function rotate180(rotation: number): number; + function isSwapWidthHeight(rotation: number): boolean; + function byDirection(dx: number, dy: number): number; + function matrixAppendRotationInv(matrix: Matrix, rotation: number, tx: number, ty: number): void; + } + class Matrix { + constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number); + + a: number; + b: number; + c: number; + d: number; + tx: number; + ty: number; + + fromArray(array: number[]): void; + set(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix; + toArray(transpose?: boolean, out?: number[]): number[]; + apply(pos: Point, newPos?: Point): Point; + applyInverse(pos: Point, newPos?: Point): Point; + translate(x: number, y: number): Matrix; + scale(x: number, y: number): Matrix; + rotate(angle: number): Matrix; + append(matrix: Matrix): Matrix; + setTransform(x: number, y: number, pivotX: number, pivotY: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number): PIXI.Matrix; + prepend(matrix: Matrix): Matrix; + invert(): Matrix; + identity(): Matrix; + decompose(transform: TransformBase): TransformBase; + clone(): Matrix; + copy(matrix: Matrix): Matrix; + + static IDENTITY: Matrix; + static TEMP_MATRIX: Matrix; + } + class PointLike { + x: number; + y: number; + + set(x?: number, y?: number): void; + copy(point: PointLike): void; + } + class ObservablePoint extends PointLike { + constructor(cb: () => any, scope?: any, x?: number, y?: number); + cb: () => any; + scope: any; + } + class Point extends PointLike { + constructor(x?: number, y?: number); + clone(): Point; + equals(p: PointLike): boolean; + } + interface HitArea { + contains(x: number, y: number): boolean; + } + class Circle { + constructor(x?: number, y?: number, radius?: number); + + x: number; + y: number; + radius: number; + type: number; + + clone(): Circle; + contains(x: number, y: number): boolean; + getBounds(): Rectangle; + } + class Ellipse { + constructor(x?: number, y?: number, width?: number, height?: number); + + x: number; + y: number; + width: number; + height: number; + type: number; + + clone(): Ellipse; + contains(x: number, y: number): boolean; + getBounds(): Rectangle; + } + class Polygon { + constructor(points: Point[] | number[]); + // Note - Rest Params cannot be combined with | + //tslint:disable-next-line:unified-signatures + constructor(...points: Point[]); + //tslint:disable-next-line:unified-signatures + constructor(...points: number[]); + + closed: boolean; + points: number[]; + type: number; + + clone(): Polygon; + contains(x: number, y: number): boolean; + close(): void; + } + class Rectangle { + constructor(x?: number, y?: number, width?: number, height?: number); + + x: number; + y: number; + width: number; + height: number; + type: number; + left: number; + right: number; + top: number; + bottom: number; + + static EMPTY: Rectangle; + + clone(): Rectangle; + copy(rectangle: Rectangle): Rectangle; + contains(x: number, y: number): boolean; + pad(paddingX: number, paddingY: number): void; + fit(rectangle: Rectangle): void; + enlarge(rectangle: Rectangle): void; + } + class RoundedRectangle { + constructor(x?: number, y?: number, width?: number, height?: number, radius?: number); + + x: number; + y: number; + width: number; + height: number; + radius: number; + type: number; + + clone(): RoundedRectangle; + contains(x: number, y: number): boolean; + } + // renderers + interface RendererOptions { + /** + * the width of the renderers view [default=800] + */ + width?: number; + + /** + * the height of the renderers view [default=600] + */ + height?: number; + + /** + * the canvas to use as a view, optional + */ + view?: HTMLCanvasElement; + + /** + * If the render view is transparent, [default=false] + */ + transparent?: boolean; + + /** + * sets antialias (only applicable in chrome at the moment) [default=false] + */ + antialias?: boolean; + + /** + * enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context [default=false] + */ + preserveDrawingBuffer?: boolean; + + /** + * The resolution / device pixel ratio of the renderer, retina would be 2 [default=1] + */ + resolution?: number; + + /** + * prevents selection of WebGL renderer, even if such is present [default=false] + */ + forceCanvas?: boolean; + + /** + * The background color of the rendered area (shown if not transparent) [default=0x000000] + */ + backgroundColor?: number; + + /** + * This sets if the renderer will clear the canvas or not before the new render pass. [default=true] + */ + clearBeforeRender?: boolean; + + /** + * If true Pixi will Math.floor() x/ y values when rendering, stopping pixel interpolation. [default=false] + */ + roundPixels?: boolean; + + /** + * forces FXAA antialiasing to be used over native FXAA is faster, but may not always look as great ** webgl only** [default=false] + */ + forceFXAA?: boolean; + + /** + * `true` to ensure compatibility with older / less advanced devices. If you experience unexplained flickering try setting this to true. **webgl only** [default=false] + */ + legacy?: boolean; + + /** + * Depricated + */ + context?: WebGLRenderingContext; + + /** + * Depricated + */ + autoResize?: boolean; + } + interface ApplicationOptions extends RendererOptions { + /** + * `true` to use PIXI.ticker.shared, `false` to create new ticker. [default=false] + */ + sharedTicker?: boolean; + + /** + * `true` to use PIXI.loaders.shared, `false` to create new Loader. + */ + sharedLoader?: boolean; + } + class SystemRenderer extends utils.EventEmitter { + constructor(system: string, options?: RendererOptions); + constructor(system: string, screenWidth?: number, screenHeight?: number, options?: RendererOptions); + + type: number; + options: RendererOptions; + screen: Rectangle; + readonly width: number; + readonly height: number; + view: HTMLCanvasElement; + resolution: number; + transparent: boolean; + autoResize: boolean; + blendModes: any; // todo? + preserveDrawingBuffer: boolean; + clearBeforeRender: boolean; + roundPixels: boolean; + protected _backgroundColor: number; + protected _backgroundColorRgba: number[]; + protected _backgroundColorString: string; + protected _tempDisplayObjectParent: Container; + protected _lastObjectRendered: DisplayObject; + + resize(screenWidth: number, screenHeight: number): void; + generateTexture(displayObject: DisplayObject, scaleMode?: number, resolution?: number): RenderTexture; + render(...args: any[]): void; + destroy(removeView?: boolean): void; + } + class CanvasRenderer extends SystemRenderer { + // plugintarget mixin start + static __plugins: any; + //tslint:disable-next-line:ban-types forbidden-types + static registerPlugin(pluginName: string, ctor: Function): void; + plugins: any; + initPlugins(): void; + destroyPlugins(): void; + // plugintarget mixin end + + // from InteractionManager + interaction?: interaction.InteractionManager; + + constructor(options?: RendererOptions); + constructor(screenWidth?: number, screenHeight?: number, options?: RendererOptions); + + rootContext: CanvasRenderingContext2D; + rootResolution?: number; + refresh: boolean; + maskManager: CanvasMaskManager; + smoothProperty: string; + extract: extract.CanvasExtract; + + context: CanvasRenderingContext2D | null; + + render(displayObject: PIXI.DisplayObject, renderTexture?: PIXI.RenderTexture, clear?: boolean, transform?: PIXI.Transform, skipUpdateTransform?: boolean): void; + setBlendMode(blendMode: number): void; + destroy(removeView?: boolean): void; + clear(clearColor?: string): void; + + on(event: "prerender" | "postrender", fn: () => void, context?: any): this; + once(event: "prerender" | "postrender", fn: () => void, context?: any): this; + removeListener(event: "prerender" | "postrender", fn?: () => void, context?: any): this; + removeAllListeners(event: "prerender" | "postrender"): this; + off(event: "prerender" | "postrender", fn?: () => void, context?: any): this; + addListener(event: "prerender" | "postrender", fn: () => void, context?: any): this; + } + class CanvasMaskManager { + constructor(renderer: CanvasRenderer); + + pushMask(maskData: any): void; + protected renderGraphicsShape(graphics: Graphics): void; + popMask(renderer: WebGLRenderer | CanvasRenderer): void; + destroy(): void; + } + class CanvasRenderTarget { + constructor(width: number, height: number, resolution: number); + + canvas: HTMLCanvasElement; + context: CanvasRenderingContext2D; + resolution: number; + + width: number; + height: number; + + clear(): void; + resize(width: number, height: number): void; + destroy(): void; + } + interface WebGLRendererOptions extends RendererOptions { + } + class WebGLRenderer extends SystemRenderer { + // plugintarget mixin start + static __plugins: any; + //tslint:disable-next-line:ban-types forbidden-types + static registerPlugin(pluginName: string, ctor: Function): void; + plugins: any; + initPlugins(): void; + destroyPlugins(): void; + // plugintarget mixin end + + // from InteractionManager + interaction: interaction.InteractionManager; + + constructor(options?: WebGLRendererOptions); + constructor(screenWidth?: number, screenHeight?: number, options?: WebGLRendererOptions); + + protected _contextOptions: { + alpha: boolean; + antiAlias?: boolean; + premultipliedAlpha: boolean; + stencil: boolean; + preseveDrawingBuffer?: boolean; + }; + protected _backgroundColorRgba: number[]; + maskManager: MaskManager; + stencilManager?: StencilManager; + emptyRenderer: ObjectRenderer; + currentRenderer: ObjectRenderer; + gl: WebGLRenderingContext; + CONTEXT_UID: number; + state?: WebGLState; + renderingToScreen: boolean; + boundTextures: Texture[]; + filterManager: FilterManager; + textureManager?: TextureManager; + textureGC?: TextureGarbageCollector; + extract: extract.WebGLExtract; + protected drawModes: any; + protected _activeShader: Shader; + _activeRenderTarget: RenderTarget; + protected _initContext(): void; + + render(displayObject: PIXI.DisplayObject, renderTexture?: PIXI.RenderTexture, clear?: boolean, transform?: PIXI.Transform, skipUpdateTransform?: boolean): void; + setObjectRenderer(objectRenderer: ObjectRenderer): void; + flush(): void; + setBlendMode(blendMode: number): void; + clear(clearColor?: number): void; + setTransform(matrix: Matrix): void; + clearRenderTexture(renderTexture: RenderTexture, clearColor?: number): WebGLRenderer; + bindRenderTexture(renderTexture: RenderTexture, transform: Transform): WebGLRenderer; + bindRenderTarget(renderTarget: RenderTarget): WebGLRenderer; + bindShader(shader: Shader, autoProject?: boolean): WebGLRenderer; + bindTexture(texture: Texture | BaseTexture, location?: number, forceLocation?: boolean): number; + unbindTexture(texture: Texture | BaseTexture): WebGLRenderer | undefined; + createVao(): glCore.VertexArrayObject; + bindVao(vao: glCore.VertexArrayObject): WebGLRenderer; + reset(): WebGLRenderer; + handleContextLost: (event: WebGLContextEvent) => void; + handleContextRestored: () => void; + destroy(removeView?: boolean): void; + + on(event: "prerender" | "postrender", fn: () => void, context?: any): this; + on(event: "context", fn: (gl: WebGLRenderingContext) => void, context?: any): this; + once(event: "prerender" | "postrender", fn: () => void, context?: any): this; + once(event: "context", fn: (gl: WebGLRenderingContext) => void, context?: any): this; + removeListener(event: "prerender" | "postrender", fn?: () => void, context?: any): this; + removeListener(event: "context", fn?: (gl: WebGLRenderingContext) => void, context?: any): this; + removeAllListeners(event: "prerender" | "postrender" | "context"): this; + off(event: "prerender" | "postrender", fn?: () => void, context?: any): this; + off(event: "context", fn?: (gl: WebGLRenderingContext) => void, context?: any): this; + addListener(event: "prerender" | "postrender", fn: () => void, context?: any): this; + addListener(event: "context", fn: (gl: WebGLRenderingContext) => void, context?: any): this; + } + class WebGLState { + constructor(gl: WebGLRenderingContext); + + activeState: number[]; + defaultState: number[]; + stackIndex: number; + stack: number[]; + gl: WebGLRenderingContext; + maxAttribs: number; + attribState: glCore.AttribState; + nativeVaoExtension: any; + + push(): void; + pop(): void; + setState(state: number[]): void; + setBlend(value: number): void; + setBlendMode(value: number): void; + setDepthTest(value: number): void; + setCullFace(value: number): void; + setFrontFace(value: number): void; + resetAttributes(): void; + resetToDefault(): void; + } + class TextureManager { + constructor(renderer: WebGLRenderer); + + renderer: WebGLRenderer; + gl: WebGLRenderingContext; + protected _managedTextures: Texture[]; + + bindTexture(): void; + getTexture(): WebGLTexture; + updateTexture(texture: BaseTexture | Texture): WebGLTexture; + destroyTexture(texture: BaseTexture, _skipRemove?: boolean): void; + removeAll(): void; + destroy(): void; + } + class TextureGarbageCollector { + constructor(renderer: WebGLRenderer); + + renderer: WebGLRenderer; + count: number; + checkCount: number; + maxIdle: number; + checkCountMax: number; + mode: number; + + update(): void; + run(): void; + unload(): void; + } + abstract class ObjectRenderer extends WebGLManager { + constructor(renderer: WebGLRenderer); + + start(): void; + stop(): void; + flush(): void; + + render(...args: any[]): void; + } + class Quad { + constructor(gl: WebGLRenderingContext); + + gl: WebGLRenderingContext; + vertices: number[]; + uvs: number[]; + interleaved: number[]; + indices: number[]; + vertexBuffer: WebGLBuffer; + vao: glCore.VertexArrayObject; + initVao(shader: glCore.GLShader): void; + map(targetTextureFrame: Rectangle, destinationFrame: Rectangle): Quad; + upload(): Quad; + destroy(): void; + } + interface FilterDataStackItem { + renderTarget: RenderTarget; + filter: any[]; + bounds: Rectangle; + } + class RenderTarget { + constructor(gl: WebGLRenderingContext, width: number, height: number, scaleMode: number, resolution: number, root?: boolean); + + gl: WebGLRenderingContext; + frameBuffer: glCore.GLFramebuffer; + texture: Texture; + clearColor: number[]; + size: Rectangle; + resolution: number; + projectionMatrix: Matrix; + transform: Matrix; + frame: Rectangle; + defaultFrame: Rectangle; + destinationFrame: Rectangle; + sourceFrame?: Rectangle; + stencilBuffer: glCore.GLFramebuffer; + stencilMaskStack: Graphics[]; + filterData: { + index: number, + stack: FilterDataStackItem[]; + }; + scaleMode: number; + root: boolean; + + clear(clearColor?: number[]): void; + attachStencilBuffer(): void; + setFrame(destinationFrame: Rectangle, sourceFrame: Rectangle): void; + activate(): void; + calculateProjection(destinationFrame: Rectangle, sourceFrame: Rectangle): void; + resize(width: number, height: number): void; + destroy(): void; + } + + class BlendModeManager extends WebGLManager { + constructor(renderer: WebGLRenderer); + + currentBlendMode: number; + + setBlendMode(blendMode: number): boolean; + } + interface FilterManagerStackItem { + renderTarget: RenderTarget; + sourceFrame: Rectangle; + destinationFrame: Rectangle; + filters: Filter[]; + target: any; + resolution: number; + } + class FilterManager extends WebGLManager { + constructor(renderer: WebGLRenderer); + gl: WebGLRenderingContext; + quad: Quad; + stack: FilterManagerStackItem[]; + stackIndex: number; + shaderCache: any; + filterData: any; + + pushFilter(target: RenderTarget, filters: Filter[]): void; + popFilter(): void; + applyFilter(shader: glCore.GLShader | Filter, inputTarget: RenderTarget, outputTarget: RenderTarget, clear?: boolean): void; + syncUniforms(shader: glCore.GLShader, filter: Filter): void; + getRenderTarget(clear?: boolean, resolution?: number): RenderTarget; + returnRenderTarget(renderTarget: RenderTarget): RenderTarget; + calculateScreenSpaceMatrix(outputMatrix: Matrix): Matrix; + calculateNormalizedScreenSpaceMatrix(outputMatrix: Matrix): Matrix; + calculateSpriteMatrix(outputMatrix: Matrix, sprite: Sprite): Matrix; + destroy(): void; + emptyPool(): void; + getPotRenderTarget(gl: WebGLRenderingContext, minWidth: number, minHeight: number, resolution: number): RenderTarget; + freePotRenderTarget(renderTarget: RenderTarget): void; + } + class StencilMaskStack { + stencilStack: any[]; + reverse: boolean; + count: number; + } + class MaskManager extends WebGLManager { + scissor: boolean; + scissorData: any; + scissorRenderTarget: RenderTarget; + enableScissor: boolean; + alphaMaskPool: number[]; + alphaMaskIndex: number; + pushMask(target: RenderTarget, maskData: Sprite | Graphics): void; + popMask(target: RenderTarget, maskData: Sprite | Graphics): void; + pushSpriteMask(target: RenderTarget, maskData: Sprite | Graphics): void; + popSpriteMask(): void; + pushStencilMask(maskData: Sprite | Graphics): void; + popStencilMask(): void; + pushScissorMask(target: RenderTarget, maskData: Sprite | Graphics): void; + popScissorMask(): void; + } + class StencilManager extends WebGLManager { + constructor(renderer: WebGLRenderer); + + stencilMaskStack: Graphics[]; + + setMaskStack(stencilMasStack: Graphics[]): void; + pushStencil(graphics: Graphics): void; + popStencil(): void; + destroy(): void; + } + class WebGLManager { + constructor(renderer: WebGLRenderer); + + renderer: SystemRenderer; + onContextChange(): void; + destroy(): void; + } + interface UniformData { + type: string; + value: any; + + // name is set by pixi if uniforms were automatically extracted from shader code, but not used anywhere + name?: string; + } + class Filter { + constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: { [name: string]: UniformData }); + + vertextSrc?: string; + fragmentSrc: string; + blendMode: number; + protected uniformData: { [name: string]: UniformData }; + uniforms: { [name: string]: any } | any; + glShaders: any; + glShaderKey?: number; + padding: number; + resolution: number; + enabled: boolean; + autoFit: boolean; + apply(filterManager: FilterManager, input: RenderTarget, output: RenderTarget, clear?: boolean, currentState?: any): void; + + static defaultVertexSrc: string; + static defaultFragmentSrc: string; + } + class SpriteMaskFilter extends Filter { + constructor(sprite: Sprite); + + maskSprite: Sprite; + maskMatrix: Matrix; + apply(filterManager: FilterManager, input: RenderTarget, output: RenderTarget): void; + } + + // sprites + + class Sprite extends Container { + constructor(texture?: Texture); + + protected _anchor: ObservablePoint; + anchor: ObservablePoint; + protected _texture: Texture; + protected _transformTrimmedID: number; + protected _textureTrimmedID: number; + protected _width: number; + protected _height: number; + tint: number; + protected _tint: number; + protected _tintRGB: number; + blendMode: number; + pluginName: string; + protected cachedTint: number; + texture: Texture; + protected textureDirty: boolean; + protected _textureID: number; + protected _transformID: number; + protected vertexTrimmedData: Float32Array; + vertexData: Float32Array; + width: number; + height: number; + + protected _onTextureUpdate(): void; + calculateVertices(): void; + protected _calculateBounds(): void; + protected calculateTrimmedVertices(): void; + protected onAnchorUpdate(): void; + protected _renderWebGL(renderer: WebGLRenderer): void; + protected _renderCanvas(renderer: CanvasRenderer): void; + getLocalBounds(): Rectangle; + containsPoint(point: Point): boolean; + destroy(options?: DestroyOptions | boolean): void; + + static from(source: number | string | BaseTexture | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): Sprite; + static fromFrame(frameId: string): Sprite; + static fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite; + } + class BatchBuffer { + vertices: ArrayBuffer; + float32View: number[]; + uint32View: number[]; + + destroy(): void; + } + class SpriteRenderer extends ObjectRenderer { + constructor(renderer: PIXI.WebGLRenderer); + + vertSize: number; + vertByteSize: number; + size: number; + buffers: BatchBuffer[]; + indices: number[]; + shaders: Shader[]; + currentIndex: number; + tick: number; + groups: any[]; + sprites: Sprite[]; + vertexBuffers: number[]; + vaos: glCore.VertexArrayObject[]; + vaoMax: number; + vertexCount: number; + + protected onContextChanged: () => void; + protected onPrerender: () => void; + render(sprite: Sprite): void; + flush(): void; + start(): void; + stop(): void; + destroy(): void; + } + class CanvasSpriteRenderer extends ObjectRenderer { + constructor(renderer: WebGLRenderer); + + render(sprite: Sprite): void; + destroy(): void; + } + namespace CanvasTinter { + function getTintedTexture(sprite: Sprite, color: number): HTMLCanvasElement; + function tintWithMultiply(texture: Texture, color: number, canvas: HTMLCanvasElement): void; + function tintWithOverlay(texture: Texture, color: number, canvas: HTMLCanvasElement): void; + function tintWithPerPixel(texture: Texture, color: number, canvas: HTMLCanvasElement): void; + function roundColor(color: number): number; + + let cacheStepsPerColorChannel: number; + let convertTintToImage: boolean; + let canUseMultiply: boolean; + let tintMethod: number; + } + + // text + interface TextStyleOptions { + align?: string; + breakWords?: boolean; + dropShadow?: boolean; + dropShadowAlpha?: number; + dropShadowAngle?: number; + dropShadowBlur?: number; + dropShadowColor?: string | number; + dropShadowDistance?: number; + fill?: string | string[] | number | number[] | CanvasGradient | CanvasPattern; + fillGradientType?: number; + fillGradientStops?: number[]; + fontFamily?: string | string[]; + fontSize?: number | string; + fontStyle?: string; + fontVariant?: string; + fontWeight?: string; + letterSpacing?: number; + lineHeight?: number; + lineJoin?: string; + miterLimit?: number; + padding?: number; + stroke?: string | number; + strokeThickness?: number; + textBaseline?: string; + trim?: boolean; + wordWrap?: boolean; + wordWrapWidth?: number; + } + + class TextStyle implements TextStyleOptions { + constructor(style: TextStyleOptions) + + styleID: number; + + clone(): TextStyle; + reset(): void; + + protected _align: string; + align: string; + protected _breakWords: boolean; + breakWords: boolean; + protected _dropShadow: boolean; + dropShadow: boolean; + protected _dropShadowAlpha: number; + dropShadowAlpha: number; + protected _dropShadowAngle: number; + dropShadowAngle: number; + protected _dropShadowBlur: number; + dropShadowBlur: number; + protected _dropShadowColor: string | number; + dropShadowColor: string | number; + protected _dropShadowDistance: number; + dropShadowDistance: number; + protected _fill: string | string[] | number | number[] | CanvasGradient | CanvasPattern; + fill: string | string[] | number | number[] | CanvasGradient | CanvasPattern; + protected _fillGradientType: number; + fillGradientType: number; + protected _fillGradientStops: number[]; + fillGradientStops: number[]; + protected _fontFamily: string | string[]; + fontFamily: string | string[]; + protected _fontSize: number | string; + fontSize: number | string; + protected _fontStyle: string; + fontStyle: string; + protected _fontVariant: string; + fontVariant: string; + protected _fontWeight: string; + fontWeight: string; + protected _letterSpacing: number; + letterSpacing: number; + protected _lineHeight: number; + lineHeight: number; + protected _lineJoin: string; + lineJoin: string; + protected _miterLimit: number; + miterLimit: number; + protected _padding: number; + padding: number; + protected _stroke: string | number; + stroke: string | number; + protected _strokeThickness: number; + strokeThickness: number; + protected _textBaseline: string; + textBaseline: string; + protected _trim: boolean; + trim: boolean; + protected _wordWrap: boolean; + wordWrap: boolean; + protected _wordWrapWidth: number; + wordWrapWidth: number; + toFontString(): string; + } + class TextMetrics { + protected _canvas: HTMLCanvasElement; + protected _context: CanvasRenderingContext2D; + protected _fonts: FontMetrics; + + text: string; + style: TextStyle; + width: number; + height: number; + lines: number[]; + lineWidgets: number[]; + lineHeight: number; + maxLineWidth: number; + fontProperties: any; + + constructor(text: string, style: TextStyle, width: number, height: number, lines: number[], lineWidths: number[], lineHeight: number, maxLineWidth: number, fontProperties: any); + + static measureText(text: string, style: TextStyle, wordWrap?: boolean, canvas?: HTMLCanvasElement): TextMetrics; + static wordWrap(text: string, style: TextStyle, canvas?: HTMLCanvasElement): string; + static measureFont(font: string): FontMetrics; + } + interface FontMetrics { + ascent: number; + descent: number; + fontSize: number; + } + class Text extends Sprite { + constructor(text?: string, style?: TextStyleOptions, canvas?: HTMLCanvasElement); + + canvas: HTMLCanvasElement; + context: CanvasRenderingContext2D; + resolution: number; + protected _text: string; + protected _style: TextStyle; + //tslint:disable-next-line:ban-types forbidden-types + protected _styleListener: Function; + protected _font: string; + protected localStyleID: number; + + width: number; + height: number; + style: TextStyle; + text: string; + + protected updateText(respectDirty?: boolean): void; + protected drawLetterSpacing(text: string, x: number, y: number, isStroke?: boolean): void; + protected updateTexture(): void; + renderWebGL(renderer: WebGLRenderer): void; + protected _renderCanvas(renderer: CanvasRenderer): void; + getLocalBounds(rect?: Rectangle): Rectangle; + protected _calculateBounds(): void; + protected _onStyleChange: () => void; + protected _generateFillStyle(style: TextStyle, lines: string[]): string | number | CanvasGradient; + destroy(options?: DestroyOptions | boolean): void; + dirty: boolean; + } + // textures + class BaseRenderTexture extends BaseTexture { + constructor(width?: number, height?: number, scaleMode?: number, resolution?: number); + + height: number; + width: number; + realHeight: number; + realWidth: number; + resolution: number; + scaleMode: number; + hasLoaded: boolean; + protected _glRenderTargets: { [n: number]: WebGLTexture; }; + protected _canvasRenderTarget: { [n: number]: WebGLTexture; }; + valid: boolean; + + resize(width: number, height: number): void; + destroy(): void; + + on(event: "update", fn: (baseRenderTexture: BaseRenderTexture) => void, context?: any): this; + once(event: "update", fn: (baseRenderTexture: BaseRenderTexture) => void, context?: any): this; + removeListener(event: "update", fn?: (baseRenderTexture: BaseRenderTexture) => void, context?: any): this; + removeAllListeners(event: "update"): this; + off(event: "update", fn?: (baseRenderTexture: BaseRenderTexture) => void, context?: any): this; + addListener(event: "update", fn: (baseRenderTexture: BaseRenderTexture) => void, context?: any): this; + } + class BaseTexture extends utils.EventEmitter { + static from(source: string | HTMLImageElement | HTMLCanvasElement, scaleMode?: number, sourceScale?: number): BaseTexture; + + constructor(source?: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, scaleMode?: number, resolution?: number); + + protected uuid?: number; + protected touched: number; + resolution: number; + width: number; + height: number; + realWidth: number; + realHeight: number; + scaleMode: number; + hasLoaded: boolean; + isLoading: boolean; + wrapMode: number; + source: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | null; + origSource: HTMLImageElement | null; + imageType: string | null; + sourceScale: number; + premultipliedAlpha: boolean; + imageUrl: string | null; + protected isPowerOfTwo: boolean; + mipmap: boolean; + wrap?: boolean; + protected _glTextures: any; + protected _enabled: number; + protected _id?: number; + protected _virtualBoundId: number; + protected readonly _destroyed: boolean; + textureCacheIds: string[]; + + update(): void; + protected _updateDimensions(): void; + protected _updateImageType(): void; + protected _loadSvgSource(): void; + protected _loadSvgSourceUsingDataUri(dataUri: string): void; + protected _loadSvgSourceUsingXhr(): void; + protected _loadSvgSourceUsingString(svgString: string): void; + protected loadSource(source: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement): void; + protected _sourceLoaded(): void; + destroy(): void; + dispose(): void; + updateSourceImage(newSrc: string): void; + + static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: number, sourceScale?: number): BaseTexture; + static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): BaseTexture; + static addToCache(baseTexture: BaseTexture, id: string): void; + static removeFromCache(baseTexture: string | BaseTexture): BaseTexture; + + on(event: "update" | "loaded" | "error" | "dispose", fn: (baseTexture: BaseTexture) => void, context?: any): this; + once(event: "update" | "loaded" | "error" | "dispose", fn: (baseTexture: BaseTexture) => void, context?: any): this; + removeListener(event: "update" | "loaded" | "error" | "dispose", fn?: (baseTexture: BaseTexture) => void, context?: any): this; + removeAllListeners(event: "update" | "loaded" | "error" | "dispose"): this; + off(event: "update" | "loaded" | "error" | "dispose", fn?: (baseTexture: BaseTexture) => void, context?: any): this; + addListener(event: "update" | "loaded" | "error" | "dispose", fn: (baseTexture: BaseTexture) => void, context?: any): this; + } + class RenderTexture extends Texture { + constructor(baseRenderTexture: BaseRenderTexture, frame?: Rectangle); + + protected legacyRenderer: any; + valid: boolean; + + resize(width: number, height: number, doNotResizeBaseTexture?: boolean): void; + + static create(width?: number, height?: number, scaleMode?: number, resolution?: number): RenderTexture; + } + class Texture extends utils.EventEmitter { + constructor(baseTexture: BaseTexture, frame?: Rectangle, orig?: Rectangle, trim?: Rectangle, rotate?: number); + + noFrame: boolean; + baseTexture: BaseTexture; + protected _frame: Rectangle; + trim?: Rectangle; + valid: boolean; + requiresUpdate: boolean; + protected _uvs: TextureUvs; + orig: Rectangle; + protected _updateID: number; + transform: any; + textureCacheIds: string[]; + + update(): void; + protected onBaseTextureLoaded(baseTexture: BaseTexture): void; + protected onBaseTextureUpdated(baseTexture: BaseTexture): void; + destroy(destroyBase?: boolean): void; + clone(): Texture; + protected _updateUvs(): void; + + static fromImage(imageUrl: string, crossOrigin?: boolean, scaleMode?: number, sourceScale?: number): Texture; + static fromFrame(frameId: string): Texture; + static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: number, origin?: string): Texture; + static fromVideo(video: HTMLVideoElement | string, scaleMode?: number): Texture; + static fromVideoUrl(videoUrl: string, scaleMode?: number): Texture; + static from(source: number | string | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | BaseTexture): Texture; + static fromLoader(source: HTMLImageElement | HTMLCanvasElement, imageUrl: string, name?: string): Texture; + static addToCache(texture: Texture, id: string): void; + static removeFromCache(texture: string | Texture): Texture; + + // depreciation + static addTextureToCache(texture: Texture, id: string): void; + static removeTextureFromCache(id: string): Texture; + + frame: Rectangle; + protected _rotate: boolean | 0; + rotate: number; + width: number; + height: number; + + static EMPTY: Texture; + static WHITE: Texture; + + on(event: "update", fn: (texture: Texture) => void, context?: any): this; + once(event: "update", fn: (texture: Texture) => void, context?: any): this; + removeListener(event: "update", fn?: (texture: Texture) => void, context?: any): this; + removeAllListeners(event: "update"): this; + off(event: "update", fn?: (texture: Texture) => void, context?: any): this; + addListener(event: "update", fn: (texture: Texture) => void, context?: any): this; + } + class TextureUvs { + x0: number; + y0: number; + x1: number; + y1: number; + x2: number; + y2: number; + x3: number; + y3: number; + + uvsUint32: Uint32Array; + + protected set(frame: Rectangle, baseFrame: Rectangle, rotate: number): void; + } + + class Spritesheet { + static BATCH_SIZE: number; + + constructor(baseTexture: BaseTexture, data: any, resolutionFilename?: string); + + baseTexture: BaseTexture; + textures: { [key: string]: Texture; }; + data: any; + resolution: number; + protected _frames: any; + protected _frameKeys: string; + protected _batchIndex: number; + protected _callback: (spriteSheet: this, textures: { [key: string]: Texture; }) => void; + protected _updateResolution(resolutionFilename: string): number; + parse(callback: (spriteSheet: this, textures: { [key: string]: Texture; }) => void): void; + protected _processFrames(initialFrameIndex: number): void; + protected _parseComplete(): void; + protected _nextBatch(): void; + destroy(destroyBase?: boolean): void; + } + + class VideoBaseTexture extends BaseTexture { + constructor(source: HTMLVideoElement, scaleMode?: number); + + autoUpdate: boolean; + autoPlay: boolean; + protected _isAutoUpdating: boolean; + + update(): void; + protected _onCanPlay(): void; + protected _onPlayStart(): void; + protected _onPlayStop(): void; + destroy(): void; + protected _isSourcePlaying(): boolean; + protected _isSourceReady(): boolean; + + static fromVideo(video: HTMLVideoElement, scaleMode?: number): VideoBaseTexture; + static fromUrl(videoSrc: string | any | string[] | any[]): VideoBaseTexture; + static fromUrls(videoSrc: string | any | string[] | any[]): VideoBaseTexture; + + source: HTMLVideoElement; + protected loadSource(source: HTMLVideoElement): void; + } + + // ticker + + namespace ticker { + const shared: Ticker; + + class TickerListener { + constructor(fn: (deltaTime: number) => void, context?: any, priority?: number, once?: boolean); + fn: (deltaTime: number) => void; + context: any; + priority: number; + once: boolean; + next: TickerListener; + previous: TickerListener; + protected _destroyed: boolean; + match(fn: (deltaTime: number) => void, context?: any): boolean; + emit(deltaTime: number): TickerListener; + connect(previous: TickerListener): void; + destroy(hard?: boolean): void; + } + class Ticker { + protected _tick: (time: number) => void; + protected _head: TickerListener; + protected _requestId: number | null; + protected _maxElapsedMS: number; + + autoStart: boolean; + deltaTime: number; + elapsedMS: number; + lastTime: number; + speed: number; + started: boolean; + + protected _requestIfNeeded(): void; + protected _cancelIfNeeded(): void; + protected _startIfPossible(): void; + + add(fn: (deltaTime: number) => void, context?: any, priority?: number): Ticker; + addOnce(fn: (deltaTime: number) => void, context?: any, priority?: number): Ticker; + //tslint:disable-next-line:ban-types forbidden-types + remove(fn: Function, context?: any, priority?: number): Ticker; + protected _addListener(listener: TickerListener): Ticker; + readonly FPS: number; + minFPS: number; + + start(): void; + stop(): void; + destroy(): void; + update(currentTime?: number): void; + } + } + + // shader + + class Shader extends glCore.GLShader { } + + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////EXTRACT/////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace extract { + class CanvasExtract { + protected renderer: CanvasRenderer; + + constructor(renderer: CanvasRenderer); + + image(target?: DisplayObject | RenderTexture): HTMLImageElement; + base64(target?: DisplayObject | RenderTexture): string; + canvas(target?: DisplayObject | RenderTexture): HTMLCanvasElement; + pixels(renderTexture?: DisplayObject | RenderTexture): number[]; + + destroy(): void; + } + class WebGLExtract { + protected renderer: WebGLRenderer; + + constructor(renderer: WebGLRenderer); + + image(target?: DisplayObject | RenderTexture): HTMLImageElement; + base64(target?: DisplayObject | RenderTexture): string; + canvas(target?: DisplayObject | RenderTexture): HTMLCanvasElement; + pixels(renderTexture?: DisplayObject | RenderTexture): number[]; + + destroy(): void; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////EXTRAS//////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace extras { + interface BitmapTextStyle { + font?: string | { + name?: string; + size?: number; + }; + align?: string; + tint?: number; + } + class BitmapText extends Container { + static registerFont(xml: XMLDocument, texture: Texture): any; + + constructor(text: string, style?: BitmapTextStyle); + + protected _textWidth: number; + protected _textHeight: number; + textWidth: number; + textHeight: number; + protected _glyphs: Sprite[]; + protected _font: string | { + name?: string; + size?: number; + }; + font: string | { + name?: string; + size?: number; + }; + protected _text: string; + protected _maxWidth: number; + maxWidth: number; + protected _maxLineHeight: number; + maxLineHeight: number; + protected _anchor: ObservablePoint; + dirty: boolean; + tint: number; + align: string; + text: string; + anchor: PIXI.Point | number; + + protected updateText(): void; + updateTransform(): void; + getLocalBounds(): Rectangle; + protected validate(): void; + + static fonts: any; + } + interface AnimatedSpriteTextureTimeObject { + texture: Texture; + time?: number; + } + class AnimatedSprite extends Sprite { + constructor(textures: Texture[] | AnimatedSpriteTextureTimeObject[], autoUpdate?: boolean); + + protected _autoUpdate: boolean; + protected _textures: Texture[]; + protected _durations: number[]; + textures: Texture[] | AnimatedSpriteTextureTimeObject[]; + animationSpeed: number; + loop: boolean; + onComplete: () => void; + onFrameChange: (currentFrame: number) => void; + onLoop: () => void; + protected _currentTime: number; + playing: boolean; + totalFrames: number; + currentFrame: number; + stop(): void; + play(): void; + gotoAndStop(frameNumber: number): void; + gotoAndPlay(frameNumber: number): void; + protected update(deltaTime: number): void; + destroy(options?: DestroyOptions | boolean): void; + + static fromFrames(frame: string[]): AnimatedSprite; + static fromImages(images: string[]): AnimatedSprite; + } + class TextureTransform { + constructor(texture: Texture, clampMargin?: number); + + protected _texture: Texture; + protected mapCoord: Matrix; + protected uClampFrame: Float32Array; + protected uClampOffset: Float32Array; + protected _lastTextureID: number; + + clampOffset: number; + clampMargin: number; + + texture: Texture; + + update(forceUpdate?: boolean): boolean; + } + class TilingSprite extends Sprite { + constructor(texture: Texture, width?: number, height?: number); + + tileTransform: TransformStatic; + protected _width: number; + protected _height: number; + protected _canvasPattern: CanvasPattern; + uvTransform: TextureTransform; + uvRespectAnchor: boolean; + + clampMargin: number; + tileScale: Point | ObservablePoint; + tilePosition: Point | ObservablePoint; + + multiplyUvs(uvs: Float32Array, out: Float32Array): Float32Array; + protected _onTextureUpdate(): void; + protected _renderWebGL(renderer: WebGLRenderer): void; + protected _renderCanvas(renderer: CanvasRenderer): void; + protected _calculateBounds(): void; + getLocalBounds(rect?: Rectangle): Rectangle; + containsPoint(point: Point): boolean; + destroy(options?: DestroyOptions | boolean): void; + + static from(source: number | string | BaseTexture | HTMLCanvasElement | HTMLVideoElement, width?: number, height?: number): TilingSprite; + static fromFrame(frameId: string, width?: number, height?: number): TilingSprite; + // if you remove the next line, the class will break. https://github.com/pixijs/pixi-typescript/issues/96 + static fromImage(imageId: string, crossorigin?: boolean, scaleMode?: number): Sprite; + static fromImage(imageId: string, width?: number, height?: number, crossorigin?: boolean, scaleMode?: number): TilingSprite; + + width: number; + height: number; + } + class TilingSpriteRenderer extends ObjectRenderer { + constructor(renderer: WebGLRenderer); + + render(ts: TilingSprite): void; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////FILTERS/////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace filters { + class FXAAFilter extends Filter { } + class BlurFilter extends Filter { + constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); + + blurXFilter: BlurXFilter; + blurYFilter: BlurYFilter; + resolution: number; + padding: number; + passes: number; + blur: number; + blurX: number; + blurY: number; + quality: number; + } + class BlurXFilter extends Filter { + constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); + + protected _quality: number; + + quality: number; + passes: number; + resolution: number; + strength: number; + firstRun: boolean; + blur: number; + } + class BlurYFilter extends Filter { + constructor(strength?: number, quality?: number, resolution?: number, kernelSize?: number); + + protected _quality: number; + + quality: number; + passes: number; + resolution: number; + strength: number; + firstRun: boolean; + blur: number; + } + class ColorMatrixFilter extends Filter { + constructor(); + + protected _loadMatrix(matrix: number[], multiply?: boolean): void; + protected _multiply(out: number[], a: number[], b: number[]): void; + protected _colorMatrix(matrix: number[]): void; + + matrix: number[]; + alpha: number; + + brightness(b: number, multiply?: boolean): void; + greyscale(scale: number, multiply?: boolean): void; + blackAndWhite(multiply?: boolean): void; + hue(rotation: number, multiply?: boolean): void; + contrast(amount: number, multiply?: boolean): void; + saturate(amount: number, multiply?: boolean): void; + desaturate(multiply?: boolean): void; + negative(multiply?: boolean): void; + sepia(multiply?: boolean): void; + technicolor(multiply?: boolean): void; + polaroid(multiply?: boolean): void; + toBGR(multiply?: boolean): void; + kodachrome(multiply?: boolean): void; + browni(multiply?: boolean): void; + vintage(multiply?: boolean): void; + colorTone(desaturation: number, toned: number, lightColor: string, darkColor: string, multiply?: boolean): void; + night(intensity: number, multiply?: boolean): void; + predator(amount: number, multiply?: boolean): void; + lsd(multiply?: boolean): void; + reset(): void; + } + class DisplacementFilter extends Filter { + constructor(sprite: Sprite, scale?: number); + + scale: Point; + map: Texture; + } + class VoidFilter extends Filter { + glShaderKey: number; + } + + // pixi-filters.d.ts todo + // https://github.com/pixijs/pixi-filters/ + class NoiseFilter extends Filter { + constructor(noise?: number, seed?: number); + noise: number; + seed: number; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////INTERACTION/////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace interaction { + interface InteractiveTarget { + interactive: boolean; + interactiveChildren: boolean; + hitArea: PIXI.Rectangle | PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.RoundedRectangle; + buttonMode: boolean; + cursor: string; + trackedPointers(): { [key: number]: InteractionTrackingData; }; + + // depricated + defaultCursor: string; + } + interface InteractionTrackingData { + readonly pointerId: number; + flags: number; + none: number; + over: boolean; + rightDown: boolean; + leftDown: boolean; + } + interface InteractionEvent { + stopped: boolean; + target: DisplayObject; + currentTarget: DisplayObject; + type: string; + data: InteractionData; + stopPropagation(): void; + } + class InteractionData { + global: Point; + target: DisplayObject; + originalEvent: MouseEvent | TouchEvent | PointerEvent; + identifier: number; + isPrimary: boolean; + button: number; + buttons: number; + width: number; + height: number; + tiltX: number; + tiltY: number; + pointerType: string; + pressure: number; + rotationAngle: number; + twist: number; + tangentialPressure: number; + readonly pointerID: number; + protected _copyEvent(event: Touch | MouseEvent | PointerEvent): void; + protected _reset(): void; + getLocalPosition(displayObject: DisplayObject, point?: Point, globalPos?: Point): Point; + } + type InteractionPointerEvents = "pointerdown" | "pointercancel" | "pointerup" | + "pointertap" | "pointerupoutside" | "pointermove" | "pointerover" | "pointerout"; + type InteractionTouchEvents = "touchstart" | "touchcancel" | "touchend" | + "touchendoutside" | "touchmove" | "tap"; + type InteractionMouseEvents = "rightdown" | "mousedown" | "rightup" | "mouseup" | + "rightclick" | "click" | "rightupoutside" | "mouseupoutside" | "mousemove" | + "mouseover" | "mouseout" | "mouseover"; + type InteractionEventTypes = InteractionPointerEvents | InteractionTouchEvents | InteractionMouseEvents; + interface InteractionManagerOptions { + autoPreventDefault?: boolean; + interactionFrequency?: number; + } + class InteractionManager extends utils.EventEmitter { + constructor(renderer: CanvasRenderer | WebGLRenderer | SystemRenderer, options?: InteractionManagerOptions); + + renderer: SystemRenderer; + autoPreventDefault: boolean; + interactionFrequency: number; + mouse: InteractionData; + activeInteractionData: { [key: number]: InteractionData; }; + interactionDataPool: InteractionData[]; + eventData: InteractionEvent; + protected interactionDOMElement: HTMLElement; + moveWhenInside: boolean; + eventsAdded: boolean; + protected mouseOverRenderer: boolean; + readonly supportsTouchEvents: boolean; + readonly supportsPointerEvents: boolean; + protected onPointerUp: (event: PointerEvent) => void; + protected processPointerUp: (interactionEvent: InteractionEvent, displayObject: Container | PIXI.Sprite | PIXI.extras.TilingSprite, hit: boolean) => void; + protected onPointerCancel: (event: PointerEvent) => void; + protected processPointerCancel: (interactionEvent: InteractionEvent, displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite) => void; + protected onPointerDown: (event: PointerEvent) => void; + protected processPointerDown: (interactionEvent: InteractionEvent, displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite, hit: boolean) => void; + protected onPointerMove: (event: PointerEvent) => void; + protected processPointerMove: (interactionEvent: InteractionEvent, displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite, hit: boolean) => void; + protected onPointerOut: (event: PointerEvent) => void; + protected processPointerOverOut: (interactionEvent: InteractionEvent, displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite, hit: boolean) => void; + protected onPointerOver: (event: PointerEvent) => void; + cursorStyles: { + default: string; + pointer: string; + }; + currentCursorMode: string; + cursor: string; + protected _tempPoint: Point; + resolution: number; + hitTest(globalPoint: Point, root?: Container): DisplayObject; + protected setTargetElement(element: HTMLCanvasElement, resolution?: number): void; + protected addEvents(): void; + protected removeEvents(): void; + update(deltaTime?: number): void; + setCursorMode(mode: string): void; + protected dispatchEvent(displayObject: Container | Sprite | extras.TilingSprite, eventString: string, eventData: any): void; + mapPositionToPoint(point: Point, x: number, y: number): void; + //tslint:disable-next-line:ban-types forbidden-types + protected processInteractive( + interactionEvent: InteractionEvent, + displayObject: PIXI.Container | PIXI.Sprite | PIXI.extras.TilingSprite, + func?: Function, + hitTest?: boolean, + interactive?: boolean + ): boolean; + //tslint:disable-next-line:ban-types forbidden-types + protected onPointerComplete( + originalEvent: PointerEvent, + cancelled: boolean, + func: Function + ): void; + protected getInteractionDataForPointerId(pointerId: number): InteractionData; + protected releaseInteractionDataForPointerId(event: PointerEvent): void; + protected configureInteractionEventForDOMEvent(interactionEvent: InteractionEvent, pointerEvent: PointerEvent, interactionData: InteractionData): InteractionEvent; + protected normalizeToPointerData(event: TouchEvent | MouseEvent | PointerEvent): PointerEvent[]; + destroy(): void; + + // depricated + defaultCursorStyle: string; + currentCursorStyle: string; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////LOADER///////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + // pixi loader extends + // https://github.com/englercj/resource-loader/ + // 2.0.6 + + class MiniSignalBinding { + //tslint:disable-next-line:ban-types forbidden-types + constructor(fn: Function, once?: boolean, thisArg?: any); + + //tslint:disable-next-line:ban-types forbidden-types + protected _fn: Function; + protected _once: boolean; + protected _thisArg: any; + protected _next: MiniSignalBinding; + protected _prev: MiniSignalBinding; + protected _owner: MiniSignal; + + detach(): boolean; + } + class MiniSignal { + constructor(); + + protected _head: MiniSignalBinding; + protected _tail: MiniSignalBinding; + + handlers(exists?: boolean): MiniSignalBinding[] | boolean; + handlers(exists?: true): boolean; + handlers(exists?: false): MiniSignalBinding[]; + + has(node: MiniSignalBinding): boolean; + dispatch(): boolean; + //tslint:disable-next-line:ban-types forbidden-types + add(fn: Function, thisArg?: any): any; + //tslint:disable-next-line:ban-types forbidden-types + once(fn: Function, thisArg?: any): any; + detach(node: MiniSignalBinding): MiniSignal; + detachAll(): MiniSignal; + } + + namespace loaders { + interface LoaderOptions { + crossOrigin?: boolean | string; + loadType?: number; + xhrType?: string; + metaData?: any; + loadElement?: HTMLImageElement | HTMLAudioElement | HTMLVideoElement; + skipSource?: boolean; + } + interface ResourceDictionary { + [index: string]: PIXI.loaders.Resource; + } + + // As of ResourceLoader v2 we no longer require EventEmitter + // However, for depreciation reasons, it remains. + class Loader extends utils.EventEmitter { + // pixi overrides here + //tslint:disable-next-line:ban-types forbidden-types + static addPixiMiddleware(fn: Function): void; + + // below this line is the original non-pixi loader + + static Resource: any; + static async: any; + static base64: any; + + constructor(baseUrl?: string, concurrency?: number); + + baseUrl: string; + progress: number; + loading: boolean; + defaultQueryString: string; + + //tslint:disable-next-line:ban-types forbidden-types + protected _beforeMiddleware: Function[]; + //tslint:disable-next-line:ban-types forbidden-types + protected _afterMiddleware: Function[]; + protected _resourcesParsing: Resource[]; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundLoadResource: (r: Resource, d: Function) => void; + protected _queue: any; + + resources: ResourceDictionary; + + onProgress: MiniSignal; + onError: MiniSignal; + onLoad: MiniSignal; + onStart: MiniSignal; + onComplete: MiniSignal; + + add(...params: any[]): this; + //tslint:disable-next-line:ban-types forbidden-types + add(name: string, url: string, options?: LoaderOptions, cb?: Function): this; + //tslint:disable-next-line:ban-types forbidden-types + add(obj: string | any | any[], options?: LoaderOptions, cb?: Function): this; + + //tslint:disable-next-line:ban-types forbidden-types + pre(fn: Function): this; + //tslint:disable-next-line:ban-types forbidden-types + use(fn: Function): this; + reset(): this; + //tslint:disable-next-line:ban-types forbidden-types + load(cb?: Function): this; + + protected _prepareUrl(url: string): string; + //tslint:disable-next-line:ban-types forbidden-types + protected _loadResource(resource: Resource, dequeue: Function): void; + protected _onComplete(): void; + protected _onLoad(resource: Resource): void; + + destroy(): void; + + // depreciation + + on(event: "complete", fn: (loader: loaders.Loader, object: any) => void, context?: any): this; + on(event: "error", fn: (error: Error, loader: loaders.Loader, resource: Resource) => void, context?: any): this; + on(event: "load" | "progress", fn: (loader: loaders.Loader, resource: Resource) => void, context?: any): this; + on(event: "start", fn: (loader: loaders.Loader) => void, context?: any): this; + + once(event: "complete", fn: (loader: loaders.Loader, object: any) => void, context?: any): this; + once(event: "error", fn: (error: Error, loader: loaders.Loader, resource: Resource) => void, context?: any): this; + once(event: "load" | "progress", fn: (loader: loaders.Loader, resource: Resource) => void, context?: any): this; + once(event: "start", fn: (loader: loaders.Loader) => void, context?: any): this; + //tslint:disable-next-line:ban-types forbidden-types + off(event: "complete" | "error" | "load" | "progress" | "start" | string, fn?: Function, context?: any): this; + } + interface TextureDictionary { + [index: string]: PIXI.Texture; + } + class Resource { + static setExtensionLoadType(extname: string, loadType: number): void; + static setExtensionXhrType(extname: string, xhrType: string): void; + + constructor(name: string, url: string | string[], options?: LoaderOptions); + + protected _flags: number; + + name: string; + url: string; + extension: string; + data: any; + crossOrigin: boolean | string; + loadType: number; + xhrType: string; + metadata: any; + error: Error; + xhr: XMLHttpRequest | null; + children: Resource[]; + type: number; + progressChunk: number; + + //tslint:disable-next-line:ban-types forbidden-types + protected _dequeue: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _onLoadBinding: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundComplete: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundOnError: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundOnProgress: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundXhrOnError: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundXhrOnAbort: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundXhrOnLoad: Function; + //tslint:disable-next-line:ban-types forbidden-types + protected _boundXdrOnTimeout: Function; + + onStart: MiniSignal; + onProgress: MiniSignal; + onComplete: MiniSignal; + onAfterMiddleware: MiniSignal; + + isDataUrl: boolean; + isComplete: boolean; + isLoading: boolean; + complete(): void; + abort(message?: string): void; + //tslint:disable-next-line:ban-types forbidden-types + load(cb?: Function): void; + + protected _hasFlag(flag: number): boolean; + protected _setFlag(flag: number, value: boolean): void; + protected _loadElement(type: string): void; + protected _loadSourceElement(type: string): void; + protected _loadXhr(): void; + protected _loadXdr(): void; + protected _createSource(type: string, url: string, mime?: string): HTMLSourceElement; + protected _onError(event?: any): void; + protected _onProgress(event?: any): void; + protected _xhrOnError(): void; + protected _xhrOnAbort(): void; + protected _xdrOnTimeout(): void; + protected _xhrOnLoad(): void; + protected _determineCrossOrigin(url: string, loc: any): string; + protected _determineXhrType(): number; + protected _determineLoadType(): number; + protected _getExtension(): string; + protected _getMimeXhrType(type: number): string; + + static STATUS_FLAGS: { + NONE: number; + DATA_URL: number; + COMPLETE: number; + LOADING: number; + }; + + static TYPE: { + UNKNOWN: number; + JSON: number; + XML: number; + IMAGE: number; + AUDIO: number; + VIDEO: number; + TEXT: number; + }; + + static LOAD_TYPE: { + XHR: number; + IMAGE: number; + AUDIO: number; + VIDEO: number; + }; + + static XHR_RESPONSE_TYPE: { + DEFAULT: string; + BUFFER: string; + BLOB: string; + DOCUMENT: string; + JSON: string; + TEXT: string; + }; + + static EMPTY_GIF: string; + + texture: Texture; + spineAtlas: any; + spineData: any; + textures?: TextureDictionary; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////MESH/////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + namespace mesh { + class Mesh extends Container { + constructor(texture: Texture, vertices?: Float32Array, uvs?: Float32Array, indices?: Uint16Array, drawMode?: number); + + protected _texture: Texture; + uvs: Float32Array; + vertices: Float32Array; + indices: Uint16Array; + dirty: number; + indexDirty: number; + dirtyVertex: boolean; + protected _geometryVersion: number; + blendMode: number; + pluginName: string; + canvasPadding: number; + drawMode: number; + texture: Texture; + tintRgb: Float32Array; + protected _glDatas: { [n: number]: any; }; + protected _uvTransform: extras.TextureTransform; + uploadUvTransform: boolean; + multiplyUvs(): void; + refresh(forceUpdate?: boolean): void; + protected _refresh(): void; + protected _renderWebGL(renderer: WebGLRenderer): void; + protected _renderCanvas(renderer: CanvasRenderer): void; + protected _onTextureUpdate(): void; + protected _calculateBounds(): void; + containsPoint(point: Point): boolean; + tint: number; + + static DRAW_MODES: { + TRIANGLE_MESH: number; + TRIANGLES: number; + }; + } + + class CanvasMeshRenderer { + constructor(renderer: CanvasRenderer); + + renderer: CanvasRenderer; + + render(mesh: Mesh): void; + protected _renderTriangleMesh(mesh: Mesh): void; + protected _renderTriangles(mesh: Mesh): void; + protected _renderDrawTriangle(mesh: Mesh, index0: number, index1: number, index2: number): void; + protected renderMeshFlat(mesh: Mesh): void; + + destroy(): void; + } + + class MeshRenderer extends ObjectRenderer { + constructor(renderer: WebGLRenderer); + + shader: Shader; + render(mesh: Mesh): void; + } + + class Plane extends Mesh { + constructor(texture: Texture, verticesX?: number, verticesY?: number); + protected _ready: boolean; + verticesX: number; + verticesY: number; + drawMode: number; + + refresh(): void; + + protected _onTexureUpdate(): void; + } + + class NineSlicePlane extends Plane { + constructor(texture: Texture, leftWidth?: number, topHeight?: number, rightWidth?: number, bottomHeight?: number); + + width: number; + height: number; + leftWidth: number; + rightWidth: number; + topHeight: number; + bottomHeight: number; + + protected _leftWidth: number; + protected _rightWidth: number; + protected _topHeight: number; + protected _bottomHeight: number; + protected _height: number; + protected _width: number; + protected _origHeight: number; + protected _origWidth: number; + protected _uvh: number; + protected _uvw: number; + + updateHorizontalVertices(): void; + updateVerticalVertices(): void; + protected drawSegment(context: CanvasRenderingContext2D | WebGLRenderingContext, textureSource: any, w: number, h: number, x1: number, y1: number, x2: number, y2: number): void; + protected _refresh(): void; + } + + class Rope extends Mesh { + constructor(texture: Texture, points: Point[]); + + points: Point[]; + colors: number[]; + autoUpdate: boolean; + protected _refresh(): void; + + refreshVertices(): void; + } + } + ////////////////////////////////////////////////////////////////////////////// + /////////////////////////////PARTICLES//////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + namespace particles { + interface ParticleContainerProperties { + scale?: boolean; + position?: boolean; + rotation?: boolean; + uvs?: boolean; + alpha?: boolean; + } + class ParticleContainer extends Container { + constructor(size?: number, properties?: ParticleContainerProperties, batchSize?: number); + protected _tint: number; + protected tintRgb: number | any[]; + tint: number; + protected _properties: boolean[]; + protected _maxSize: number; + protected _batchSize: number; + protected _glBuffers: { [n: number]: WebGLBuffer; }; + protected _bufferToUpdate: number; + interactiveChildren: boolean; + blendMode: number; + roundPixels: boolean; + baseTexture: BaseTexture; + + setProperties(properties: ParticleContainerProperties): void; + protected onChildrenChange: (smallestChildIndex?: number) => void; + + destroy(options?: DestroyOptions | boolean): void; + } + class ParticleBuffer { + constructor(gl: WebGLRenderingContext, properties: any, dynamicPropertyFlags: any[], size: number); + + gl: WebGLRenderingContext; + vertSize: number; + vertByteSize: number; + size: number; + dynamicProperties: any[]; + staticProperties: any[]; + staticStride: number; + staticBuffer: any; + staticData: any; + dynamicStride: number; + dynamicBuffer: any; + dynamicData: any; + + destroy(): void; + } + interface ParticleRendererProperty { + attribute: number; + size: number; + uploadFunction(children: PIXI.DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + offset: number; + } + class ParticleRenderer extends ObjectRenderer { + constructor(renderer: WebGLRenderer); + + shader: glCore.GLShader; + indexBuffer: WebGLBuffer; + properties: ParticleRendererProperty[]; + protected tempMatrix: Matrix; + + start(): void; + generateBuffers(container: ParticleContainer): ParticleBuffer[]; + uploadVertices(children: DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + uploadPosition(children: DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + uploadRotation(children: DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + uploadUvs(children: DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + uploadAlpha(children: DisplayObject[], startIndex: number, amount: number, array: number[], stride: number, offset: number): void; + destroy(): void; + + indices: Uint16Array; + } + } + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////PREPARE/////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + namespace prepare { + type AddHook = (item: any, queue: any[]) => boolean; + type UploadHook = (prepare: UploadHookSource, item: any) => boolean; + abstract class BasePrepare{ + constructor(renderer: SystemRenderer); + + limiter: CountLimiter | TimeLimiter; + protected renderer: SystemRenderer; + protected uploadHookHelper: UploadHookSource; + protected queue: any[]; + protected addHooks: AddHook[]; + protected uploadHooks: Array>; + //tslint:disable-next-line:ban-types forbidden-types + protected completes: Function[]; + protected ticking: boolean; + protected delayedTick: () => void; + + //tslint:disable-next-line:ban-types forbidden-types + upload(item: Function | DisplayObject | Container | BaseTexture | Texture | Graphics | Text | any, done?: () => void): void; + protected tick(): void; + protected prepareItems(): void; + registerFindHook(addHook: AddHook): this; + registerUploadHook(uploadHook: UploadHook): this; + protected findMultipleBaseTextures(item: PIXI.DisplayObject, queue: any[]): boolean; + protected findBaseTexture(item: PIXI.DisplayObject, queue: any[]): boolean; + protected findTexture(item: PIXI.DisplayObject, queue: any[]): boolean; + add(item: PIXI.DisplayObject | PIXI.Container | PIXI.BaseTexture | PIXI.Texture | PIXI.Graphics | PIXI.Text | any): this; + destroy(): void; + } + class CanvasPrepare extends BasePrepare { + constructor(renderer: CanvasRenderer); + + protected canvas: HTMLCanvasElement; + protected ctx: CanvasRenderingContext2D; + } + class WebGLPrepare extends BasePrepare { + constructor(renderer: WebGLRenderer); + } + class CountLimiter { + constructor(maxItemsPerFrame: number); + + protected maxItemsPerFrame: number; + protected itemsLeft: number; + + beginFrame(): void; + allowedToUpload(): boolean; + } + class TimeLimiter { + constructor(maxMilliseconds: number); + + protected maxMilliseconds: number; + protected frameStart: number; + + beginFrame(): void; + allowedToUpload(): boolean; + } + } + + ////////////////////////////////////////////////////////////////////////////// + /////////////////////////////pixi-gl-core///////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // pixi-gl-core https://github.com/pixijs/pixi-gl-core + // sharedArrayBuffer as a type is not available yet. + // need to fully define what an `Attrib` is. + namespace glCore { + interface ContextOptions { + /** + * Boolean that indicates if the canvas contains an alpha buffer. + */ + alpha?: boolean; + /** + * Boolean that indicates that the drawing buffer has a depth buffer of at least 16 bits. + */ + depth?: boolean; + /** + * Boolean that indicates that the drawing buffer has a stencil buffer of at least 8 bits. + */ + stencil?: boolean; + /** + * Boolean that indicates whether or not to perform anti-aliasing. + */ + antialias?: boolean; + /** + * Boolean that indicates that the page compositor will assume the drawing buffer contains colors with pre-multiplied alpha. + */ + premultipliedAlpha?: boolean; + /** + * If the value is true the buffers will not be cleared and will preserve their values until cleared or overwritten by the author. + */ + preserveDrawingBuffer?: boolean; + /** + * Boolean that indicates if a context will be created if the system performance is low. + */ + failIfMajorPerformanceCaveat?: boolean; + } + function createContext(view: HTMLCanvasElement, options?: ContextOptions): WebGLRenderingContext; + function setVertexAttribArrays(gl: WebGLRenderingContext, attribs: Attrib[], state?: WebGLState): WebGLRenderingContext | undefined; + class GLBuffer { + constructor(gl: WebGLRenderingContext, type: number, data: ArrayBuffer | ArrayBufferView | any, drawType: number); + + protected _updateID?: number; + gl: WebGLRenderingContext; + buffer: WebGLBuffer; + type: number; + drawType: number; + data: ArrayBuffer | ArrayBufferView | any; + + upload(data: ArrayBuffer | ArrayBufferView | any, offset?: number, dontBind?: boolean): void; + bind(): void; + + static createVertexBuffer(gl: WebGLRenderingContext, data: ArrayBuffer | ArrayBufferView | any, drawType: number): GLBuffer; + static createIndexBuffer(gl: WebGLRenderingContext, data: ArrayBuffer | ArrayBufferView | any, drawType: number): GLBuffer; + static create(gl: WebGLRenderingContext, type: number, data: ArrayBuffer | ArrayBufferView | any, drawType: number): GLBuffer; + + destroy(): void; + } + class GLFramebuffer { + constructor(gl: WebGLRenderingContext, width: number, height: number); + + gl: WebGLRenderingContext; + frameBuffer: WebGLFramebuffer; + stencil: WebGLRenderbuffer; + texture: GLTexture; + width: number; + height: number; + + enableTexture(texture: GLTexture): void; + enableStencil(): void; + clear(r: number, g: number, b: number, a: number): void; + bind(): void; + unbind(): void; + resize(width: number, height: number): void; + destroy(): void; + + static createRGBA(gl: WebGLRenderingContext, width: number, height: number, data: ArrayBuffer | ArrayBufferView | any): GLFramebuffer; + static createFloat32(gl: WebGLRenderingContext, width: number, height: number, data: ArrayBuffer | ArrayBufferView | any): GLFramebuffer; + } + class GLShader { + constructor(gl: WebGLRenderingContext, vertexSrc: string | string[], fragmentSrc: string | string[], precision?: string, attributeLocations?: { [key: string]: number }); + + gl: WebGLRenderingContext; + program?: WebGLProgram | null; + uniformData: any; + uniforms: any; + attributes: any; + + bind(): void; + destroy(): void; + } + class GLTexture { + constructor(gl: WebGLRenderingContext, width?: number, height?: number, format?: number, type?: number); + + gl: WebGLRenderingContext; + texture: WebGLTexture; + mipmap: boolean; + premultiplyAlpha: boolean; + width: number; + height: number; + format: number; + type: number; + + upload(source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement): void; + uploadData(data: ArrayBuffer | ArrayBufferView, width: number, height: number): void; + bind(location?: number): void; + unbind(): void; + minFilter(linear: boolean): void; + magFilter(linear: boolean): void; + enableMipmap(): void; + enableLinearScaling(): void; + enableNearestScaling(): void; + enableWrapClamp(): void; + enableWrapRepeat(): void; + enableWrapMirrorRepeat(): void; + destroy(): void; + + static fromSource(gl: WebGLRenderingContext, source: HTMLImageElement | ImageData | HTMLVideoElement | HTMLCanvasElement, premultipleAlpha?: boolean): GLTexture; + static fromData(gl: WebGLRenderingContext, data: number[], width: number, height: number): GLTexture; + } + interface Attrib { + attribute: { + location: number; + size: number; + }; + normalized: boolean; + stride: number; + start: number; + buffer: ArrayBuffer; + } + interface WebGLRenderingContextAttribute { + buffer: WebGLBuffer; + attribute: any; + type: number; + normalized: boolean; + stride: number; + start: number; + } + interface AttribState { + tempAttribState: Attrib[]; + attribState: Attrib[]; + } + class VertexArrayObject { + static FORCE_NATIVE: boolean; + + constructor(gl: WebGLRenderingContext, state: WebGLState); + + protected nativeVaoExtension: any; + protected nativeState: AttribState; + protected nativeVao: VertexArrayObject; + gl: WebGLRenderingContext; + attributes: Attrib[]; + indexBuffer: GLBuffer; + dirty: boolean; + + bind(): VertexArrayObject; + unbind(): VertexArrayObject; + activate(): VertexArrayObject; + addAttribute(buffer: GLBuffer, attribute: Attrib, type: number, normalized: boolean, stride: number, start: number): VertexArrayObject; + addIndex(buffer: GLBuffer, options?: any): VertexArrayObject; + clear(): VertexArrayObject; + draw(type: number, size: number, start: number): VertexArrayObject; + destroy(): void; + } + } + + ////////////////////////////////////////////////////////////////////////////// + ///////////////////////////////UTILS////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + interface DecomposedDataUri { + mediaType: string; + subType: string; + encoding: string; + data: any; + } + + namespace utils { + function uid(): number; + function hex2rgb(hex: number, out?: number[]): number[]; + function hex2string(hex: number): string; + function rgb2hex(rgb: number[]): number; + function canUseNewCanvasBlendModes(): boolean; + function getResolutionOfUrl(url: string, defaultValue?: number): number; + function getSvgSize(svgString: string): any; + function decomposeDataUri(dataUri: string): DecomposedDataUri | void; + function getUrlFileExtension(url: string): string | void; + function sayHello(type: string): void; + function skipHello(): void; + function isWebGLSupported(): boolean; + function sign(n: number): number; + function removeItems(arr: T[], startIdx: number, removeCount: number): void; + function correctBlendMode(blendMode: number, premultiplied: boolean): number; + function premultiplyTint(tint: number, alpha: number): number; + function premultiplyRgba(rgb: Float32Array | number[], alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array; + function premultiplyTintToRgba(tint: number, alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array; + const premultiplyBlendMode: number[][]; + const TextureCache: any; + const BaseTextureCache: any; + + // https://github.com/kaimallea/isMobile + namespace isMobile { + const apple: { + phone: boolean; + ipod: boolean; + tablet: boolean; + device: boolean; + }; + const android: { + phone: boolean; + tablet: boolean; + device: boolean; + }; + const amazon: { + phone: boolean; + tablet: boolean; + device: boolean; + }; + const windows: { + phone: boolean; + tablet: boolean; + device: boolean; + }; + const seven_inch: boolean; + const other: { + blackberry10: boolean; + blackberry: boolean; + opera: boolean; + firefox: boolean; + chrome: boolean; + device: boolean; + }; + const any: boolean; + const phone: boolean; + const tablet: boolean; + } + // https://github.com/primus/eventemitter3 + class EventEmitter { + static prefixed: string | boolean; + static EventEmitter: { + new(): EventEmitter; + prefixed: string | boolean; + }; + /** + * Minimal EventEmitter interface that is molded against the Node.js + * EventEmitter interface. + * + * @constructor + * @api public + */ + constructor(); + /** + * Return an array listing the events for which the emitter has registered listeners. + * + * @returns {(string | symbol)[]} + */ + eventNames(): Array<(string | symbol)>; + /** + * Return the listeners registered for a given event. + * + * @param {(string | symbol)} event The event name. + * @returns {Function[]} + */ + //tslint:disable-next-line:ban-types forbidden-types + listeners(event: string | symbol): Function[]; + /** + * Check if there listeners for a given event. + * If `exists` argument is not `true` lists listeners. + * + * @param {(string | symbol)} event The event name. + * @param {boolean} exists Only check if there are listeners. + * @returns {boolean} + */ + listeners(event: string | symbol, exists: boolean): boolean; + /** + * Calls each of the listeners registered for a given event. + * + * @param {(string | symbol)} event The event name. + * @param {...*} args Arguments that are passed to registered listeners + * @returns {boolean} `true` if the event had listeners, else `false`. + */ + emit(event: string | symbol, ...args: any[]): boolean; + /** + * Add a listener for a given event. + * + * @param {(string | symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + */ + //tslint:disable-next-line:ban-types forbidden-types + on(event: string | symbol, fn: Function, context?: any): this; + /** + * Add a one-time listener for a given event. + * + * @param {(string | symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + */ + //tslint:disable-next-line:ban-types forbidden-types + once(event: string | symbol, fn: Function, context?: any): this; + /** + * Remove the listeners of a given event. + * + * @param {(string | symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + */ + //tslint:disable-next-line:ban-types forbidden-types + removeListener(event: string | symbol, fn?: Function, context?: any, once?: boolean): this; + /** + * Remove all listeners, or those of the specified event. + * + * @param {(string | symbol)} event The event name. + * @returns {EventEmitter} `this`. + */ + removeAllListeners(event?: string | symbol): this; + /** + * Alias method for `removeListener` + */ + //tslint:disable-next-line:ban-types forbidden-types + off(event: string | symbol, fn?: Function, context?: any, once?: boolean): this; + /** + * Alias method for `on` + */ + //tslint:disable-next-line:ban-types forbidden-types + addListener(event: string | symbol, fn: Function, context?: any): this; + /** + * This function doesn't apply anymore. + * @deprecated + */ + setMaxListeners(): this; + } + } + ////////////////////////////////////////////////////////////////////////////// + /////////////////////////////depreciation///////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + // not sure how to handle blendmodes scalemodes basetexturecache + namespace core { + /** + * @class + * @private + * @name SpriteBatch + * @memberof PIXI + * @see PIXI.ParticleContainer + * @throws {ReferenceError} SpriteBatch does not exist any more, please use the new ParticleContainer instead. + * @deprecated since version 3.0.0 + */ + type SpriteBatch = ParticleContainer; + + /** + * @class + * @private + * @name AssetLoader + * @memberof PIXI + * @see PIXI.loaders.Loader + * @throws {ReferenceError} The loader system was overhauled in pixi v3, please see the new PIXI.loaders.Loader class. + * @deprecated since version 3.0.0 + */ + type AssetLoader = loaders.Loader; + + /** + * @class + * @private + * @name Stage + * @memberof PIXI + * @see PIXI.Container + * @deprecated since version 3.0.0 + */ + type Stage = Container; + + /** + * @class + * @private + * @name DisplayObjectContainer + * @memberof PIXI + * @see PIXI.Container + * @deprecated since version 3.0.0 + */ + type DisplayObjectContainer = Container; + + /** + * @class + * @private + * @name Strip + * @memberof PIXI + * @see PIXI.mesh.Mesh + * @deprecated since version 3.0.0 + */ + type Strip = mesh.Mesh; + + /** + * @class + * @private + * @name Rope + * @memberof PIXI + * @see PIXI.mesh.Rope + * @deprecated since version 3.0.0 + */ + type Rope = mesh.Rope; + + /** + * @class + * @private + * @name ParticleContainer + * @memberof PIXI + * @see PIXI.particles.ParticleContainer + * @deprecated since version 4.0.0 + */ + type ParticleContainer = particles.ParticleContainer; + + /** + * @class + * @private + * @name MovieClip + * @memberof PIXI + * @see PIXI.extras.MovieClip + * @deprecated since version 3.0.0 + */ + type MovieClip = extras.AnimatedSprite; + + /** + * @class + * @private + * @name TilingSprite + * @memberof PIXI + * @see PIXI.extras.TilingSprite + * @deprecated since version 3.0.0 + */ + type TilingSprite = extras.TilingSprite; + + /** + * @class + * @private + * @name BaseTextureCache + * @memberof PIXI + * @see PIXI.utils.BaseTextureCache + * @deprecated since version 3.0.0 + */ + type BaseTextureCache = any; + + /** + * @class + * @private + * @name BitmapText + * @memberof PIXI + * @see PIXI.extras.BitmapText + * @deprecated since version 3.0.0 + */ + type BitmapText = extras.BitmapText; + + /** + * @namespace + * @private + * @name math + * @memberof PIXI + * @see PIXI + * @deprecated since version 3.0.6 + */ + type math = any; + + /** + * @class + * @private + * @name PIXI.AbstractFilter + * @see PIXI.Filter + * @deprecated since version 3.0.6 + */ + type AbstractFilter = Filter; + + /** + * @class + * @private + * @name PIXI.TransformManual + * @see PIXI.TransformBase + * @deprecated since version 4.0.0 + */ + type TransformManual = TransformBase; + + /** + * @static + * @constant + * @name PIXI.TARGET_FPMS + * @see PIXI.settings.TARGET_FPMS + * @deprecated since version 4.2.0 + */ + type TARGET_FPMS = number; + + /** + * @static + * @constant + * @name PIXI.FILTER_RESOLUTION + * @see PIXI.settings.FILTER_RESOLUTION + * @deprecated since version 4.2.0 + */ + type FILTER_RESOLUTION = number; + + /** + * @static + * @constant + * @name PIXI.RESOLUTION + * @see PIXI.settings.RESOLUTION + * @deprecated since version 4.2.0 + */ + type RESOLUTION = number; + + /** + * @static + * @constant + * @name PIXI.MIPMAP_TEXTURES + * @see PIXI.settings.MIPMAP_TEXTURES + * @deprecated since version 4.2.0 + */ + type MIPMAP_TEXTURES = any; + + /** + * @static + * @constant + * @name PIXI.SPRITE_BATCH_SIZE + * @see PIXI.settings.SPRITE_BATCH_SIZE + * @deprecated since version 4.2.0 + */ + type SPRITE_BATCH_SIZE = number; + + /** + * @static + * @constant + * @name PIXI.SPRITE_MAX_TEXTURES + * @see PIXI.settings.SPRITE_MAX_TEXTURES + * @deprecated since version 4.2.0 + */ + type SPRITE_MAX_TEXTURES = number; + + /** + * @static + * @constant + * @name PIXI.RETINA_PREFIX + * @see PIXI.settings.RETINA_PREFIX + * @deprecated since version 4.2.0 + */ + type RETINA_PREFIX = RegExp | string; + + /** + * @static + * @constant + * @name PIXI.DEFAULT_RENDER_OPTIONS + * @see PIXI.settings.RENDER_OPTIONS + * @deprecated since version 4.2.0 + */ + type DEFAULT_RENDER_OPTIONS = number; + + /** + * @static + * @name PRECISION + * @memberof PIXI.settings + * @see PIXI.PRECISION + * @deprecated since version 4.4.0 + */ + type PRECISION = string; + } + + namespace extras { + /** + * @class + * @name MovieClip + * @memberof PIXI.extras + * @see PIXI.extras.AnimatedSprite + * @deprecated since version 4.2.0 + */ + type MovieClip = extras.AnimatedSprite; + } + namespace settings { + /** + * @static + * @name PRECISION + * @memberof PIXI.settings + * @see PIXI.PRECISION + * @deprecated since version 4.4.0 + */ + type PRECISION = number; + } +} + +declare namespace pixi { + const gl: typeof PIXI.glCore; +} + +//tslint:disable-next-line:no-single-declare-module +declare module "pixi.js" { + export = PIXI; +} +/* tslint:disable */// Generated by Haxe TypeScript Declaration Generator :) + +/** + * Allows you to map pixels to the screen or draw rectangles. + */ +declare class Bitmap { + /** + * The basic object that represents an image. + * + * @class Bitmap + * @constructor + * @param {Int} width The width of the bitmap + * @param {Int} height The height of the bitmap + */ + constructor(width?: number, height?: number); + /** + * The face name of the font. + * + * @property fontFace + * @type String + */ + fontFace: string; + /** + * The size of the font in pixels. + * + * @property fontSize + * @type Number + */ + fontSize: number; + /** + * Whether the font is italic. + * + * @property fontItalic + * @type Boolean + */ + fontItalic: number; + /** + * The color of the text in CSS format. + * + * @property textColor + * @type String + */ + textColor: string; + /** + * The color of the outline of the text in CSS format. + * + * @property outlineColor + * @type String + */ + outlineColor: string; + /** + * The width of the outline of the text. + * + * @property outlineWidth + * @type Number + */ + outlineWidth: number; + /** + * [read-only] The url of the image file. + * + * @property url + * @type String + */ + url: string; + /** + * [read-only] The base texture that holds the image. + * + * @property baseTexture + * @type PIXI.BaseTexture + */ + baseTexture: PIXI.BaseTexture; + /** + * [read-only] The bitmap canvas. + * + * @property canvas + * @type HTMLCanvasElement + */ + canvas: HTMLCanvasElement; + /** + * [read-only] The 2d context of the bitmap canvas. + * + * @property context + * @type CanvasRenderingContext2D + */ + context: CanvasRenderingContext2D; + /** + * [read-only] The width of the bitmap. + * + * @property width + * @type Number + */ + width: number; + /** + * [read-only] The height of the bitmap. + * + * @property height + * @type Number + */ + height: number; + /** + * [read-only] The rectangle of the bitmap. + * + * @property rect + * @type Rectangle + */ + rect: Rectangle; + /** + * Whether the smooth scaling is applied. + * + * @property smooth + * @type Boolean + */ + smooth: boolean; + /** + * The opacity of the drawing object in the range (0, 255). + * + * @property paintOpacity + * @type Number + */ + paintOpacity: number; + /** + * Cache entry, for images. In all cases _url is the same as cacheEntry.key + * @type CacheEntry + */ + cacheEntry: CacheEntry; + /** + * Checks whether the bitmap is ready to render. + * + * @method isReady + * @return {Boolean} True if the bitmap is ready to render + */ + isReady(): boolean; + /** + * Checks whether a loading error has occurred. + * + * @method isError + * @return {Boolean} True if a loading error has occurred + */ + isError(): boolean; + /** + * Resizes the bitmap. + * + * @method resize + * @param {Number} width The new width of the bitmap + * @param {Number} height The new height of the bitmap + */ + resize(width: number, height: number): void; + /** + * Performs a block transfer. + * + * @method blt + * @param {Bitmap} source The bitmap to draw + * @param {Number} sx The x coordinate in the source + * @param {Number} sy The y coordinate in the source + * @param {Number} sw The width of the source image + * @param {Number} sh The height of the source image + * @param {Number} dx The x coordinate in the destination + * @param {Number} dy The y coordinate in the destination + * @param {Number} [dw=sw] The width to draw the image in the destination + * @param {Number} [dh=sh] The height to draw the image in the destination + */ + blt(source: Bitmap, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw?: number, dh?: number): void; + /** + * Returns pixel color at the specified point. + * + * @method getPixel + * @param {Number} x The x coordinate of the pixel in the bitmap + * @param {Number} y The y coordinate of the pixel in the bitmap + * @return {String} The pixel color (hex format) + */ + getPixel(x: number, y: number): string; + /** + * Returns alpha pixel value at the specified point. + * + * @method getAlphaPixel + * @param {Number} x The x coordinate of the pixel in the bitmap + * @param {Number} y The y coordinate of the pixel in the bitmap + * @return {String} The alpha value + */ + getAlphaPixel(x: number, y: number): string; + /** + * Clears the specified rectangle. + * + * @method clearRect + * @param {Number} x The x coordinate for the upper-left corner + * @param {Number} y The y coordinate for the upper-left corner + * @param {Number} width The width of the rectangle to clear + * @param {Number} height The height of the rectangle to clear + */ + clearRect(x: number, y: number, width: number, height: number): void; + /** + * Clears the entire bitmap. + * + * @method clear + */ + clear(): void; + /** + * Fills the specified rectangle. + * + * @method fillRect + * @param {Number} x The x coordinate for the upper-left corner + * @param {Number} y The y coordinate for the upper-left corner + * @param {Number} width The width of the rectangle to clear + * @param {Number} height The height of the rectangle to clear + * @param {String} color The color of the rectangle in CSS format + */ + fillRect(x: number, y: number, width: number, height: number, color: string): void; + /** + * Fills the entire bitmap. + * + * @method fillAll + * @param {String} color The color of the rectangle in CSS format + */ + fillAll(color: string): void; + /** + * Draws the rectangle with a gradation. + * + * @method gradientFillRect + * @param {Number} x The x coordinate for the upper-left corner + * @param {Number} y The y coordinate for the upper-left corner + * @param {Number} width The width of the rectangle to clear + * @param {Number} height The height of the rectangle to clear + * @param {String} color1 The start color of the gradation + * @param {String} color2 The end color of the gradation + * @param {Boolean} vertical Whether it draws a vertical gradient + */ + gradientFillRect(x: number, y: number, width: number, height: number, color1: string, color2: string, vertical?: boolean): void; + /** + * Draw the filled circle. + * + * @method drawCircle + * @param {Number} x The x coordinate of the center of the circle + * @param {Number} y The y coordinate of the center of the circle + * @param {Number} radius The radius of the circle + * @param {String} color The color of the circle in CSS format + */ + drawCircle(x: number, y: number, radius: number, color: string): void; + /** + * Draws the outline text to the bitmap. + * + * @method drawText + * @param {String} text The text that will be drawn + * @param {Number} x The x coordinate for the left of the text + * @param {Number} y The y coordinate for the top of the text + * @param {Number} maxWidth The maximum allowed width of the text + * @param {Number} lineHeight The height of the text line + * @param {String} align The alignment of the text + */ + drawText(text: string, x: number, y: number, maxWidth: number, lineHeight: number, align?: string): void; + /** + * Returns the width of the specified text. + * + * @method measureTextWidth + * @param {String} text The text to be measured + * @return {Number} The width of the text in pixels + */ + measureTextWidth(text: string): number; + /** + * Changes the color tone of the entire bitmap. + * + * @method adjustTone + * @param {Number} r The red strength in the range (-255, 255) + * @param {Number} g The green strength in the range (-255, 255) + * @param {Number} b The blue strength in the range (-255, 255) + */ + adjustTone(r: number, g: number, b: number): void; + /** + * Rotates the hue of the entire bitmap. + * + * @method rotateHue + * @param {Number} offset The hue offset in 360 degrees + */ + rotateHue(offset: number): void; + /** + * Applies a blur effect to the bitmap. + * + * @method blur + */ + blur(): void; + /** + * Add a callback function that will be called when the bitmap is loaded. + * + * @method addLoadListener + * @param {Function} listner The callback function + */ + addLoadListener(listner: (bitmap: Bitmap) => void): void; + /** + * touch the resource + * @method touch + */ + touch(): void; + /** + * Performs a block transfer, using assumption that original image was not modified (no hue) + * + * @method blt + * @param {Bitmap} source The bitmap to draw + * @param {Int} sx The x coordinate in the source + * @param {Int} sy The y coordinate in the source + * @param {Int} sw The width of the source image + * @param {Int} sh The height of the source image + * @param {Int} dx The x coordinate in the destination + * @param {Int} dy The y coordinate in the destination + * @param {Int} [dw=sw] The width to draw the image in the destination + * @param {Int} [dh=sh] The height to draw the image in the destination + */ + bltImage(source: Bitmap, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw?: number, dh?: number): void; + /** + * Loads a image file and returns a new bitmap object. + * + * @static + * @method load + * @param {String} url The image url of the texture + * @return Bitmap + */ + static load(url: string): Bitmap; + /** + * Takes a snapshot of the game screen and returns a new bitmap object. + * + * @static + * @method snap + * @param {Stage} stage The stage object + * @return Bitmap + */ + static snap(stage: Stage): Bitmap; +} + +declare class CacheEntry { + /** + * The resource class. Allows to be collected as a garbage if not use for some time or ticks + * + * @class CacheEntry + * @constructor + * @param {ResourceManager} resource manager + * @param {string} key, url of the resource + * @param {string} item - Bitmap, HTML5Audio, WebAudio - whatever you want to store in the cache + */ + constructor(cache: CacheMap, key: string, item: string); + /** + * frees the resource + */ + free(byTTL?: boolean): void; + /** + * Allocates the resource + * @returns {CacheEntry} + */ + allocate(): CacheEntry; + /** + * Sets the time to live + * @param {number} ticks TTL in ticks, 0 if not set + * @param {number} time TTL in seconds, 0 if not set + * @returns {CacheEntry} + */ + setTimeToLive(ticks?: number, seconds?: number): CacheEntry; + isStillAlive(): boolean; + /** + * makes sure that resource wont freed by Time To Live + * if resource was already freed by TTL, put it in cache again + */ + touch(): void; +} + +declare class CacheMap { + /** + * Cache for images, audio, or any other kind of resource + * @param manager + * @constructor + */ + constructor(manager: ImageManager); + /** + * checks ttl of all elements and removes dead ones + */ + checkTTL(): void; + /** + * cache item + * @param key url of cache element + * @returns {*|null} + */ + getItem(key: string): any; + clear(): void; + setItem(key: string, item: any): CacheEntry; + update(ticks: number, delta: number): void; +} + +/** + * The static class that carries out graphics processing. + * + * @class Graphics + */ +declare class Graphics { + protected constructor(); + /** + * The total frame count of the game screen. + * + * @static + * @property frameCount + * @type Number + */ + static frameCount: number; + /** + * The alias of PIXI.blendModes.NORMAL. + * + * @static + * @property BLEND_NORMAL + * @type Number + * @final + */ + static BLEND_NORMAL: number; + /** + * The alias of PIXI.blendModes.ADD. + * + * @static + * @property BLEND_ADD + * @type Number + * @final + */ + static BLEND_ADD: number; + /** + * The alias of PIXI.blendModes.MULTIPLY. + * + * @static + * @property BLEND_MULTIPLY + * @type Number + * @final + */ + static BLEND_MULTIPLY: number; + /** + * The alias of PIXI.blendModes.SCREEN. + * + * @static + * @property BLEND_SCREEN + * @type Number + * @final + */ + static BLEND_SCREEN: number; + /** + * The width of the game screen. + * + * @static + * @property width + * @type Number + */ + static width: number; + /** + * The height of the game screen. + * + * @static + * @property height + * @type Number + */ + static height: number; + /** + * The width of the window display area. + * + * @static + * @property boxWidth + * @type Number + */ + static boxWidth: number; + /** + * The height of the window display area. + * + * @static + * @property boxHeight + * @type Number + */ + static boxHeight: number; + /** + * The zoom scale of the game screen. + * + * @static + * @property scale + * @type Number + */ + static scale: number; + /** + * Initializes the graphics system. + * + * @static + * @method initialize + * @param {Number} width The width of the game screen + * @param {Number} height The height of the game screen + * @param {String} type The type of the renderer. + * 'canvas', 'webgl', or 'auto'. + */ + static initialize(width?: number, height?: number, type?: string): void; + /** + * Marks the beginning of each frame for FPSMeter. + * + * @static + * @method tickStart + */ + static tickStart(): void; + /** + * Marks the end of each frame for FPSMeter. + * + * @static + * @method tickEnd + */ + static tickEnd(): void; + /** + * Renders the stage to the game screen. + * + * @static + * @method render + * @param {Stage} stage The stage object to be rendered + */ + static render(stage?: Stage): void; + /** + * Checks whether the renderer type is WebGL. + * + * @static + * @method isWebGL + * @return {Boolean} True if the renderer type is WebGL + */ + static isWebGL(): boolean; + /** + * Checks whether the current browser supports WebGL. + * + * @static + * @method hasWebGL + * @return {Boolean} True if the current browser supports WebGL. + */ + static hasWebGL(): boolean; + /** + * Checks whether the canvas blend mode 'difference' is supported. + * + * @static + * @method canUseDifferenceBlend + * @return {Boolean} True if the canvas blend mode 'difference' is supported + */ + static canUseDifferenceBlend(): boolean; + /** + * Checks whether the canvas blend mode 'saturation' is supported. + * + * @static + * @method canUseSaturationBlend + * @return {Boolean} True if the canvas blend mode 'saturation' is supported + */ + static canUseSaturationBlend(): boolean; + /** + * Sets the source of the "Now Loading" image. + * + * @static + * @method setLoadingImage + * @param {String} Path of image + */ + static setLoadingImage(src: string): void; + /** + * Initializes the counter for displaying the "Now Loading" image. + * + * @static + * @method startLoading + */ + static startLoading(): void; + /** + * Increments the loading counter and displays the "Now Loading" image if necessary. + * + * @static + * @method updateLoading + */ + static updateLoading(): void; + /** + * Erases the "Now Loading" image. + * + * @static + * @method endLoading + */ + static endLoading(): void; + /** + * Displays the error text to the screen. + * + * @static + * @method printError + * @param {String} name The name of the error + * @param {String} message The message of the error + */ + static printError(name: string, message: string): void; + /** + * Shows the FPSMeter element. + * + * @static + * @method showFps + */ + static showFps(): void; + /** + * Hides the FPSMeter element. + * + * @static + * @method hideFps + */ + static hideFps(): void; + /** + * Loads a font file. + * + * @static + * @method loadFont + * @param {String} name The face name of the font + * @param {String} url The url of the font file + */ + static loadFont(name: string, url: string): void; + /** + * Checks whether the font file is loaded. + * + * @static + * @method isFontLoaded + * @param {String} name The face name of the font + * @return {Boolean} True if the font file is loaded + */ + static isFontLoaded(name: string): boolean; + /** + * Starts playback of a video. + * + * @static + * @method playVideo + * @param {String} src + */ + static playVideo(src: string): void; + /** + * Checks whether the video is playing. + * + * @static + * @method isVideoPlaying + * @return {Boolean} True if the video is playing + */ + static isVideoPlaying(): boolean; + /** + * Checks whether the browser can play the specified video type. + * + * @static + * @method canPlayVideoType + * @param {String} type The video type to test support for + * @return {Boolean} True if the browser can play the specified video type + */ + static canPlayVideoType(type: string): boolean; + /** + * 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 + */ + static pageToCanvasX(x: number): number; + /** + * Converts a y coordinate on the page to the corresponding + * y coordinate on the canvas area. + * + * @static + * @method pageToCanvasY + * @param {Number} y The y coordinate on the page to be converted + * @return {Number} The y coordinate on the canvas area + */ + static pageToCanvasY(y: number): number; + /** + * Checks whether the specified point is inside the game canvas area. + * + * @static + * @method isInsideCanvas + * @param {Number} x The x coordinate on the canvas area + * @param {Number} y The y coordinate on the canvas area + * @return {Boolean} True if the specified point is inside the game canvas area + */ + static isInsideCanvas(x: number, y: number): boolean; + /** + * Calls pixi.js garbage collector + */ + static callGC(): void; + static _renderer: PIXI.AbstractRenderer; +} + +declare class HTML5Audio { + protected constructor(); + _initialized: boolean; + _unlocked: boolean; + _audioElement: HTMLAudioElement; + _gainTweenInterval: number; + _tweenGain: number; + _tweenTargetGain: number; + _tweenGainStep: number; + _staticSePath: boolean; + _volume: number; + _loadListeners: (() => void)[]; + _hasError: boolean; + __autoPlay: boolean; + _isLoading: boolean; + _buffered: boolean; + /** + * [read-only] The url of the audio file. + * + * @property url + * @type String + */ + url: string; + /** + * The volume of the audio. + * + * @property volume + * @type Number + */ + volume: number; + /** + * Sets up the Html5 Audio. + * + * @static + * @method setup + * @param {String} url The url of the audio file + */ + setup(url: string): void; + /** + * Initializes the audio system. + * + * @static + * @method initialize + * @return {Boolean} True if the audio system is available + */ + initialize(): void; + /** + * Clears the audio data. + * + * @static + * @method clear + */ + clear(): void; + /** + * Set the URL of static se. + * + * @static + * @param {String} url + */ + setStaticSe(url: string): void; + /** + * Checks whether the audio data is ready to play. + * + * @static + * @method isReady + * @return {Boolean} True if the audio data is ready to play + */ + isReady(): boolean; + /** + * Checks whether a loading error has occurred. + * + * @static + * @method isError + * @return {Boolean} True if a loading error has occurred + */ + isError(): boolean; + /** + * Checks whether the audio is playing. + * + * @static + * @method isPlaying + * @return {Boolean} True if the audio is playing + */ + isPlaying(): boolean; + /** + * Plays the audio. + * + * @static + * @method play + * @param {Boolean} loop Whether the audio data play in a loop + * @param {Number} offset The start position to play in seconds + */ + play(loop: boolean, offset: number): void; + /** + * Stops the audio. + * + * @static + * @method stop + */ + stop(): void; + /** + * Performs the audio fade-in. + * + * @static + * @method fadeIn + * @param {Number} duration Fade-in time in seconds + */ + fadeIn(duration: number): void; + /** + * Performs the audio fade-out. + * + * @static + * @method fadeOut + * @param {Number} duration Fade-out time in seconds + */ + fadeOut(duration: number): void; + /** + * Gets the seek position of the audio. + * + * @static + * @method seek + */ + seek(): void; +} + +declare class Input { + protected constructor(); + /** + * The wait time of the key repeat in frames. + * + * @static + * @property keyRepeatWait + * @type Number + */ + static keyRepeatWait: number; + /** + * The interval of the key repeat in frames. + * + * @static + * @property keyRepeatInterval + * @type Number + */ + static keyRepeatInterval: number; + /** + * A hash table to convert from a virtual key code to a mapped key name. + * + * @static + * @property keyMapper + * @type Object + * ``` + * { + * [key:number]:string + * } + * ``` + */ + static keyMapper: Object; + /** + * A hash table to convert from a gamepad button to a mapped key name. + * + * @static + * @property gamepadMapper + * @type Object + * ``` + * { + * [key:number]:String + * } + * ``` + */ + static gamepadMapper: Object; + /** + * [read-only] The four direction value as a number of the numpad, or 0 for neutral. + * + * @static + * @property dir4 + * @type Number + */ + static dir4: number; + /** + * [read-only] The eight direction value as a number of the numpad, or 0 for neutral. + * + * @static + * @property dir8 + * @type Number + */ + static dir8: number; + /** + * [read-only] The time of the last input in milliseconds. + * + * @static + * @property date + * @type Number + */ + static date: number; + /** + * Initializes the input system. + * + * @static + * @method initialize + */ + static initialize(): void; + /** + * Clears all the input data. + * + * @static + * @method clear + */ + static clear(): void; + /** + * Updates the input data. + * + * @static + * @method update + */ + static update(): void; + /** + * Checks whether a key is currently pressed down. + * + * @static + * @method isPressed + * @param {String} keyName The mapped name of the key + * @return {Boolean} True if the key is pressed + */ + static isPressed(keyName: string): boolean; + /** + * Checks whether a key is just pressed. + * + * @static + * @method isTriggered + * @param {String} keyName The mapped name of the key + * @return {Boolean} True if the key is triggered + */ + static isTriggered(keyName: string): boolean; + /** + * Checks whether a key is just pressed or a key repeat occurred. + * + * @static + * @method isRepeated + * @param {String} keyName The mapped name of the key + * @return {Boolean} True if the key is repeated + */ + static nisRepeated(keyName: string): boolean; + /** + * Checks whether a key is kept depressed. + * + * @static + * @method isLongPressed + * @param {String} keyName The mapped name of the key + * @return {Boolean} True if the key is long-pressed + */ + static isLongPressed(keyName: string): boolean; +} + +/** + * The static class that handles JSON with object information. + * + * @class JsonEx + */ +declare class JsonEx { + protected constructor(); + /** + * The maximum depth of objects. + * + * @static + * @property maxDepth + * @type Number + * @default 100 + */ + maxDepth: number; + /** + * Makes a deep copy of the specified object. + * + * @static + * @method makeDeepCopy + * @param {Object} object The object to be copied + * @return {Object} The copied object + */ + static makeDeepCopy(object: any): any; + /** + * Converts an object to a JSON string with object information. + * + * @static + * @method stringify + * @param {Object} object The object to be converted + * @return {String} The JSON string + */ + static stringify(object: any): string; + /** + * Parses a JSON string and reconstructs the corresponding object. + * + * @static + * @method parse + * @param {String} json The JSON string + * @return {Object} The reconstructed object + */ + static parse(json: string): any; +} + +declare namespace PIXI { + declare class Point { + /** + * The Point object represents a location in a two-dimensional coordinate system, where x represents + * the horizontal axis and y represents the vertical axis. + * + * @class + * @namespace PIXI + * @param [x=0] {number} position of the point on the x axis + * @param [y=0] {number} position of the point on the y axis + */ + constructor(x?: number, y?: number); + /** + * Copies x and y from the given point + * + * @param {Point} The point to copy from + * @return {Point} Returns itself. + */ + copyFrom(p: PIXI.Point): PIXI.Point; + /** + * Copies x and y into the given point + * + * @param {Point} p - The point to copy. + * @return {Point} Given point with values updated + */ + copyTo(p: PIXI.Point): PIXI.Point; + /** + * Returns true if the given point is equal to this point + * + * @method copy + * @param {Point} the point to compare + * @return {Bool} the result of the comparison + */ + equals(p: PIXI.Point): boolean; + /** + * Sets the point to a new x and y position. + * If y is ommited, both x and y will be set to x. + * + * @method set + * @param [x=0] {Float} position of the point on the x axis + * @param [y=0] {Float} position of the point on the y axis + */ + set(x?: number, y?: number): void; + /** + * @property x + * @type Float + * @default 0 + */ + x: number; + /** + * @property y + * @type Float + * @default 0 + */ + y: number; + } +} + +declare class Point extends PIXI.Point { + /** + * The point class. + * + * @class Point + * @constructor + * @param {Number} x The x coordinate + * @param {Number} y The y coordinate + */ + constructor(x?: number, y?: number); + /** + * The x coordinate. + * + * @property x + * @type Number + */ + x: number; + /** + * The y coordinate. + * + * @property y + * @type Number + */ + y: number; +} + +declare namespace pixi.core.math.shapes { + declare class Shape { + protected constructor(); + /** + * Defines the type of the shape to avoid instanceof (Std.is) checks + */ + type: any; + /** + * Checks whether the x and y coordinates passed to this function are contained within this Shape + * + * @method contains + * @param x {Float} The X coordinate of the point to test + * @param y {Float} The Y coordinate of the point to test + * @return {Bool} Whether the x/y coords are within this Rectangle + */ + contains(x: number, y: number): boolean; + } +} + +declare namespace PIXI { + declare class Rectangle extends pixi.core.math.shapes.Shape { + /** + * the Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its width and its height. + * + * @class Rectangle + * @constructor + * @param x {Float} The X coord of the upper-left corner of the rectangle + * @param y {Float} The Y coord of the upper-left corner of the rectangle + * @param width {Float} The overall width of this rectangle + * @param height {Float} The overall height of this rectangle + */ + constructor(x?: number, y?: number, width?: number, height?: number); + /** + * Creates a clone of this Rectangle instance + * + * @method clone + * @return {Rectangle} a copy of the rectangle + */ + clone(): PIXI.Rectangle; + /** + * Copies another Rectangle to this one. + * + * @param rectangle {Rectangle} The rectangle to copy + * @return {Rectangle} Returns itself. + */ + copy(rectangle: PIXI.Rectangle): PIXI.Rectangle; + /** + * Checks whether the x and y coordinates given are contained within the rectangle. + * + * @param x {Float} x coordinate of the point to test. + * @param y {Float} y coordinate of the point to test. + * @return {Bool} whether the x and y coordinates are within this Rectangle. + */ + contains(x: number, y: number): boolean; + /** + * Pads this rectangle, making it grow in all directions. + * + * @param padX {Float} The horizontal padding amount. + * @param padY {Float} The vertical padding amount. + */ + pad(padX: number, padY: number): void; + /** + * Fits this rectangle around the passed one. + * + * @param rectangle {Rectangle} The rectangle to fit. + */ + fit(rectangle: PIXI.Rectangle): void; + /** + * Enlarges this rectangle to fit around the passed one. + * + * @param rectangle {Rectangle} The rectangle to include. + */ + enlarge(rectangle: PIXI.Rectangle): void; + /** + * @property x + * @type Float + * @default 0 + */ + x: number; + /** + * @property y + * @type Float + * @default 0 + */ + y: number; + /** + * @property width + * @type Float + * @default 0 + */ + width: number; + /** + * @property height + * @type Float + * @default 0 + */ + height: number; + /** + * @property left + * @type Float + * @default 0 + */ + left: number; + /** + * @property right + * @type Float + * @default 0 + */ + right: number; + /** + * @property top + * @type Float + * @default 0 + */ + top: number; + /** + * @property bottom + * @type Float + * @default 0 + */ + bottom: number; + } +} + +declare class Rectangle extends PIXI.Rectangle { + /** + * The rectangle class. + * + * @class Rectangle + * @constructor + * @param {Number} x The x coordinate for the upper-left corner + * @param {Number} y The y coordinate for the upper-left corner + * @param {Number} width The width of the rectangle + * @param {Number} height The height of the rectangle + */ + constructor(x?: number, y?: number, width?: number, height?: number); + /** + * @static + * @property emptyRectangle + * @type Rectangle + */ + static emptyRectangle: Rectangle; +} + +declare namespace PIXI.utils { + declare class EventEmitter { + /** + * Minimal EventEmitter interface that is molded against the Node.js + * EventEmitter interface. + * + * @constructor + */ + constructor(); + /** + * Return a list of assigned event listeners. + * + * @param {String} eventName + * @return {Array} + */ + listeners(event: string): any[]; + /** + * Emit an event to all registered event listeners. + * + * @alias dispatchEvent + * @param eventName {String} The name of the event. + * @return {Bool} Indication if we've emitted an event. + */ + emit(event: string, a1?: any, a2?: any, a3?: any, a4?: any, a5?: any): boolean; + /** + * Register a new EventListener for the given event. + * + * @param {String} event Name of the event. + * @param {function} fn Callback function. + * @param {Mixed} context The context of the function. + */ + on(event: string, fn: (arg0: PIXI.interaction.InteractionEvent) => void, context?: any): void; + /** + * Add an EventListener that's only called once. + * + * @param {String} event Name of the event. + * @param {function} fn Callback function. + * @param {Mixed} context The context of the function. + */ + once(event: string, fn: (arg0: PIXI.interaction.InteractionEvent) => void, context?: any): void; + /** + * Register a new EventListener for the given event. + * + * @param {String} event Name of the event. + * @param {function} fn Callback function. + * @param {Mixed} context The context of the function. + */ + addListener(event: string, fn: (arg0: PIXI.interaction.InteractionEvent) => void, context?: any): void; + /** + * Remove event listeners. + * + * @param {String} event The event we want to remove. + * @param {function} fn The listener that we need to find. + * @param {Bool} once Only remove once listeners. + */ + off(event: string, fn: (arg0: PIXI.interaction.InteractionEvent) => void, once?: boolean): void; + /** + * Remove event listeners. + * + * @param {String} event The event we want to remove. + * @param {function} fn The listener that we need to find. + * @param {Bool} once Only remove once listeners. + */ + removeListener(event: string, fn: (arg0: PIXI.interaction.InteractionEvent) => void, once?: boolean): void; + /** + * Remove all listeners or only the listeners for the specified event. + * + * @param {String} event The event want to remove all listeners for. + */ + removeAllListeners(event?: string): void; + } +} + +declare namespace PIXI.interaction { + declare class interactiveTarget extends PIXI.utils.EventEmitter { + protected constructor(); + /** + * Fired when a pointer device button (usually a mouse button) is pressed on the display + * object. + * + * @event mousedown + * @memberof InteractiveTarget# + */ + mousedown(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * on the display object. + * + * @event rightdown + * @memberof InteractiveTarget# + */ + rightdown(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button (usually a mouse button) is released over the display + * object. + * + * @event mouseup + * @memberof InteractiveTarget# + */ + mouseup(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * over the display object. + * + * @event rightup + * @memberof InteractiveTarget# + */ + rightup(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button (usually a mouse button) is pressed and released on + * the display object. + * + * @event click + * @memberof InteractiveTarget# + */ + click(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is pressed + * and released on the display object. + * + * @event rightclick + * @memberof InteractiveTarget# + */ + rightclick(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button (usually a mouse button) is released outside the + * display object that initially registered a + * [mousedown]{@link PIXI.interaction.InteractionManager#event:mousedown}. + * + * @event mouseupoutside + * @memberof InteractiveTarget# + */ + mouseupoutside(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device secondary button (usually a mouse right-button) is released + * outside the display object that initially registered a + * [rightdown]{@link PIXI.interaction.InteractionManager#event:rightdown}. + * + * @event rightupoutside + * @memberof InteractiveTarget# + */ + rightupoutside(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device (usually a mouse) is moved while over the display object + * + * @event mousemove + * @memberof InteractiveTarget# + */ + mousemove(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device (usually a mouse) is moved onto the display object + * + * @event mouseover + * @memberof InteractiveTarget# + */ + mouseover(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device (usually a mouse) is moved off the display object + * + * @event mouseout + * @memberof InteractiveTarget# + */ + mouseout(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button is pressed on the display object. + * + * @event pointerdown + * @memberof InteractiveTarget# + */ + pointerdown(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button is released over the display object. + * + * @event pointerup + * @memberof InteractiveTarget# + */ + pointerup(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button is pressed and released on the display object. + * + * @event pointertap + * @memberof InteractiveTarget# + */ + pointertap(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device button is released outside the display object that initially + * registered a [pointerdown]{@link PIXI.interaction.InteractionManager#event:pointerdown}. + * + * @event pointerupoutside + * @memberof InteractiveTarget# + */ + pointerupoutside(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device is moved while over the display object + * + * @event pointermove + * @memberof InteractiveTarget# + */ + pointermove(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device is moved onto the display object + * + * @event pointerover + * @memberof InteractiveTarget# + */ + pointerover(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a pointer device is moved off the display object + * + * @event pointerout + * @memberof InteractiveTarget# + */ + pointerout(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a touch point is placed on the display object. + * + * @event touchstart + * @memberof InteractiveTarget# + */ + touchstart(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a touch point is removed from the display object. + * + * @event touchend + * @memberof InteractiveTarget# + */ + touchend(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a touch point is placed and removed from the display object. + * + * @event tap + * @memberof InteractiveTarget# + */ + tap(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a touch point is removed outside of the display object that initially + * registered a [touchstart]{@link PIXI.interaction.InteractionManager#event:touchstart}. + * + * @event touchendoutside + * @memberof InteractiveTarget# + */ + touchendoutside(event: PIXI.interaction.InteractionEvent): void; + /** + * Fired when a touch point is moved along the display object. + * + * @event touchmove + * @memberof InteractiveTarget# + */ + touchmove(event: PIXI.interaction.InteractionEvent): void; + /** + * Indicates if the displayObject is interactive or not. + * + * @member {Bool} + * @default false + * @memberof InteractiveTarget# + */ + interactive: boolean; + /** + * Indicates if the children of displayObject are interactive or not. + * + * @member {Bool} + * @default true + * @memberof InteractiveTarget# + */ + interactiveChildren: boolean; + /** + * Interaction shape. Children will be hit first, then this shape will be checked. + * + * @member {Shape} + * @memberof InteractiveTarget# + * @default null + */ + hitArea: pixi.core.math.shapes.Shape; + /** + * Indicates if the displayObject uses button mode or normal mode. + * + * @member {Bool} + * @default false + * @memberof InteractiveTarget# + */ + buttonMode: boolean; + /** + * Default cursor. + * + * @member {String} + * @default pointer + * @memberof InteractiveTarget# + */ + defaultCursor: string; + /** + * Internal check to detect if the mouse cursor is hovered over the displayObject + * + * @member {Bool} + * @private + */ + _over: boolean; + /** + * Internal check to detect if the left mouse button is pressed on the displayObject + * + * @member {Bool} + * @private + */ + _isLeftDown: boolean; + /** + * Internal check to detect if the right mouse button is pressed on the displayObject + * + * @member {Bool} + * @private + */ + _isRightDown: boolean; + /** + * Internal check to detect if the pointer cursor is hovered over the displayObject + * + * @member {Bool} + * @private + */ + _pointerOver: boolean; + /** + * Internal check to detect if the pointer is down on the displayObject + * + * @member {Bool} + * @private + */ + _pointerDown: boolean; + /** + * Internal check to detect if a user has touched the displayObject + * + * @member {Bool} + * @private + */ + _touchDown: boolean; + } +} + +declare namespace pixi.core.display { + export type DestroyOptions = { + /** + * {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + baseTexture: boolean; + /** + * {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + */ + children: boolean; + /** + * {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + */ + texture: boolean; + } +} + +declare namespace PIXI { + declare class DisplayObject extends PIXI.interaction.interactiveTarget { + /** + * The base class for all objects that are rendered on the screen. + * This is an abstract class and should not be used on its own rather it should be extended. + * + * @class + * @namespace PIXI + */ + constructor(); + /** + * Retrieves the bounds of the displayObject as a rectangle object + * + * @param skipUpdate {Matrix} setting to true will stop the transforms of the scene graph from being updated. + * This means the calculation returned MAY be out of date BUT will give you a nice performance boost + * @param rect {Rectangle} Optional rectangle to store the result of the bounds calculation + * @return {Rectangle} the rectangular bounding area + */ + getBounds(skipUpdate?: boolean, rect?: PIXI.Rectangle): PIXI.Rectangle; + /** + * Retrieves the local bounds of the displayObject as a rectangle object + * + * @param rect {Rectangle} Optional rectangle to store the result of the bounds calculation + * @return {Rectangle} the rectangular bounding area + */ + getLocalBounds(rect?: PIXI.Rectangle): PIXI.Rectangle; + /** + * Calculates the global position of the display object + * + * @param position {Point} The world origin to calculate from + * @param point {Point} A Point in which to store the value, optional (otherwise a new Point is created) + * @param skipUpdate {Bool} Should we skip the update transform + * @return {Point} A point object representing the position of this object + */ + toGlobal(position: PIXI.Point, point?: PIXI.Point, skipUpdate?: boolean): PIXI.Point; + /** + * Calculates the local position of the display object relative to another point + * + * @param position {Point} The world origin to calculate from + * @param [from] {DisplayObject} The DisplayObject to calculate the global position from + * @param [point] {Point} A Point object in which to store the value, optional (otherwise will create a new Point) + * @return {Point} A point object representing the position of this object + */ + toLocal(position: PIXI.Point, frm?: PIXI.DisplayObject, point?: PIXI.Point): PIXI.Point; + updateTransform(): void; + displayObjectUpdateTransform(): void; + /** + * Set the parent Container of this DisplayObject + * + * @param container {Container} The Container to add this DisplayObject to + * @return {Container} The Container that this DisplayObject was added to + */ + setParent(container: PIXI.Container): PIXI.Container; + /** + * Convenience function to set the postion, scale, skew and pivot at once. + * + * @param [x=0] {Float} The X position + * @param [y=0] {Float} The Y position + * @param [scaleX=1] {Float} The X scale value + * @param [scaleY=1] {Float} The Y scale value + * @param [skewX=0] {Float} The X skew value + * @param [skewY=0] {Float} The Y skew value + * @param [pivotX=0] {Float} The X pivot value + * @param [pivotY=0] {Float} The Y pivot value + * @return {DisplayObject} + */ + setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): PIXI.DisplayObject; + /** + * Base destroy method for generic display objects + * Removes all internal references and listeners as well as removes children from the display list. + * + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value + * @param {boolean} [options.children=false] - if set to true, all the children will have their destroy + * method called as well. 'options' will be passed on to those calls. + * @param {boolean} [options.texture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the texture of the child sprite + * @param {boolean} [options.baseTexture=false] - Only used for child Sprites if options.children is set to true + * Should it destroy the base texture of the child sprite + */ + destroy(options?: boolean | pixi.core.display.DestroyOptions): void; + /** + * The instance name of the object. + * + * @member {String} + */ + name: string; + /** + * Set this to true if you want this display object to be cached as a bitmap. + * This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects. + * To remove simply set this property to 'null' + * + * @member {Bool} + * @memberof DisplayObject# + */ + cacheAsBitmap: boolean; + /** + * The opacity of the object. + * + * @member {Float} + */ + alpha: number; + /** + * World transform and local transform of this object. This will become read-only later, + * please do not assign anything there unless you know what are you doing. + * + * @member {Transform} + */ + transform: PIXI.Transform; + /** + * The visibility of the object. If false the object will not be drawn, and + * the updateTransform function will not be called. + * + * @member {Bool} + */ + visible: boolean; + /** + * Can this object be rendered, if false the object will not be drawn but the updateTransform + * methods will still be called. + * + * @member {Bool} + */ + renderable: boolean; + /** + * The display object container that contains this display object. + * + * @member {Container} + * @readOnly + */ + parent: PIXI.Container; + /** + * The multiplied alpha of the displayObject + * + * @member {Float} + * @readOnly + */ + worldAlpha: number; + /** + * The area the filter is applied to. This is used as more of an optimisation + * rather than figuring out the dimensions of the displayObject each frame you can set this rectangle + * + * Also works as an interaction mask + * + * @member {Rectangle} + */ + filterArea: PIXI.Rectangle; + /** + * The position of the displayObject on the x axis relative to the local coordinates of the parent. + * + * @member {Float} + * @memberof DisplayObject# + */ + x: number; + /** + * The position of the displayObject on the y axis relative to the local coordinates of the parent. + * + * @member {Float} + * @memberof DisplayObject# + */ + y: number; + /** + * Current transform of the object based on world (parent) factors + * + * @member {Matrix} + * @readOnly + */ + worldTransform: PIXI.Matrix; + /** + * Current transform of the object based on local factors: position, scale, other stuff + * + * @member {PIXI.Matrix} + * @readOnly + */ + localTransform: PIXI.Matrix; + /** + * The coordinate of the object relative to the local coordinates of the parent. + * + * @member {Point} + */ + position: PIXI.Point; + /** + * The scale factor of the object. + * + * @member {Point} + */ + scale: PIXI.Point; + /** + * The pivot point of the displayObject that it rotates around + * + * @member {Point} + */ + pivot: PIXI.Point; + /** + * The skew factor for the object in radians. + * + * @member {Point} + */ + skew: PIXI.Point; + /** + * The rotation of the object in radians. + * + * @member {Float} + */ + rotation: number; + /** + * Indicates if the displayObject is globally visible. + * + * @member {Bool} + * @memberof DisplayObject# + * @readonly + */ + worldVisible: boolean; + /** + * Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. + * In PIXI a regular mask must be a PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it utilises shape clipping. + * To remove a mask, set this property to null. + * + * For the moment, PIXI.CanvasRenderer doesn't support PIXI.Sprite as mask. + * + * @member {Graphics|Sprite} + * @memberof DisplayObject# + */ + mask: PIXI.Sprite | PIXI.Graphics; + /** + * Sets the filters for the displayObject. + * * IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. + * To remove filters simply set this property to 'null' + * + * @member {Array} + * @memberof DisplayObject# + */ + filters: PIXI.Filter[]; + /** + * Flag for if the object is accessible. If true AccessibilityManager will overlay a + * shadow div with attributes set + * + * @member {Bool} + */ + accessible: boolean; + /** + * Sets the title attribute of the shadow div + * If accessibleTitle AND accessibleHint has not been this will default to 'displayObject [tabIndex]' + * + * @member {String} + */ + accessibleTitle: string; + /** + * Sets the aria-label attribute of the shadow div + * + * @member {String} + */ + accessibleHint: string; + tabIndex: number; + } +} + +declare namespace PIXI { + declare class Container extends PIXI.DisplayObject { + /** + * A Container represents a collection of display objects. + * It is the base class of all display objects that act as a container for other objects. + * + * @class + * @extends DisplayObject + * @namespace PIXI + */ + constructor(); + /** + * The array of children of this container. + * + * @member {DisplayObject[]} + * @readonly + */ + children: PIXI.DisplayObject[]; + /** + * The width of the Container, setting this will actually modify the scale to achieve the value set + * + * @member {Float} + * @memberof Container# + */ + width: number; + /** + * The height of the Container, setting this will actually modify the scale to achieve the value set + * + * @member {Float} + * @memberof Container# + */ + height: number; + /** + * Adds a child to the container. + * + * You can also add multple items like so: myContainer.addChild(thinkOne, thingTwo, thingThree) + * + * @param child {DisplayObject} The DisplayObject to add to the container + * @return {DisplayObject} The child that was added. + */ + addChild(child: T): T; + /** + * Adds a child to the container at a specified index. + * If the index is out of bounds an error will be thrown. + * + * @param child {DisplayObject} The child to add + * @param index {Int} The index to place the child in + * @return {DisplayObject} The child that was added. + */ + addChildAt(child: T, index: number): T; + /** + * Swaps the position of 2 Display Objects within this container. + * + * @param child1 {DisplayObject} + * @param child2 {DisplayObject} + */ + swapChildren(child1: PIXI.DisplayObject, child2: PIXI.DisplayObject): void; + /** + * Returns the index position of a child DisplayObject instance + * + * @param child {DisplayObject} The DisplayObject instance to identify + * @return {Int} The index position of the child display object to identify + */ + getChildIndex(child: PIXI.DisplayObject): number; + /** + * Changes the position of an existing child in the display object container + * + * @param child {DisplayObject} The child DisplayObject instance for which you want to change the index number + * @param index {Int} The resulting index number for the child display object + */ + setChildIndex(child: PIXI.DisplayObject, index: number): void; + /** + * Returns the child at the specified index + * + * @param index {Int} The index to get the child from + * @return {DisplayObject} The child at the given index, if any. + */ + getChildAt(index: number): PIXI.DisplayObject; + /** + * Removes a child from the container. + * + * @param child {DisplayObject} The DisplayObject to remove + * @return {DisplayObject} The child that was removed. + */ + removeChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Removes a child from the specified index position. + * + * @param index {Int} The index to get the child from + * @return {DisplayObject} The child that was removed. + */ + removeChildAt(index: number): PIXI.DisplayObject; + /** + * Removes all children from this container that are within the begin and end indexes. + * + * @param beginIndex {Int} The beginning position. Default value is 0. + * @param endIndex {Int} The ending position. Default value is size of the container. + * @return {Array} The children that are removed. + */ + removeChildren(beginIndex?: number, endIndex?: number): PIXI.DisplayObject[]; + /** + * Returns the display object in the container + * + * @param name {string} instance name + * @return {DisplayObject} + */ + getChildByName(name: string): PIXI.DisplayObject; + } +} + +declare namespace PIXI { + declare class Sprite extends PIXI.Container { + /** + * The Sprite object is the base for all textured objects that are rendered to the screen + * + * A sprite can be created directly from an image like this: + * + * ```haxe + * var sprite = new Sprite.fromImage('assets/image.png'); + * ``` + * + * @class Sprite + * @extends Container + * @namespace PIXI + * @param texture {Texture} The texture for this sprite + */ + constructor(texture?: PIXI.Texture); + /** + * The anchor sets the origin point of the texture. + * The default is 0,0 this means the texture's origin is the top left + * Setting than anchor to 0.5,0.5 means the textures origin is centered + * Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner + * + * @member {ObservablePoint} + */ + anchor: PIXI.ObservablePoint; + /** + * The texture that the sprite is using + * + * @member {Texture} + */ + texture: PIXI.Texture; + /** + * The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect. + * + * @member {Int} + * @default 0xFFFFFF + */ + tint: number; + /** + * The blend mode to be applied to the sprite. Set to CONST.blendModes.NORMAL to remove any blend mode. + * + * @member {Int} + * @default CONST.blendModes.NORMAL; + */ + blendMode: any; + /** + * The shader that will be used to render the sprite. Set to null to remove a current shader. + * + * @member {Shader|Filter} + */ + shader: PIXI.Shader | PIXI.Filter; + /** + * Plugin that is responsible for rendering this element. + * Allows to customize the rendering process without overriding '_render' & '_renderCanvas' methods. + * + * @member {String} + * @default 'sprite' + */ + pluginName: string; + /** + * Tests if a point is inside this sprite + * + * @param {Point} point - the point to test + * @return {Bool} the result of the test + */ + containsPoint(point: PIXI.Point): boolean; + /** + * Helper function that creates a new sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {Int|String|BaseTexture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from + * @return {Sprite} The newly created sprite + */ + static from(source: any): PIXI.Sprite; + /** + * Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId + * The frame ids are created when a Texture packer file has been loaded + * + * @static + * @param frameId {String} The frame Id of the texture in the cache + * @return {Sprite} A new Sprite using a texture from the texture cache matching the frameId + */ + static fromFrame(frameId: string): PIXI.Sprite; + /** + * Helper function that creates a sprite that will contain a texture based on an image url + * If the image is not in the texture cache it will be loaded + * + * @static + * @param imageId {String} The image url of the texture + * @param [crossorigin=(auto)] {Bool} Should use anonymouse CORS? Defaults to true if the URL is not a data-URI. + * @param [scaleMode=scaleModes.DEFAULT] {ScaleModes} See {@link scaleModes} for possible values + * @return {Sprite} A new Sprite using a texture from the texture cache matching the image id + */ + static fromImage(imageId: string, crossorigin?: boolean, scaleMode?: any): PIXI.Sprite; + } +} + +declare class ScreenSprite extends PIXI.Sprite { + /** + * The sprite which covers the entire game screen. + * + * @class ScreenSprite + * @constructor + */ + constructor(); + /** + * The opacity of the sprite (0 to 255). + * + * @property opacity + * @type Number + */ + opacity: number; + /** + * Sets black to the color of the screen sprite. + * + * @method setBlack + */ + setBlack(): void; + /** + * Sets white to the color of the screen sprite. + * + * @method setWhite + */ + setWhite(): void; + /** + * Sets the color of the screen sprite by values. + * + * @method setColor + * @param {Number} r The red value in the range (0, 255) + * @param {Number} g The green value in the range (0, 255) + * @param {Number} b The blue value in the range (0, 255) + */ + setColor(r?: number, g?: number, b?: number): void; +} + +declare class Tilemap extends PIXI.Container { + /** + * [read-only] The array of children of the sprite. + * + * @property children + * @type Array + */ + constructor(); + /** + * The bitmaps used as a tileset. + * + * @property bitmaps + * @type Array + */ + bitmaps: Bitmap[]; + /** + * The origin point of the tilemap for scrolling. + * + * @property origin + * @type Point + */ + origin: Point; + /** + * The tileset flags. + * + * @property flags + * @type Array + */ + flags: number[]; + /** + * The animation count for autotiles. + * + * @property animationCount + * @type Number + */ + animationCount: number; + /** + * Whether the tilemap loops horizontal. + * + * @property horizontalWrap + * @type Boolean + */ + horizontalWrap: boolean; + /** + * Whether the tilemap loops vertical. + * + * @property verticalWrap + * @type Boolean + */ + verticalWrap: boolean; + /** + * The width of the screen in pixels. + * + * @property width + * @type Number + */ + tileWidth: number; + /** + * The height of a tile in pixels. + * + * @property tileHeight + * @type Number + */ + tileHeight: number; + /** + * Sets the tilemap data. + * + * @method setData + * @param {Number} width The width of the map in number of tiles + * @param {Number} height The height of the map in number of tiles + * @param {Array} data The one dimensional array for the map data + */ + setData(width: number, height: number, data: number[]): void; + /** + * Checks whether the tileset is ready to render. + * + * @method isReady + * @type Boolean + * @return {Boolean} True if the tilemap is ready + */ + isReady(): boolean; + /** + * Updates the tilemap for each frame. + * + * @method update + */ + update(): void; + /** + * @method updateTransform + * @private + */ + updateTransform(): void; + /** + * Forces to repaint the entire static + * + * @method refresh + */ + refresh(): void; + /** + * Adds a child to the container. + * + * @method addChild + * @param {PIXI.DisplayObject} child The child to add + * @return {PIXI.DisplayObject} The child that was added + */ + addChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Adds a child to the container at a specified index. + * + * @method addChildAt + * @param {PIXI.DisplayObject} child The child to add + * @param {Number} index The index to place the child in + * @return {PIXI.DisplayObject} The child that was added + */ + addChildAt(child: PIXI.DisplayObject, index: number): PIXI.DisplayObject; + /** + * Removes a child from the container. + * + * @method removeChild + * @param {PIXI.DisplayObject} child The child to remove + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Removes a child from the specified index position. + * + * @method removeChildAt + * @param {Number} index The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChildAt(index: number): PIXI.DisplayObject; + /** + * Forces to refresh the tileset + * + * @method refresh + */ + refreshTileset(): void; + static TILE_ID_A1: number; + static TILE_ID_A2: number; + static TILE_ID_A3: number; + static TILE_ID_A4: number; + static TILE_ID_A5: number; + static TILE_ID_B: number; + static TILE_ID_C: number; + static TILE_ID_D: number; + static TILE_ID_E: number; + static TILE_ID_MAX: number; + static FLOOR_AUTOTILE_TABLE: number[][][]; + static WALL_AUTOTILE_TABLE: number[][][]; + static WATERFALL_AUTOTILE_TABLE: number[][][]; + static isVisibleTile(tileId: number): boolean; + static isAutotile(tileId: number): boolean; + static getAutotileKind(tileId: number): number; + static getAutotileShape(tileId: number): number; + static makeAutotileId(kind: number, shape: number): number; + static isSameKindTile(tileID1: number, tileID2: number): boolean; + static isTileA1(tileId: number): boolean; + static isTileA2(tileId: number): boolean; + static isTileA3(tileId: number): boolean; + static isTileA4(tileId: number): boolean; + static isTileA5(tileId: number): boolean; + static isWaterTile(tileId: number): boolean; + static isWaterfallTile(tileId: number): boolean; + static isGroundTile(tileId: number): boolean; + static isShadowingTile(tileId: number): boolean; + static isRoofTile(tileId: number): boolean; + static isWallTopTile(tileId: number): boolean; + static isWallSideTile(tileId: number): boolean; + static isWallTile(tileId: number): boolean; + static isFloorTypeAutotile(tileId: number): boolean; + static isWallTypeAutotile(tileId: number): boolean; + static isWaterfallTypeAutotile(tileId: number): boolean; +} + +declare class ShaderTilemap extends Tilemap { + protected constructor(); + /** + * PIXI render method + * + * @method renderWebGL + * @param {PIXI.WebGLRenderer} pixi renderer + */ + renderWebGL(renderer: PIXI.Renderer): void; + /** + * PIXI render method + * + * @method renderCanvas + * @param {PIXI.CanvasRenderer} pixi renderer + */ + renderCanvas(renderer: PIXI.CanvasRenderer): void; + /** + * Forces to repaint the entire tilemap AND update bitmaps list if needed + * + * @method refresh + */ + refresh(): void; + /** + * Call after you update tileset + * + * @method refreshTileset + */ + refreshTileset(): void; +} + +declare class Sprite extends PIXI.Sprite { + /** + * The basic object that is rendered to the game screen. + * + * @class Sprite + * @constructor + * @param {Bitmap} bitmap The image for the sprite + */ + constructor(bitmap?: Bitmap); + /** + * The image for the sprite. + * + * @property bitmap + * @type Bitmap + */ + bitmap: Bitmap; + /** + * The width of the sprite without the scale. + * + * @property width + * @type Number + */ + opacity: number; + /** + * The visibility of the sprite. + * + * @property visible + * @type Boolean + */ + visible: boolean; + /** + * The x coordinate of the sprite. + * + * @property x + * @type Number + */ + x: number; + /** + * The y coordinate of the sprite. + * + * @property y + * @type Number + */ + y: number; + /** + * The origin point of the sprite. (0,0) to (1,1). + * + * @property anchor + * @type Point + */ + point: PIXI.Point; + /** + * The scale factor of the sprite. + * + * @property scale + * @type Point + */ + scale: PIXI.Point; + /** + * The rotation of the sprite in radians. + * + * @property rotation + * @type Number + */ + rotation: number; + /** + * The blend mode to be applied to the sprite. + * + * @property blendMode + * @type Number + */ + blendMode: number; + /** + * Sets the filters for the sprite. + * + * @property filters + * @type Array + */ + filters: PIXI.Filter[]; + /** + * [read-only] The array of children of the sprite. + * + * @property children + * @type Array + */ + spriteId: number; + opaque: boolean; + voidFilter: PIXI.Filter; + initialize(bitmap?: Bitmap): void; + /** + * Updates the sprite for each frame. + * + * @method update + */ + update(): void; + /** + * @method updateTransform + * @private + */ + updateTransform(): void; + /** + * Sets the x and y at once. + * + * @method move + * @param {Number} x The x coordinate of the sprite + * @param {Number} y The y coordinate of the sprite + */ + move(x: number, y: number): void; + /** + * Sets the rectagle of the bitmap that the sprite displays. + * + * @method setFrame + * @param {Number} x The x coordinate of the frame + * @param {Number} y The y coordinate of the frame + * @param {Number} width The width of the frame + * @param {Number} height The height of the frame + */ + setFrame(x: number, y: number, width: number, height: number): void; + /** + * Gets the blend color for the sprite. + * + * @method getBlendColor + * @return {Array} The blend color [r, g, b, a] + */ + getBlendColor(): number[]; + /** + * Sets the blend color for the sprite. + * + * @method setBlendColor + * @param {Array} color The blend color [r, g, b, a] + */ + setBlendColor(color: number[]): void; + /** + * Gets the color tone for the sprite. + * + * @method getColorTone + * @return {Array} The color tone [r, g, b, gray] + */ + getColorTone(): number[]; + /** + * Sets the color tone for the sprite. + * + * @method setColorTone + * @param {Array} tone The color tone [r, g, b, gray] + */ + setColorTone(tone: number[]): void; + /** + * Adds a child to the container. + * + * @method addChild + * @param {PIXI.DisplayObject} child The child to add + * @return {PIXI.DisplayObject} The child that was added + */ + addChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Adds a child to the container at a specified index. + * + * @method addChildAt + * @param {PIXI.DisplayObject} child The child to add + * @param {Number} index The index to place the child in + * @return {PIXI.DisplayObject} The child that was added + */ + addChildAt(child: PIXI.DisplayObject, index: number): PIXI.DisplayObject; + /** + * Removes a child from the container. + * + * @method removeChild + * @param {PIXI.DisplayObject} child The child to remove + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Removes a child from the specified index position. + * + * @method removeChildAt + * @param {Number} index The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChildAt(index: number): PIXI.DisplayObject; + /** + * Number of the created objects. + * + * @static + * @property _counter + * @type Number + */ + static _counter: number; +} + +declare class Stage extends PIXI.Container { + /** + * The root object of the display tree. + * + * @class Stage + * @constructor + */ + constructor(); + /** + * Adds a child to the container. + * + * @method addChild + * @param {PIXI.DisplayObject} child The child to add + * @return {PIXI.DisplayObject} The child that was added + */ + addChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Adds a child to the container at a specified index. + * + * @method addChildAt + * @param {PIXI.DisplayObject} child The child to add + * @param {Number} index The index to place the child in + * @return {PIXI.DisplayObject} The child that was added + */ + addChildAt(child: PIXI.DisplayObject, index: number): PIXI.DisplayObject; + /** + * Removes a child from the container. + * + * @method removeChild + * @param {PIXI.DisplayObject} child The child to remove + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Removes a child from the specified index position. + * + * @method removeChildAt + * @param {Number} index The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChildAt(index: number): PIXI.DisplayObject; +} + +declare namespace PIXI { + declare class TilingSprite extends PIXI.Sprite { + /** + * A tiling sprite is a fast way of rendering a tiling image + * + * @class + * @extends Sprite + * @memberof PIXI.extras + * @param texture {Texture} the texture of the tiling sprite + * @param width {Float} [width=100] the width of the tiling sprite + * @param height {Float} [height=100] the height of the tiling sprite + */ + constructor(texture: PIXI.Texture, width?: number, height?: number); + /** + * Tile transform + * + * @member {Transform} + */ + tileTransform: PIXI.Transform; + /** + * Whether or not anchor affects uvs + * + * @member {Bool} + * @default false + */ + uvRespectAnchor: boolean; + /** + * The scaling of the image that is being tiled + * + * @member {ObservablePoint} + */ + tileScale: PIXI.ObservablePoint; + /** + * The offset position of the image that is being tiled + * + * @member {ObservablePoint} + */ + tilePosition: PIXI.ObservablePoint; + /** + * Changes frame clamping in corresponding textureTransform, shortcut + * Change to -0.5 to add a pixel to the edge, recommended for transparent trimmed textures in atlas + * @default 0.5 + */ + clampMargin: number; + /** + * Helper function that creates a new sprite based on the source you provide. + * The source can be - frame id, image url, video url, canvas element, video element, base texture + * + * @static + * @param {Int|String|BaseTexture|HTMLCanvasElement|HTMLVideoElement} source Source to create texture from + * @param {Float} width - the width of the tiling sprite + * @param {Float} height - the height of the tiling sprite + * @return {TilingSprite} The newly created sprite + */ + static from(source: any, width: number, height: number): PIXI.TilingSprite; + /** + * Helper function that creates a tiling sprite that will use a texture from the TextureCache based on the frameId + * The frame ids are created when a Texture packer file has been loaded + * + * @static + * @param {String} frameId - The frame Id of the texture in the cache + * @param {Float} width - the width of the tiling sprite + * @param {Float} height - the height of the tiling sprite + * @return {TilingSprite} A new TilingSprite using a texture from the texture cache matching the frameId + */ + static fromFrame(frameId: string, width: number, height: number): PIXI.TilingSprite; + /** + * Helper function that creates a sprite that will contain a texture based on an image url + * If the image is not in the texture cache it will be loaded + * + * @static + * @param {String} imageId - The image url of the texture + * @param {Float} width - the width of the tiling sprite + * @param {Float} height - the height of the tiling sprite + * @param {Bool} [crossorigin] - if you want to specify the cross-origin parameter + * @param {ScaleModes} [scaleMode=PIXI.settings.SCALE_MODE] - if you want to specify the scale mode, + * see {@link PIXI.SCALE_MODES} for possible values + * @return {TilingSprite} A new TilingSprite using a texture from the texture cache matching the image id + */ + static fromImage(imageId: string, width: number, height: number, crossorigin?: boolean, scaleMode?: any): PIXI.TilingSprite; + } +} + +declare class TilingSprite extends PIXI.TilingSprite { + /** + * The sprite object for a tiling image. + * + * @class TilingSprite + * @constructor + * @param {Bitmap} bitmap The image for the tiling sprite + */ + constructor(bitmap: Bitmap); + /** + * The origin point of the tiling sprite for scrolling. + * + * @property origin + * @type Point + */ + origin: Point; + /** + * The image for the tiling sprite. + * + * @property bitmap + * @type Bitmap + */ + bitmap: Bitmap; + /** + * The opacity of the tiling sprite (0 to 255). + * + * @property opacity + * @type Number + */ + opacity: number; + /** + * The visibility of the tiling sprite. + * + * @property visible + * @type Boolean + */ + visibility: boolean; + /** + * The x coordinate of the tiling sprite. + * + * @property x + * @type Number + */ + x: number; + /** + * The y coordinate of the tiling sprite. + * + * @property y + * @type Number + */ + y: number; + spriteId: number; + /** + * Updates the tiling sprite for each frame. + * + * @method update + */ + update(): void; + /** + * @method updateTransform + * @private + */ + updateTransform(): void; + /** + * Sets the x, y, width, and height all at once. + * + * @method move + * @param {Number} x The x coordinate of the tiling sprite + * @param {Number} y The y coordinate of the tiling sprite + * @param {Number} width The width of the tiling sprite + * @param {Number} height The height of the tiling sprite + */ + move(x?: number, y?: number, width?: number, height?: number): void; + /** + * Specifies the region of the image that the tiling sprite will use. + * + * @method setFrame + * @param {Number} x The x coordinate of the frame + * @param {Number} y The y coordinate of the frame + * @param {Number} width The width of the frame + * @param {Number} height The height of the frame + */ + setFrame(x: number, y: number, width: number, height: number): void; + updateTransformTS(): void; + /** + * @method generateTilingTexture + * @param {Boolean} arg + */ + generateTilingTexture(arg: boolean): void; +} + +declare namespace PIXI { + declare class Filter { + /** + * @class + * @memberof PIXI + * @param [vertexSrc] {String} The source of the vertex shader. + * @param [fragmentSrc] {String} The source of the fragment shader. + * @param [uniforms] {Dynamic} Custom uniforms to use to augment the built-in ones. + */ + constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: any); + /** + * Legacy filters use position and uvs from attributes + */ + readonly legacy: boolean; + /** + * Sets the blendmode of the filter. Default: PIXI.BLEND_MODES.NORMAL + */ + blendMode: any; + /** + * Program that the shader uses + */ + program: PIXI.Program; + /** + * The WebGL state the filter requires to render + */ + state: PIXI.State; + /** + * The vertex shader. + * + * @member {String} + */ + vertexSrc: string; + /** + * The fragment shader. + * + * @member {String} + */ + fragmentSrc: string; + /** + * An object containing the current values of custom uniforms. + * @example Updating the value of a custom uniform + * filter.uniforms.time = performance.now(); + * + * @member {Dynamic} + */ + uniforms: any; + /** + * The padding of the filter. Some filters require extra space to breath such as a blur. + * Increasing this will add extra width and height to the bounds of the object that the + * filter is applied to. + * + * @member {Float} + */ + padding: number; + /** + * The resolution of the filter. Setting this to be lower will lower the quality but + * increase the performance of the filter. + * + * @member {Float} + */ + resolution: number; + /** + * If enabled is true the filter is applied, if false it will not. + * + * @member {Bool} + */ + enabled: boolean; + /** + * If enabled, PixiJS will fit the filter area into boundaries for better performance. Switch it off if it does not work for specific shader. + * Workaround for http://jsfiddle.net/xbmhh207/1/ + * @default true + * @member {Bool} + */ + autoFit: boolean; + apply(filterManager: PIXI.systems.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clear?: boolean, currentState?: pixi.core.renderers.webgl.filters.CurrentState): void; + /** + * The default vertex shader source + * + * @static + * @constant + */ + static defaultVertexSrc: any; + /** + * The default fragment shader source + * + * @static + * @constant + */ + static defaultFragmentSrc: any; + } +} + +declare namespace PIXI.filters { + declare class ColorMatrixFilter extends PIXI.Filter { + /** + * The ColorMatrixFilter class lets you apply a 5x5 matrix transformation on the RGBA + * color and alpha values of every pixel on your displayObject to produce a result + * with a new set of RGBA color and alpha values. It's pretty powerful! + * + * ```js + * var colorMatrix = new ColorMatrixFilter(); + * container.filters = [colorMatrix]; + * colorMatrix.contrast(2); + * ``` + * @author Clément Chenebault + * @class + * @extends AbstractFilter + * @memberof PIXI.filters + */ + constructor(); + /** + * Sets the matrix of the color matrix filter + * + * @member {number[]} + * @memberof ColorMatrixFilter# + * @default [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] + */ + matrix: number[]; + /** + * Adjusts brightness + * + * Multiply the current matrix + * @param b {Float} value of the brigthness (0 is black) + * @param multiply {Bool} refer to ._loadMatrix() method + */ + brightness(b: number, multiply: boolean): void; + /** + * Set the matrices in grey scales + * + * Multiply the current matrix + * @param scale {Float} value of the grey (0 is black) + * @param multiply {Bool} refer to ._loadMatrix() method + */ + greyscale(scale: number, multiply: boolean): void; + /** + * Set the black and white matrice + * Multiply the current matrix + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + blackAndWhite(multiply: boolean): void; + /** + * Set the hue propertie of the color + * + * Multiply the current matrix + * @param rotation {Float} in degrees + * @param multiply {Bool} refer to ._loadMatrix() method + */ + hue(rotation: number, multiply: boolean): void; + /** + * Set the contrast matrix, increase the separation between dark and bright + * Increase contrast : shadows darker and highlights brighter + * Decrease contrast : bring the shadows up and the highlights down + * + * @param amount {Float} value of the contrast + * @param multiply {Bool} refer to ._loadMatrix() method + */ + contrast(amount: number, multiply: boolean): void; + /** + * Set the saturation matrix, increase the separation between colors + * Increase saturation : increase contrast, brightness, and sharpness + * @param amount {Float} + * @param multiply {Bool} refer to ._loadMatrix() method + */ + saturation(amount: number, multiply: boolean): void; + /** + * Desaturate image (remove color) + * + * Call the saturate function + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + desaturate(multiply: boolean): void; + /** + * Negative image (inverse of classic rgb matrix) + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + negative(multiply: boolean): void; + /** + * Sepia image + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + sepia(multiply: boolean): void; + /** + * Color motion picture process invented in 1916 (thanks Dominic Szablewski) + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + technicolor(multiply: boolean): void; + /** + * Polaroid filter + * + * @param multiply {boolean} refer to ._loadMatrix() method + */ + polaroid(multiply: boolean): void; + /** + * Filter who transforms : Red -> Blue and Blue -> Red + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + toBGR(multiply: boolean): void; + /** + * Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski) + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + kodachrome(multiply: boolean): void; + /** + * Brown delicious browni filter (thanks Dominic Szablewski) + * + * @param multiply {Bool} refer to ._loadMatrix() method + */ + browni(multiply: boolean): void; + vintage(multiply: boolean): void; + colorTone(desaturation: number, toned: number, lightColor: number, darkColor: number, multiply: boolean): void; + night(intensity: number, multiply: boolean): void; + predator(amount: number, multiply: boolean): void; + lsd(multiply: boolean): void; + reset(): void; + } +} + +declare class ToneFilter extends PIXI.filters.ColorMatrixFilter { + /** + * The color matrix filter for WebGL. + * + * @class ToneFilter + * @extends PIXI.Filter + * @constructor + */ + constructor(); + /** + * Changes the hue. + * + * @method adjustHue + * @param {Number} value The hue value in the range (-360, 360) + */ + adjustHue(value?: number): void; + /** + * Changes the saturation. + * + * @method adjustSaturation + * @param {Number} value The saturation value in the range (-255, 255) + */ + adjustSaturation(value?: number): void; + /** + * Changes the tone. + * + * @method adjustTone + * @param {Number} r The red strength in the range (-255, 255) + * @param {Number} g The green strength in the range (-255, 255) + * @param {Number} b The blue strength in the range (-255, 255) + */ + adjustTone(r?: number, g?: number, b?: number): void; +} + +declare class ToneSprite extends PIXI.Container { + /** + * The sprite which changes the screen color in 2D canvas mode. + * + * @class ToneSprite + * @constructor + */ + constructor(); + /** + * Clears the tone. + * + * @method reset + */ + clear(): void; + /** + * Sets the tone. + * + * @method setTone + * @param {Number} r The red strength in the range (-255, 255) + * @param {Number} g The green strength in the range (-255, 255) + * @param {Number} b The blue strength in the range (-255, 255) + * @param {Number} gray The grayscale level in the range (0, 255) + */ + setTone(r: number, g: number, b: number, gray: number): void; +} + +declare namespace rm.types { + export const enum Frames { + base = -1, + } +} + +declare class TouchInput { + protected constructor(); + static _mousePressed: boolean; + static _screenPressed: boolean; + static _pressedTime: number; + static _date: number; + static _x: number; + static _y: number; + /** + * The wait time of the pseudo key repeat in frames. + * + * @static + * @property keyRepeatWait + * @type Number + */ + static keyRepeatWait: rm.types.Frames; + /** + * The interval of the pseudo key repeat in frames. + * + * @static + * @property keyRepeatInterval + * @type Number + */ + static keyRepeatInterval: rm.types.Frames; + /** + * [read-only] The horizontal scroll amount. + * + * @static + * @property wheelX + * @type Number + */ + static wheelX: number; + /** + * [read-only] The vertical scroll amount. + * + * @static + * @property wheelY + * @type Number + */ + static wheelY: number; + /** + * [read-only] The x coordinate on the canvas area of the latest touch event. + * + * @static + * @property x + * @type Number + */ + static x: number; + /** + * [read-only] The y coordinate on the canvas area of the latest touch event. + * + * @static + * @property y + * @type Number + */ + static y: number; + /** + * [read-only] The time of the last input in milliseconds. + * + * @static + * @property date + * @type Number + */ + static date: number; + /** + * Initializes the touch system. + * + * @static + * @method initialize + */ + static initialize(): void; + /** + * Clears all the touch data. + * + * @static + * @method clear + */ + static clear(): void; + /** + * Updates the touch data. + * + * @static + * @method update + */ + static update(): void; + /** + * Checks whether the mouse button or touchscreen is currently pressed down. + * + * @static + * @method isPressed + * @return {Boolean} True if the mouse button or touchscreen is pressed + */ + static isPressed(): boolean; + /** + * Checks whether the left mouse button or touchscreen is just pressed. + * + * @static + * @method isTriggered + * @return {Boolean} True if the mouse button or touchscreen is triggered + */ + static isTriggered(): boolean; + /** + * Checks whether the left mouse button or touchscreen is just pressed + * or a pseudo key repeat occurred. + * + * @static + * @method isRepeated + * @return {Boolean} True if the mouse button or touchscreen is repeated + */ + static isRepeated(): boolean; + /** + * Checks whether the left mouse button or touchscreen is kept depressed. + * + * @static + * @method isLongPressed + * @return {Boolean} True if the left mouse button or touchscreen is long-pressed + */ + static isLongPressed(): boolean; + /** + * Checks whether the right mouse button is just pressed. + * + * @static + * @method isCancelled + * @return {Boolean} True if the right mouse button is just pressed + */ + static isCancelled(): boolean; + /** + * Checks whether the mouse or a finger on the touchscreen is moved. + * + * @static + * @method isMoved + * @return {Boolean} True if the mouse or a finger on the touchscreen is moved + */ + static isMoved(): boolean; + /** + * Checks whether the left mouse button or touchscreen is released. + * + * @static + * @method isReleased + * @return {Boolean} True if the mouse button or touchscreen is released + */ + static isReleased(): boolean; +} + +declare class Utils { + protected constructor(); + /** + * The name of the RPG Maker. 'MV' in the current version. + */ + static RPGMAKER_NAME: string; + /** + * The version of the RPG Maker. + * + * @static + * @property RPGMAKER_VERSION + * @type String + * @final + */ + static RPGMAKER_VERSION: string; + /** + * Checks whether the option is in the query string. + * + * @param {String} name The option name + * @return {Boolean} True if the option is in the query string + */ + static isOptionValid(name: string): boolean; + /** + * Checks whether the platform is NW.js. + * + * @return {Boolean} True if the platform is NW.js + */ + static isNwjs(): boolean; + /** + * Checks whether the platform is a mobile device. + * + * @static + * @method isMobileDevice + * @return {Boolean} True if the platform is a mobile device + */ + static isMobileDevice(): boolean; + /** + * Checks whether the browser is Mobile Safari. + * + * @static + * @method isMobileSafari + * @return {Boolean} True if the browser is Mobile Safari + */ + static isMobileSafari(): boolean; + /** + * Checks whether the browser is Android Chrome. + * + * @return {Boolean} True if the browser is Android Chrome + */ + static isAndroidChrome(): boolean; + /** + * Checks whether the browser can read files in the game folder. + * + * @return {Boolean} True if the browser can read files in the game folder + */ + static canReadGameFiles(): boolean; + /** + * Makes a CSS color string from RGB values. + * + * @static + * @method rgbToCssColor + * @param {Int} r The red value in the range (0, 255) + * @param {Int} g The green value in the range (0, 255) + * @param {Int} b The blue value in the range (0, 255) + * @return {String} CSS color string + */ + static rgbToCssColor(r: number, g: number, b: number): string; + static isSupportPassiveEvent(): boolean; + static generateRuntimeId(): number; +} + +declare class Weather extends PIXI.Container { + /** + * The weather effect which displays rain, storm, or snow. + * + * @class Weather + * @constructor + */ + constructor(); + /** + * The type of the weather in ['none', 'rain', 'storm', 'snow']. + * + * @property type + * @type String + */ + type: string; + /** + * The power of the weather in the range (0, 9). + * + * @property power + * @type Number + */ + power: number; + /** + * The origin point of the weather for scrolling. + * + * @property origin + * @type Point + */ + origin: Point; + /** + * Updates the weather for each frame. + * + * @method update + */ + update(): void; +} + +declare class WindowLayer extends PIXI.Container { + /** + * The layer which contains game windows. + * + * @class WindowLayer + * @constructor + */ + constructor(); + /** + * The width of the window layer in pixels. + * + * @property width + * @type Number + */ + voidFilter: PIXI.Filter; + /** + * Sets the x, y, width, and height all at once. + * + * @method move + * @param {Number} x The x coordinate of the window layer + * @param {Number} y The y coordinate of the window layer + * @param {Number} width The width of the window layer + * @param {Number} height The height of the window layer + */ + move(x: number, y: number, width: number, height: number): void; + /** + * Updates the window layer for each frame. + * + * @method update + */ + update(): void; + /** + * Adds a child to the container. + * + * @method addChild + * @param {PIXI.DisplayObject} child The child to add + * @return {PIXI.DisplayObject} The child that was added + */ + addChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Adds a child to the container at a specified index. + * + * @method addChildAt + * @param {PIXI.DisplayObject} child The child to add + * @param {Number} index The index to place the child in + * @return {PIXI.DisplayObject} The child that was added + */ + addChildAt(child: PIXI.DisplayObject, index: number): PIXI.DisplayObject; + /** + * Removes a child from the container. + * + * @method removeChild + * @param {PIXI.DisplayObject} child The child to remove + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Removes a child from the specified index position. + * + * @method removeChildAt + * @param {Number} index The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChildAt(index: number): PIXI.DisplayObject; + /** + * @method _renderCanvas + * @param {PIXI.CanvasRenderer} renderer + * @private + */ + _renderCanvas(renderer: PIXI.CanvasRenderer): void; + /** + * @method _renderWebGL + * @param {PIXI.WebGLRenderer} renderer + * @private + */ + _renderWebGL(renderer: PIXI.Renderer): void; +} + +declare class Window extends PIXI.Container { + /** + * The visibility of the sprite. + * + * @property visible + * @type Boolean + */ + constructor(); + /** + * The origin point of the window for scrolling. + * + * @property origin + * @type Point + */ + origin: PIXI.Point; + /** + * The active state for the window. + * + * @property active + * @type Boolean + */ + active: boolean; + /** + * The visibility of the down scroll arrow. + * + * @property downArrowVisible + * @type Boolean + */ + downArrowVisible: boolean; + /** + * The visibility of the up scroll arrow. + * + * @property upArrowVisible + * @type Boolean + */ + upArrowVisible: boolean; + /** + * The visibility of the pause sign. + * + * @property pause + * @type Boolean + */ + pause: boolean; + /** + * The image used as a window skin. + * + * @property windowskin + * @type Bitmap + */ + windowskin: Bitmap; + /** + * The bitmap used for the window contents. + * + * @property contents + * @type Bitmap + */ + contents: Bitmap; + /** + * The width of the window in pixels. + * + * @property width + * @type Number + */ + padding: number; + /** + * The size of the margin for the window background. + * + * @property margin + * @type Number + */ + margin: number; + /** + * The opacity of the window without contents (0 to 255). + * + * @property opacity + * @type Number + */ + opacity: number; + /** + * The opacity of the window background (0 to 255). + * + * @property backOpacity + * @type Number + */ + backOpacity: number; + /** + * The opacity of the window contents (0 to 255). + * + * @property contentsOpacity + * @type Number + */ + contentsOpacity: number; + /** + * The openness of the window (0 to 255). + * + * @property openness + * @type Number + */ + openness: number; + /** + * The width of the content area in pixels. + */ + innerWidth: number; + /** + * The height of the content area in pixels. + */ + innerHeight: number; + /** + * The rectangle of the content area + */ + innerRect: Rectangle; + /** + * Updates the window for each frame. + * + * @method update + */ + update(): void; + /** + * Sets the x, y, width, and height all at once. + * + * @method move + * @param {Number} x The x coordinate of the window + * @param {Number} y The y coordinate of the window + * @param {Number} width The width of the window + * @param {Number} height The height of the window + */ + move(x?: number, y?: number, width?: number, height?: number): void; + /** + * Returns true if the window is completely open (openness == 255). + * + * @method isOpen + * @return {Boolean} + */ + isOpen(): boolean; + /** + * Returns true if the window is completely closed (openness == 0). + * + * @method isClosed + * @return {Boolean} + */ + isClosed(): boolean; + /** + * Sets the position of the command cursor. + * + * @method setCursorRect + * @param {Number} x The x coordinate of the cursor + * @param {Number} y The y coordinate of the cursor + * @param {Number} width The width of the cursor + * @param {Number} height The height of the cursor + */ + setCursorRect(x?: number, y?: number, width?: number, height?: number): void; + /** + * Changes the color of the background. + * + * @method setTone + * @param {Number} r The red value in the range (-255, 255) + * @param {Number} g The green value in the range (-255, 255) + * @param {Number} b The blue value in the range (-255, 255) + */ + setTone(r: number, g: number, b: number): void; + /** + * Adds a child between the background and contents. + * + * @method addChildToBack + * @param {PIXI.DisplayObject} child The child to add + * @return {PIXI.DisplayObject} The child that was added + */ + addChildToBack(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Adds a child to the container. + * + * @method addChild + * @param {PIXI.DisplayObject} child The child to add + * @return {PIXI.DisplayObject} The child that was added + */ + addChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Adds a child to the container at a specified index. + * + * @method addChildAt + * @param {PIXI.DisplayObject} child The child to add + * @param {Number} index The index to place the child in + * @return {PIXI.DisplayObject} The child that was added + */ + addChildAt(child: PIXI.DisplayObject, index: number): PIXI.DisplayObject; + /** + * Removes a child from the container. + * + * @method removeChild + * @param {PIXI.DisplayObject} child The child to remove + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Removes a child from the specified index position. + * + * @method removeChildAt + * @param {Number} index The index to get the child from + * @return {PIXI.DisplayObject} The child that was removed + */ + removeChildAt(index: number): PIXI.DisplayObject; + /** + * Move the cursor position by the given amount + * @param x + * @param y + */ + moveCursorBy(x: number, y: number): void; + /** + * Moves the inner children by the given amount. + * @param x + * @param y + */ + moveInnerChildrenBy(x: number, y: number): void; + /** + * Adds a child to the client area. + * @param child + * @return DisplayObject + */ + addInnerChild(child: PIXI.DisplayObject): PIXI.DisplayObject; + /** + * Draws the window shape into PIXI.Graphics object. Used by WindowLayer. + * @param graphics + */ + drawShape(graphics: PIXI.Graphics): void; + /** + * Destroys the window + */ + destroy(): void; + /** + * @method updateTransform + * @private + */ + updateTransform(): void; +} + +declare namespace rm.types { + export type AudioParameters = { + name: string; + pan: number; + pitch: number; + pos: number; + volume: number; + } +} + +/** + * Static class that handles BGM, BGS, ME, and SE. + */ +declare class AudioManager { + protected constructor(); + static _bgmVolume: number; + static _bgsVolume: number; + static _meVolume: number; + static _seVolume: number; + static _currentBgm: rm.types.AudioParameters; + static _currentBgs: rm.types.AudioParameters; + static _bgmBuffer: HTML5Audio; + static _bgsBuffer: HTML5Audio; + static _meBuffer: HTML5Audio; + static _seBuffers: HTML5Audio[]; + static _staticBuffers: HTML5Audio[]; + static _replayFadeTime: number; + static _path: string; + static _blobUrl: string; + static bgmVolume: number; + static bgsVolume: number; + static meVolume: number; + static seVolume: number; + static playBgm(bgm: rm.types.AudioParameters, pos?: number): void; + static replayBgm(bgm: rm.types.AudioParameters): void; + static isCurrentBgm(bgm: rm.types.AudioParameters): boolean; + static updateBgmParameters(bgm: rm.types.AudioParameters): void; + static pdateCurrentBgm(bgm: rm.types.AudioParameters, pos: number): void; + static stopBgm(): void; + static fadeOutBgm(duration: number): void; + static fadeInBgm(duration: number): void; + static playBgs(bgs: rm.types.AudioParameters, pos?: number): void; + static replayBgs(bgs: rm.types.AudioParameters): void; + static isCurrentBgs(bgs: rm.types.AudioParameters): boolean; + static updateBgsParameters(bgs: rm.types.AudioParameters): void; + static updateCurrentBgs(bgs: rm.types.AudioParameters, pos: number): void; + static stopBgs(): void; + static fadeOutBgs(duration: number): void; + static fadeInBgs(duration: number): void; + static playMe(me: rm.types.AudioParameters): void; + static updateMeParameters(me: rm.types.AudioParameters): void; + static fadeOutMe(duration: number): void; + static stopMe(): void; + static playSe(se: rm.types.AudioParameters): void; + static updateSeParameters(buffer: rm.types.AudioParameters, se: rm.types.AudioParameters): void; + static stopSe(): void; + static playStaticSe(se: rm.types.AudioParameters): void; + static loadStaticSe(se: rm.types.AudioParameters): void; + static isStaticSe(se: rm.types.AudioParameters): boolean; + static stopAll(): void; + static saveBgm(): rm.types.AudioParameters; + static saveBgs(): rm.types.AudioParameters; + static makeEmptyAudioObject(): rm.types.AudioParameters; + static createBuffer(): HTML5Audio; + static updateBufferParameters(buffer: rm.types.AudioParameters, configVolume: number, audio: rm.types.AudioParameters): void; + static audioFileExt(): string; + static shouldUseHtml5Audio(): string; + static checkErrors(): void; + static checkWebAudioError(webAudio?: HTML5Audio): void; + static playEncryptedBgm(bgm: rm.types.AudioParameters, pos?: number): void; + static createDecryptBuffer(url: string, bgm: rm.types.AudioParameters, pos?: number): void; +} + +declare namespace rm.types { + /** + * A superclass of actor, class, skill, item, weapon, armor, enemy, and state. + * + * Some items are unnecessary depending on the type of data, but they are included for convenience sake. + */ + export type BaseItem = { + /** + * The description text. + */ + description: string; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + meta: Object; + /** + * The item name. + */ + name: string; + note: string; + } +} + +declare namespace rm.types { + export type BattleRewards = { + exp: number; + gold: number; + items: rm.types.BaseItem[]; + } +} + +declare namespace rm.types { + export const enum BattleResult { + base = -1, + } +} + +/** + * Manages the game battles to process all of the + * events that happen within. + */ +declare class BattleManager { + protected constructor(); + _phase: string; + _canEscape: boolean; + _canLose: boolean; + _battleTest: boolean; + _eventCallback: () => void; + _preemptive: boolean; + _surprise: boolean; + _actorIndex: number; + _actionForceBattler: Game_Battler; + _mapBgm: rm.types.AudioParameters; + _mapBgs: rm.types.AudioParameters; + _actionBattlers: Game_Battler[]; + _subject: Game_Battler; + _action: Game_Action; + _targets: Game_Battler[]; + _logWindow: Window_BattleLog; + _statusWindow: Window_BattleStatus; + _spriteset: Spriteset_Battle; + _escapeRatio: number; + _escaped: boolean; + _rewards: rm.types.BattleRewards; + static setup(troopId: number, canEscape: boolean, canLose: boolean): void; + static initMembers(): void; + static isBattleTest(): boolean; + static setBattleTest(battleTest: boolean): void; + static setEventCallback(callback: () => void): void; + static setLogWindow(logWindow: Window_BattleLog): void; + static setStatusWindow(statusWindow: Window_BattleStatus): void; + static setSpriteset(spriteset: Spriteset_Battle): void; + static onEncounter(): void; + static ratePreemptive(): number; + static rateSurprise(): number; + static saveBgmAndBgs(): void; + static playBattleBgm(): void; + static playVictoryMe(): void; + static playDefeatMe(): void; + static replayBgmAndBgs(): void; + static makeEscapeRatio(): void; + static update(): void; + static updateEvent(): boolean; + static updateEventMain(): boolean; + static isBusy(): boolean; + static isInputting(): boolean; + static isInTurn(): boolean; + static isTurnEnd(): boolean; + static isAborting(): boolean; + static isBattleEnd(): boolean; + static canEscape(): boolean; + static canLose(): boolean; + static isEscaped(): boolean; + static actor(): Game_Actor; + static clearActor(): void; + static changeActor(newActorIndex: number, lastActorActionState: string): void; + static startBattle(): void; + static displayStartMessages(): void; + static startInput(): void; + static inputtingAction(): Game_Action; + static selectNextCommand(): void; + static selectPreviousCommand(): void; + static refreshStatus(): void; + static startTurn(): void; + static updateTurn(): void; + static processTurn(): void; + static endTurn(): void; + static updateTurnEnd(): void; + static getNextSubject(): Game_Battler; + static allBattleMembers(): Game_Battler[]; + static makeActionOrders(): void; + static startAction(): void; + static updateAction(): void; + static endAction(): void; + static invokeAction(): void; + static invokeNormalAction(): void; + static invokeCounterAttack(): void; + static invokeMagicReflection(): void; + static applySubstitute(target: Game_Battler): Game_Battler; + static checkSubstitute(target: Game_Battler): boolean; + static isActionForced(): boolean; + static forceAction(battler: Game_Battler): void; + static processForcedAction(): void; + static abort(): void; + static checkBattleEnd(): boolean; + static checkAbort(): boolean; + static processVictory(): void; + static processEscape(): boolean; + static processAbort(): void; + static processDefeat(): void; + static endBattle(result: rm.types.BattleResult): void; + static updateBattleEnd(): void; + static makeRewards(): void; + static displayVictoryMessage(): void; + static displayDefeatMessage(): void; + static displayEscapeSuccessMessage(): void; + static displayEscapeFailureMessage(): void; + static displayRewards(): void; + static displayExp(): void; + static displayGold(): void; + static displayDropItems(): void; + static gainRewards(): void; + static gainExp(): void; + static gainGold(): void; + static gainDropItems(): void; +} + +declare namespace rm.types { + export type TextState = { + index: number; + left: number; + startX: number; + text: string; + x: number; + y: number; + } +} + +declare namespace rm.types { + +} + +declare class Window_Base extends Window { + /** + * Creates an instance of Window_Base. + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @memberof Window_Base + */ + constructor(x: number, y: number, width: number, height: number); + /** + * Initializes the window. + * + * @memberof Window_Base + */ + initialize(x?: number, y?: number, width?: number, height?: number): void; + /** + * Returns the standard line height of the current window; + * default is 36. + * @returns {number} + * @memberof Window_Base + */ + lineHeight(): number; + /** + * Returns the standard font face of the + * game based on what language the game is in. + * @returns {String} + * @memberof Window_Base + */ + standardFontFace(): string; + /** + * Returns the standard font size of the text + * in window; default is 28. + * @returns {number} + * @memberof Window_Base + */ + standardFontSize(): number; + /** + * Returns the standard padding of the window; + * default is 18. + * @returns {number} + * @memberof Window_Base + */ + standardPadding(): number; + /** + * Returns the text padding of the window; + * default is 6. + * @returns {number} + * @memberof Window_Base + */ + textPadding(): number; + /** + * Returns the standard back opacity of the window; this is the + * opacity of the area behind the window's text content. + * Default is 192. + * @returns {number} + * @memberof Window_Base + */ + standardBackOpacity(): number; + /** + * Loads the window skin from the img/system directory. + * + * @memberof Window_Base + */ + loadWindowSkin(): void; + /** + * Updates the window padding based on the + * standardPadding method. + * @memberof Window_Base + */ + updatePadding(): void; + /** + * Updates the back opacity of the window + * based on the standardBackOpacity method. + * @memberof Window_Base + */ + updateBackOpacity(): void; + /** + * Returns the inner content width of the window. + * + * @returns {number} + * @memberof Window_Base + */ + contentsWidth(): number; + /** + * Returns the inner content height of the window. + * + * @returns {number} + * @memberof Window_Base + */ + contentsHeight(): number; + /** + * Returns the fitting height given a number of lines based on + * the line height plus standard padding of the window. + * Default formula: numLines * lineHeight + standardPadding * 2 + * + * @param {number} numLines + * @returns {number} + * @memberof Window_Base + */ + fittingHeight(numLines: number): number; + /** + * Updates the tone of the window based on the + * game system window tone defined in the database. + * @memberof Window_Base + */ + updateTone(): void; + /** + * Creates the contents of the window; this is the area + * of the window which text is drawn to. + * @memberof Window_Base + */ + createContents(): void; + /** + * Resets the font settings of the window back to the + * default. + * @memberof Window_Base + */ + resetFontSettings(): void; + /** + * Resets the text color of the window back to the + * default. + * @memberof Window_Base + */ + resetTextColor(): void; + /** + * The update method of the window; this is + * run every frame to do logic processing for the window. + * @memberof Window_Base + */ + update(): void; + /** + * Updates the openness of the window when the + * _opening property is set to true. + * Openness is increased. + * @memberof Window_Base + */ + updateOpen(): void; + /** + * Updates the openness of the window when the + * _closing property is set to true. + * Openness is decreased. + * @memberof Window_Base + */ + updateClose(): void; + /** + * Opens the window. + * + * @memberof Window_Base + */ + open(): void; + /** + * Closes the window. + * + * @memberof Window_Base + */ + close(): void; + /** + * Returns true if the window is currently opening. + * + * @returns {boolean} + * @memberof Window_Base + */ + isOpening(): boolean; + /** + * Returns true if the window is currently closing. + * + * @returns {boolean} + * @memberof Window_Base + */ + isClosing(): boolean; + /** + * Shows the window, making it visible. + * + * @memberof Window_Base + */ + show(): void; + /** + * Hides the window, making it invisible; + * the window is not closed when hidden. + * + * @memberof Window_Base + */ + hide(): void; + /** + * Activates the window, allowing it to be processed + * and to update. + * @memberof Window_Base + */ + activate(): void; + /** + * Deactives the window, preventing further processing. + * + * @memberof Window_Base + */ + deactivate(): void; + /** + * Returns a text color given a numbered index + * as a css color String; this index maps + * directly to the img/system/window.png colors + * by default. + * @param {number} n + * @returns {*} + * @memberof Window_Base + */ + textColor(n: number): string; + /** + * Returns the normal color as a css + * color String. + * @returns {String} + * @memberof Window_Base + */ + normalColor(): string; + /** + * Returns the system color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + systemColor(): string; + /** + * Returns the crisis color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + crisisColor(): string; + /** + * Returns the death color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + deathColor(): string; + /** + * Returns the gauage back color as + * a css color String. + * @returns {String} + * @memberof Window_Base + */ + gaugeBackColor(): string; + /** + * Returns the hp gauge color 1 + * as a css color String. + * @returns {String} + * @memberof Window_Base + */ + hpGaugeColor1(): string; + /** + * Returns the hp gauge color 2 + * as a css color String. + * @returns {String} + * @memberof Window_Base + */ + hpGaugeColor2(): string; + /** + * Returns the mp gauge color 1 + * as a css color String. + * @returns {String} + * @memberof Window_Base + */ + mpGaugeColor1(): string; + /** + * Returns the mp gauge color 2 + * as a css color String. + * @returns {String} + * @memberof Window_Base + */ + mpGaugeColor2(): string; + /** + * Returns the mp cost color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + mpCostColor(): string; + /** + * Returns the power up color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + powerUpColor(): string; + /** + * Returns the power down color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + powerDownColor(): string; + /** + * Returns the tp gauge color 1 as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + tpGaugeColor1(): string; + /** + * Returns tp gauge color 2 as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + tpGaugeColor2(): string; + /** + * Returns the tp cost color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + tpCostColor(): string; + /** + * Returns the pending color as a + * css color String. + * @returns {String} + * @memberof Window_Base + */ + pendingColor(): string; + /** + * Returns the translucentOpacity for the window; + * The default is 160. + * + * @returns {number} + * @memberof Window_Base + */ + translucentOpacity(): number; + /** + * Changes the text color property given a css color String. + * + * @param {String} color + * @memberof Window_Base + */ + changeTextColor(color: string): void; + /** + * Changes the paintOpacity (the opacity of the text drawn to the window); + * if true the opacity is set to 255, otherwise the opacity is set to 160. + * @param {boolean} enabled + * @memberof Window_Base + */ + changePaintOpacity(enabled: boolean): void; + /** + * Given text or a number, draws the content to the window's contents + * layer at the specified x and y coordinate within the max width. + * The text content can also be aligned with the align property. + * The possible alignments are: "left", "center", "right". + * @param {(String | number)} text + * @param {number} x + * @param {number} y + * @param {number} maxWidth + * @param {String} align + * @memberof Window_Base + */ + drawText(text: string | number, x: number, y: number, maxWidth: number, align: string): void; + /** + * Calculates the width of a text String and + * returns a number. + * @param {String} text + * @returns {number} + * @memberof Window_Base + */ + textWidth(text: string): number; + /** + * Draws text with text codes included; this will draw + * icons, increase text height, and more. + * @param text + * @param x + * @param y + * @param width + * @returns Int + * @memberof Window_Base + */ + drawTextEx(text: string, x: number, y: number): number; + /** + * Converts the escape characters and returns the text content + * after processing the characters. + * @param {String} text + * @returns {String} + * @memberof Window_Base + */ + convertEscapeCharacters(text: string): string; + /** + * Returns the actor name given an index; + * the index starts from 1. + * @param {number} actorIndex + * @returns {String} + * @memberof Window_Base + */ + actorName(actorIndex: number): string; + /** + * Returns a party member name given an index; + * the index starts from 1. + * @param {number} partyMemberIndex + * @returns {String} + * @memberof Window_Base + */ + partyMemberName(partyMemberIndex: number): string; + /** + * Process each character in the text when drawTextEx + * is used to draw text. + * @param {MV.TextState} textState + * @memberof Window_Base + */ + processCharacter(textState: rm.types.TextState): void; + /** + * Processes the normal characters in the text + * when drawTextEx is used to draw text. + * Normal characters are letters and numbers. + * @param {MV.TextState} textState + * @memberof Window_Base + */ + processNormalCharacter(textState: rm.types.TextState): void; + /** + * Processes new line when drawTextEx is used to draw text. + * + * @param {MV.TextState} textState + * @memberof Window_Base + */ + processNewLine(textState: rm.types.TextState): void; + /** + * Processes new page when drawTexttEx is used to draw text. + * + * @param {MV.TextState} textState + * @memberof Window_Base + */ + processNewPage(textState: rm.types.TextState): void; + obtainEscapeCode(textState: rm.types.TextState): string; + /** + * Obtains the escape parameters from text codes in the text state + * when drawTextEx is used to draw text. + * @param {MV.TextState} textState + * @returns {(number | String)} + * @memberof Window_Base + */ + obtainEscapeParam(textState: string | rm.types.TextState): number | string; + /** + * Processes escape characters when drawTextEx is used + * for drawing text. + * @param {String} code + * @param {MV.TextState} textState + * @memberof Window_Base + */ + processEscapeCharacter(code: string, textState: rm.types.TextState): void; + /** + * Processes drawing an icon when drawTextEx is used for + * drawing text. + * @param {number} iconIndex + * @param {MV.TextState} textState + * @memberof Window_Base + */ + processDrawIcon(iconIndex: number, textState: rm.types.TextState): void; + /** + * Makes the font bigger by a value of 12. + * + * @memberof Window_Base + */ + makeFontBigger(): void; + /** + * Makes the font smaller by a value of 12. + * + * @memberof Window_Base + */ + makeFontSmaller(): void; + /** + * Calculates the text height of the textState (when using drawTextEx); + * if all is set to true, all lines of text are calculated, otherwise + * only a single line is processed. + * @param {rm.TextState} textState + * @param {Bool} all + * @returns Int + * @memberof Window_Base + */ + calcTextHeight(textState: rm.types.TextState, all: boolean): number; + /** + * Draws an icon given the specified iconIndex at the specified + * x and y coordinates. The Width and Height of the icon is based on the + * _iconWidth and _iconHeight properties. + * @param {number} iconIndex + * @param {number} x + * @param {number} y + * @memberof Window_Base + */ + drawIcon(iconIndex: number, x: number, y: number): void; + drawFace(faceName: string, faceIndex: number, x: number, y: number, width: number, height: number): void; + /** + * Draws a character (map sprites) at the specified x and y coordinate. + * CharacterName refers to character spritesheet, and characterIndex refers + * to the characterIndex on the spritesheet. + * @param {String} characterName + * @param {number} characterIndex + * @param {number} x + * @param {number} y + * @memberof Window_Base + */ + drawCharacter(characterName: string, characterIndex: number, x: number, y: number): void; + /** + * Draws a gauge at the specified x and y coordinates within the given width. + * Color1 and Color2 represent the gradient as css color Strings of the gauge. + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} rate + * @param {String} color1 + * @param {String} color2 + * @memberof Window_Base + */ + drawGauge(x: number, y: number, width: number, rate: number, color1: string, color2: string): void; + /** + * Returns the hp color as a css String. + * + * @param {Game_Actor} actor + * @returns {String} + * @memberof Window_Base + */ + hpColor(actor: Game_Actor): string; + /** + * Returns the mp color as a css color String. + * + * @param {Game_Actor} actor + * @returns {String} + * @memberof Window_Base + */ + mpColor(actor: Game_Actor): string; + /** + * Returns the tp color as a css color String. + * + * @param {Game_Actor} actor + * @returns {String} + * @memberof Window_Base + */ + tpColor(actor: Game_Actor): string; + drawActorCharacter(actor: Game_Actor, x: number, y: number): void; + /** + * Draws the actor face at the specified x and y coordinates within + * the given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @memberof Window_Base + */ + drawActorFace(actor: Game_Actor, x: number, y: number, width: number, height: number): void; + /** + * Draws the actor name at the specified x and y coordinates within + * the given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorName(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the actor class at the specified x and y coordinates + * within the given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorClass(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the actor nickname at the specified x and y coordinates + * within the given width. + * @param {Game_Actor} actor + * @param {Int} x + * @param {Int} y + * @param {Int} width + * @memberof Window_Base + */ + drawActorNickname(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the actor level at the specified x and y coordinates. + * + * @param {Game_Actor} actor + * @param {Int} x + * @param {Int} y + * @memberof Window_Base + */ + drawActorLevel(actor: Game_Actor, x: number, y: number): void; + /** + * Draws the actor icons at the specified x and y coordinates + * within the given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorIcons(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the current and max number at the specified x and y coordinate + * within the given width. Color1 represents the current number and color2 + * represents the max number when the text is drawn. + * @param {number} current + * @param {number} max + * @param {number} x + * @param {number} y + * @param {number} width + * @param {String} color1 + * @param {String} color2 + * @memberof Window_Base + */ + drawCurrentAndMax(current: number, max: number, x: number, y: number, width: number, color1: string, color2: string): void; + /** + * Draws the actor hp at the specified x and y coordinates within + * the given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorHp(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the actor mp at the specified x and y coordinates within + * the given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorMp(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the actor tp at the specified x and y coordinates within the + * given width. + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorTp(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws a simple status for the game actor passed into the method at the + * specified x and y coordinates within the given width. + * + * @param {Game_Actor} actor + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawActorSimpleStatus(actor: Game_Actor, x: number, y: number, width: number): void; + /** + * Draws the item name at the specified x and y coordinates within + * the given width. + * @param {RPG.BaseItem} item + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawItemName(item: rm.types.BaseItem, x: number, y: number, width: number): void; + /** + * Draws the currency value given at the specified x and y coordinates within + * the width given. Useful if you want to write your own custom currency value. + * @param {number} value + * @param {String} unit + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_Base + */ + drawCurrencyValue(value: number, unit: string, x: number, y: number, width: number): void; + /** + * Changes the text color based on the powerUpColor, powerDownColor + * and normal color. powerUpColor is any number greater than 0, powerDownColor + * is any color less than 0, otherwise normal color is returned. + * @param {number} change + * @memberof Window_Base + */ + paramchangeTextColor(change: number): rm.types.Color; + /** + * Sets the background type of the window. + * 0 is 255 window opacity (standard). + * 1 is the window with background dimmer. + * Any other number changes the opacity + * to 0. + * @param {number} type + * @memberof Window_Base + */ + setBackgroundType(type: number): void; + /** + * Shows the background dimmer sprite. + * + * @memberof Window_Base + */ + showBackgroundDimmer(): void; + /** + * Hides the background dimmer sprite. + * + * @memberof Window_Base + */ + hideBackgroundDimmer(): void; + /** + * Updates the background dimmer sprite opacity based on the openness + * of the window. + * @memberof Window_Base + */ + updateBackgroundDimmer(): void; + /** + * Refreshes the bitmap attached to the dimmer sprite + * based on the window dimensions. + * @memberof Window_Base + */ + refreshDimmerBitmap(): void; + /** + * Color 1 of the dimmer sprite bitmap. + * for the gradient. + * @returns {String} + * @memberof Window_Base + */ + dimColor1(): string; + /** + * Color 2 of the dimmer sprite bitmap + * for the gradient. + * @returns {String} + * @memberof Window_Base + */ + dimColor2(): string; + /** + * Returns the x coordinate of the mouse to + * a local window x coordinate. + * @param {number} x + * @returns {number} + * @memberof Window_Base + */ + canvasToLocalX(x: number): number; + /** + * Returns the y coordinate of the mouse + * to a local window y coordinate. + * @param {number} y + * @returns {number} + * @memberof Window_Base + */ + canvasToLocalY(y: number): number; + /** + * Reverses the face images of the + * game party members. + * @memberof Window_Base + */ + reserveFaceImages(): void; + static _iconWidth: number; + static _iconHeight: number; + static _faceWidth: number; + static _faceHeight: number; +} + +declare namespace rm.types { + export type ConfigData = { + alwaysDash: boolean; + bgmVolume: number; + bgsVolume: number; + commandRemember: boolean; + meVolume: number; + seVolume: number; + } +} + +/** + * Manages the configuration of RPGMakerMZ Config Data. + */ +declare class ConfigManager { + protected constructor(); + static load(): void; + static save(): void; + static makeData(): rm.types.ConfigData; + static applyData(config: rm.types.ConfigData): void; + static readFlag(config: rm.types.ConfigData, name: string): boolean; + static readVolume(config: rm.types.ConfigData, name: string): number; +} + +/** + * Manages the game data: saving, loading, meta data, + * and map information. + */ +declare class DataManager { + protected constructor(); + static _globalId: string; + static _lastAccessId: number; + static _errorUrl: any; + static _databaseFiles: JSON[]; + static loadDatabase(): void; + static loadDataFile(name: string, src: string): void; + static isDatabaseLoaded(): boolean; + static loadMapData(mapId: number): void; + static makeEmptyMap(): void; + static isMapLoaded(): boolean; + static onLoad(object: any): void; + /** + * Extracts Meta Data. A Json Like Object + * @param data + */ + static extractMetaData(data: any): void; + static checkError(): void; + static isBattleTest(): boolean; + static isEventTest(): boolean; + /** + * Returns a Bool value given an item. + * Item being a database object representing a skill. + * @static + * @param {object} item + * @returns {Bool} + * @memberof DataManager + */ + static isSkill(item: rm.types.BaseItem): boolean; + /** + * Returns a Bool value given an item. + * Item must be a database item to be true. + * @static + * @param {object} item + * @returns {Bool} + * @memberof DataManager + */ + static isItem(item: rm.types.BaseItem): boolean; + /** + * Returns a Bool value given an item. + * Item must be a database weapon to be true. + * @static + * @param {object} item + * @returns {Bool} + * @memberof DataManager + */ + static isWeapon(item: rm.types.BaseItem): boolean; + /** + * Returns a Bool value given an item. + * Item must be a database armor to be true. + * @static + * @param {object} item + * @returns {Bool} + * @memberof DataManager + */ + static isArmor(item: rm.types.BaseItem): boolean; + static createGameObjects(): void; + static setupNewGame(): void; + static setupBattleTest(): void; + static setupEventTest(): void; + static loadGlobalInfo(): void; + /** + * JSON like object + * @param info + */ + static saveGlobalInfo(info: any): void; + /** + * Returns a Bool value given a savefileId. + * If the savefileId exists; the value will be true. + * @static + * @param {number} savefileId + * @returns {Bool} + * @memberof DataManager + */ + static isThisGameFile(savefileId: number): boolean; + static isAnySavefileExists(): boolean; + static latestSavefileId(): number; + static loadAllSavefileImages(): void; + /** + * JSON Like Object for save file images + */ + static loadSavefileImages(info: any): void; + /** + * Returns the maximum number of save files + * allocated in the game. + * @static + * @returns {number} + * @memberof DataManager + */ + static maxSavefiles(): number; + /** + * Saves the RPGMakerMV game given a savefileId. + * Returns true if successful. + * @static + * @param {number} savefileId + * @returns {Bool} + * @memberof DataManager + */ + static saveGame(savefileId: number): boolean; + static loadGame(savefileId: number): boolean; + /** + * Returns the last accessed save fileId upon + * saving or loading the game. + * @static + * @returns {number} + * @memberof DataManager + */ + static lastAccessedSavefileId(): number; + static saveGameWithoutRescue(savefileId: number): boolean; + static loadGameWithoutRescue(savefileId: number): boolean; + static selectSavefileForNewGame(): void; + /** + * Creates a new save file on the global + * save file information containing important + * data such as play time, characters, timestamp. + * @static + * @memberof DataManager + */ + static makeSavefileInfo(): void; + /** + * Creates the save file contents when saving your game. + * Good for aliasing when you want to add more data + * to the game's save contents. + * @static + * @returns {object} + * @memberof DataManager + */ + static makeSaveContents(): any; + /** + * Extracts the save file contents into the game's + * variables. An excellent method to alias when you + * wish to extend the game's save contents for a plugin. + * @static + * @param {object} contents + * @memberof DataManager + */ + static extractSaveContents(contents: any): void; +} + +/** + * Static class that manages images. Loading the images + * and create bitmap objects. + */ +declare class ImageManager { + protected constructor(); + static cache: CacheMap; + static loadFace(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/parallaxes/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadParallax(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/pictures/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadPicture(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/animations/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadAnimation(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/battlebacks1/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadBattleback1(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/battlebacks2/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadBattleback2(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/enemies/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadEnemy(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/characters/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadCharacter(filename: string, hue?: number): Bitmap; + static loadSvActor(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/sv_enemies/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadSvEnemy(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from 'img/system/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadSystem(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/tilesets/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadTileset(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/titles1/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadTitle1(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from the 'img/titles2/' folder + * and returns it. + * @param {string} filename + * @param {number} [hue] + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadTitle2(filename: string, hue?: number): Bitmap; + /** + * Loads a Bitmap object from any folder and returns it. + * + * @param {string} folder + * @param {string} filename + * @param {number} hue + * @param {boolean} smooth + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadBitmap(folder: string, filename: string, hue: number, smooth: boolean): Bitmap; + /** + * Loads an empty Bitmap object and returns it. + * + * @param {string} path + * @param {number} hue + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadEmptyBitmap(path: string, hue: number): Bitmap; + /** + * Loads a Bitmap object given a path + * and returns it. + * @param {string} path + * @param {number} hue + * @returns {Bitmap} + * @memberof ImageManagerStatic + */ + static loadNormalBitmap(path: string, hue: number): Bitmap; + /** + * Clears the image cache in RPGMakerMV. + * + * @memberof ImageManagerStatic + */ + static clear(): void; + /** + * Returns true if the image cache + * is ready. + * @returns {boolean} + * @memberof ImageManagerStatic + */ + static isReady(): boolean; + /** + * Returns true if the given filename + * is an object character. Must contain + * a '!' in the file name to be an + * object character. + * @param {string} filename + * @returns {boolean} + * @memberof ImageManagerStatic + */ + static isObjectCharacter(filename: string): boolean; + /** + * Returns true if the given filename is + * a large character. Must contain a '$' + * in the file name to be a large character. + * @param {string} filename + * @returns {boolean} + * @memberof ImageManagerStatic + */ + static isBigCharacter(filename: string): boolean; + static isZeroParallax(filename: string): boolean; +} + +declare namespace rm.types { + /** + * Plugin Settings for RPGMakerMV/MZ + */ + export type PluginSettings = { + /** + * Plugin Description + */ + description: string; + /** + * Plugin Name + */ + name: string; + /** + * Plugin Parameters in a map/dictionary like syntax. + * Example: + * ```js + * parameters["TextSpeed"] + * ``` + */ + parameters: { [key: string]: any }; + /** + * Plugin Status On/Off + */ + status: string; + } +} + +/** + * Static class that manages plugins + */ +declare class PluginManager { + protected constructor(); + static _path: string; + static _scripts: string[]; + static _errorUrls: string[]; + static setup(plugins: rm.types.PluginSettings[]): void; + static checkErrors(): void; + /** + * Returns all of the plugin parameters for an RPGMakerMZ + * plugin in a JSON Like String Format. + * Should typedef this for ease of parsing. + * @param name + * @return Any + */ + static parameters(name: string): any; + /** + * Uses internally by the Plugin Manager to load + * the plugin scripts. + * @param name + */ + static loadScript(name: string): void; + static onError(e: Event): void; + /** + * Regsters a new plugin command in MZ using a lambda expression + * The Variable of the lambda should be transformed into the appropriate + * typed def struct for your use case for your command. + * Example Syntax For Commented Parameters + * + *```js + * //Should be in comment + * @command PluginCommandFunctionName + * @text My Plugin Command + * @desc Plugin Command Description Text + * @arg Actors + * @text Which Actors? + * @type actor[] + * @desc Select which Actor ID(s) to affect. + * @default ["1"] + * @arg State + * @text State + * @type state + * @desc Which State to apply? + * @default 1 + * PluginManager.registerCommand("TestPlugin", "PluginCommandFunctionName", args => { + * // Get Arguments + * const actorIds = JSON.parse(args.Actors); + * const stateId = args.State; + * // Use the arguments + * for (const actorId of actorIds) { + * const actor = $gameParty.members().find(member => member.actorId() === Number(actorId)); + * if (actor) { + * actor.addState(stateId); + * } + * } + * }); + * ``` + * @param pluginName + * @param commandName + * @param lambda + */ + static registerCommand(pluginName: string, commandName: string, lambda: (arg0: any) => void): void; +} + +/** + * Manages the scenes of the game. + */ +declare class SceneManager { + protected constructor(); + static _scene: Scene_Base; + static _nextScene: Scene_Base; + static _stack: any[]; + static _screenWidth: number; + static _screenHeight: number; + static _backgroundBitmap: Bitmap; + static _boxWidth: number; + static _boxHeight: number; + static _deltaTime: number; + static _currentTime: number; + static _accumulator: number; + /** + * Convenience variable for getting the current scene. + */ + static _scene: any; + static preferableRendererType(): string; + static shouldUseCanvasRenderer(): boolean; + static initialize(): void; + static initGraphics(): void; + static initAudio(): void; + static initInput(): void; + static initNwjs(): void; + static update(): void; + static terminate(): void; + static tickStart(): void; + static tickEnd(): void; + static changeScene(): void; + static updateScene(): void; + static renderScene(): void; + static onSceneCreate(): void; + static onSceneStart(): void; + static onSceneLoading(): void; + static onError(e: Event): void; + static onKeyDown(event: KeyboardEvent): void; + static catchException(e: Event): void; + static isSceneChanging(): boolean; + static isCurrentSceneBusy(): boolean; + static isCurrentSceneStarted(): boolean; + static isNextScene(sceneClass: any): boolean; + static isPreviousScene(sceneClass: any): boolean; + /** + * Goes to the scene passed in. + * @param sceneClass + */ + static goto(sceneClass: any): void; + /** + * Pushes the scene passed in to the scene stack. + * Immediately goes to the scene passed in. + * @param sceneClass + */ + static push(sceneClass: any): void; + /** + * Pops the current scene from the stack. + */ + static pop(): void; + /** + * Exits the current scene. + */ + static exit(): void; + static clearStack(): void; + /** + * Stops the current scene. + */ + static stop(): void; + static prepareNextScene(): void; + static snap(): Bitmap; + static snapForBackground(): void; + static backgroundBitmap(): Bitmap; + static updateManagers(ticks: number, delta: number): void; +} + +/** + * Static class that plays sound effects defined in the database. + */ +declare class SoundManager { + protected constructor(); + static preloadImportantSounds(): void; + static loadSystemSound(databaseNumber: number): void; + static playSystemSound(databaseNumber: number): void; + static playCursor(): void; + static playOk(): void; + static playCancel(): void; + static playBuzzer(): void; + static playEquip(): void; + static playSave(): void; + static playLoad(): void; + static playBattleStart(): void; + static playEscape(): void; + static playEnemyAttack(): void; + static playEnemyDamage(): void; + static playEnemyCollapse(): void; + static playBossCollapse1(): void; + static playBossCollapse2(): void; + static playActorDamage(): void; + static playActorCollapse(): void; + static playRecovery(): void; + static playMiss(): void; + static playEvasion(): void; + static playMagicEvasion(): void; + static playReflection(): void; + static playShop(): void; + static playUseItem(): void; + static playUseSkill(): void; +} + +/** + * The static class that manages storage of save game data. + */ +declare class StorageManager { + protected constructor(); + static save(savefileId: number, json: string): void; + static load(savefileId: number): string; + static exists(savefileId: number): boolean; + static remove(savefileId: number): void; + static backup(savefileId: number): void; + static backupExists(savefileId: number): boolean; + static cleanBackup(savefileId: number): boolean; + static restoreBackup(savefileId: number): void; + static isLocalMode(): boolean; + static saveToLocalFile(savefileId: number, json: string): void; + static loadFromLocalFile(savefileId: number): string; + static loadFromLocalBackupFile(savefileId: number): string; + static localFileBackupExists(savefileId: number): boolean; + static localFileExists(savefileId: number): boolean; + static removeLocalFile(savefileId: number): void; + static saveToWebStorage(savefileId: number, json: string): void; + static loadFromWebStorage(savefileId: number): string; + static loadFromWebStorageBackup(savefileId: number): string; + static webStorageBackupExists(savefileId: number): boolean; + static webStorageExists(savefileId: number): boolean; + static removeWebStorage(savefileId: number): void; + static localFileDirectoryPath(): string; + static localFilePath(savefileId: number): string; + static webStorageKey(savefileId: number): string; +} + +/** + * The static class that handles terms and messages. + * This is linked to the terms and information + * contained within the editor. + */ +declare class TextManager { + protected constructor(); + static currencyUnit: string; + static level: string; + static levelA: string; + static hp: string; + static hpA: string; + static mp: string; + static mpA: string; + static tp: string; + static tpA: string; + static exp: string; + static expA: string; + static fight: string; + static escape: string; + static attack: string; + static guard: string; + static item: string; + static skill: string; + static equip: string; + static status: string; + static formation: string; + static save: string; + static gameEnd: string; + static options: string; + static weapon: string; + static armor: string; + static keyItem: string; + static equip2: string; + static optimize: string; + static clear: string; + static newGame: string; + static continue_: string; + static toTitle: string; + static cancel: string; + static buy: string; + static sell: string; + static alwaysDash: string; + static commandRemember: string; + static bgmVolume: string; + static bgsVolume: string; + static meVolume: string; + static seVolume: string; + static possession: string; + static expTotal: string; + static expNext: string; + static saveMessage: string; + static loadMessage: string; + static file: string; + static partyName: string; + static emerge: string; + static preemptive: string; + static surprise: string; + static escapeStart: string; + static escapeFailure: string; + static victory: string; + static defeat: string; + static obtainExp: string; + static obtainGold: string; + static obtainItem: string; + static levelUp: string; + static obtainSkill: string; + static useItem: string; + static criticalToEnemy: string; + static criticalToActor: string; + static actorDamage: string; + static actorRecovery: string; + static actorGain: string; + static actorLoss: string; + static actorDrain: string; + static actorNoDamage: string; + static actorNoHit: string; + static enemyDamage: string; + static enemyRecovery: string; + static enemyGain: string; + static enemyLoss: string; + static enemyDrain: string; + static enemyNoDamage: string; + static enemyNoHit: string; + static evasion: string; + static magicEvasion: string; + static magicReflection: string; + static counterAttack: string; + static substitute: string; + static buffAdd: string; + static debuffAdd: string; + static buffRemove: string; + static actionFailure: string; + static basic(basicId: number): string; + static param(paramId: number): string; + static command(commandId: number): string; + static message(messageId: string): string; + static getter(method: string, param: number): string; +} + +declare namespace rm.types { + /** + * The data class for enemy [Actions]. + */ + export type EnemyAction = { + /** + * The first parameter of the condition. + */ + conditionParam1: number; + /** + * The second parameter of the condition. + */ + conditionParam2: number; + /** + * The type of condition. + * + * 0: Always + * 1: Turn No. + * 2: HP + * 3: MP + * 4: State + * 5: Party Level + * 6: Switch + */ + conditionType: number; + /** + * The action's priority rating (1..10). + */ + rating: number; + /** + * The ID of skills to be employed as actions. + */ + skillId: number; + } +} + +declare namespace rm.types { + /** + * The data class for damage. + */ + export type Damage = { + /** + * Critical hit (true/false). + */ + critical: boolean; + /** + * The element ID. + */ + elementId: number; + /** + * The formula. + */ + formula: string; + /** + * The type of damage. + * + * 0: None + * 1: HP damage + * 2: MP damage + * 3: HP recovery + * 4: MP recovery + * 5: HP drain + * 6: MP drain + */ + type: number; + /** + * The degree of variability. + */ + variance: number; + } +} + +declare namespace rm.types { + /** + * The data class for use effects. + */ + export type Effect = { + /** + * The use effect code. + */ + code: number; + /** + * The ID of data (state, parameter, and so on) according to the type of use effect. + */ + dataId: number; + /** + * Value 1 set according to the type of use effect. + */ + value1: number; + /** + * Value 2 set according to the type of use effect. + */ + value2: number; + } +} + +declare namespace rm.types { + export type UsableItem = { + /** + * The animation ID. + */ + animationId: number; + /** + * Damage (RPG.Damage). + */ + damage: rm.types.Damage; + /** + * The description text. + */ + description: string; + /** + * A list of use effects. An RPG.Effect array. + */ + effects: rm.types.Effect[]; + /** + * The type of hit. + * + * 0: Certain hit + * 1: Physical attack + * 2: Magical attack + */ + hitType: number; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + meta: Object; + /** + * The item name. + */ + name: string; + note: string; + /** + * When the item/skill may be used. + * + * 0: Always + * 1: Only in battle + * 2: Only from the menu + * 3: Never + */ + occasion: number; + /** + * The number of repeats. + */ + repeats: number; + /** + * The scope of effects. + * + * 0: None + * 1: One Enemy + * 2: All Enemies + * 3: One Random Enemy + * 4: Two Random Enemies + * 5: Three Random Enemies + * 6: Four Random Enemies + * 7: One Ally + * 8: All Allies + * 9: One Ally (Dead) + * 10: All Allies (Dead) + * 11: The User + */ + scope: number; + /** + * The speed correction. + */ + speed: number; + /** + * The success rate. + */ + successRate: number; + /** + * The number of TP gained. + */ + tpGain: number; + } +} + +/** + * Game_Action + * The game object class representing a battle action. + * @class Game_Action + */ +declare class Game_Action { + constructor(subject: Game_Battler, forcing: boolean); + _subjectActorId: number; + _subjectEnemyIndex: number; + _targetIndex: number; + _forcing: boolean; + _item: Game_Item; + clear(): void; + setSubject(subject: Game_Battler): void; + subject(): Game_Battler; + friendsUnit(): Game_Unit; + opponentsUnit(): Game_Unit; + setEnemyAction(action: rm.types.EnemyAction): void; + setAttack(): void; + setGuard(): void; + setSkill(skillId: number): void; + setItem(itemId: number): void; + setItemObject(object: rm.types.UsableItem): void; + setTarget(targetIndex: number): void; + item(): rm.types.UsableItem; + isSkill(): boolean; + isItem(): boolean; + numRepeats(): number; + checkItemScope(list: number[]): boolean; + isForOpponent(): boolean; + isForFriend(): boolean; + isForDeadFriend(): boolean; + isForUser(): boolean; + isForOne(): boolean; + isForRandom(): boolean; + isForAll(): boolean; + needsSelection(): number; + numTargets(): number; + checkDamageType(list: number[]): boolean; + isHpEffect(): boolean; + isMpEffect(): boolean; + isDamage(): boolean; + isRecover(): boolean; + isDrain(): boolean; + isHpRecover(): boolean; + isMpRecover(): boolean; + isCertainHit(): boolean; + isPhysical(): boolean; + isMagical(): boolean; + isAttack(): boolean; + isGuard(): boolean; + isMagicSkill(): boolean; + decideRandomTarget(): void; + setConfusion(): void; + prepare(): void; + isValid(): boolean; + speed(): number; + makeTargets(): Game_Battler[]; + repeatTargets(targets: Game_Battler[]): Game_Battler[]; + confusionTarget(): Game_Battler; + targetsForOpponents(): Game_Battler[]; + targetsForFriends(): Game_Battler[]; + evaluate(): number; + itemTargetCandidates(): Game_Battler[]; + evaluateWithTarget(target: Game_Battler): number; + testApply(target: Game_Battler): boolean; + hasItemAnyValidEffects(target: Game_Battler): boolean; + testItemEffect(target: Game_Battler, effect: rm.types.Effect): boolean; + itemCnt(target: Game_Battler): number; + itemMrf(target: Game_Battler): number; + itemHit(target: Game_Battler): number; + itemEva(target: Game_Battler): number; + itemCri(target: Game_Battler): number; + apply(target: Game_Battler): void; + makeDamageValue(target: Game_Battler, critical: boolean): number; + evalDamageFormula(target: Game_Battler): number; + calcElementRate(target: Game_Battler): number; + elementsMaxRate(target: Game_Battler, elements: number[]): number; + applyCritical(damage: number): number; + applyVariance(damage: number, variance: number): number; + applyGuard(damage: number, target: Game_Battler): number; + executeDamage(target: Game_Battler, value: number): void; + executeHpDamage(target: Game_Battler, value: number): void; + executeMpDamage(target: Game_Battler, value: number): void; + gainDrainedHp(value: number): void; + gainDrainedMp(value: number): void; + applyItemEffect(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectRecoverHp(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectRecoverMp(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectGainTp(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectAddState(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectAddAttackState(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectAddNormalState(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectRemoveState(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectAddBuff(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectAddDebuff(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectRemoveBuff(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectRemoveDebuff(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectSpecial(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectGrow(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectLearnSkill(target: Game_Battler, effect: rm.types.Effect): void; + itemEffectCommonEvent(target: Game_Battler, effect: rm.types.Effect): void; + makeSuccess(target: Game_Battler): void; + applyItemUserEffect(target: Game_Battler): void; + lukEffectRate(target: Game_Battler): number; + applyGlobal(): void; + static EFFECT_RECOVER_HP: number; + static EFFECT_RECOVER_MP: number; + static EFFECT_GAIN_TP: number; + static EFFECT_ADD_STATE: number; + static EFFECT_REMOVE_STATE: number; + static EFFECT_ADD_BUFF: number; + static EFFECT_ADD_DEBUFF: number; + static EFFECT_REMOVE_BUFF: number; + static EFFECT_REMOVE_DEBUFF: number; + static EFFECT_SPECIAL: number; + static EFFECT_GROW: number; + static EFFECT_LEARN_SKILL: number; + static EFFECT_COMMON_EVENT: number; + static SPECIAL_EFFECT_ESCAPE: number; + static HITTYPE_CERTAIN: number; + static HITTYPE_PHYSICAL: number; + static HITTYPE_MAGICAL: number; +} + +declare namespace haxe.display { + +} + +declare namespace haxe.display { + +} + +declare namespace rm.types { + export type Trait = { + /** + * The trait code. + */ + code: number; + /** + * The ID of the data (such as elements or states) according to the type of the trait. + */ + dataId: number; + /** + * The map tree expansion flag, which is used internally. + */ + expanded: boolean; + /** + * The x-axis scroll position, which is used internally. + */ + scrollX: number; + /** + * The y-axis scroll position, which is used internally. + */ + scrollY: number; + /** + * The value set according to the type of the trait. + */ + value: number; + } +} + +declare namespace rm.types { + /** + * The data class for state. + */ + export type State = { + /** + * The timing of automatic state removal. + * + * 0: None + * 1: At end of action + * 2: At end of turn + */ + autoRemovalTiming: number; + /** + * Chance of state being removed by damage (%). + */ + chanceByDamage: number; + description: string; + doc: string; + /** + * The icon number. + */ + iconIndex: number; + /** + * The ID. + */ + id: number; + internal: boolean; + links: string[]; + /** + * The maximum turns of the duration. + */ + maxTurns: number; + /** + * The message when an actor fell in the state. + */ + message1: string; + /** + * The message when an enemy fell in the state. + */ + message2: string; + /** + * The message when the state remains. + */ + message3: string; + /** + * The message when the state is removed. + */ + message4: number; + /** + * The minimum turns of the duration. + */ + minTurns: number; + /** + * The side-view motion. + */ + motion: number; + /** + * The name. + */ + name: string; + /** + * The side-view overlay. + */ + overlay: number; + parameters: string[]; + platforms: haxe.display.Platform[]; + /** + * The state priority (0..100). + */ + priority: number; + releaseByDamage: boolean; + /** + * Removes state at end of battle (true/false). + */ + removeAtBattleEnd: boolean; + /** + * Removes state by damage (true/false). + */ + removeByDamage: boolean; + /** + * Removes state by action restriction (true/false). + */ + removeByRestriction: boolean; + /** + * Removes state by walking (true/false). + */ + removeByWalking: boolean; + /** + * Action restrictions. + * + * 0: None + * 1: Attack enemy + * 2: Attack enemy or ally + * 3: Attack ally + * 4: Cannot act + */ + restriction: number; + /** + * Number of steps until state is removed. + */ + stepToRemove: number; + targets: haxe.display.MetadataTarget[]; + /** + * The array of Trait data. + */ + traits: rm.types.Trait[]; + } +} + +/** + * ----------------------------------------------------------------------------- + * Game_ActionResult + * + * The game object declare class for a result of a battle action. For convinience, all + * member variables in this declare class are public. + * @class Game_ActionResult + */ +declare class Game_ActionResult { + constructor(); + used: boolean; + missed: boolean; + evaded: boolean; + physical: boolean; + drain: boolean; + critical: boolean; + success: boolean; + hpAffected: boolean; + hpDamage: number; + mpDamage: number; + tpDamage: number; + addedStates: number[]; + removedStates: number[]; + addedBuffs: number[]; + addedDebuffs: number[]; + removedBuffs: number[]; + initialize(): void; + /** + * Clears the game action result. + * + * @memberof Game_ActionResult + */ + clear(): void; + /** + * Returns the added states from the action result. + * + * @returns {Array} + * @memberof Game_ActionResult + */ + addedStateObjects(): rm.types.State[]; + /** + * Returns the removes states from the result. + * + * @returns {Array} + * @memberof Game_ActionResult + */ + removedStateObjects(): rm.types.State[]; + isStatusAffected(): boolean; + /** + * Returns true if the action result is a hit. + * + * @returns {Bool} + * @memberof Game_ActionResult + */ + isHit(): boolean; + isStateAdded(stateId: number): boolean; + pushAddedState(stateId: number): void; + isStateRemoved(stateId: number): boolean; + pushRemovedState(stateId: number): void; + /** + * Returns true if the a buff is added to the specified param + * from the action result. + * @param {number} paramId + * @returns {Bool} + * @memberof Game_ActionResult + */ + isBuffAdded(paramId: number): boolean; + pushAddedBuff(paramId: number): void; + isDebuffAdded(paramId: number): boolean; + pushAddedDebuff(paramId: number): void; + isBuffRemoved(paramId: number): boolean; + pushRemovedBuff(paramId: number): void; +} + +declare namespace rm.types { + /** + * The data class for skills. + */ + export type Skill = { + /** + * The animation ID. + */ + animationId: number; + /** + * Damage (RPG.Damage). + */ + damage: rm.types.Damage; + /** + * The description text. + */ + description: string; + /** + * A list of use effects. An RPG.Effect array. + */ + effects: rm.types.Effect[]; + /** + * The type of hit. + * + * 0: Certain hit + * 1: Physical attack + * 2: Magical attack + */ + hitType: number; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + /** + * The use message. + */ + message1: string; + /** + * The use message. + */ + message2: string; + meta: Object; + /** + * Number of MP consumed. + */ + mpCost: number; + /** + * The item name. + */ + name: string; + note: string; + /** + * When the item/skill may be used. + * + * 0: Always + * 1: Only in battle + * 2: Only from the menu + * 3: Never + */ + occasion: number; + /** + * The number of repeats. + */ + repeats: number; + /** + * Weapon type required. + */ + requiredWtypeId1: number; + /** + * Weapon type required. + */ + requiredWtypeId2: number; + /** + * The scope of effects. + * + * 0: None + * 1: One Enemy + * 2: All Enemies + * 3: One Random Enemy + * 4: Two Random Enemies + * 5: Three Random Enemies + * 6: Four Random Enemies + * 7: One Ally + * 8: All Allies + * 9: One Ally (Dead) + * 10: All Allies (Dead) + * 11: The User + */ + scope: number; + /** + * The speed correction. + */ + speed: number; + /** + * Skill type ID. + */ + stypeId: number; + /** + * The success rate. + */ + successRate: number; + /** + * Number of TP consumed + */ + tpCost: number; + /** + * The number of TP gained. + */ + tpGain: number; + } +} + +declare namespace rm.types { + /** + * The data class for items. + */ + export type Item = { + /** + * The animation ID. + */ + animationId: number; + /** + * The truth value indicating whether the item disappears when used. + */ + consumable: boolean; + /** + * Damage (RPG.Damage). + */ + damage: rm.types.Damage; + /** + * The description text. + */ + description: string; + /** + * A list of use effects. An RPG.Effect array. + */ + effects: rm.types.Effect[]; + /** + * The type of hit. + * + * 0: Certain hit + * 1: Physical attack + * 2: Magical attack + */ + hitType: number; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + /** + * The item type ID. + * + * 1: Regular item + * 2: Key item + */ + itypeId: number; + meta: Object; + /** + * The item name. + */ + name: string; + note: string; + /** + * When the item/skill may be used. + * + * 0: Always + * 1: Only in battle + * 2: Only from the menu + * 3: Never + */ + occasion: number; + /** + * The item's price. + */ + price: number; + /** + * The number of repeats. + */ + repeats: number; + /** + * The scope of effects. + * + * 0: None + * 1: One Enemy + * 2: All Enemies + * 3: One Random Enemy + * 4: Two Random Enemies + * 5: Three Random Enemies + * 6: Four Random Enemies + * 7: One Ally + * 8: All Allies + * 9: One Ally (Dead) + * 10: All Allies (Dead) + * 11: The User + */ + scope: number; + /** + * The speed correction. + */ + speed: number; + /** + * The success rate. + */ + successRate: number; + /** + * The number of TP gained. + */ + tpGain: number; + } +} + +declare namespace rm.types { + /** + * A superclass of weapons and armor. + */ + export type EquipItem = { + /** + * The description text. + */ + description: string; + /** + * The type of weapon or armor. + * + * 0: Weapon + * 1: Shield + * 2: Head + * 3: Body + * 4: Accessory + */ + etypeId: number; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + meta: Object; + /** + * The item name. + */ + name: string; + note: string; + /** + * The amount of parameter change. An array of integers using the following IDs as subscripts: + * + * 0: Maximum hit points + * 1: Maximum magic points + * 2: Attack power + * 3: Defense power + * 4: Magic attack power + * 5: Magic defense power + * 6: Agility + * 7: Luck + */ + params: number[]; + /** + * The price of the weapon or armor. + */ + price: number; + /** + * The array of Trait data. + */ + traits: rm.types.Trait[]; + } +} + +/** + * ----------------------------------------------------------------------------- + * Game_BattlerBase + * + * The superdeclare class of Game_Battler. It mainly contains parameters calculation. + * @class Game_BattlerBase + */ +declare class Game_BattlerBase { + constructor(); + initialize(): void; + _hp: number; + _mp: number; + _tp: number; + _hidden: boolean; + _paramPlus: number[]; + _states: number[]; + /** + * [stateId: Int]:Int + * } + * Access using number/integer + */ + _stateTurns: { [key: string]: any }; + _buffs: number[]; + _buffTurns: number[]; + /** + * [read-only] Hit Points + */ + readonly hp: number; + /** + * [read-only] Magic Points + */ + readonly mp: number; + /** + * [read-only] Tactical Points + */ + readonly tp: number; + /** + * [read-only] Maximum Hit Points - param 0 + */ + readonly mhp: number; + /** + * [read-only] Maximum Magic Points - param 1 + */ + readonly mmp: number; + /** + * [read-only] ATtacK power - param 2 + */ + readonly atk: number; + /** + * [read-only] DEFense power - param 3 + */ + readonly def: number; + /** + * [read-only] Magic Attack power - param 4 + */ + readonly mat: number; + /** + * [read-only] Magic Defense power - param 5 + */ + readonly mdf: number; + /** + * [read-only] Agility - param 6 + */ + readonly agi: number; + /** + * [read-only] LucK - param 7 + */ + readonly luk: number; + /** + * [read-only] HIT rate -xparam 0 + */ + readonly hit: number; + /** + * [read-only] EVAsion rate + */ + readonly eva: number; + /** + * [read-only] CRItical rate + */ + readonly cri: number; + /** + * [read-only] Critical EVasion rate + */ + readonly cev: number; + /** + * [read-only] Magic EVasion rate + */ + readonly mev: number; + /** + * [read-only] Magic ReFlection rate + */ + readonly mrf: number; + /** + * [read-only] CouNTer attack rate + */ + readonly cnt: number; + /** + * [read-only] Hp ReGeneration rate + */ + readonly hrg: number; + /** + * [read-only] Mp ReGeneration rate + */ + readonly mrg: number; + /** + * [read-only] Tp ReGeneration rate + */ + readonly trg: number; + /** + * [read-only] TarGet Rate + */ + readonly tgr: number; + /** + * [read-only] Ggweqrtg*xzuaRD effect rate + */ + readonly grd: number; + /** + * [read-only] RECovery effect rate + */ + readonly rec: number; + /** + * [read-only] PHArmacology + */ + readonly pha: number; + /** + * [read-only] Mp Cost Rate + */ + readonly mcr: number; + /** + * [read-only] Tp Charge Rate + */ + readonly tcr: number; + /** + * [read-only] Physical Damage Rate + */ + readonly pdr: number; + /** + * [read-only] Magical Damage Rate + */ + readonly mdr: number; + /** + * [read-only] Floor Damage Rate + */ + readonly fdr: number; + /** + * [read-only] EXperience Rate + */ + readonly exr: number; + initMembers(): void; + /** + * Clears any modifications to + * the base parameters. + */ + clearParamPlus(): void; + /** + * Clears states applied to the actors. + */ + clearStates(): void; + /** + * Erases the current state from the game battler given the + * stateId in the editor database. + * @param {number} stateId + * @memberof Game_BattlerBase + */ + eraseState(stateId: number): void; + /** + * Returns true if the battler is affected by the specified state given + * the state id. + * @param {number} stateId + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isStateAffected(stateId: number): boolean; + isDeathStateAffected(): boolean; + /** + * Returns the death state id. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + deathStateId(): number; + /** + * Resets the state count of the specified state, given the state id. + * + * @param {number} stateId + * @memberof Game_BattlerBase + */ + resetStateCounts(stateId: number): void; + /** + * Returns true if the state, given the state id is expired. + * + * @param {number} stateId + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isStateExpired(stateId: number): boolean; + updateStateTurns(): void; + /** + * Clears buffs from the battler. + * + * @memberof Game_BattlerBase + */ + clearBuffs(): void; + eraseBuff(paramId: number): void; + /** + * Returns the length of the buff. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + buffLength(): number; + /** + * Buffs the current parameter id. + * + * @param {number} paramId + * @returns {number} + * @memberof Game_BattlerBase + */ + buff(paramId: number): number; + isBuffAffected(paramId: number): boolean; + isDebuffAffected(paramId: number): boolean; + isBuffOrDebuffAffected(paramId: number): boolean; + isMaxBuffAffected(paramId: number): boolean; + isMaxDebuffAffected(paramId: number): boolean; + increaseBuff(paramId: number): void; + decreaseBuff(paramId: number): void; + overwriteBuffTurns(paramId: number, turns: number): void; + isBuffExpired(paramId: number): boolean; + /** + * Updates the buff turns on battler. + * + * @memberof Game_BattlerBase + */ + updateBuffTurns(): void; + /** + * Kills the battler. + * + * @memberof Game_BattlerBase + */ + die(): void; + /** + * Revives the battler. + * + * @memberof Game_BattlerBase + */ + revive(): void; + /** + * Returns the states applied to the battler. + * + * @returns {Array} + * @memberof Game_BattlerBase + */ + states(): rm.types.State[]; + /** + * Returns the array of state icons attached to the battler; + * this is determined by the active states on the battler. + * @returns {Array} + * @memberof Game_BattlerBase + */ + stateIcons(): number[]; + /** + * Returns the array of buff icons attached to the battler; + * this is determined by the active buffs on the battler. + * @returns {Array} + * @memberof Game_BattlerBase + */ + buffIcons(): number[]; + buffIconIndex(buffLevel: number, paramId: number): number; + /** + * Returns all of the icons attached to the battler. + * + * @returns {Array} + * @memberof Game_BattlerBase + */ + allIcons(): number[]; + /** + * Returns the trait object to the user + * @return Array + */ + traitObjects(): any[]; + /** + * Returns all the traits of the battler. + * + * @returns {Array} + * @memberof Game_BattlerBase + */ + allTraits(): rm.types.Trait[]; + traits(code: number): rm.types.Trait[]; + traitsWithId(code: number, traitId: number): rm.types.Trait[]; + traitsPi(code: number, traitId: number): number; + traitsSum(code: number, traitId: number): number; + traitsSumAll(code: number): number; + traitsSet(code: number): number[]; + /** + * Returns the base parameters of the battler; this is determined by their + * current level and the paramId given. + * @param {number} paramId + * @returns {number} + * @memberof Game_BattlerBase + */ + paramBase(paramId: number): number; + paramPlus(paramId: number): number; + paramMin(paramId: number): number; + paramMax(paramId: number): number; + paramRate(paramId: number): number; + paramBuffRate(paramId: number): number; + /** + * Returns a standard parameter, given a paramId; + * standard parameters include: HP, MP, Atk, M.Atk, Def, M.Def, Luck, Agility. + * @param {number} paramId + * @returns {number} + * @memberof Game_BattlerBase + */ + param(paramId: number): number; + /** + * Returns the Extra parameter, given a x parameter id. + * These include + * Hit rate + * Evasion rate + * Critical rate + * Magic evasion rate + * Magic reflection rate + * Counter attack rate + * Hp regeneration rate + * Mp regeneration rate + * Tp regeneration rate + * @param xparamId + * @return Int + */ + xparam(xparamId: number): number; + sparam(sparamId: number): number; + elementRate(elementId: number): number; + debuffRate(paramId: number): number; + stateRate(stateId: number): number; + stateResistSet(): number[]; + isStateResist(stateId: number): boolean; + /** + * Returns the attack elements of the battler + * as a list of numbers. + * @returns {Array} + * @memberof Game_BattlerBase + */ + attackElements(): number[]; + /** + * Returns the attack states of the battler as a + * list of numbers. + * @returns {Array} + * @memberof Game_BattlerBase + */ + attackStates(): number[]; + attackStatesRate(stateId: number): void; + /** + * Returns the attack speed of the battler. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + attackSpeed(): number; + /** + * Returns the number of attacks available to the battler. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + attackTimesAdd(): number; + /** + * Returns an array of integers + * representing skill type ids. + * @return Array + */ + addedSkillTypes(): number[]; + isSkillTypeSealed(skilltypeId: number): boolean; + addedSkills(): number[]; + isSkillSealed(skillId: number): boolean; + isEquipWtypeOk(weaponTypeId: number): boolean; + isEquipAtypeOk(armorTypeId: number): boolean; + isEquipTypeLocked(equipmentTypeId: number): boolean; + isEquipTypeSealed(equipmentTypeId: number): boolean; + /** + * Returns the battler slot type of a trait. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + slotType(): number; + /** + * Returns true if the battler dual wields. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isDualWield(): boolean; + actionPlusSet(): number[]; + /** + * Takes a special flag + * @param flagId + * @return Bool + */ + specialFlag(flagId: number): boolean; + /** + * Returns the collapse type of the battler. + * This is represented as an Int. + * @returns {Int} + * @memberof Game_BattlerBase + */ + collapseType(): number; + partyAbility(abilityId: number): boolean; + /** + * Returns true if the battler is set to battle automatically. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isAutoBattle(): boolean; + /** + * Returns true if the battler is guarding. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isGuard(): boolean; + isSubstitute(): boolean; + /** + * Returns true if tp is preserved between battles. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isPreserveTp(): boolean; + addParam(paramId: number, value: number): void; + /** + * Sets the battler hp. + * + * @param {number} hp + * @memberof Game_BattlerBase + */ + setHp(hp: number): void; + /** + * Sets the battler mp. + * + * @param {number} mp + * @memberof Game_BattlerBase + */ + setMp(mp: number): void; + /** + * Sets the battler tp. + * + * @param {number} tp + * @memberof Game_BattlerBase + */ + setTp(tp: number): void; + /** + * Returns the maximum tp of the battler. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + maxTp(): number; + /** + * Refreshes the battler. + * + * @memberof Game_BattlerBase + */ + refresh(): void; + /** + * Recovers the battler from all states and restores the + * battler to maximum hp and mp. + * @memberof Game_BattlerBase + */ + recoverAll(): void; + /** + * Returns the percentage of the battler's hp left as a float. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + hpRate(): number; + /** + * Returns the percentage of the battler's mp left as a float. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + mpRate(): number; + /** + * Returns the percentage of the battler's tp left as a float. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + tpRate(): number; + /** + * Hides the game battler. + * + * @memberof Game_BattlerBase + */ + hide(): void; + /** + * Shows the game battler. + * + * @memberof Game_BattlerBase + */ + appear(): void; + /** + * Returns true if the game battler is hidden. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isHidden(): boolean; + /** + * Returns true if the game battler is not hidden. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isAppeared(): boolean; + /** + * Returns true if the battler is dead. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isDead(): boolean; + /** + * Returns true if the battler is alive. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isAlive(): boolean; + /** + * Returns true if the battler is dying. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isDying(): boolean; + /** + * Returns true if the game battler is restricted. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isRestricted(): boolean; + /** + * Returns true if the battler can input actions. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canInput(): boolean; + canMove(): boolean; + /** + * Returns true if the battler is confused. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isConfused(): boolean; + /** + * Returns the confusion level of the battler. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + confusionLevel(): number; + /** + * Returns true if the battler is an actor. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isActor(): boolean; + /** + * Returns true if the battler is an enemy. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isEnemy(): boolean; + /** + * Sorts the states attached to the battler. + * + * @memberof Game_BattlerBase + */ + sortStates(): void; + /** + * Returns the number of the restriction. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + restriction(): number; + /** + * Adds a new state given a state id to the battler. + * + * @param {number} stateId + * @memberof Game_BattlerBase + */ + addNewState(stateId: number): void; + /** + * Handler for when the battler is restricted. + * + * @memberof Game_BattlerBase + */ + onRestrict(): void; + mostImportantStateText(): string; + stateMotionIndex(): number; + stateOverlayIndex(): number; + /** + * Returns true if the skill is a weapon type + * oriented skill. + * @param {RPG.Skill} skill + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isSkillWtypeOk(skill: rm.types.Skill): boolean; + /** + * Returns the mp cost of the skill. + * + * @param {RPG.Skill} skill + * @returns {number} + * @memberof Game_BattlerBase + */ + skillMpCost(skill: rm.types.Skill): number; + /** + * Returns the tp cost of the skill. + * + * @param {RPG.Skill} skill + * @returns {number} + * @memberof Game_BattlerBase + */ + skillTpCost(skill: rm.types.Skill): number; + /** + * Returns true if the battler can pay the cost + * of the specified skill. + * @param {RPG.Skill} skill + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canPaySkillCost(skill: rm.types.Skill): boolean; + /** + * Pays the cost of the skill when activating the skill. + * + * @param {RPG.Skill} skill + * @memberof Game_BattlerBase + */ + paySkillCost(skill: rm.types.Skill): void; + /** + * Returns true if the item occasion is okay. + * + * @param {RPG.UsableItem} item + * @returns {Bool} + * @memberof Game_BattlerBase + */ + isOccasionOk(item: rm.types.UsableItem): boolean; + meetsUsableItemConditions(item: rm.types.UsableItem): boolean; + /** + * Returns true if the battler meets the skill conditions. + * + * @param {RPG.Skill} skill + * @returns {Bool} + * @memberof Game_BattlerBase + */ + meetsSkillConditions(skill: rm.types.Skill): boolean; + /** + * Returns true if the battler meets the item conditions. + * + * @param {RPG.Item} item + * @returns {Bool} + * @memberof Game_BattlerBase + */ + meetsItemConditions(item: rm.types.Item): boolean; + /** + * Returns true if the battler can use the item. + * + * @param {RPG.UsableItem} item + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canUse(item: rm.types.UsableItem): boolean; + /** + * Returns true if the battler can equip the item. + * + * @param {RPG.EquipItem} item + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canEquip(item: rm.types.EquipItem): boolean; + /** + * Returns true if the battler can equip a weapon. + * + * @param {RPG.EquipItem} item + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canEquipWeapon(item: rm.types.EquipItem): boolean; + /** + * Returns true if the battler can equip armor. + * + * @param {RPG.EquipItem} item + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canEquipArmor(item: rm.types.EquipItem): boolean; + /** + * Returns the attack skill id in the database. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + attackSkillid(): number; + /** + * Returns the guard skill id in the database. + * + * @returns {number} + * @memberof Game_BattlerBase + */ + guardSkillId(): number; + /** + * Returns true if the battler can attack. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canAttack(): boolean; + /** + * Returns true if the battler can guard. + * + * @returns {Bool} + * @memberof Game_BattlerBase + */ + canGuard(): boolean; + /** + * Trait element rate; default to 11. + */ + static TRAIT_ELEMENT_RATE: number; + /** + * Debuff Rate; default to 12. + */ + static TRAIT_DEBUFF_RATE: number; + /** + * Trait state rate; default to 13. + */ + static TRAIT_STATE_RATE: number; + /** + * Trait state resist; default to 14. + */ + static TRAIT_STATE_RESIST: number; + /** + * Trait param; default to 21. + */ + static TRAIT_PARAM: number; + /** + * Trait x param; default to 22. + */ + static TRAIT_XPARAM: number; + /** + * Trait s param; default to 23. + */ + static TRAIT_SPARAM: number; + /** + * Trait attack element; default to 31. + */ + static TRAIT_ATTACK_ELEMENT: number; + /** + * Trait attack state; default to 32. + */ + static TRAIT_ATTACK_STATE: number; + /** + * Trait attack speed; default to 33. + */ + static TRAIT_ATTACK_SPEED: number; + /** + * Trait attack times; default to 34. + */ + static TRAIT_ATTACK_TIMES: number; + /** + * Trait Stype(Skill type ) add; default to 41. + */ + static TRAIT_STYPE_ADD: number; + /** + * Trait Stype(Skill type) seal; default to 42. + */ + static TRAIT_STYPE_SEAL: number; + /** + * Trait Skill add; default to 43. + */ + static TRAIT_SKILL_ADD: number; + /** + * Trait skill seal; default to 44. + */ + static TRAIT_SKILL_SEAL: number; + /** + * Trait WType(equip weapon type); default to 51. + */ + static TRAIT_EQUIP_WTYPE: number; + /** + * Trait AType(Equip armor type); default to 52. + */ + static TRAIT_EQUIP_ATYPE: number; + /** + * Trait equipment lock; default to 53. + */ + static TRAIT_EQUIP_LOCK: number; + /** + * Trait equipment seal; default to 54. + */ + static TRAIT_EQUIP_SEAL: number; + /** + * Trait slot type;default to 55. + */ + static TRAIT_SLOT_TYPE: number; + /** + * Trait action plus; default to 61. + */ + static TRAIT_ACTION_PLUS: number; + /** + * Trait special flag; default to 62. + */ + static TRAIT_SPECIAL_FLAG: number; + /** + * Trait collapse type; default to 63. + */ + static TRAIT_COLLAPSE_TYPE: number; + /** + * Trait party ability; default to 64. + */ + static TRAIT_PARTY_ABILITY: number; + /** + * Flag ID auto battle; default to 0; + */ + static FLAG_ID_AUTO_BATTLE: number; + /** + * Flag ID guard; default to 1. + */ + static FLAG_ID_GUARD: number; + /** + * Flag Id substitude; default to 2. + */ + static FLAG_ID_SUBSTITUTE: number; + /** + * Flag id preserve type; default to 3. + */ + static FLAG_ID_PRESERVE_TP: number; + /** + * Icon buff start, default to 32. + */ + static ICON_BUFF_START: number; + /** + * Icon debuff start; default to 48. + */ + static ICON_DEBUFF_START: number; +} + +declare namespace rm.types { + export type BattlerAnimation = { + animationId: number; + delay: number; + mirror: boolean; + } +} + +declare namespace rm.types { + export const enum MotionType { + WALK = "walk", + WAIT = "wait", + CHANT = "chant", + GUARD = "guard", + DAMAGE = "damage", + EVADE = "evade", + THRUST = "thrust", + MISSLE = "missle", + SKILL = "SKILL", + SPELL = "spell", + ITEM = "item", + ESCAPE = "escape", + VICTORY = "victory", + DYING = "dying", + ABNORMAL = "abnormal", + SLEEP = "sleep", + DEAD = "dead", + } +} + +declare namespace rm.types { + export const enum WeaponImageId { + base = -1, + } +} + +declare namespace rm.types { + export const enum AnimationId { + base = -1, + } +} + +declare namespace rm.types { + export const enum ActionState { + base = "", + } +} + +declare class Game_Battler extends Game_BattlerBase { + protected constructor(); + _actions: Game_Action[]; + _speed: number; + _result: Game_ActionResult; + _actionState: string; + _lastTargetIndex: number; + _animations: rm.types.BattlerAnimation[]; + _damagePopup: boolean; + _effectType: string; + _motionType: rm.types.MotionType; + _weaponImageId: number; + _motionRefresh: boolean; + _selected: boolean; + /** + * Returns the name of the battler. + * + * @returns {String} + * @memberof Game_Battler + */ + name(): string; + /** + * Returns the battler name of the battler; + * the battler name is associated with the file used as the battler graphic. + * @returns {String} + * @memberof Game_Battler + */ + battlerName(): string; + /** + * Returns the index of the battler. + * + * @returns {number} + * @memberof Game_Battler + */ + index(): number; + /** + * Returns the unit of the battler; this is either the + * game party or game troop. + * @returns {Game_Unit} + * @memberof Game_Battler + */ + friendsUnit(): Game_Unit; + /** + * Returns the opponents unit; this is either + * game party or game troop. + * @returns {Game_Unit} + * @memberof Game_Battler + */ + opponentsUnit(): Game_Unit; + /** + * Clears animations from the battler. + * + * @memberof Game_Battler + */ + clearAnimations(): void; + /** + * Clear damage pop up from the battler. + * + * @memberof Game_Battler + */ + clearDamagePopup(): void; + /** + * Clear weapon animation from the battler. + * + * @memberof Game_Battler + */ + clearWeaponAnimation(): void; + /** + * Clears effect from the battler. + * + * @memberof Game_Battler + */ + clearEffect(): void; + /** + * Clears motion from the battler. + * + * @memberof Game_Battler + */ + clearMotion(): void; + requestEffect(effectType: string): void; + /** + * Request the specified motion on the game battler. + * + * @param {String} motionType + * @memberof Game_Battler + */ + requestMotion(motionType: string): void; + requestMotionRefresh(): void; + select(): void; + deselect(): void; + isAnimationRequested(): boolean; + isDamagePopupRequested(): boolean; + isEffectRequested(): boolean; + /** + * Returns true if a motion is requested. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isMotionRequested(): boolean; + /** + * Returns true if a weapon animation is requested. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isWeaponAnimationRequested(): boolean; + isMotionRefreshRequested(): boolean; + isSelected(): boolean; + /** + * Returns the effect type of the battler. + * + * @returns {String} + * @memberof Game_Battler + */ + effectType(): string; + /** + * Returns the motion type of the battler. + * + * @returns {String} + * @memberof Game_Battler + */ + motionType(): string; + /** + * Returns the weapon image id. + * + * @returns {number} + * @memberof Game_Battler + */ + weaponImageId(): rm.types.WeaponImageId; + /** + * Shifts the battler animation. + * + * @returns {BattlerAnimation} + * @memberof Game_Battler + */ + shiftAnimation(): rm.types.BattlerAnimation; + /** + * Starts the specified animation, given the animation id on the + * battler. + * @param {number} animationId + * @param {Bool} mirror + * @param {number} delay + * @memberof Game_Battler + */ + startAnimation(animationId: rm.types.AnimationId, mirror: boolean, delay: number): void; + /** + * Starts a damage pop up on the battler. + * + * @memberof Game_Battler + */ + startDamagePopup(): void; + /** + * Starts the weapon animation on te battler given a weapon id. + * + * @param {number} weaponImageId + * @memberof Game_Battler + */ + startWeaponAnimation(weaponImageId: rm.types.WeaponImageId): void; + action(index: number): Game_Action; + /** + * Sets the action at the specified index for the battler. + * + * @param {number} index + * @param {Game_Action} action + * @memberof Game_Battler + */ + setAction(index: number, action: Game_Action): void; + /** + * Returns the number of battler actions. + * + * @returns {number} + * @memberof Game_Battler + */ + numActions(): number; + /** + * Clears the battler actions. + * + * @memberof Game_Battler + */ + clearActions(): void; + /** + * Returns the battler action result. + * + * @returns {Game_ActionResult} + * @memberof Game_Battler + */ + result(): Game_ActionResult; + /** + * Clears the battler action result. + * + * @memberof Game_Battler + */ + clearResult(): void; + /** + * Refreshes the battler. + * + * @memberof Game_Battler + */ + refresh(): void; + /** + * Adds a state to the battler given the specified + * state id. + * @param {number} stateId + * @memberof Game_Battler + */ + addState(stateId: number): void; + /** + * Returns true if the specified state given the state id + * is addable. + * @param {number} stateId + * @returns {Bool} + * @memberof Game_Battler + */ + isStateAddable(stateId: number): boolean; + /** + * Returns true if the specified state given the state id + * restricts. + * + * @param {number} stateId + * @returns {Bool} + * @memberof Game_Battler + */ + isStateRestrict(stateId: number): boolean; + /** + * Handler for when theb attler is restricted. + * + * @memberof Game_Battler + */ + onRestrict(): void; + /** + * Removes the specified state given the state id. + * + * @param {number} stateId + * @memberof Game_Battler + */ + removeState(stateId: number): void; + /** + * Has the battler escape from battle; plays a sound on escaping. + * + * @memberof Game_Battler + */ + escape(): void; + /** + * Adds a buff to the battler for the specified number of turns + * on the selected parameter. + * @param {number} paramId + * @param {number} turns + * @memberof Game_Battler + */ + addBuff(paramId: number, turns: number): void; + /** + * Adds a debuff to the battler for the specified number of turns + * on the selected parameter. + * @param {number} paramId + * @param {number} turns + * @memberof Game_Battler + */ + addDebuff(paramId: number, turns: number): void; + removeBuff(paramId: number): void; + removeBattleStates(): void; + /** + * Removes all buffs from the battler. + * + * @memberof Game_Battler + */ + removeAllBuffs(): void; + removeStatesAuto(timing: number): void; + removeBuffsAuto(): void; + removeStatesByDamage(): void; + /** + * Creates the number of times for + * an action. + * @returns {number} + * @memberof Game_Battler + */ + makeActionTimes(): number; + /** + * Creates the actions for the battler. + * + * @memberof Game_Battler + */ + makeActions(): void; + /** + * Returns the speed of the battler. + * + * @returns {number} + * @memberof Game_Battler + */ + speed(): number; + /** + * Calculates the speed of the battler. + * + * @memberof Game_Battler + */ + makeSpeed(): void; + /** + * Returns the current action of the battler. + * + * @returns {Game_Action} + * @memberof Game_Battler + */ + currentAction(): Game_Action; + /** + * Removes the current battler action. + * + * @memberof Game_Battler + */ + removeCurrentAction(): void; + /** + * Sets the last target based on the target passed in. + * @param target + */ + setLastTarget(target: Game_Battler): void; + forceAction(skillId: number, targetIndex: number): void; + /** + * Has theb attler use the given item. + * + * @param {RPG.UsableItem} item + * @memberof Game_Battler + */ + useItem(item: rm.types.UsableItem): void; + /** + * Has the battler consume the given item. + * + * @param {RPG.UsableItem} item + * @memberof Game_Battler + */ + consumeItem(item: rm.types.UsableItem): void; + /** + * Adds the specified amount of hp to the battler. + * + * @param {number} value + * @memberof Game_Battler + */ + gainHp(value: number): void; + /** + * Adds the specified amount of mp to the battler. + * + * @param {number} value + * @memberof Game_Battler + */ + gainMp(value: number): void; + /** + * Adds the specified amount of tp to the battler. + * + * @param {number} value + * @memberof Game_Battler + */ + gainTp(value: number): void; + /** + * Adds a specified amount of tp to the battler silently. + * + * @param {number} value + * @memberof Game_Battler + */ + gainSilentTp(value: number): void; + /** + * Initializes the battler's tp; tp is random. + * + * @memberof Game_Battler + */ + initTp(): void; + /** + * Clears the battler's tp. + * + * @memberof Game_Battler + */ + clearTp(): void; + chargeTpByDamage(damageRate: number): void; + /** + * Has the battler regenerate hp based on their hp regen. + * + * @memberof Game_Battler + */ + regenerateHp(): void; + maxSlipDamage(): number; + /** + * Has the battler regenerate mp based on their mp regen. + * + * @memberof Game_Battler + */ + regenerateMp(): void; + /** + * Has the battler regenerate tp based on their tp regen. + * + * @memberof Game_Battler + */ + regenerateTp(): void; + /** + * Has the battler regenerate all resources based on + * their respective regeneration stats. + * @memberof Game_Battler + */ + regenerateAll(): void; + /** + * Handler for when battle has started. + * + * @memberof Game_Battler + */ + onBattleStart(): void; + /** + * Handler for when all actions end + */ + onAllActionsEnd(): void; + /** + * Handler for when turn ends + */ + onTurnEnd(): void; + /** + * Handler for when battle ends + */ + onBattleEnd(): void; + /** + * Handler for when damage is done + * @param value + */ + onDamage(value: number): void; + /** + * Sets the action state + * @param actionState + */ + setActionState(actionState: rm.types.ActionState): void; + isUndecided(): boolean; + /** + * Returns true if the battler is inputting commands in battle. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isInputting(): boolean; + /** + * Returns true if the battler is waiting in battle. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isWaiting(): boolean; + /** + * Returns true if the battler is performing an action in battle. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isActing(): boolean; + /** + * Returns true if the battler is chanting in combat. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isChanting(): boolean; + /** + * Returns true if the battler is waiting to guard. + * + * @returns {Bool} + * @memberof Game_Battler + */ + isGuardWaiting(): boolean; + /** + * Perform action start motion, given the specified game action. + * + * @param {Game_Action} action + * @memberof Game_Battler + */ + performActionStart(action: Game_Action): void; + /** + * Perform given action motion. + * + * @param {Game_Action} action + * @memberof Game_Battler + */ + performAction(action: Game_Action): void; + /** + * Perform action end motion. + * + * @memberof Game_Battler + */ + performActionEnd(): void; + /** + * Perform damage motion. + * + * @memberof Game_Battler + */ + performDamage(): void; + /** + * Perform miss motion. + * + * @memberof Game_Battler + */ + performMiss(): void; + /** + * Perform recovery motion. + * + * @memberof Game_Battler + */ + performRecovery(): void; + /** + * Perform evasion motion. + * + * @memberof Game_Battler + */ + performEvasion(): void; + /** + * Perform magic evasion motion. + * + * @memberof Game_Battler + */ + performMagicEvasion(): void; + /** + * Perform counter motion. + * + * @memberof Game_Battler + */ + performCounter(): void; + /** + * Performs the reflect motion. + * + * @memberof Game_Battler + */ + performReflection(): void; + /** + * Perform substitute motion with the specified game battler. + * + * @param {Game_Battler} target + * @memberof Game_Battler + */ + performSubstitute(target: Game_Battler): void; + /** + * Performs the collapse motion. + * + * @memberof Game_Battler + */ + performCollapse(): void; +} + +declare namespace rm.types { + /** + * The data class for actors. + */ + export type Actor = { + /** + * The file name of the actor's battler graphic. + */ + battlerName: string; + /** + * The index (0..7) of the actor's walking graphic. + */ + characterIndex: number; + /** + * The file name of the actor's walking graphic. + */ + characterName: string; + /** + * The actor's class ID. + */ + classId: number; + doc: string; + /** + * The actor's initial equipment. An array of weapon IDs or armor IDs with the following subscripts: + */ + equips: number[]; + /** + * The index (0..7) of the actor's face graphic. + */ + faceIndex: number; + /** + * The file name of the actor's face graphic. + */ + faceName: string; + /** + * The ID. + */ + id: string; + /** + * The actor's initial level. + */ + initialLevel: number; + internal: boolean; + links: string[]; + /** + * The actor's max level + */ + maxLevel: number; + /** + * The name. + */ + name: string; + /** + * The actor's nickname. + */ + nickname: string; + parameters: string[]; + platforms: haxe.display.Platform[]; + /** + * The profile. + */ + profile: string; + targets: haxe.display.MetadataTarget[]; + /** + * The array of Trait data. + */ + traits: rm.types.Trait[]; + } +} + +declare namespace rm.types { + /** + * The data class for weapons. + */ + export type Weapon = { + /** + * The animation ID when using the weapon. + */ + animationId: number; + /** + * The description text. + */ + description: string; + /** + * The type of weapon or armor. + * + * 0: Weapon + * 1: Shield + * 2: Head + * 3: Body + * 4: Accessory + */ + etypeId: number; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + meta: Object; + /** + * The item name. + */ + name: string; + note: string; + /** + * The amount of parameter change. An array of integers using the following IDs as subscripts: + * + * 0: Maximum hit points + * 1: Maximum magic points + * 2: Attack power + * 3: Defense power + * 4: Magic attack power + * 5: Magic defense power + * 6: Agility + * 7: Luck + */ + params: number[]; + /** + * The price of the weapon or armor. + */ + price: number; + /** + * The array of Trait data. + */ + traits: rm.types.Trait[]; + /** + * The weapon type ID. + */ + wtypeId: number; + } +} + +declare namespace rm.types { + /** + * The data class for armor. + */ + export type Armor = { + /** + * The armor type ID. + */ + atypeId: number; + /** + * The description text. + */ + description: string; + /** + * The type of weapon or armor. + * + * 0: Weapon + * 1: Shield + * 2: Head + * 3: Body + * 4: Accessory + */ + etypeId: number; + /** + * The icon number. + */ + iconIndex: number; + /** + * The item ID. + */ + id: number; + meta: Object; + /** + * The item name. + */ + name: string; + note: string; + /** + * The amount of parameter change. An array of integers using the following IDs as subscripts: + * + * 0: Maximum hit points + * 1: Maximum magic points + * 2: Attack power + * 3: Defense power + * 4: Magic attack power + * 5: Magic defense power + * 6: Agility + * 7: Luck + */ + params: number[]; + /** + * The price of the weapon or armor. + */ + price: number; + /** + * The array of Trait data. + */ + traits: rm.types.Trait[]; + } +} + +declare namespace rm.types { + /** + * The data class for a class's [Skills to Learn]. + */ + export type ClassLearning = { + doc: string; + internal: boolean; + /** + * The data class for a class's [Skills to Learn]. + */ + level: number; + links: string[]; + name: string; + parameters: string[]; + platforms: haxe.display.Platform[]; + /** + * The ID of the skill to learn. + */ + skillId: number; + targets: haxe.display.MetadataTarget[]; + } +} + +declare namespace rm.types { + /** + * The data class for class. + */ + export type RPGClass = { + doc: string; + /** + * An array of values that decides the experience curve. The subscripts are as follows: + * + * 0: Base value + * 1: Extra value + * 2: Acceleration A + * 3: Acceleration B + */ + expParams: number[]; + /** + * The ID. + */ + id: number; + internal: boolean; + /** + * The skills to learn. An array of RPG.Class.Learning. + */ + learnings: rm.types.ClassLearning[]; + links: string[]; + /** + * The name. + */ + name: string; + parameters: string[]; + /** + * The parameter development curve. A 2-dimensional array containing ordinary parameters according to level (Table). + * + * The format is params[param_id, level], and param_id is assigned as follows: + * + * 0: Maximum hit points + * 1: Maximum magic points + * 2: Attack power + * 3: Defense power + * 4: Magic attack power + * 5: Magic defense power + * 6: Agility + * 7: Luck + */ + params: number[][]; + platforms: haxe.display.Platform[]; + targets: haxe.display.MetadataTarget[]; + /** + * The array of Trait data. + */ + traits: rm.types.Trait[]; + } +} + +declare class Game_Actor extends Game_Battler { + constructor(actorId: number); + _actorId: number; + _name: string; + _nickname: string; + _profile: string; + _classId: number; + _level: number; + _characterName: string; + _characterIndex: number; + _faceName: string; + _faceIndex: number; + _battlerName: string; + _exp: Object; + /** + * Skill Ids + */ + _skills: number[]; + _equips: Game_Item[]; + _actionInputIndex: number; + _lastMenuSkill: Game_Item; + _lastBattleSkill: Game_Item; + _lastCommandSymbol: string; + _stateSteps: Object; + /** + * [read-only] + */ + level: number; + setup(actorId: number): void; + /** + * Returns the id of the actor. + * + * @returns {Int} + * @memberof Game_Actor + */ + actorId(): number; + /** + * Returns the database information of the actor. + * + * @returns {Actor} + * @memberof Game_Actor + */ + actor(): rm.types.Actor; + /** + * Returns the actor's name. + * @return String + */ + name(): string; + /** + * Sets the actor name. + * + * @param {String} name + * @memberof Game_Actor + */ + setName(name: string): void; + /** + * Returns the nickname of the actor. + * + * @returns {String} + * @memberof Game_Actor + */ + nickname(): string; + /** + * Sets the nickname of the actor. + * + * @param {String} nickname + * @memberof Game_Actor + */ + setNickname(nickname: string): void; + /** + * Returns the actor profile. + * + * @returns {String} + * @memberof Game_Actor + */ + profile(): string; + /** + * Sets the actor profile. + * + * @param {String} profile + * @memberof Game_Actor + */ + setProfile(profile: string): void; + /** + * Returns the face name of the actor; this is + * the image of faces for the actor. + * @returns {String} + * @memberof Game_Actor + */ + faceName(): string; + /** + * Returns the face index of the actor. + * + * @returns {Int} + * @memberof Game_Actor + */ + faceIndex(): number; + /** + * Clears all states from the actor. + * + * @memberof Game_Actor + */ + clearStates(): void; + /** + * Erase the specified state from the actor. + * + * @param {Int} stateId + * @memberof Game_Actor + */ + eraseState(stateId: number): void; + /** + * Reset state count of the specified state. + * + * @param {Int} stateId + * @memberof Game_Actor + */ + resetStateCounts(stateId: number): void; + /** + * Initialize images of the actor. + * + * @memberof Game_Actor + */ + initImages(): void; + /** + * Returns the exp required to level. + * + * @param {Int} level + * @returns {Int} + * @memberof Game_Actor + */ + expForLevel(level: number): number; + /** + * Initialize exp of the actor. + * + * @memberof Game_Actor + */ + initExp(): void; + /** + * Returns the current experience points of the actor. + * + * @returns {Int} + * @memberof Game_Actor + */ + currentExp(): number; + /** + * Returns the current level's experience for the actor. + * + * @returns {Int} + * @memberof Game_Actor + */ + currentLevelExp(): number; + /** + * Returns the experience points for the next level of the actor. + * + * @returns {Int} + * @memberof Game_Actor + */ + nextLevelExp(): number; + /** + * Returns the next required experience points for the actor to level up. + * + * @returns {Int} + * @memberof Game_Actor + */ + nextRequiredExp(): number; + /** + * Returns the maximum level of the actor. + * + * @memberof Game_Actor + */ + maxLevel(): void; + /** + * Returns true if the actor is max level. + * + * @returns {Bool} + * @memberof Game_Actor + */ + isMaxLevel(): boolean; + /** + * Initialize actor skills. + * + * @memberof Game_Actor + */ + initSkills(): void; + /** + * Initialize actor equipment in the given slots. + * + * @param {Array} equips + * @memberof Game_Actor + */ + initEquips(equips: number[]): void; + /** + * Returns the equip slots of the actor. + * + * @returns {Array} + * @memberof Game_Actor + */ + equipSlots(): number[]; + /** + * Returns the equipment of the actor. + * + * @returns {Array} + * @memberof Game_Actor + */ + equips(): rm.types.EquipItem[]; + /** + * Returns the weapon of the actor. + * + * @returns {Array} + * @memberof Game_Actor + */ + weapons(): rm.types.Weapon[]; + /** + * Returns the armor of the actor. + * + * @returns {Array} + * @memberof Game_Actor + */ + armors(): rm.types.Armor[]; + /** + * Returns true if the actor has a weapon. + * + * @param {Weapon} weapon + * @returns {Bool} + * @memberof Game_Actor + */ + hasWeapon(weapon: rm.types.Weapon): boolean; + /** + * Returns true if the actor has armor. + * + * @param {Armor} armor + * @returns {Bool} + * @memberof Game_Actor + */ + hasArmor(armor: rm.types.Armor): boolean; + /** + * Returns true if the equip change is okay in the given slot. + * + * @param {Int} slotId + * @returns {Bool} + * @memberof Game_Actor + */ + isEquipChangeOk(slotId: number): boolean; + /** + * Changes the actor equipment in the given slot with the + * given equip item. Places the original item into the party + * inventory. + * @param {Int} slotId + * @param {EquipItem} item + * @memberof Game_Actor + */ + changeEquip(slotId: number, item: rm.types.EquipItem): void; + /** + * Forces the actor to change equipment in the given slot + * with the given equip item without placing the item back into + * the party inventory. + * @param {Int} slotId + * @param {EquipItem} item + * @memberof Game_Actor + */ + forceChangeEquip(slotId: number, item: rm.types.EquipItem): void; + /** + * Trades the new item with the old item in the party inventory. + * + * @param {EquipItem} newItem + * @param {EquipItem} oldItem + * @returns {Bool} + * @memberof Game_Actor + */ + tradeItemWithParty(newItem: rm.types.EquipItem, oldItem: rm.types.EquipItem): boolean; + /** + * Changes the actor equip with an item based on the equip id. + * + * @param {Int} etypeId + * @param {Int} itemId + * @memberof Game_Actor + */ + changeEquipById(etypeId: number, itemId: number): void; + /** + * Returns true if the actor is equipped with the specific item. + * + * @param {EquipItem} item + * @returns {Bool} + * @memberof Game_Actor + */ + isEquipped(item: rm.types.EquipItem): boolean; + /** + * Discards the given equip item from the actor; item + * is not return to the party inventory. + * @param {EquipItem} item + * @memberof Game_Actor + */ + discardEquip(item: rm.types.EquipItem): void; + /** + * Returns items the actor can't normally equip to the party inventory. + * + * @param {Bool} forcing + * @memberof Game_Actor + */ + releaseUnequippableItems(forcing: boolean): void; + /** + * Clears the actor's equipment; items are returned to the inventory. + * + * @memberof Game_Actor + */ + clearEquipments(): void; + /** + * Optimize the actor's equipment. + * + * @memberof Game_Actor + */ + optimizeEquipments(): void; + /** + * Equips the best item in the given slot. + * + * @param {Int} slotId + * @memberof Game_Actor + */ + bestEquipItem(slotId: number): void; + /** + * Calculates the equip item performance and returns the sum/difference. + * + * @param {EquipItem} item + * @returns {Int} + * @memberof Game_Actor + */ + calcEquipItemPerformance(item: rm.types.EquipItem): number; + isSkillWtypeOk(skill: rm.types.Skill): boolean; + isWtypeEquipped(wtypeId: number): boolean; + /** + * Refreshes the actor. + * + * @memberof Game_Actor + */ + refresh(): void; + friendsUnit(): Game_Party; + opponentsUnit(): Game_Temp; + /** + * Returns true if the actor is a member in battle. + * + * @returns {Bool} + * @memberof Game_Actor + */ + isBattleMember(): boolean; + isFormationChangeOk(): boolean; + /** + * Returns the current class of the actor from the database. + * + * @returns {Class} + * @memberof Game_Actor + */ + currentClass(): rm.types.RPGClass; + /** + * Returns true if the actor is the specified class from the database. + * + * @param {Class} gameClass + * @returns {Bool} + * @memberof Game_Actor + */ + isClass(gameClass: rm.types.RPGClass): boolean; + /** + * Returns the actor's skills; even if the skills are not usable. + * + * @returns {Array} + * @memberof Game_Actor + */ + skills(): rm.types.Skill[]; + /** + * Returns the usable skills of the actor. + * + * @returns {Array} + * @memberof Game_Actor + */ + usableSkills(): rm.types.Skill[]; + /** + * Returns the attack element ids. + * + * @returns {Array} + * @memberof Game_Actor + */ + attackElements(): number[]; + /** + * Returns true if the actor has no weapon. + * + * @returns {Bool} + * @memberof Game_Actor + */ + hasNoWeapons(): boolean; + /** + * Returns the element id of barehanded attacks. + * By default this is 1. + * + * @returns {Int} + * @memberof Game_Actor + */ + bareHandsElementId(): number; + /** + * Returns the base value of the parameter. + * @param paramId + * @return Int + */ + paramBase(paramId: number): number; + /** + * Returns the first attack animation id. + * + * @returns {Int} + * @memberof Game_Actor + */ + attackAnimationId1(): number; + /** + * Returns the second attack animation id. + * + * @returns {Int} + * @memberof Game_Actor + */ + attackAnimationId2(): number; + /** + * Returns the animation id for a barehanded attack. + * + * @returns {Int} + * @memberof Game_Actor + */ + bareHandsAnimationId(): number; + /** + * Change the actor experience points; leveling up the actor + * if it's above the required exp for the current level. + * If show is set to true, actor level up with be displayed. + * @param {Int} exp + * @param {Bool} show + * @memberof Game_Actor + */ + changeExp(exp: number, show: boolean): void; + /** + * Level up the actor. + * + * @memberof Game_Actor + */ + levelUp(): void; + /** + * Level down the actor. + * + * @memberof Game_Actor + */ + levelDown(): void; + findNewSkills(lastSkills: rm.types.Skill[]): rm.types.Skill[]; + /** + * Displays the actor level up in a message window, with the learned skills. + * + * @param {Array} newSkills + * @memberof Game_Actor + */ + displayLevelUp(newSkills: rm.types.Skill[]): void; + /** + * Gives the specified exp to the actor. + * + * @param {Int} exp + * @memberof Game_Actor + */ + gainExp(exp: number): void; + /** + * Returns the final exp rate of the actor based on if the actor + * is a reserved party member or an active battle member. + * @returns {Int} + * @memberof Game_Actor + */ + finalExpRate(): number; + /** + * Returns the exp rate of actors not in battle; this is set in the database. + * + * @returns {Int} + * @memberof Game_Actor + */ + benchMembersExpRate(): number; + /** + * Returns true if the actor should display level up in a message window. + * + * @returns {Bool} + * @memberof Game_Actor + */ + shouldDisplayLevelUp(): boolean; + /** + * Changes the actor level; if show is set to true, + * the actor level will be displayed. + * @param {Int} level + * @param {Bool} show + * @memberof Game_Actor + */ + changeLevel(level: number, show: boolean): void; + /** + * Actor learns the specified skill given the skill id. + * + * @param {Int} skillId + * @memberof Game_Actor + */ + learnSkill(skillId: number): void; + /** + * Actor forgets the specified skill given the skill id from + * the actor's usable skills. + * @param {Int} skillId + * @memberof Game_Actor + */ + forgetSkill(skillId: number): void; + /** + * Returns true if the actor has learned the specified + * skill given the specified skill id. + * @param {Int} skillId + * @returns {Bool} + * @memberof Game_Actor + */ + isLearnedSkill(skillId: number): boolean; + /** + * Changes the actor class; if keep is true, the actor + * will retain their experience points. + * @param {Int} classId + * @param {Bool} keepExp + * @memberof Game_Actor + */ + changeClass(classId: number, keepExp: boolean): void; + setCharacterImage(characterName: string, characterIndex: number): void; + /** + * Sets the face image of the actor given the face image (from database) + * and face index within the iamge. + * + * @param {String} faceName + * @param {Int} faceIndex + * @memberof Game_Actor + */ + setFaceImage(faceName: string, faceIndex: number): void; + /** + * Sets the battler image of the actor; this is the sprite displayed + * in the side view mode. + * @param {String} battlerName + * @memberof Game_Actor + */ + setBattlerImage(battlerName: string): void; + /** + * Returns true if the actor sprite is visible. + * + * @returns {Bool} + * @memberof Game_Actor + */ + isSpriteVisible(): boolean; + /** + * Starts the animation on the actor given the specified animation id; + * if mirror is set to true, the animation will be mirrored. If a delay is enter, + * the animation will be delayed. + * @param {Int} animationId + * @param {Bool} mirror + * @param {Int} delay + * @memberof Game_Actor + */ + startAnimation(animationId: number, mirror: boolean, delay: number): void; + /** + * Performs the attack motion for the actor. + * + * @memberof Game_Actor + */ + performAttack(): void; + /** + * Perform the victory motion for the actor. + * + * @memberof Game_Actor + */ + performVictory(): void; + /** + * Performs the escape motion for the actor. + * + * @memberof Game_Actor + */ + performEscape(): void; + /** + * Creates the action list for the actor. + * + * @returns {Array} + * @memberof Game_Actor + */ + makeActionList(): Game_Action[]; + /** + * Creates the auto battle actions for the game actor. + * + * @memberof Game_Actor + */ + makeAutoBattleActions(): void; + makeConfusionActions(): void; + /** + * Handler for when the player walks on the map scene. + * + * @memberof Game_Actor + */ + onPlayerWalk(): void; + updateStateSteps(state: rm.types.State): void; + /** + * Shows the added states to the actor. + * + * @memberof Game_Actor + */ + showAddedStates(): void; + /** + * Shows the removed states from the actor. + * + * @memberof Game_Actor + */ + showRemovedStates(): void; + stepsForTurn(): number; + turnEndOnMap(): void; + /** + * Checks the effect of the floor on the actor. + * + * @memberof Game_Actor + */ + checkFloorEffect(): void; + /** + * Executes the floor dmaage on the actor. + * + * @memberof Game_Actor + */ + executeFloorDamage(): void; + /** + * Returns the basic floor damage. + * + * @returns {Int} + * @memberof Game_Actor + */ + basicFloorDamage(): number; + /** + * Returns the max floor damage. + * + * @returns {Int} + * @memberof Game_Actor + */ + maxFloorDamage(): number; + /** + * Perform damage to the actor on the map scene. + * + * @memberof Game_Actor + */ + performMapDamage(): void; + /** + * Clears all of the actor's animations. + * + * @memberof Game_Actor + */ + clearActions(): void; + /** + * Returns action the actor is inputting. + * + * @returns {Game_Action} + * @memberof Game_Actor + */ + inputtingAction(): Game_Action; + selectNextCommand(): boolean; + selectPreviousCommand(): boolean; + /** + * Returns the last menu skill of the actor. + * + * @returns {Skill} + * @memberof Game_Actor + */ + lastMenuSkill(): rm.types.Skill; + setLastMenuSkill(skill: rm.types.Skill): void; + /** + * Returns the last battle skill of the actor. + * + * @returns {Skill} + * @memberof Game_Actor + */ + lastBattleSkill(): rm.types.Skill; + setLastBattleSkill(skill: rm.types.Skill): void; + /** + * Returns the last command symbol that the actor used. + * + * @returns {String} + * @memberof Game_Actor + */ + lastCommandSymbol(): string; + /** + * Sets the last command symbol to the given symbol; this is the + * selected command in the battle menu. + * @param {String} symbol + * @memberof Game_Actor + */ + setLastCommandSymbol(symbol: string): void; + /** + * Returns true if the item effect has a special effect from game action. + * @param item + * @return Bool + */ + testEscape(item: rm.types.BaseItem): boolean; +} + +declare class Game_Actors { + constructor(); + /** + * List of all Game_Actor in the database. + */ + _data: Game_Actor[]; + initialize(): void; + /** + * Returns the actor with the specified id. + * + * @param {number} actorId + * @returns {Game_Actor} + * @memberof Game_Actors + */ + actor(actorId: number): Game_Actor; +} + +declare namespace rm.types { + export const enum MoveSpeed { + X8SLOWER = 1, + X4SLOWER = 2, + X2SLOWER = 3, + NORMAL = 4, + X2FASTER = 5, + X4FASTER = 6, + } +} + +declare namespace rm.types { + export const enum MoveFrequency { + LOWEST = 1, + LOWER = 2, + NORMAL = 3, + HIGHER = 4, + HIGHEST = 5, + } +} + +declare namespace rm.types { + export const enum Direction { + base = -1, + } +} + +declare namespace rm.types { + +} + +declare namespace rm.types { + export const enum CharacterPriority { + BELOW_CHARACTERS = 0, + SAME_AS_CHARACTERS = 1, + ABOVE_CHARACTERS = 2, + } +} + +declare namespace rm.types { + export const enum BalloonId { + EXCLAMATION = 0, + QUESTION = 1, + MUSIC_NOTE = 2, + HEART = 3, + ANGER = 4, + SWEAT = 5, + COBWEB = 6, + SILENCE = 7, + LIGHT_BULB = 8, + ZZZ = 9, + } +} + +/** + * The super class of Game Character. It handles basic + * information such as coordinates, images, and more + * shared by all characters. + */ +declare class Game_CharacterBase { + constructor(); + _x: number; + _y: number; + _realX: number; + _realY: number; + _moveSpeed: rm.types.MoveSpeed; + _moveFrequency: rm.types.MoveFrequency; + _opacity: number; + _blendMode: number; + _direction: rm.types.Direction; + _pattern: rm.types.CharacterPattern; + _priorityType: rm.types.CharacterPriority; + _tileId: number; + _characterName: string; + _characterIndex: number; + _isObjectCharacter: boolean; + _walkAnime: boolean; + _stepAnime: boolean; + _directionFix: boolean; + _through: boolean; + _transparent: boolean; + _bushDepth: number; + _animationId: rm.types.AnimationId; + _ballonId: rm.types.BalloonId; + _animationPlaying: boolean; + _balloonPlaying: boolean; + _animationCount: number; + _stopCount: number; + _jumpCount: number; + _jumpPeak: number; + _movementSuccess: boolean; + initialize(): void; + /** + * [read-only] + */ + x: number; + /** + * [read-only] + */ + y: number; + initMembers(): void; + pos(x: number, y: number): boolean; + posNt(x: number, y: number): boolean; + /** + * Returns the move speed of the game character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + moveSpeed(): number; + setMoveSpeed(moveSpeed: number): void; + /** + * Returns the move frequency of the character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + moveFrequency(): number; + setMoveFrequency(moveFrequency: number): void; + opacity(): number; + setOpacity(opacity: number): void; + /** + * Returns the blend mode of the character; + * these are represented by Ints. + * @returns {Int} + * @memberof Game_CharacterBase + */ + blendMode(): number; + /** + * Sets the blend mode of the character; + * these are represented by Ints. + * @param {Int} blendMode + * @memberof Game_CharacterBase + */ + setBlendMode(blendMode: number): void; + /** + * Returns true if the character is + * normal priority; this means you can collide with them. + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isNormalPriority(): boolean; + setPriorityType(priorityType: number): void; + /** + * Returns true if the character is moving. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isMoving(): boolean; + /** + * Returns true if the character is jumping. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isJumping(): boolean; + /** + * Returns the jump height of base character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + jumpHeight(): number; + /** + * Returns true if the character is stopping. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isStopping(): boolean; + checkStop(threshold: number): boolean; + /** + * Resets the step count of the character. + * + * @memberof Game_CharacterBase + */ + resetStopCount(): void; + realMoveSpeed(): number; + distancePerFrame(): number; + /** + * Returns true if the character is dashing. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isDashing(): boolean; + isDebugThrough(): boolean; + /** + * Straightens the character. + * + * @memberof Game_CharacterBase + */ + straighten(): void; + reverseDir(d: number): number; + canPass(x: number, y: number, d: number): boolean; + canPassDiagonally(x: number, y: number, horz: number, vert: number): boolean; + isMapPassable(x: number, y: number, d: number): boolean; + isCollidedWithCharacters(x: number, y: number): boolean; + isCollidedWithEvents(x: number, y: number): boolean; + isCollidedWithVehicles(x: number, y: number): boolean; + setPosition(x: number, y: number): void; + copyPosition(character: Game_Player): void; + locate(x: number, y: number): void; + direction(): number; + /** + * Sets the direction of the character based on numpad + * directions. + * @param {Int} d + * @memberof Game_CharacterBase + */ + setDirection(d: number): void; + /** + * Returns true if the character is a tile; these + * are events without character sprites. + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isTile(): boolean; + /** + * Returns true if the character is an object character; + * these are events with character sprites. + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isObjectCharacter(): boolean; + shiftY(): number; + scrolledX(): number; + scrolledY(): number; + /** + * Returns the character's scrreen x position. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + screenX(): number; + /** + * Returns the character's screen y position. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + screenY(): number; + /** + * Returns the character's screen z position. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + screenZ(): number; + isNearTheScreen(): boolean; + update(): void; + updateStop(): void; + updateJump(): void; + updateMove(): void; + updateAnimation(): void; + animationWait(): number; + /** + * Updates the character's animation count. + * + * @memberof Game_CharacterBase + */ + updateAnimationCount(): void; + updatePattern(): void; + maxPattern(): number; + /** + * Returns the pattern of the character; these are the walking + * patterns. + * @returns {Int} + * @memberof Game_CharacterBase + */ + pattern(): number; + /** + * Sets the pattern of the character, given + * a pattern Int. + * @param {Int} pattern + * @memberof Game_CharacterBase + */ + setPattern(pattern: number): void; + isOriginalPattern(): boolean; + /** + * Resets the pattern of the character. + * + * @memberof Game_CharacterBase + */ + resetPattern(): void; + refreshBushDepth(): void; + isOnLadder(): boolean; + isOnBush(): boolean; + /** + * Returns the terrain tag of the character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + terrainTag(): number; + /** + * Returns the region id of the character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + regionId(): number; + /** + * Increases the character steps. + * + * @memberof Game_CharacterBase + */ + increaseSteps(): void; + /** + * Returns the tile id of character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + tileId(): number; + characterName(): string; + characterIndex(): number; + setImage(characterName: string, characterIndex: number): void; + setTileImage(tileId: number): void; + checkEventTriggerTouchFront(d: number): void; + checkEventTriggerTouch(x: number, y: number): boolean; + isMovementSucceeded(x: number, y: number): boolean; + setMovementSuccess(success: boolean): void; + moveStraight(d: number): void; + moveDiagonally(horz: number, vert: number): void; + jump(xPlus: number, yPlus: number): void; + hasWalkAnime(): boolean; + setWalkAnime(walkAnime: boolean): void; + /** + * Returns true if the character has step animation. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + hasStepAnime(): boolean; + setStepAnime(stepAnime: boolean): void; + /** + * Returns true if the character is set to a fixed direction. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isDirectionFixed(): boolean; + /** + * Sets the character to be fixed in a specified direction + * given a Bool value. + * @param {Bool} directionFix + * @memberof Game_CharacterBase + */ + setDirectionFix(directionFix: boolean): void; + /** + * Returns true if the character is set to pass through. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isThrough(): boolean; + setThrough(through: boolean): void; + isTransparent(): boolean; + /** + * Returns the bush depth around the character. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + bushDepth(): number; + setTransparent(transparent: boolean): void; + /** + * Requests an animation given the animation id. + * + * @param {Int} animationId + * @memberof Game_CharacterBase + */ + requestAnimation(animationId: number): void; + /** + * Requests the balloon animation given the balloon id. + * + * @param {Int} balloonId + * @memberof Game_CharacterBase + */ + requestBalloon(balloonId: number): void; + /** + * Returns the animation id. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + animationId(): number; + /** + * Returns the id of the balloon animation. + * + * @returns {Int} + * @memberof Game_CharacterBase + */ + balloonId(): number; + /** + * Starts the requested animation. + * + * @memberof Game_CharacterBase + */ + startAnimation(): void; + /** + * Stars a balloon animation. + * + * @memberof Game_CharacterBase + */ + startBalloon(): void; + isAnimationPlaying(): boolean; + /** + * Returns true if a balloon animation is playing. + * + * @returns {Bool} + * @memberof Game_CharacterBase + */ + isBalloonPlaying(): boolean; + endAnimation(): void; + /** + * Ends the balloon animation on the character. + * + * @memberof Game_CharacterBase + */ + endBalloon(): void; +} + +declare namespace rm.types { + /** + * The data class for the Move command. + */ + export type MoveCommand = { + /** + * Move command code. + */ + code: number; + /** + * An array containing the Move command's arguments. The contents vary for each command. + */ + parameters: any[]; + } +} + +declare namespace rm.types { + /** + * The data class for the Move route. + */ + export type MoveRoute = { + /** + * Program contents. An RPG.MoveCommand array. + */ + list: rm.types.MoveCommand[]; + /** + * The truth value of the [Repeat Action] option. + */ + repeat: boolean; + /** + * The truth value of the [Skip If Cannot Move] option. + */ + skippable: boolean; + /** + * The truth value of the [Wait for Completion] option. + */ + wait: boolean; + } +} + +/** + * Super class of Game_Player, Game_Follower, Game_Vehicle, + * and Game_Event. + */ +declare class Game_Character extends Game_CharacterBase { + protected constructor(); + _moveRouteForcing: boolean; + _moveRoute: rm.types.MoveRoute; + _moveRouteIndex: number; + _originalMoveRoute: rm.types.MoveRoute; + _originalMoveRouteIndex: number; + _waitCount: number; + initMembers(): void; + /** + * Memorizes the movement route. + * + * @memberof Game_Character + */ + memorizeMoveRoute(): void; + /** + * Restores the original movement route. + * + * @memberof Game_Character + */ + restoreMoveRoute(): void; + /** + * Returns true if the move route is being forced. + * + * @returns {Bool} + * @memberof Game_Character + */ + isMoveRouteForcing(): boolean; + /** + * Sets the move route of the game character. + * + * @param {RPG.MoveRoute} moveRoute + * @memberof Game_Character + */ + setMoveRoute(moveRoute: rm.types.MoveRoute): void; + /** + * Forces the move route of the game character. + * + * @param {RPG.MoveRoute} moveRoute + * @memberof Game_Character + */ + forceMoveRoute(moveRoute: rm.types.MoveRoute): void; + updateStop(): void; + /** + * Updates the game character's move routine. + * + * @memberof Game_Character + */ + updateRoutineMove(): void; + /** + * Processes the given move commands. + * + * @param {RPG.MoveCommand} command + * @memberof Game_Character + */ + processMoveCommand(command: rm.types.MoveCommand): void; + deltaXFrom(x: number): number; + deltaYFrom(y: number): number; + /** + * Move's the game character at random. + * + * @memberof Game_Character + */ + moveRandom(): void; + /** + * Moves the game character toward the other game character. + * + * @param {Game_Character} character + * @memberof Game_Character + */ + moveTowardCharacter(character: Game_Character): void; + /** + * Moves the game character away from the other game character. + * + * @param {Game_Character} character + * @memberof Game_Character + */ + moveAwayFromCharacter(character: Game_Character): void; + /** + * Turns the game character toward the other game character. + * + * @param {Game_Character} character + * @memberof Game_Character + */ + turnTowardCharacter(character: Game_Character): void; + /** + * Turns the game character away from the other game character. + * + * @param {Game_Character} character + * @memberof Game_Character + */ + turnAwayFromCharacter(character: Game_Character): void; + /** + * Turns the game character toward the player. + * + * @memberof Game_Character + */ + turnTowardPlayer(): void; + /** + * Turns the game character away from the player. + * + * @memberof Game_Character + */ + turnAwayFromPlayer(): void; + /** + * Moves the game character toward the player. + * + * @memberof Game_Character + */ + moveTowardPlayer(): void; + /** + * Moves the game character away from the player. + * + * @memberof Game_Character + */ + moveAwayFromPlayer(): void; + /** + * Moves the game character forward. + * + * @memberof Game_Character + */ + moveForward(): void; + /** + * Moves the game character backward. + * + * @memberof Game_Character + */ + moveBackward(): void; + /** + * Handles the end of the move route. + * + * @memberof Game_Character + */ + processRouteEnd(): void; + advanceMoveRouteIndex(): void; + /** + * Turns the game character right by 90 degrees. + * + * @memberof Game_Character + */ + turnRight90(): void; + /** + * Turns the game character left by 90 degrees. + * + * @memberof Game_Character + */ + turnLeft90(): void; + turn180(): void; + /** + * Turns the game character or left by 90 degrees. + * + * @memberof Game_Character + */ + turnRightOrLeft90(): void; + /** + * Turns the game character at random. + * + * @memberof Game_Character + */ + turnRandom(): void; + swap(character: Game_Character): void; + findDirectionTo(goalX: number, goalY: number): number; + /** + * Returns the search limit for path finding. + * + * @returns {Int} + * @memberof Game_Character + */ + searchLimit(): number; + static ROUTE_END: number; + static ROUTE_MOVE_DOWN: number; + static ROUTE_MOVE_LEFT: number; + static ROUTE_MOVE_RIGHT: number; + static ROUTE_MOVE_UP: number; + static ROUTE_MOVE_LOWER_L: number; + static ROUTE_MOVE_LOWER_R: number; + static ROUTE_MOVE_UPPER_L: number; + static ROUTE_MOVE_UPPER_R: number; + static ROUTE_MOVE_RANDOM: number; + static ROUTE_MOVE_TOWARD: number; + static ROUTE_MOVE_AWAY: number; + static ROUTE_MOVE_FORWARD: number; + static ROUTE_MOVE_BACKWARD: number; + static ROUTE_JUMP: number; + static ROUTE_WAIT: number; + static ROUTE_TURN_DOWN: number; + static ROUTE_TURN_LEFT: number; + static ROUTE_TURN_RIGHT: number; + static ROUTE_TURN_UP: number; + static ROUTE_TURN_90D_R: number; + static ROUTE_TURN_90D_L: number; + static ROUTE_TURN_180D: number; + static ROUTE_TURN_90D_R_L: number; + static ROUTE_TURN_RANDOM: number; + static ROUTE_TURN_TOWARD: number; + static ROUTE_TURN_AWAY: number; + static ROUTE_SWITCH_ON: number; + static ROUTE_SWITCH_OFF: number; + static ROUTE_CHANGE_SPEED: number; + static ROUTE_CHANGE_FREQ: number; + static ROUTE_WALK_ANIME_ON: number; + static ROUTE_WALK_ANIME_OFF: number; + static ROUTE_STEP_ANIME_ON: number; + static ROUTE_STEP_ANIME_OFF: number; + static ROUTE_DIR_FIX_ON: number; + static ROUTE_DIR_FIX_OFF: number; + static ROUTE_THROUGH_ON: number; + static ROUTE_THROUGH_OFF: number; + static ROUTE_TRANSPARENT_ON: number; + static ROUTE_TRANSPARENT_OFF: number; + static ROUTE_CHANGE_IMAGE: number; + static ROUTE_CHANGE_OPACITY: number; + static ROUTE_CHANGE_BLEND_MODE: number; + static ROUTE_PLAY_SE: number; + static ROUTE_SCRIPT: number; +} + +declare namespace rm.types { + /** + * The data class for the Event command. + */ + export type EventCommand = { + /** + * The event code. + */ + code: number; + /** + * The indent depth. Usually 0. The [Conditional Branch] command, among others, adds 1 with every step deeper. + */ + indent: number; + /** + * An array containing the Event command's arguments. The contents vary for each command. + */ + parameters: any[]; + } +} + +declare namespace rm.types { + /** + * The data class for common events. + */ + export type CommonEvent = { + /** + * The event ID. + */ + id: number; + /** + * A list of event commands. An RPG.EventCommand array. + */ + list: rm.types.EventCommand[]; + /** + * The event name. + */ + name: string; + /** + * The condition switch ID. + */ + switchId: number; + /** + * The event trigger (0: none, 1: autorun; 2: parallel). + */ + trigger: number; + } +} + +declare class Game_CommonEvent { + constructor(commonEventId: number); + _commonEventId: number; + _interpreter: Game_Interpreter; + initialize(commonEventId: number): void; + /** + * Returns the common event information from the database. + * + * @returns {CommonEvent} + * @memberof Game_CommonEvent + */ + event(): rm.types.CommonEvent; + /** + * Returns the common event's list of event commands. + * + * @returns {Array} + * @memberof Game_CommonEvent + */ + list(): rm.types.EventCommand[]; + /** + * Refreshes the common event. + * + * @memberof Game_CommonEvent + */ + refresh(): void; + /** + * Returns true if the common event is active. + * + * @returns {boolean} + * @memberof Game_CommonEvent + */ + isActive(): boolean; + /** + * Updates the common event. + * + * @memberof Game_CommonEvent + */ + update(): void; +} + +declare namespace rm.types { + export type EnemyDropItem = { + /** + * The ID of the data depending on the type of dropped item (item, weapon, or armor). + */ + dataId: number; + /** + * N of the probability that the item will be dropped, 1/N. + */ + denominator: number; + /** + * The type of dropped item. + * + * 0: None + * 1: Item + * 2: Weapon + * 3: Armor + */ + kind: number; + } +} + +declare namespace rm.types { + export type Enemy = { + /** + * The enemy's action pattern. An array of RPG.Enemy.Action. + */ + actions: rm.types.EnemyAction[]; + /** + * The adjustment value for the battler graphic's hue (0..360). + */ + battlerHue: number; + /** + * The file name of the enemy's battler graphic. + */ + battlerName: string; + doc: string; + /** + * The items the enemy drops. An RPG.Enemy.DropItem array. + */ + dropItems: rm.types.EnemyDropItem[]; + /** + * The enemy's experience. + */ + exp: number; + /** + * The enemy's gold. + */ + gold: number; + /** + * The ID of the enemy in the database. + * + * @type {number} + * @memberof Enemy + */ + id: number; + internal: boolean; + links: string[]; + /** + * The name of the enemy in the database. + * + * @type {string} + * @memberof Enemy + */ + name: string; + parameters: string[]; + /** + * Parameters. An array of integers using the following IDs as subscripts: + * + * 0: Maximum hit points + * 1: Maximum magic points + * 2: Attack power + * 3: Defense power + * 4: Magic attack power + * 5: Magic defense power + * 6: Agility + * 7: Luck + */ + params: number[]; + platforms: haxe.display.Platform[]; + targets: haxe.display.MetadataTarget[]; + } +} + +/** + * ----------------------------------------------------------------------------- + * Game_Enemy + * + * The game object declare class for an enemy. + * @class Game_Enemy + */ +declare class Game_Enemy extends Game_Battler { + constructor(enemyId: number, x: number, y: number); + _enemyId: number; + _letter: string; + _plural: boolean; + _screenX: number; + _screenY: number; + initialize(enemyId: number, x: number, y: number): void; + initMembers(): void; + setup(enemyId: number, x: number, y: number): void; + /** + * Returns the other troops in the enemy team. + * + * @returns {Game_Troop} + * @memberof Game_Enemy + */ + friendsUnit(): Game_Temp; + /** + * Returns the game party. + * + * @returns {Game_Party} + * @memberof Game_Enemy + */ + opponentsUnit(): Game_Party; + isBattleMember(): boolean; + /** + * Returns the enemy id. + * + * @returns {number} + * @memberof Game_Enemy + */ + enemyId(): number; + /** + * Returns the enemy information from the database. + * + * @returns {RPG.Enemy} + * @memberof Game_Enemy + */ + enemy(): rm.types.Enemy; + /** + * Returns the enemy's exp amount. + * + * @memberof Game_Enemy + */ + exp(): void; + /** + * Returns enemy's given gold. + * + * @memberof Game_Enemy + */ + gold(): void; + /** + * Creates the drop items for the enemy specified by the database. + * + * @returns {Array} + * @memberof Game_Enemy + */ + makeDropItems(): rm.types.BaseItem[]; + /** + * Returns the item drop rate of the enemy. + * + * @returns {number} + * @memberof Game_Enemy + */ + dropItemRate(): number; + itemObject(kind: number, dataId: number): void; + /** + * Returns true if the enemy sprite is visible. + * + * @returns {boolean} + * @memberof Game_Enemy + */ + isSpriteVisible(): boolean; + /** + * Returns enemy screen X coordinate. + * + * @returns {number} + * @memberof Game_Enemy + */ + screenX(): number; + /** + * Returns enemy screen Y position. + * + * @returns {number} + * @memberof Game_Enemy + */ + screenY(): number; + /** + * Returns the hue of the enemy. + * + * @returns {number} + * @memberof Game_Enemy + */ + battlerHue(): number; + /** + * Returns the enemy original name. + * + * @returns {string} + * @memberof Game_Enemy + */ + originalName(): string; + isLetterEmpty(): boolean; + setLetter(letter: string): void; + setPlural(plural: boolean): void; + /** + * Transform the enemy into another enemy based on id. + * + * @param {number} enemyId + * @memberof Game_Enemy + */ + transform(enemyId: number): void; + meetsCondition(action: rm.types.EnemyAction): boolean; + meetsTurnCondition(param1: number, param2: number): boolean; + meetsHpCondition(param1: number, param2: number): boolean; + meetsMpCondition(param1: number, param2: number): boolean; + meetsStateCondition(param: number): boolean; + meetsPartyLevelCondition(param: number): boolean; + meetsSwitchCondition(param: number): boolean; + /** + * Returns true if the enemy action is valid. + * + * @param {RPG.Enemy.Action} action + * @returns {boolean} + * @memberof Game_Enemy + */ + isActionValid(action: rm.types.EnemyAction): boolean; + selectAction(actionList: rm.types.EnemyAction[], ratingZero: number): rm.types.EnemyAction; + selectAllActions(actionList: rm.types.EnemyAction[]): void; +} + +declare namespace rm.types { + export const enum MoveType { + FIXED = 0, + RANDOM = 1, + APPROACH = 2, + CUSTOM = 3, + } +} + +declare namespace rm.types { + export const enum EventTrigger { + base = -1, + } +} + +declare namespace rm.types { + /** + * The data class for the event page conditions. + */ + export type EventPageConditions = { + /** + * The ID of that actor if the [Actor] condition is valid. + */ + actorId: string; + /** + * The truth value indicating whether the [Actor] condition is valid. + */ + actorValid: boolean; + /** + * The ID of that item if the [Item] condition is valid. + */ + itemId: string; + /** + * The truth value indicating whether the [Item] condition is valid. + */ + itemValid: boolean; + /** + * The letter of that self switch ("A".."D") if the [Self Switch] condition is valid. + */ + selfSwitchCh: string; + /** + * The truth value indicating whether the [Self Switch] condition is valid. + */ + selfSwitchValid: boolean; + /** + * The ID of that switch if the first [Switch] condition is valid. + */ + switch1Id: number; + /** + * The truth value indicating whether the first [Switch] condition is valid. + */ + switch1Valid: boolean; + /** + * The ID of that switch if the second [Switch] condition is valid. + */ + switch2Id: number; + /** + * The truth value indicating whether the second [Switch] condition is valid. + */ + switch2Valid: boolean; + /** + * The ID of that variable if the [Variable] condition is valid. + */ + variableId: number; + /** + * The truth value indicating whether the [Variable] condition is valid. + */ + variableValid: boolean; + /** + * The standard value of that variable (x and greater) if the [Variable] condition is valid. + */ + variableValue: number; + } +} + +declare namespace rm.types { + /** + * The data class for the Event page [Graphics]. + */ + export type EventPageImage = { + /** + * The index of the character's graphic file (0..7). + */ + characterIndex: number; + /** + * The file name of the character's graphic. + */ + characterName: string; + /** + * The direction in which the character is facing (2: down, 4: left, 6: right, 8: up). + */ + direction: number; + /** + * The character's pattern (0..2). + */ + pattern: number; + /** + * The tile ID. If the specified graphic is not a tile, this value is 0. + */ + tileId: number; + } +} + +declare namespace rm.types { + /** + * The data class for the event page. + */ + export type EventPage = { + /** + * The event condition (RPG.EventPage.Condition). + */ + conditions: rm.types.EventPageConditions; + /** + * The truth value of the [Direction Fix] option. + */ + directionFix: boolean; + /** + * The event graphic (RPG.EventPage.Image) . + */ + image: rm.types.EventPageImage; + /** + * A list of event commands. An RPG.EventCommand array. + */ + list: rm.types.EventCommand[]; + /** + * The movement frequency (1: lowest, 2: lower, 3: normal, 4: higher, 5: highest). + */ + moveFrequency: number; + /** + * The movement route (RPG.MoveRoute). Referenced only when the movement type is set to custom. + */ + moveRoute: rm.types.MoveRoute[]; + /** + * The movement speed (1: x8 slower, 2: x4 slower, 3: x2 slower, 4: normal, 5: x2 faster, 6: x4 faster). + */ + moveSpeed: number; + /** + * The type of movement (0: fixed, 1: random, 2: approach, 3: custom). + */ + moveType: number; + /** + * The priority type (0: below characters, 1: same as characters, 2: above characters). + */ + priorityType: number; + /** + * The truth value of the [Stepping Animation] option. + */ + stepAnime: boolean; + /** + * The truth value of the [Through] option. + */ + through: boolean; + /** + * The event trigger (0: action button, 1: player touch, 2: event touch, 3: autorun, 4: parallel). + */ + trigger: number; + /** + * The truth value of the [Walking Animation] option. + */ + walkAnime: boolean; + } +} + +declare namespace rm.types { + /** + * The data class for map events. + */ + export type Event = { + /** + * The event ID. + */ + id: number; + meta: Object; + /** + * The event name. + */ + name: string; + note: string; + /** + * The event pages. RPG.EventPage array. + */ + pages: rm.types.EventPage[]; + /** + * The event's x-coordinate on the map. + */ + x: number; + /** + * The event's y-coordinate on the map. + */ + y: number; + } +} + +/** + * THe game object class for an event. It contains functionality + * for event page switching and running parallel process events. + */ +declare class Game_Event extends Game_Character { + constructor(mapId: number, eventId: number); + _mapId: number; + _eventId: number; + _moveType: rm.types.MoveType; + _trigger: rm.types.EventTrigger; + _starting: boolean; + _erased: boolean; + _pageIndex: number; + _originalPattern: rm.types.CharacterPattern; + _originalDirection: rm.types.Direction; + _prelockDirection: rm.types.Direction; + _locked: boolean; + initialize(mapId: number, eventId: number): void; + initMembers(): void; + /** + * Returns the event id of the game event. + * + * @returns {Int} + * @memberof Game_Event + */ + eventId(): number; + /** + * Returns the event database information. + * + * @returns {RPG.Event} + * @memberof Game_Event + */ + event(): rm.types.Event; + /** + * Returns the event page created in the database. + * + * @returns {RPG.EventPage} + * @memberof Game_Event + */ + page(): rm.types.EventPage; + /** + * Returns the list of event commands on the current page of the game event. + * + * @returns {Array} + * @memberof Game_Event + */ + list(): rm.types.EventCommand[]; + isCollidedWithCharacters(x: number, y: number): boolean; + isCollidedWithEvents(x: number, y: number): boolean; + /** + * Returns true if the event has collided with the player character + * at the specified x and y coordinates. + * @param {Int} x + * @param {Int} y + * @returns {Bool} + * @memberof Game_Event + */ + isCollidedWithPlayerCharacters(x: number, y: number): boolean; + /** + * Locks the game event. + * + * @memberof Game_Event + */ + lock(): void; + /** + * Unlocks the game eveent. + * + * @memberof Game_Event + */ + unlock(): void; + updateStop(): void; + /** + * Updates the self movement of the game event. + * + * @memberof Game_Event + */ + updateSelfMovement(): void; + stopCountThreshold(): number; + moveTypeRandom(): void; + moveTypeTowardPlayer(): void; + /** + * Returns true if the game event is near the player. + * + * @returns {Bool} + * @memberof Game_Event + */ + isNearThePlayer(): boolean; + moveTypeCustom(): void; + /** + * Returns true if the event is staring. + * + * @returns {Bool} + * @memberof Game_Event + */ + isStarting(): boolean; + /** + * Clears the starting flag. + * + * @memberof Game_Event + */ + clearStartingFlag(): void; + isTriggerIn(triggers: number[]): boolean; + /** + * Starts the game event. + * + * @memberof Game_Event + */ + start(): void; + /** + * Erases the event. + * + * @memberof Game_Event + */ + erase(): void; + /** + * Refreshes the game event. + * + * @memberof Game_Event + */ + refresh(): void; + /** + * Finds the proper page index of the game event for + * event command processing. + * @returns {Int} + * @memberof Game_Event + */ + findProperPageIndex(): number; + meetsConditions(page: rm.types.EventPage): boolean; + /** + * Sets up the event page. + * + * @memberof Game_Event + */ + setupPage(): void; + /** + * Clears the page settings of the game event. + * + * @memberof Game_Event + */ + clearPageSettings(): void; + /** + * Sets up the event page settings. + * + * @memberof Game_Event + */ + setupPageSettings(): void; + isOriginalPattern(): boolean; + /** + * Resets the pattern of the game event. + * + * @memberof Game_Event + */ + resetPattern(): void; + checkEventTriggerAuto(): void; + update(): void; + updateParallel(): void; + locate(x: number, y: number): void; + /** + * Forces the game event to move along the specified route. + * + * @param {RPG.MoveRoute} moveRoute + * @memberof Game_Event + */ + forceMoveRoute(moveRoute: rm.types.MoveRoute): void; +} + +/** + * ----------------------------------------------------------------------------- + * Game_Follower + * + * The game object declare class for a follower. A follower is an allied character, + * other than the front character, displayed in the party. + * @class Game_Follower + */ +declare class Game_Follower extends Game_Character { + constructor(memberIndex: number); + _memberIndex: number; + refresh(): void; + /** + * Returns the current actor. + * + * @returns {Game_Actor} + * @memberof Game_Follower + */ + actor(): Game_Actor; + /** + * Returns true if the follower is visible. + * + * @returns {Bool} + * @memberof Game_Follower + */ + isVisible(): boolean; + /** + * Updates the game follower. + * + * @memberof Game_Follower + */ + update(): void; + /** + * Has the follower chase a game actor. + * + * @param {Game_Character} character + * @memberof Game_Follower + */ + chaseCharacter(character: Game_Character): void; +} + +/** + * ----------------------------------------------------------------------------- + * Game_Followers + * + * The wrapper declare class for a follower array. + * @class Game_Followers + */ +declare class Game_Followers { + constructor(); + _visible: boolean; + _gathering: boolean; + _data: Game_Follower[]; + initialize(): void; + /** + * Returns true if the followers are visible. + * + * @returns {Bool} + * @memberof Game_Followers + */ + isVisible(): boolean; + /** + * Shows the followers. + * + * @memberof Game_Followers + */ + show(): void; + /** + * Hides the followers. + * + * @memberof Game_Followers + */ + hide(): void; + /** + * Returns the followers at the specified index. + * + * @param {number} index + * @returns {Game_Follower} + * @memberof Game_Followers + */ + follower(index: number): Game_Follower; + forEach(callback: () => void, thisObject: any): void; + reverseEach(callback: () => void, thisObject: any): void; + /** + * Refreshes the game followers. + * + * @memberof Game_Followers + */ + refresh(): void; + /** + * Updates the game followers. + * + * @memberof Game_Followers + */ + update(): void; + /** + * Updates the movement of game followers. + * + * @memberof Game_Followers + */ + updateMove(): void; + jumpAll(): void; + synchronize(x: number, y: number, d: number): void; + /** + * Gathers the followers. + * + * @memberof Game_Followers + */ + gather(): void; + /** + * Returns true if the followers are gathering. + * + * @returns {Bool} + * @memberof Game_Followers + */ + areGathering(): boolean; + /** + * Returns the visible followers. + * + * @returns {Array} + * @memberof Game_Followers + */ + visibleFollowers(): Game_Follower[]; + /** + * Returns true if the followers are moving. + * + * @returns {Bool} + * @memberof Game_Followers + */ + areMoving(): boolean; + /** + * Returns true if the followers are gathered. + * + * @returns {Bool} + * @memberof Game_Followers + */ + areGathered(): boolean; + /** + * Returns true if the specified follower is collided at the specified x and y + *coordinate. + * + * @param {number} x + * @param {number} y + * @returns {Bool} + * @memberof Game_Followers + */ + isSomeoneCollided(x: number, y: number): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Game_Interpreter + * + * The interpreter for running event commands. + * @class Game_Interpreter + */ +declare class Game_Interpreter { + constructor(depth: number); + _depth: number; + _branch: Object; + _params: any[]; + _indent: number; + _frameCount: number; + _freezeChecker: number; + _mapId: number; + _eventId: number; + _list: rm.types.EventCommand[]; + _index: number; + _waitCount: number; + _waitMode: string; + _comments: string; + _character: Game_Event; + _childInterpreter: Game_Interpreter; + checkOverflow(): void; + /** + * Clears the interpreter. + * + * @memberof Game_Interpreter + */ + clear(): void; + /** + * Sets up the interpreter with the list of event commands, and the given + * event Id. + * + * @param {Array} list + * @param {Int} eventId + * @memberof Game_Interpreter + */ + setup(list: rm.types.EventCommand[], eventId: number): void; + /** + * Returns the currrent eventId. + * + * @returns {Int} + * @memberof Game_Interpreter + */ + eventId(): number; + /** + * Returns true if the event is on the current map. + * + * @returns {Bool} + * @memberof Game_Interpreter + */ + isOnCurrentMap(): boolean; + /** + * Returns true after setting up the reserved common event. + * + * @returns {Bool} + * @memberof Game_Interpreter + */ + setupReservedCommonEvent(): boolean; + /** + * Returns true if the interpreter is running. + * + * @returns {Bool} + * @memberof Game_Interpreter + */ + isRunning(): boolean; + update(): void; + /** + * Updates the child game interpreter. + * + * @returns {Bool} + * @memberof Game_Interpreter + */ + updateChild(): boolean; + /** + * Updates the wait of the game interpreter. + * + * @returns {Bool} + * @memberof Game_Interpreter + */ + updateWait(): boolean; + updateWaitCount(): boolean; + updateWaitMode(): boolean; + /** + * Sets the wait mode of the interpreter. + * + * @param {String} waitMode + * @memberof Game_Interpreter + */ + setWaitMode(waitMode: string): void; + /** + * sets a specified wait duration for the interpreter. + * + * @param {Int} duration + * @memberof Game_Interpreter + */ + wait(duration: number): void; + fadeSpeed(): number; + /** + * Executes the event command; + * returns true or false based on execution. + * @returns {Bool} + * @memberof Game_Interpreter + */ + executeCommand(): boolean; + /** + * Checks if the interpreter has frozen. + * + * @returns {Bool} + * @memberof Game_Interpreter + */ + checkFreeze(): boolean; + /** + * Terminates the game interpreter. + * + * @memberof Game_Interpreter + */ + terminate(): void; + /** + * Skips a conditional branch on the interpreter. + * + * @memberof Game_Interpreter + */ + skipBranch(): void; + /** + * Returns the current event command. + * + * @returns {RPG.EventCommand} + * @memberof Game_Interpreter + */ + currentCommand(): rm.types.EventCommand; + /** + * Returns the next event code. + * + * @returns {Int} + * @memberof Game_Interpreter + */ + nextEventCode(): number; + iterateActorId(param: number, callback: (actor: Game_Actor) => void): void; + iterateActorEx(param1: number, param2: number, callback: (actor: Game_Actor) => void): void; + iterateActorIndex(param: number, callback: (actor: Game_Actor) => void): void; + iterateEnemyIndex(param: number, callback: (enemt: Game_Enemy) => void): void; + iterateBattler(param1: number, param2: number, callback: (battler: Game_Battler) => void): void; + character(param: number): Game_Character; + operateValue(operation: number, operandType: number, operand: number): number; + changeHp(target: number, value: number, allowDeath: boolean): void; + /** + * Show Text + */ + command101(): boolean; + /** + * Show Choices + */ + command102(): boolean; + setupChoices(params: any[]): void; + /** + * When [**] + */ + command402(): boolean; + /** + * When Cancel + */ + command403(): boolean; + /** + * Input Number + */ + command103(): boolean; + /** + * + * @param params + */ + setupNumInput(params: number[]): void; + /** + * Select Item + */ + command104(): boolean; + setupItemChoice(params: number[]): void; + /** + * Show Scrolling Text + */ + command105(): boolean; + /** + * Comment + */ + command108(): boolean; + /** + * Conditional Branch + */ + command111(): boolean; + /** + * Else + */ + command411(): boolean; + /** + * Loop + */ + command112(): boolean; + /** + * Repeat Above + */ + command413(): boolean; + /** + * Break Loop + */ + command113(): boolean; + /** + * Exit Event Processing + */ + command115(): boolean; + /** + * Common Event + */ + command117(): boolean; + setupChild(list: rm.types.EventCommand[], eventId: number): void; + /** + * Label + */ + command118(): boolean; + /** + * Jump to Label + */ + command119(): boolean; + jumpTo(index: number): void; + /** + * Control Switches + */ + command121(): boolean; + /** + * Control Variables + */ + command122(): boolean; + gameDataOperand(type: number, param1: number, param2: number): number; + operateVariable(variableId: number, operationType: number, value: number): void; + /** + * Control Self Switch + */ + command123(): boolean; + /** + * Control Timer + */ + command124(): boolean; + /** + * Change Gold + */ + command125(): boolean; + /** + * Change Items + */ + command126(): boolean; + /** + * Change Weapons + */ + command127(): boolean; + /** + * Change Armors + */ + command128(): boolean; + /** + * Change Party Member + */ + command129(): boolean; + /** + * Change Battle BGM + */ + command132(): boolean; + /** + * Change Victory ME + */ + command133(): boolean; + /** + * Change Save Access + */ + command134(): boolean; + /** + * Change Menu Access + */ + command135(): boolean; + /** + * Change Encounter Disable + */ + command136(): boolean; + /** + * Change Formation Access + */ + command137(): boolean; + /** + * Change Window Color + */ + command138(): boolean; + /** + * Change Defeat ME + */ + command139(): boolean; + /** + * Change Vehicle BGM + */ + command140(): boolean; + /** + * Transfer Player + */ + command201(): boolean; + /** + * Set Vehicle Location + */ + command202(): boolean; + /** + * Set Event Location + */ + command203(): boolean; + /** + * Scroll Map + */ + command204(): boolean; + /** + * Set Movement Route + */ + command205(): boolean; + /** + * Getting On and Off Vehicles + */ + command206(): boolean; + /** + * Change Transparency + */ + command211(): boolean; + /** + * Show Animation + */ + command212(): boolean; + /** + * Show Balloon Icon + */ + command213(): boolean; + /** + * Erase Event + */ + command214(): boolean; + /** + * Change Player Followers + */ + command216(): boolean; + /** + * Gather Followers + */ + command217(): boolean; + /** + * Fadeout Screen + */ + command221(): boolean; + /** + * Fadein Screen + */ + command222(): boolean; + /** + * Tint Screen + */ + command223(): boolean; + /** + * Flash Screen + */ + command224(): boolean; + /** + * Shake Screen + */ + command225(): boolean; + /** + * Wait + */ + command230(): boolean; + /** + * Show Picture + */ + command231(): boolean; + /** + * Move Picture + */ + command232(): boolean; + /** + * Rotate Picture + */ + command233(): boolean; + /** + * Tint Picture + */ + command234(): boolean; + /** + * Erase Picture + */ + command235(): boolean; + /** + * Set Weather Effect + */ + command236(): boolean; + /** + * Play BGM + */ + command241(): boolean; + /** + * Fadeout BGM + */ + command242(): boolean; + /** + * Save BGM + */ + command243(): boolean; + /** + * Resume BGM + */ + command244(): boolean; + /** + * Play BGS + */ + command245(): boolean; + /** + * Fadeout BGS + */ + command246(): boolean; + /** + * Play ME + */ + command249(): boolean; + /** + * Play SE + */ + command250(): boolean; + /** + * Stop SE + */ + command251(): boolean; + /** + * Play Movie + */ + command261(): boolean; + videoFileExt(): string; + /** + * Change Map Name Display + */ + command281(): boolean; + /** + * Change Tileset + */ + command282(): boolean; + /** + * Change Battle Back + */ + command283(): boolean; + /** + * Change Parallax + */ + command284(): boolean; + /** + * Get Location Info + */ + command285(): boolean; + /** + * Battle Processing + */ + command301(): boolean; + /** + * If Win + */ + command601(): boolean; + /** + * If Escape + */ + command602(): boolean; + /** + * If Lose + */ + command603(): boolean; + /** + * Shop Processing + */ + command302(): boolean; + /** + * Name Input Processing + */ + command303(): boolean; + /** + * Change HP + */ + command311(): boolean; + /** + * Change MP + */ + command312(): boolean; + /** + * Change TP + */ + command326(): boolean; + /** + * Change State + */ + command313(): boolean; + /** + * Recover All + */ + command314(): boolean; + /** + * Change EXP + */ + command315(): boolean; + /** + * Change Level + */ + command316(): boolean; + /** + * Change Parameter + */ + command317(): boolean; + /** + * Change Skill + */ + command318(): boolean; + /** + * Change Equipment + */ + command319(): boolean; + /** + * Change Name + */ + command320(): boolean; + /** + * Change Class + */ + command321(): boolean; + /** + * Change Actor Images + */ + command322(): boolean; + /** + * Change Vehicle Image + */ + command323(): boolean; + /** + * Change Nickname + */ + command324(): boolean; + /** + * Change Profile + */ + command325(): boolean; + /** + * Change Enemy HP + */ + command331(): boolean; + /** + * Change Enemy MP + */ + command332(): boolean; + /** + * Change Enemy TP + */ + command342(): boolean; + /** + * Change Enemy State + */ + command333(): boolean; + /** + * Enemy Recover All + */ + command334(): boolean; + /** + * Enemy Appear + */ + command335(): boolean; + /** + * Enemy Transform + */ + command336(): boolean; + /** + * Show Battle Animation + */ + command337(): boolean; + /** + * Force Action + */ + command339(): boolean; + /** + * Abort Battle + */ + command340(): boolean; + /** + * Open Menu Screen + */ + command351(): boolean; + /** + * Open Save Screen + */ + command352(): boolean; + /** + * Game Over + */ + command353(): boolean; + /** + * Return to Title Screen + */ + command354(): boolean; + /** + * Script + */ + command355(): boolean; + /** + * Plugin Command + */ + command356(): boolean; + pluginCommand(command: string, args: string[]): void; +} + +/** + * Game_Item + * The game object class for handling skills, items, weapons. armor. + * This is required, because the save data should not include the database object itself. + * @class Game_Item + */ +declare class Game_Item { + constructor(item: rm.types.BaseItem); + _dataClass: string; + _itemId: number; + initialize(): void; + /** + * Returns true the item is a skill. + * + * @returns {boolean} + * @memberof Game_Item + */ + isSkill(): boolean; + /** + * Returns true if the item is an item. + * + * @returns {boolean} + * @memberof Game_Item + */ + isItem(): boolean; + /** + * Returns true if the item is a usable item, similar to a potion. + * + * @returns {boolean} + * @memberof Game_Item + */ + isUsableItem(): boolean; + /** + * Returns true if the item is a weapon. + * + * @returns {boolean} + * @memberof Game_Item + */ + isWeapon(): boolean; + /** + * Returns true if the item is an armor. + * + * @returns {boolean} + * @memberof Game_Item + */ + isArmor(): boolean; + /** + * Returns true if the item is equippable (weapon or armor). + * + * @returns {boolean} + * @memberof Game_Item + */ + isEquipItem(): boolean; + /** + * Returns true if the item is 'null'. + * + * @returns {boolean} + * @memberof Game_Item + */ + isNull(): boolean; + /** + * Returns the current itemId. + * + * @returns {number} + * @memberof Game_Item + */ + itemId(): number; + object(): rm.types.BaseItem; + /** + * Sets the current item of the current Game_Item object. + * + * @param {RPG.BaseItem} item + * @memberof Game_Item + */ + setObject(item: rm.types.BaseItem): void; + setEquip(isWeapon: boolean, itemId: number): void; +} + +declare namespace rm.types { + /** + * The data class for tile sets. + */ + export type Tileset = { + doc: string; + /** + * The flags table. A 1-dimensional array containing a variety of flags (Table). + * + * Uses tile IDs as subscripts. The correspondence of each bit is as shown below: + * + * 0x0001: Impassable downward + * 0x0002: Impassable leftward + * 0x0004: Impassable rightward + * 0x0008: Impassable upward + * 0x0010: Display on normal character + * 0x0020: Ladder + * 0x0040: Bush + * 0x0080: Counter + * 0x0100: Damage floor + * 0x0200: Impassable by boat + * 0x0400: Impassable by ship + * 0x0800: Airship cannot land + * 0xF000: Terrain tag + * This manual does not discuss bit operations, but they are similar to those in C. + * We recommend an Internet search using keywords such as "hexadecimal bit operations" when necessary. + */ + flags: number[]; + /** + * The ID of the tile set. + */ + id: number; + internal: boolean; + links: string[]; + /** + * The mode of the tile set (0: Field type, 1: Area type, 2: VX compatible type). + */ + mode: number; + /** + * The name of the tile set. + */ + name: string; + parameters: string[]; + platforms: haxe.display.Platform[]; + targets: haxe.display.MetadataTarget[]; + /** + * The file name of the graphic used as the number index (0-8) tile set. + * + * The correspondence between numbers and sets is illustrated in the table below. + * + * 0 TileA1 + * 1 TileA2 + * 2 TileA3 + * 3 TileA4 + * 4 TileA5 + * 5 TileB + * 6 TileC + * 7 TileD + * 8 TileE + */ + tilesetNames: string[]; + } +} + +declare namespace rm.types { + export type MapEncounter = { + /** + * An array containing Region IDs. + */ + regionSet: number[]; + /** + * The enemy Troop ID. + */ + troopId: number; + /** + * Weight/chance among enemies on the map that you'll + * meet this enemy. + */ + weight: number; + } +} + +/** + * The game object for the map. It contains scrolling and passage functions + * along with the game interpreter. + */ +declare class Game_Map { + constructor(); + _interpreter: Game_Interpreter; + _mapId: number; + _tilesetId: number; + _events: Game_Event[]; + _commonEvents: Game_CommonEvent[]; + _vehicles: Game_Vehicle[]; + _displayX: number; + _displayY: number; + _nameDisplay: boolean; + _scrollDirection: number; + _scrollRest: number; + _scrollSpeed: number; + _parallaxName: string; + _parallaxZero: boolean; + _parallaxLoopX: boolean; + _parallaxLoopY: boolean; + _parallaxSx: number; + _parallaxSy: number; + _parallaxX: number; + _parallaxY: number; + _battleback1Name: string; + _battleback2Name: string; + _needsRefresh: boolean; + initialize(): void; + setup(mapId: number): void; + /** + * Returns true if an event is running. + * + * @returns {Bool} + * @memberof Game_Map + */ + isEventRunning(): boolean; + /** + * Returns tile width. + * + * @returns {Int} + * @memberof Game_Map + */ + tileWidth(): number; + /** + * Returns tile height. + * + * @returns {Int} + * @memberof Game_Map + */ + tileHeight(): number; + /** + * Returns map id. + * + * @returns {Int} + * @memberof Game_Map + */ + mapId(): number; + /** + * Returns the tileset id. + * + * @returns {Int} + * @memberof Game_Map + */ + tilesetId(): number; + /** + * Returns the display x coordinate. + * + * @returns {Int} + * @memberof Game_Map + */ + displayX(): number; + /** + * Returns the display y coordinate. + * + * @returns {Int} + * @memberof Game_Map + */ + displayY(): number; + parallaxName(): string; + /** + * Returns the name of battle back 1. + * + * @returns {String} + * @memberof Game_Map + */ + battleback1Name(): string; + /** + * Returns the name of battle back 2. + * + * @returns {String} + * @memberof Game_Map + */ + battleback2Name(): string; + requestRefresh(mapId: number): void; + /** + * Returns true if the name display is enabled. + * + * @returns {Bool} + * @memberof Game_Map + */ + isNameDisplayEnabled(): boolean; + /** + * Disables name display. + * + * @memberof Game_Map + */ + disableNameDisplay(): void; + /** + * Enable name display. + * + * @memberof Game_Map + */ + enableNameDisplay(): void; + /** + * Creates the vehicles for the game map. + * + * @memberof Game_Map + */ + createVehicles(): void; + /** + * Refreshes the vehicles on the game map. + * + * @memberof Game_Map + */ + refereshVehicles(): void; + vehicles(): Game_Vehicle[]; + /** + * Returns the game vehicle specified by type. + * + * @param {String} type + * @returns {Game_Vehicle} + * @memberof Game_Map + */ + vehicle(type: string): Game_Vehicle; + /** + * Returns the game boat. + * + * @returns {Game_Vehicle} + * @memberof Game_Map + */ + boat(): Game_Vehicle; + /** + * Returns the game ship. + * + * @returns {Game_Vehicle} + * @memberof Game_Map + */ + ship(): Game_Vehicle; + /** + * Returns the game airship. + * + * @returns {Game_Vehicle} + * @memberof Game_Map + */ + airship(): Game_Vehicle; + setupEvents(): void; + /** + * Returns all events on the game map. + * + * @returns {Array} + * @memberof Game_Map + */ + events(): Game_Event[]; + /** + * Returns an event, given the event id. + * + * @param {Int} eventId + * @returns {Game_Event} + * @memberof Game_Map + */ + event(eventId: number): Game_Event; + /** + * Erases the event given the event id. + * + * @param {Int} eventId + * @memberof Game_Map + */ + eraseEvent(eventId: number): void; + /** + * Returns all the parallel running common events. + * + * @returns {Array} + * @memberof Game_Map + */ + parallelCommonEvents(): rm.types.CommonEvent[]; + setupScroll(): void; + setupParallax(): void; + setupBattleback(): void; + setDisplayPos(x: number, y: number): void; + parallaxOx(): number; + parallaxOy(): number; + /** + * Returns the tilset of the game map. + * + * @returns {RPG.Tileset} + * @memberof Game_Map + */ + tileset(): rm.types.Tileset; + /** + * Returns the tileset flags of the game map. + * + * @returns {Array} + * @memberof Game_Map + */ + tilesetFlags(): number[]; + /** + * Returns the display name of the game map. + * + * @returns {String} + * @memberof Game_Map + */ + displayName(): string; + /** + * Returns the map width. + * + * @returns {Int} + * @memberof Game_Map + */ + width(): number; + /** + * Returns the map height. + * + * @returns {Int} + * @memberof Game_Map + */ + height(): number; + /** + * Returns the map data. + * + * @returns {Array} + * @memberof Game_Map + */ + data(): number[]; + /** + * Returns true if the map loops horizontally. + * + * @returns {Bool} + * @memberof Game_Map + */ + isLoopHorizontal(): boolean; + /** + * Returns true if the map loops vertically. + * + * @returns {Bool} + * @memberof Game_Map + */ + isLoopVertical(): boolean; + /** + * Returns true if dash is disabled on the map. + * + * @returns {Bool} + * @memberof Game_Map + */ + isDashDisabled(): boolean; + /** + * Returns the list of possible encounters on the current map. + * + * @returns {Array} + * @memberof Game_Map + */ + encounterList(): rm.types.MapEncounter[]; + /** + * Returns the Int of encounter steps on the map. + * + * @returns {Int} + * @memberof Game_Map + */ + encounterStep(): number; + /** + * Returns true if the map is an over world map. + * + * @returns {Bool} + * @memberof Game_Map + */ + isOverworld(): boolean; + /** + * Returns the screen tile x coordinate. + * + * @returns {Int} + * @memberof Game_Map + */ + screenTileX(): number; + /** + * Returns the screen tile y coordinate. + * + * @returns {Int} + * @memberof Game_Map + */ + screenTileY(): number; + adjustX(x: number): number; + adjustY(y: number): number; + roundX(x: number): number; + roundY(y: number): number; + xWithDirection(x: number, d: number): number; + yWithDirection(y: number, d: number): number; + roundXWithDirection(x: number, d: number): number; + roundYWithDirection(y: number, d: number): number; + deltaX(x1: number, x2: number): number; + deltaY(y1: number, y2: number): number; + distance(x1: number, y1: number, x2: number, y2: number): number; + /** + * Converts the x coordinate from canvas to map coordinate x. + * + * @param {Int} x + * @returns {Int} + * @memberof Game_Map + */ + canvasToMapX(x: number): number; + /** + * Converts the y coordinate from canvas to map y coordinate. + * + * @param {Int} y + * @returns {Int} + * @memberof Game_Map + */ + canvasToMapY(y: number): number; + /** + * Auto plays the game map. + * + * @memberof Game_Map + */ + autoplay(): void; + refreshIfNeeded(): void; + refresh(): void; + refreshTileEvents(): void; + /** + * Returns the game events at the specified + * x and y position. + * @param {Int} x + * @param {Int} y + * @returns {Array} + * @memberof Game_Map + */ + eventsXy(x: number, y: number): Game_Event[]; + eventsXyNt(x: number, y: number): Game_Event[]; + tileEventsXy(x: number, y: number): Game_Event[]; + eventIdXy(x: number, y: number): number; + scrollDown(distance: number): void; + scrollLeft(distance: number): void; + scrollRight(distance: number): void; + scrollUp(distance: number): void; + /** + * Returns true if the x and y coordinates are valid. + * + * @param {Int} x + * @param {Int} y + * @returns {Bool} + * @memberof Game_Map + */ + isValid(x: number, y: number): boolean; + checkPassage(x: number, y: number, bit: number): boolean; + /** + * Returns the tile id at the specified x, y, and z coordinates. + * + * @param {Int} x + * @param {Int} y + * @param {Int} z + * @returns {Int} + * @memberof Game_Map + */ + tileId(x: number, y: number, z: number): number; + layeredTiles(x: number, y: number): number[]; + allTiles(x: number, y: number): number[]; + autotileType(x: number, y: number, z: number): number; + isPassable(x: number, y: number, d: number): boolean; + isBoatPassable(x: number, y: number): boolean; + isShipPassable(x: number, y: number): boolean; + isAirshipLandOk(x: number, y: number): boolean; + checkLayeredTilesFlags(x: number, y: number, bit: number): boolean; + /** + * Returns true if the specified element at the given x and y coordinates + * is a ladder. + * @param {Int} x + * @param {Int} y + * @returns {Bool} + * @memberof Game_Map + */ + isLadder(x: number, y: number): boolean; + isBush(x: number, y: number): boolean; + isCounter(x: number, y: number): boolean; + isDamageFloor(x: number, y: number): boolean; + terrainTag(x: number, y: number): number; + regionId(x: number, y: number): number; + startScroll(direction: number, distance: number, speed: number): void; + isScrolling(): boolean; + /** + * Updates the game map, given that the scene is active. + * + * @param {Bool} sceneActive + * @memberof Game_Map + */ + update(sceneActive: boolean): void; + updateScroll(): void; + scrollDistance(): number; + doScroll(direction: number, distance: number): void; + /** + * Updates all events on the map. + * + * @memberof Game_Map + */ + updateEvents(): void; + /** + * Updates all game vehicles on the map. + * + * @memberof Game_Map + */ + updateVehicles(): void; + /** + * Updates the map parallaxes. + * + * @memberof Game_Map + */ + updateParallax(): void; + /** + * Changes them ap tileset, given the tileset id. + * + * @param {Int} tilesetId + * @memberof Game_Map + */ + changeTileset(tilesetId: number): void; + changeBattleback(battleback1Name: string, battleback2Name: string): void; + changeParallax(name: string, loopX: boolean, loopY: boolean, sx: number, sy: number): void; + /** + * Updates the map's game interpreter. + * + * @memberof Game_Map + */ + updateInterpreter(): void; + /** + * Unlocks an event on the map given the event id. + * + * @param {Int} eventId + * @memberof Game_Map + */ + unlockEvent(eventId: number): void; + setupStartingEvent(): boolean; + setupTestEvent(): boolean; + setupStartingMapEvent(): boolean; + /** + * Sets up an auto run common event. + * + * @returns {Bool} + * @memberof Game_Map + */ + setupAutorunCommonEvent(): boolean; + /** + * Returns true if any event is starting on the map. + * + * @returns {Bool} + * @memberof Game_Map + */ + isAnyEventStarting(): boolean; +} + +declare namespace rm.types { + export const enum MessageBackgroundType { + base = -1, + } +} + +declare namespace rm.types { + export const enum MessagePositionType { + base = -1, + } +} + +declare namespace rm.types { + export const enum ChoiceDefaultType { + base = -1, + } +} + +declare namespace rm.types { + export const enum ChoiceCancelType { + base = -1, + } +} + +declare namespace rm.types { + export const enum ChocieBackgroundType { + base = -1, + } +} + +declare namespace rm.types { + export const enum ChoicePositionType { + base = -1, + } +} + +declare class Game_Message { + constructor(); + _texts: string[]; + _choices: string[]; + _faceName: string; + _faceIndex: number; + _background: rm.types.MessageBackgroundType; + _positionType: rm.types.MessagePositionType; + _choiceDefaultType: rm.types.ChoiceDefaultType; + _choiceCancelType: rm.types.ChoiceCancelType; + _choiceBackground: rm.types.ChocieBackgroundType; + _choicePositionType: rm.types.ChoicePositionType; + _numInputVariableId: number; + _numInputMaxDigits: number; + _itemChoiceVariableId: number; + _itemChoiceItypeId: number; + _scrollMode: boolean; + _scrollSpeed: number; + _scrollNoFast: boolean; + _choiceCallback: (n: number) => void; + initialize(): void; + clear(): void; + choices(): string[]; + /** + * Returns the name of the face image used for the message. + * + * @returns {String} + * @memberof Game_Message + */ + faceName(): string; + /** + * Returns the face index within the face image to display the + * correct face. + * @returns {number} + * @memberof Game_Message + */ + faceIndex(): number; + /** + * Returns the background associated with the message; + * this is the background + * @returns {number} + * @memberof Game_Message + */ + background(): number; + /** + * Returns the current position type of the message window. + * + * @returns {number} + * @memberof Game_Message + */ + positionType(): number; + choiceDefaultType(): number; + choiceCancelType(): number; + /** + * Returns the background type of the choice window. + * + * @returns {number} + * @memberof Game_Message + */ + choiceBackground(): number; + /** + * Returns the position of the choice window. + * + * @returns {number} + * @memberof Game_Message + */ + choicePositionType(): number; + /** + * Returns the number input variable id. + * + * @returns {number} + * @memberof Game_Message + */ + numInputVariableId(): number; + /** + * Returns the number input maximum digits. + * + * @returns {number} + * @memberof Game_Message + */ + numInputMaxDigits(): number; + /** + * Returns the item choice variable id. + * + * @returns {number} + * @memberof Game_Message + */ + itemChoiceVariableId(): number; + /** + * Returns the item choice item type id. + * + * @returns {number} + * @memberof Game_Message + */ + itemChoiceItypeId(): number; + /** + * Returns true if the scroll mode is set to true. + * + * @returns {boolean} + * @memberof Game_Message + */ + scrollMode(): boolean; + /** + * Returns the scroll speed. + * + * @returns {number} + * @memberof Game_Message + */ + scrollSpeed(): number; + /** + * Returns true if the scroll is set to not being fast. + * + * @returns {boolean} + * @memberof Game_Message + */ + scrollNoFast(): boolean; + /** + * Adds text to the game message object. + * + * @param {String} text + * @memberof Game_Message + */ + add(text: string): void; + setFaceImage(faceName: string, faceIndex: number): void; + /** + * Sets the background of the message window; + * options are 0 (fully opaque), 1 (transparent), 2 (invisible background). + * The default is 0. + * @param {number} background + * @memberof Game_Message + */ + setBackground(background: number): void; + /** + * Sets the position of the message window; + * default is 2. + * @param {number} positionType + * @memberof Game_Message + */ + setPositionType(positionType: number): void; + /** + * Sets the choices within the choice window; + * sets the default and cancel choices for the window. + * @param {Array} choices + * @param {number} defaultType + * @param {number} cancelType + * @memberof Game_Message + */ + setChoices(choices: string[], defaultType: number, cancelType: number): void; + setChoiceBackground(background: number): void; + /** + * Sets the position of the choice window associated with the + * message window. + * @param {number} positionType + * @memberof Game_Message + */ + setChoicePositionType(positionType: number): void; + /** + * Sets the number input and associates it with a variable id; + * the max number of digits can also be set. + * @param {number} variableId + * @param {number} maxDigits + * @memberof Game_Message + */ + setNumberInput(variableId: number, maxDigits: number): void; + /** + * Sets the choice and associates it with a variable id; + * sets the itemtype id associated with the choice. + * @param {number} variableId + * @param {number} itemType + * @memberof Game_Message + */ + setItemChoice(variableId: number, itemType: number): void; + /** + * Sets the scroll speed of the message window; + * disable fast movement if noFast is set to true. + * @param {number} speed + * @param {boolean} noFast + * @memberof Game_Message + */ + setScroll(speed: number, noFast: boolean): void; + /** + * Sets a callback to be associated with a specific choice; + * a callback is a JavaScript function that will be run when the + * choice is selected. + * @param {((n: number) => Void)} callback + * @memberof Game_Message + */ + setChoiceCallback(callback: (n: number) => void): void; + onChoice(n: number): void; + /** + * Returns true if the game message object has text. + * + * @returns {boolean} + * @memberof Game_Message + */ + hasText(): boolean; + /** + * Returns true if the game message object has a set of choices. + * + * @returns {boolean} + * @memberof Game_Message + */ + isChoice(): boolean; + /** + * Returns true if the game message object has a number input attached. + * + * @returns {boolean} + * @memberof Game_Message + */ + isNumberInput(): boolean; + /** + * Returns true if the game message object has an item choice attached. + * + * @returns {boolean} + * @memberof Game_Message + */ + isItemChoice(): boolean; + /** + * Returns true if the game message object has text, choices, number input, + * or item choice. + * @returns {boolean} + * @memberof Game_Message + */ + isBusy(): boolean; + /** + * Creates a new page for the text within the message window. + * + * @memberof Game_Message + */ + newPage(): void; + /** + * Returns all of the text contained within the message. + * + * @returns {String} + * @memberof Game_Message + */ + allText(): string; +} + +/** + * Superclass of Game_Party & Game_Troop + * + * @class Game_Unit + */ +declare class Game_Unit { + constructor(); + _inBattle: boolean; + initialize(): void; + /** + * Returns true if unit is in battle. + * + * @returns {boolean} + * @memberof Game_Unit + */ + inBattle(): boolean; + /** + * Returns the list of battlers. + * + * @returns {Array} + * @memberof Game_Unit + */ + members(): Game_Battler[]; + /** + * Returns the list of alive battlers. + * + * @returns {Array} + * @memberof Game_Unit + */ + aliveMembers(): Game_Battler[]; + /** + * Returns the list of dead battlers. + * + * @returns {Array} + * @memberof Game_Unit + */ + deadMembers(): Game_Battler[]; + /** + * Returns the list of movable members. + * + * @returns {Array} + * @memberof Game_Unit + */ + movableMembers(): Game_Battler[]; + /** + * Clears the unit's actions. + * + * @memberof Game_Unit + */ + clearActions(): void; + /** + * Returns the agility of the unit. + * + * @returns {Int} + * @memberof Game_Unit + */ + agility(): number; + tgrSum(): number; + /** + * Returns a random target from the game unit. + * + * @returns {Game_Battler} + * @memberof Game_Unit + */ + randomTarget(): Game_Battler; + /** + * Returns a random dead target from the game unit. + * + * @returns {Game_Battler} + * @memberof Game_Unit + */ + randomDeadTarget(): Game_Battler; + smoothTarget(index: number): Game_Battler; + smoothDeadTarget(index: number): Game_Battler; + /** + * Clears the action results. + * + * @memberof Game_Unit + */ + clearResults(): void; + /** + * Handler for when battle is started. + * + * @memberof Game_Unit + */ + onBattleStart(): void; + /** + * Handler for when battle has ended. + * + * @memberof Game_Unit + */ + onBattleEnd(): void; + /** + * Creates the action's of the game unit. + * + * @memberof Game_Unit + */ + makeActions(): void; + /** + * Selects a member of the unit given a battler. + * + * @param {Game_Battler} activeMember + * @memberof Game_Unit + */ + select(activeMember: Game_Battler): void; + /** + * Returns true if all members of the unit are dead. + * + * @returns {Bool} + * @memberof Game_Unit + */ + isAllDead(): boolean; + substituteBattler(): Game_Battler; +} + +/** + * The game object for the party. Contains information + * such as gold and items. + */ +declare class Game_Party extends Game_Unit { + protected constructor(); + _gold: number; + _steps: number; + _lastItem: Game_Item; + _menuActorId: number; + _targetActorId: number; + _actors: Game_Actor[]; + /** + * Data structure. + * [ItemId:Int] : Int + */ + _items: { [key: string]: any }; + /** + * Data structure. + * [weaponId:Int] : Int + */ + _weapons: { [key: string]: any }; + /** + * Data structure. + * [armorId:Int] : Int + */ + _armors: { [key: string]: any }; + /** + * Returns all party members. + * + * @returns {Array} + * @memberof Game_Party + */ + members(): Game_Actor[]; + /** + * Returns the living party members. + * + * @returns {Array} + * @memberof Game_Party + */ + aliveMembers(): Game_Actor[]; + /** + * Returns the dead party members. + * + * @returns {Array} + * @memberof Game_Party + */ + deadMembers(): Game_Actor[]; + /** + * Returns the movable members in the party. + * + * @returns {Array} + * @memberof Game_Party + */ + movableMembers(): Game_Actor[]; + /** + * Returns the battle members in the party. + * + * @returns {Array} + * @memberof Game_Party + */ + battleMembers(): Game_Actor[]; + /** + * Initialize all party items. + * + * @memberof Game_Party + */ + initAllItems(): void; + /** + * Returns true if the game party exists. + * + * @returns {Bool} + * @memberof Game_Party + */ + exists(): boolean; + /** + * Returns the size of the party. + * + * @returns {Int} + * @memberof Game_Party + */ + size(): number; + /** + * Returns true if the game party is empty. + * + * @returns {Bool} + * @memberof Game_Party + */ + isEmpty(): boolean; + /** + * Returns the maximum battle members in the party. + * + * @returns {Int} + * @memberof Game_Party + */ + maxBattleMembers(): number; + /** + * Returns the leader of the party. + * + * @returns {Game_Actor} + * @memberof Game_Party + */ + leader(): Game_Actor; + /** + * Revive the battle members of the party. + * + * @memberof Game_Party + */ + reviveBattleMembers(): void; + items(): rm.types.Item[]; + /** + * Returns the weapons of the party. + * + * @returns {Array} + * @memberof Game_Party + */ + weapons(): rm.types.Weapon[]; + /** + * Returns the party's armor. + * + * @returns {Array} + * @memberof Game_Party + */ + armors(): rm.types.Armor[]; + /** + * Returns the party's equippable items. + * + * @returns {Array} + * @memberof Game_Party + */ + equipItems(): rm.types.EquipItem[]; + /** + * Returns all items within the party's posession. + * Items can be of equip item, or item type. + * @returns {Array} + * @memberof Game_Party + */ + allItems(): rm.types.BaseItem[]; + itemContainer(item: rm.types.BaseItem): { ItemId: number }; + /** + * Sets up the starting party members. + * + * @memberof Game_Party + */ + setupStartingMembers(): void; + name(): string; + /** + * Sets up a test battle with the party. + * + * @memberof Game_Party + */ + setupBattleTest(): void; + /** + * Sets up the battle test members. + * + * @memberof Game_Party + */ + setupBattleTestMembers(): void; + /** + * Sets up the battle test items. + * + * @memberof Game_Party + */ + setupBattleTestItems(): void; + /** + * Returns the highest level in the party. + * + * @returns {Int} + * @memberof Game_Party + */ + highestLevel(): number; + /** + * Adds an actor to the party given the actor id. + * + * @param {Int} actorId + * @memberof Game_Party + */ + addActor(actorId: number): void; + /** + * Removes an actor from the party given the actor id. + * + * @param {Int} actorId + * @memberof Game_Party + */ + removeActor(actorId: number): void; + /** + * Returns party gold. + * + * @returns {Int} + * @memberof Game_Party + */ + gold(): number; + /** + * Increases the party gold given a specified amount. + * + * @param {Int} amount + * @memberof Game_Party + */ + gainGold(amount: number): void; + /** + * Decreases the party gold given a specified amount. + * + * @param {Int} amount + * @memberof Game_Party + */ + loseGold(amount: number): void; + /** + * Returns maximum gold of the party. + * + * @returns {Int} + * @memberof Game_Party + */ + maxGold(): number; + /** + * Returns the Int of steps the party has taken. + * + * @returns {Int} + * @memberof Game_Party + */ + steps(): number; + /** + * Increases the Int of steps the party has taken. + * + * @memberof Game_Party + */ + increaseSteps(): void; + /** + * Returns the Int of items in the possession of the party of the + * given item. + * @param {RPG.BaseItem} item + * @returns {Int} + * @memberof Game_Party + */ + numItems(item: rm.types.BaseItem): number; + /** + * Returns the maximum Int of items of the given item. + * + * @param {RPG.BaseItem} item + * @returns {Int} + * @memberof Game_Party + */ + maxItems(item: rm.types.BaseItem): number; + hasMaxItems(item: rm.types.BaseItem): boolean; + /** + * Returns true if the party has the given item; + * if includeEquip is set to true, this will also check party equipment. + * @param {RPG.BaseItem} item + * @param {Bool} includeEquip + * @returns {Bool} + * @memberof Game_Party + */ + hasItem(item: rm.types.BaseItem, includeEquip: boolean): boolean; + /** + * Returns true if any party member has the specified equip item. + * + * @param {RPG.EquipItem} item + * @returns {Bool} + * @memberof Game_Party + */ + isAnyMemberEquipped(item: rm.types.EquipItem): boolean; + gainItem(item: rm.types.BaseItem, amount: number, includeEquip: boolean): void; + discardMembersEquip(item: rm.types.EquipItem, amount: number): void; + loseItem(item: rm.types.BaseItem, amount: number, includeEquip: boolean): void; + /** + * Has the party consume the given item. + * + * @param {RPG.BaseItem} item + * @memberof Game_Party + */ + consumeItem(item: rm.types.BaseItem): void; + /** + * Returns true if the party can use the item. + * + * @param {RPG.BaseItem} item + * @returns {Bool} + * @memberof Game_Party + */ + canUse(item: rm.types.BaseItem): boolean; + canInput(): boolean; + /** + * Handler for when the player walks. + * + * @memberof Game_Party + */ + onPlayerWalk(): void; + /** + * Returns the actor that will be used in the current menu; + * this is for menu scenes that target one actor. + * @returns {Game_Actor} + * @memberof Game_Party + */ + menuActor(): Game_Actor; + setMenuActor(actor: Game_Actor): void; + makeMenuActorNext(): void; + makeMenuActorPrevious(): void; + targetActor(): Game_Actor; + setTargetActor(actor: Game_Actor): void; + /** + * Returns the last item selected by the game party. + * + * @returns {RPG.BaseItem} + * @memberof Game_Party + */ + lastItem(): rm.types.BaseItem; + setLastItem(item: rm.types.BaseItem): void; + swapOrder(index1: number, index2: number): void; + /** + * Returns the characters that go on the save life. + * + * @returns {Array>} + * @memberof Game_Party + */ + charactersForSavefile(): any[][]; + /** + * Returns the actor faces for the save file. + * + * @returns {Array>} + * @memberof Game_Party + */ + facesForSavefile(): any[][]; + partyAbility(abilityId: number): boolean; + /** + * Returns true if the encounter rate is set to half. + * + * @returns {Bool} + * @memberof Game_Party + */ + hasEncounterHalf(): boolean; + /** + * Returns true if the encounter rate is set to none. + * + * @returns {Bool} + * @memberof Game_Party + */ + hasEncounterNone(): boolean; + hasCancelSurprise(): boolean; + /** + * Returns true if the party has an increased chance of preemptive strike. + * + * @returns {Bool} + * @memberof Game_Party + */ + hasRaisePreemptive(): boolean; + /** + * Returns true if the party has double gold in effect. + * + * @returns {Bool} + * @memberof Game_Party + */ + hasGoldDouble(): boolean; + hasDropItemDouble(): boolean; + ratePreemptive(troopAgi: number): number; + rateSurprise(troopAgi: number): number; + /** + * Performs victory motion for the entire party. + * + * @memberof Game_Party + */ + performVictory(): void; + /** + * Performs escape motion for the entire party. + * + * @memberof Game_Party + */ + performEscape(): void; + /** + * Remove battle states from all actors in the party. + * + * @memberof Game_Party + */ + removeBattleStates(): void; + /** + * Refreshes the motion on all actors in the party. + * + * @memberof Game_Party + */ + requestMotionRefresh(): void; + static ABILITY_ENCOUNTER_HALF: number; + static ABILITY_ENCOUNTER_NONE: number; + static ABILITY_CANCEL_SURPRISE: number; + static ABILITY_RAISE_PREEMPTIVE: number; + static ABILITY_GOLD_DOUBLE: number; + static ABILITY_DROP_ITEM_DOUBLE: number; +} + +/** + * ----------- + * The game object class for a picture. + * + */ +declare class Game_Picture { + constructor(); + /** + * _name property of the current picture. + * + * @protected + * @type {string} + * @memberof Game_Picture + */ + _name: string; + _origin: number; + _x: number; + _y: number; + _scaleX: number; + _scaleY: number; + _opacity: number; + /** + * Blend Mode, accepts an integer. + */ + _blendMode: number; + _targetX: number; + _targetY: number; + _targetScaleX: number; + _targetScaleY: number; + _targetOpacity: number; + _duration: number; + /** + * Tone of the picture, in RGB format. + * 0 - 255, for all three tone elements. + */ + _tone: number[]; + _toneTarget: number[]; + _toneDuration: number; + _angle: number; + _rotationSpeed: number; + initialize(): void; + /** + * Returns the name of the game picture. + * + * @returns {string} + * @memberof Game_Picture + */ + name(): string; + /** + * Returns the origin of the game picture. + * + * @returns {number} + * @memberof Game_Picture + */ + origin(): number; + /** + * Returns the picture x coordinate. + * + * @returns {number} + * @memberof Game_Picture + */ + x(): number; + /** + * Returns the picture y coordinate. + * + * @returns {number} + * @memberof Game_Picture + */ + y(): number; + /** + * Returns x scale of the game picture. + * + * @returns {number} + * @memberof Game_Picture + */ + scaleX(): number; + /** + * Returns the y scale of the game picture. + * + * @returns {number} + * @memberof Game_Picture + */ + scaleY(): number; + /** + * Returns the opacity of the game picture. + * + * @returns {number} + * @memberof Game_Picture + */ + opacity(): number; + /** + * Returns the blend mode of the game picture. + * + * @returns {number} + * @memberof Game_Picture + */ + blendMode(): number; + /** + * Returns the tone of the game picture. + * + * @returns {Array} + * @memberof Game_Picture + */ + tone(): number[]; + /** + * Returns the angle of the game picture. + * + * @returns {number} + * @memberof Game_Picture + */ + angle(): number; + initBasic(): void; + initTarget(): void; + initTone(): void; + initRotation(): void; + show(name: string, origin: number, x: number, y: number, scaleX: number, scaleY: number, opacity: number, blendMode: number): void; + move(origin: number, x: number, y: number, scaleX: number, scaleY: number, opacity: number, blendMode: number, duration: number): void; + rotate(speed: number): void; + tint(tone: number[], duration: number): void; + /** + * Erases the game picture. + * + * @memberof Game_Picture + */ + erase(): void; + /** + * Updates the game picture. + * + * @memberof Game_Picture + */ + update(): void; + /** + * Updates the movement of the game picture. + * + * @memberof Game_Picture + */ + updateMove(): void; + /** + * Updates the tone of the game picture. + * + * @memberof Game_Picture + */ + updateTone(): void; + /** + * Updates the rotation of the game picture. + * + * @memberof Game_Picture + */ + updateRotation(): void; +} + +/** + * The game object class for the player. It contains, + * encounter information, x, y, vehicle type, and whether + * the player is dashing. The Game Player State is this + * object. + */ +declare class Game_Player extends Game_Character { + protected constructor(); + _vehicleType: string; + _vehicleGettingOn: boolean; + _vehicleGettingOff: boolean; + _dashing: boolean; + _needsMapReload: boolean; + _transferring: boolean; + _newX: number; + _newY: number; + _newDirection: rm.types.Direction; + _fadeType: number; + _followers: Game_Followers; + _encounterCount: number; + /** + * Clears the transfer information for the player. + * + * @memberof Game_Player + */ + clearTransferInfo(): void; + /** + * Returns the player followers (party members). + * + * @returns {Game_Followers} + * @memberof Game_Player + */ + followers(): Game_Followers; + /** + * Refreshes the game player. + * + * @memberof Game_Player + */ + refresh(): void; + /** + * Returns true if the player is stopping. + * + * @returns {Bool} + * @memberof Game_Player + */ + isStopping(): boolean; + /** + * Reserves a transfer of the player to the specified map, at the given + * x and y coordinates, facing the given direction (d). Using a specific fade. + * @param {Int} mapId + * @param {Int} x + * @param {Int} y + * @param {Int} [d] + * @param {Int} [fadeType] + * @memberof Game_Player + */ + reserveTransfer(mapId: number, x: number, y: number, d?: number, fadeType?: number): void; + requestMapReload(): void; + isTransferring(): boolean; + /** + * Returns the new map id. + * + * @returns {Int} + * @memberof Game_Player + */ + newMapId(): number; + fadeType(): number; + /** + * Performs a transfer of the player to a different area or map. + * + * @memberof Game_Player + */ + performTransfer(): void; + isMapPassable(x: number, y: number, d: number): boolean; + /** + * Returns the current vehicles the player is riding in. + * + * @returns {Game_Vehicle} + * @memberof Game_Player + */ + vehicle(): Game_Vehicle; + /** + * Returns true if the player is in a boat. + * + * @returns {Bool} + * @memberof Game_Player + */ + isInBoat(): boolean; + /** + * Returns true if the player is in a ship. + * + * @returns {Bool} + * @memberof Game_Player + */ + isInShip(): boolean; + /** + * Returns true if the player is in an airship. + * + * @returns {Bool} + * @memberof Game_Player + */ + isInAirship(): boolean; + /** + * Returns true if the player is in a vehicle. + * + * @returns {Bool} + * @memberof Game_Player + */ + isInVehicle(): boolean; + /** + * Returns true if the player is in their normal state. + * + * @returns {Bool} + * @memberof Game_Player + */ + isNormal(): boolean; + /** + * Returns true if the player is dashing. + * + * @returns {Bool} + * @memberof Game_Player + */ + isDashRing(): boolean; + isDebugThrough(): boolean; + isCollided(x: number, y: number): boolean; + /** + * Returns the player's center x coordinate. + * + * @returns {Int} + * @memberof Game_Player + */ + centerX(): number; + /** + * Returns the player's center y coordinate. + * + * @returns {Int} + * @memberof Game_Player + */ + centerY(): number; + center(x: number, y: number): void; + locate(x: number, y: number): void; + increaseSteps(): void; + /** + * Creates the encounter count for the player. + * + * @memberof Game_Player + */ + makeEncounterCount(): void; + /** + * Creates the encounter troop id and returns it. + * + * @returns {Int} + * @memberof Game_Player + */ + makeEncounterTroopId(): number; + meetsEncounterConditions(encounter: rm.types.MapEncounter): boolean; + /** + * Executes an encounter. + * + * @returns {Bool} + * @memberof Game_Player + */ + executeEncounter(): boolean; + /** + * Has the player start a map event at the given x and y coordinates. + * Also passing the triggers and whether the event start is normal. + * @param {Int} x + * @param {Int} y + * @param {Array} triggers + * @param {Bool} normal + * @memberof Game_Player + */ + startMapEvent(x: number, y: number, triggers: number[], normal: boolean): void; + moveByInput(): void; + /** + * Returns true if the player can move. + * + * @returns {Bool} + * @memberof Game_Player + */ + canMove(): boolean; + /** + * Gets the input direction of the player as a Int. + * + * @returns {Int} + * @memberof Game_Player + */ + getInputDirection(): number; + executeMove(direction: number): void; + update(sceneActive?: boolean): void; + /** + * Updates the dashing of the player. + * + * @memberof Game_Player + */ + updateDashing(): void; + /** + * Returns true if the dash button is pressed. + * + * @returns {Bool} + * @memberof Game_Player + */ + isDashButtonPressed(): boolean; + updateScroll(lastScrolledX: number, lastScrolledY: number): void; + /** + * Updates the vehicle. + * + * @memberof Game_Player + */ + updateVehicle(): void; + /** + * Updates the player getting on the vehicle. + * + * @memberof Game_Player + */ + updateVehicleGetOn(): void; + /** + * Updates the player getting off the vehicle. + * + * @memberof Game_Player + */ + updateVehicleGetOff(): void; + updateNonmoving(wasMoving: boolean): void; + triggerAction(): boolean; + triggerButtonAction(): boolean; + /** + * Returns true if the player triggered a touch action. + * + * @returns {Bool} + * @memberof Game_Player + */ + triggerTouchAction(): boolean; + triggerTouchActionD1(x1: number, y1: number): boolean; + triggerTouchActionD2(x2: number, y2: number): boolean; + triggerTouchActionD3(x2: number, y2: number): boolean; + /** + * Updates the player encounter count. + * + * @memberof Game_Player + */ + updateEncounterCount(): void; + /** + * Returns true if the player can encounter enemies. + * + * @returns {Bool} + * @memberof Game_Player + */ + canEncounter(): boolean; + /** + * Returns the encounter progress value of the player. + * + * @returns {Int} + * @memberof Game_Player + */ + encounterProgressValue(): number; + checkEventTriggerHere(triggers: number[]): void; + checkEventTriggerThere(triggers: number[]): void; + /** + * Returns true if the player can start local events. + * + * @returns {Bool} + * @memberof Game_Player + */ + canStartLocalEvents(): boolean; + /** + * Returns true if the player is getting on/off a vehicle. + * + * @returns {Bool} + * @memberof Game_Player + */ + getOnOffVehicle(): boolean; + /** + * Returns true if the player is getting on a vehicle. + * + * @returns {Bool} + * @memberof Game_Player + */ + getOnVehicle(): boolean; + /** + * Returns true if the player is getting off a vehicle. + * + * @returns {Bool} + * @memberof Game_Player + */ + getOffVehicle(): boolean; + /** + * Forces the player to move forward. + * + * @memberof Game_Player + */ + forceMoveForward(): void; + /** + * Returns true if the player is on a floor that does damage. + * + * @returns {Bool} + * @memberof Game_Player + */ + isOnDamageFloor(): boolean; + /** + * Moves the player straight, given a direction. + * + * @param {Int} d + * @memberof Game_Player + */ + moveStraight(d: number): void; + /** + * Moves the player diagonally, given a horizontal + * and vertical direction. The numpad represents the directions. + * @param {Int} horz + * @param {Int} vert + * @memberof Game_Player + */ + moveDiagonally(horz: number, vert: number): void; + /** + * Has the player jump in the given direction at the specified + * x and y coordinate. This x and y will be added to the player's current + * position. + * @param {Int} xPlus + * @param {Int} yPlus + * @memberof Game_Player + */ + jump(xPlus: number, yPlus: number): void; + /** + * Shows the player followers. + * + * @memberof Game_Player + */ + showFollowers(): void; + /** + * Hides the player followers. + * + * @memberof Game_Player + */ + hideFollowers(): void; + /** + * Gather followers around the player. + * + * @memberof Game_Player + */ + gatherFollowers(): void; + /** + * Returns true if the followers are currently gathering. + * + * @returns {Bool} + * @memberof Game_Player + */ + areFollowersGathering(): boolean; + /** + * Returns true if the followers are gathered. + * + * @returns {Bool} + * @memberof Game_Player + */ + areFollowersGathered(): boolean; +} + +/** + * The game object class for screen effect data, such as + * changes in color tone and flashes. + * aliased as $gameScreen. + * @class Game_Screen + */ +declare class Game_Screen { + constructor(); + initialize(): void; + clear(): void; + /** + * Handler for when the battle starts in game; prepares + * the screen for the battle scene. + * @memberof Game_Screen + */ + onBattleStart(): void; + /** + * Returns the brightness of the game screen. + * + * @returns {number} + * @memberof Game_Screen + */ + brightness(): number; + tone(): number[]; + flashColor(): number[]; + shake(): number; + /** + * Returns the zoom x coordinate of the screen. + * + * @returns {number} + * @memberof Game_Screen + */ + zoomX(): number; + /** + * Returns the zoom y coordiante of the screen. + * + * @returns {number} + * @memberof Game_Screen + */ + zoomY(): number; + /** + * Returns the zoom scale of the screen. + * + * @returns {number} + * @memberof Game_Screen + */ + zoomScale(): number; + /** + * Returns the current weather type. + * + * @returns {string} + * @memberof Game_Screen + */ + weatherType(): string; + /** + * Returns the weather power. + * + * @returns {number} + * @memberof Game_Screen + */ + weatherPower(): number; + /** + * Returns the specified picture given the picture id. + * + * @param {number} pictureId + * @returns {Game_Picture} + * @memberof Game_Screen + */ + picture(pictureId: number): Game_Picture; + /** + * Returns the real picture id, given the picture id. + * + * @param {number} pictureId + * @returns {number} + * @memberof Game_Screen + */ + realPictureId(pictureId: number): number; + /** + * Clears the screen fade. + * + * @memberof Game_Screen + */ + clearFade(): void; + /** + * Clears the screen tone. + * + * @memberof Game_Screen + */ + clearTone(): void; + /** + * Clears the screen flash. + * + * @memberof Game_Screen + */ + clearFlash(): void; + /** + * Clears the screen shake. + * + * @memberof Game_Screen + */ + clearShake(): void; + /** + * Clears the screen zoom. + * + * @memberof Game_Screen + */ + clearZoom(): void; + /** + * Clears the screen weather. + * + * @memberof Game_Screen + */ + clearWeather(): void; + /** + * Clears the pictures set on the game screen. + * + * @memberof Game_Screen + */ + clearPictures(): void; + /** + * Erases the battle pictures. + * + * @memberof Game_Screen + */ + eraseBattlePictures(): void; + /** + * Returns the maximum number of pictures set on the game screen. + * + * @returns {number} + * @memberof Game_Screen + */ + maxPictures(): number; + startFadeOut(duration: number): void; + startFadeIn(duration: number): void; + startTint(tone: number[], duration: number): void; + startFlash(color: number[], duration: number): void; + startShake(power: number, speed: number, duration: number): void; + startZoom(x: number, y: number, scale: number, duration: number): void; + setZoom(x: number, y: number, scale: number): void; + changeWeather(type: string, power: number, duration: number): void; + /** + * Updates the game screen. + * + * @memberof Game_Screen + */ + update(): void; + /** + * Updates the screen fade out. + * + * @memberof Game_Screen + */ + updateFadeOut(): void; + /** + * Updates the screen fade in. + * + * @memberof Game_Screen + */ + updateFadeIn(): void; + /** + * Updates the screen tone. + * + * @memberof Game_Screen + */ + updateTone(): void; + /** + * Update the screen flash. + * + * @memberof Game_Screen + */ + updateFlash(): void; + /** + * Update the screen shake. + * + * @memberof Game_Screen + */ + updateShake(): void; + /** + * Update the screen zoom. + * + * @memberof Game_Screen + */ + updateZoom(): void; + /** + * Update the screen weather. + * + * @memberof Game_Screen + */ + updateWeather(): void; + /** + * Update the screen pictures. + * + * @memberof Game_Screen + */ + updatePictures(): void; + startFlashForDamage(): void; + showPicture(pictureId: number, name: string, origin: number, x: number, y: number, scaleX: number, scaleY: number, opacity: number, blendMode: number): void; + movePicture(pictureId: number, origin: number, x: number, y: number, scaleX: number, scaleY: number, opacity: number, blendMode: number, duration: number): void; + rotatePicture(pictureId: number, speed: number): void; + tintPicture(pictureId: number, tone: number[], duration: number): void; + /** + * Erases a picture from the screen given the respected picture id. + * + * @param {number} pictureId + * @memberof Game_Screen + */ + erasePicture(pictureId: number): void; +} + +/** + * The game object class for self switches. + */ +declare class Game_SelfSwitches { + constructor(); + /** + * {key: Array} + */ + _data: { [key: string]: any }; + initialize(): void; + /** + * Clears the array of data for the game's self switches. + * + * @memberof Game_SelfSwitches + */ + clear(): void; + /** + * Returns the value of the switch at the current key; + * the value is a boolean (true or false). + * @param {Array} key + * @returns {boolean} + * @memberof Game_SelfSwitches + */ + value(key: any[]): boolean; + /** + * Sets the value of the key of the respected self switch. + * + * @param {Array} key + * @param {boolean} value + * @memberof Game_SelfSwitches + */ + setValue(key: any[], value: boolean): void; + onChange(): void; +} + +/** + * The game object class for game switches. + * + * @class Game_Switches + */ +declare class Game_Switches { + constructor(); + _data: boolean[]; + initialize(): void; + clear(): void; + value(switchId: number): boolean; + setValue(switchId: number, value: boolean): void; + onChange(): void; +} + +declare namespace rm.types { + /** + * The data class for audio file. + */ + export type AudioFile = { + /** + * The sound file name. + */ + name: string; + /** + * The pan. + */ + pan: number; + /** + * The sound's pitch (50..150). The default value is 100. + */ + pitch: number; + /** + * The sound's volume (0..100). The default values are 100 for BGM and ME and 80 for BGS and SE. + */ + volume: number; + } +} + +/** + * Game_System + * The game object class representing system data. + * @class Game_System + */ +declare class Game_System { + protected constructor(); + initialize(): void; + isJapanese(): boolean; + isChinese(): boolean; + isKorean(): boolean; + isCJK(): boolean; + isRussian(): boolean; + isSideView(): boolean; + isAutoSaveEnabled(): boolean; + isSaveEnabled(): boolean; + /** + * Disables the ability to save the game. + * + * @memberof Game_System + */ + disableSave(): void; + /** + * Enables the ability to save the game. + * + * @memberof Game_System + */ + enableSave(): void; + /** + * Returns true if the menu is enabled. + * + * @returns {Bool} + * @memberof Game_System + */ + isMenuEnabled(): boolean; + /** + * Disables the menu from being accessed. + * + * @memberof Game_System + */ + disableMenu(): void; + /** + * Enables the menu to be accessed. + * + * @memberof Game_System + */ + enableMenu(): void; + isEncounterEnabled(): boolean; + /** + * Returns true if the player can encounter enemies. + * + * @memberof Game_System + */ + disableEncounter(): void; + enableEncounter(): void; + isFormationEnabled(): boolean; + /** + * Disables the use of the formation command in the menu. + * + * @memberof Game_System + */ + disableFormation(): void; + /** + * Enables the use of the formation command in the menu. + * + * @memberof Game_System + */ + enableFormation(): void; + /** + * Returns the number of battles the player has participated in. + * + * @returns {number} + * @memberof Game_System + */ + battleCount(): number; + /** + * Returns the number of the wins the player has gained in battle. + * + * @returns {number} + * @memberof Game_System + */ + winCount(): number; + /** + * Returns the number of battles the player has escaped from in battle. + * + * @returns {number} + * @memberof Game_System + */ + escapeCount(): number; + /** + * Returns the number of saves the player has made in game. + * + * @returns {number} + * @memberof Game_System + */ + saveCount(): number; + /** + * Returns the version id represented in the database. + * + * @returns {number} + * @memberof Game_System + */ + versionId(): number; + /** + * Returns the current save file id + * + * @returns {number} + * @memberof Game_System + */ + savefileId(): number; + /** + * Sets the save file id + * + * @returns {Void} + * @memberof Game_System + */ + setSavefileId(savefileId: number): void; + /** + * Returns the tone of the window in the database. + * + * @returns {Array} + * @memberof Game_System + */ + windowTone(): number[]; + /** + * Sets the window tone, given an array + * of rgb. Example: [0, 255, 255]. + * @param {Array} value + * @memberof Game_System + */ + setWindowTone(value: number[]): void; + /** + * Returns the current battle background music. + * + * @returns {AudioFile} + * @memberof Game_System + */ + battleBgm(): rm.types.AudioFile; + /** + * Sets the battle background music. + * + * @param {AudioFile} value + * @memberof Game_System + */ + setBattleBgm(value: rm.types.AudioFile): void; + /** + * Returns the victory musical effect. + * + * @returns {AudioFile} + * @memberof Game_System + */ + victoryMe(): rm.types.AudioFile; + /** + * Sets the victory musical effect. + * + * @param {AudioFile} value + * @memberof Game_System + */ + setVictoryMe(value: rm.types.AudioFile): void; + /** + * Returns the defeat musical effect. + * + * @returns {AudioFile} + * @memberof Game_System + */ + defeatMe(): rm.types.AudioFile; + onBattleStart(): void; + onBattleWin(): void; + onBattleEscape(): void; + onBeforeSave(): void; + onAfterLoad(): void; + /** + * Returns the total play time. + * + * @returns {number} + * @memberof Game_System + */ + playtime(): number; + playtimeText(): string; + /** + * Saves background music to the game system object. + * + * @memberof Game_System + */ + saveBgm(): void; + /** + * Replays the saved background music. + * + * @memberof Game_System + */ + replayBgm(): void; + /** + * Saves the walking background music. + * + * @memberof Game_System + */ + saveWalkingBgm(): void; + /** + * Replays the saved walking background music. + * + * @memberof Game_System + */ + replayWalkingBgm(): void; + /** + * Saves the second walking bgm from the map data. + * + * @memberof Game_System + */ + saveWalkingBgm2(): void; + /** + * Returns the main font face + * + * @returns {String} + * @memberof Game_System + */ + mainFontFace(): string; + /** + * Returns the font face for number + * + * @returns {String} + * @memberof Game_System + */ + numberFontFace(): string; + /** + * Returns the main font size + * + * @returns {Int} + * @memberof Game_System + */ + mainFontSize(): number; + /** + * Returns the window padding + * + * @returns {Int} + * @memberof Game_System + */ + windowPadding(): number; +} + +/** + * The game object class for temporary data that is not + * included in the save data. + * @class Game_Temp + */ +declare class Game_Temp { + constructor(); + _isPlaytest: boolean; + _commonEventId: number; + _destinationX: number; + _destinationY: number; + initialize(): void; + /** + * Determines if the game is in Play Test mode. + * + * @returns {boolean} + * @memberof Game_Temp + */ + isPlaytest(): boolean; + /** + * Reserves the given commonEventId to be processed later. + * + * @param {number} commonEventId + * @memberof Game_Temp + */ + reserveCommonEvent(commonEventId: number): void; + /** + * Clears the current reserved common event. + * + * @memberof Game_Temp + */ + clearCommonEvent(): void; + /** + * Returns true if a common event has been reserved. + * + * @returns {boolean} + * @memberof Game_Temp + */ + isCommonEventReserved(): boolean; + /** + * Returns common event data from the database. + * + * @returns {any} + * @memberof Game_Temp + */ + reservedCommonEvent(): any; + /** + * Sets the destination of the player for movement. + * + * @param {number} x + * @param {number} y + * @memberof Game_Temp + */ + setDestination(x: number, y: number): void; + /** + * Clears the destination of movement for the player. + * + * @memberof Game_Temp + */ + clearDestination(): void; + /** + * Determines if the destination for the player to move to is valid. + * + * @returns {boolean} + * @memberof Game_Temp + */ + isDestinationValid(): boolean; + /** + * Returns the x coordinate of the destination. + * + * @returns {number} + * @memberof Game_Temp + */ + destinationX(): number; + /** + * Returns the y coordinate of the destination. + * + * @returns {number} + * @memberof Game_Temp + */ + destinationY(): number; +} + +/** + * The game object class for the timer. + * + * @class Game_Timer + */ +declare class Game_Timer { + constructor(); + _frames: number; + _working: boolean; + initialize(): void; + /** + * Updates the game timer. + * + * @param {boolean} sceneActive + * @memberof Game_Timer + */ + update(sceneActive: boolean): void; + /** + * Starts the timer with the specified number of frames as count. + * + * @param {number} count + * @memberof Game_Timer + */ + start(count: number): void; + /** + * Stops the timer. + * + * @memberof Game_Timer + */ + stop(): void; + /** + * Returns true if the timer is working and counting down. + * + * @returns {boolean} + * @memberof Game_Timer + */ + isWorking(): void; + /** + * Returns the number of seconds on the timer. + * + * @returns {number} + * @memberof Game_Timer + */ + seconds(): number; + /** + * Handler for when the time expires on the timer. + * + * @memberof Game_Timer + */ + onExpire(): void; +} + +declare namespace rm.types { + export type TroopMember = { + /** + * The enemy ID. + */ + enemyId: number; + /** + * The truth value of the [Appear Halfway] option. + */ + hidden: boolean; + /** + * The troop member's x-coordinate. + */ + x: number; + /** + * The troop member's y-coordinate. + */ + y: number; + } +} + +declare namespace rm.types { + /** + * The data class of battle event [Conditions]. + */ + export type PageCondition = { + /** + * The HP percentage specified in the [Actor] condition. + */ + actorHp: number; + /** + * The actor ID specified in the [Actor] condition. + */ + actorId: number; + /** + * The truth value indicating whether the [Actor] condition is valid. + */ + actorValid: boolean; + /** + * The HP percentage specified in the [Enemy] condition. + */ + enemyHp: number; + /** + * The troop member index specified in the [Enemy] condition (0..7). + */ + enemyIndex: number; + /** + * The truth value indicating whether the [Enemy] condition is valid. + */ + enemyValid: boolean; + /** + * The switch ID specified in the [Switch] condition. + */ + switchId: number; + /** + * The truth value indicating whether the [Switch] condition is valid. + */ + switchValid: boolean; + /** + * The a and b values specified in the [Turn No.] condition. To be input in the form A + B * X. + */ + turnA: number; + /** + * The a and b values specified in the [Turn No.] condition. To be input in the form A + B * X. + */ + turnB: number; + /** + * The truth value indicating whether the [At End of Turn] condition is valid. + */ + turnEnding: boolean; + /** + * The truth value indicating whether the [Turn No.] condition is valid. + */ + turnValid: boolean; + } +} + +declare namespace rm.types { + /** + * The data class for battle events (pages). + */ + export type Page = { + /** + * Condition (RPG.Troop.Page.Condition). + */ + condition: rm.types.PageCondition; + /** + * Program contents. An RPG.EventCommand array. + */ + list: rm.types.EventCommand[]; + /** + * Span (0: battle, 1: turn, 2: moment). + */ + span: number; + } +} + +declare namespace rm.types { + export type Troop = { + /** + * The troop ID. + */ + id: number; + /** + * The troop members. An RPG.Troop.Member array. + */ + members: rm.types.TroopMember[]; + /** + * The troop name. + */ + name: string; + /** + * The battle events. An RPG.Troop.Page array. + */ + pages: rm.types.Page[]; + } +} + +/** + * ----------------------------------------------------------------------------- + * Game_Troop + * + * The game object declare class for a troop and the battle-related data. + * @class Game_Troop + */ +declare class Game_Temp extends Game_Unit { + constructor(); + _interpreter: Game_Interpreter; + _troopId: number; + /** + * Returns all enemies in the battle. + * + * @returns {Array} + * @memberof Game_Troop + */ + members(): Game_Enemy[]; + /** + * Returns all alive enemies. + * + * @returns {Array} + * @memberof Game_Troop + */ + aliveMembers(): Game_Enemy[]; + /** + * Returns all dead enemies. + * + * @returns {Array} + * @memberof Game_Troop + */ + deadMembers(): Game_Enemy[]; + /** + * Returns movable enemies. + * + * @returns {Array} + * @memberof Game_Troop + */ + movableMembers(): Game_Enemy[]; + /** + * Returns true if event is running. + * + * @returns {boolean} + * @memberof Game_Troop + */ + isEventRunning(): boolean; + /** + * Updates the game interpreter. + * + * @memberof Game_Troop + */ + updateInterpreter(): void; + /** + * Returns the turn count. + * + * @returns {number} + * @memberof Game_Troop + */ + turnCount(): number; + clear(): void; + /** + * Returns troop information from the database. + * + * @returns {RPG.Troop} + * @memberof Game_Troop + */ + troop(): rm.types.Troop; + setup(troopId: number): void; + /** + * Creates unique names for each enemy. + * + * @memberof Game_Troop + */ + makeUniqueNames(): void; + /** + * Returns the letter table for enemy troops. + * + * @returns {Array} + * @memberof Game_Troop + */ + letterTable(): string[]; + /** + * Returns the name of enemies within the troop. + * + * @returns {Array} + * @memberof Game_Troop + */ + enemyNames(): string[]; + meetsConditions(page: rm.types.EventPage): boolean; + setupBattleEvent(): void; + /** + * Increases the turn number. + * + * @memberof Game_Troop + */ + increaseTurn(): void; + /** + * Returns the total exp of all members of the enemy troop. + * + * @returns {number} + * @memberof Game_Troop + */ + expTotal(): number; + /** + * Return the total gold of all enemies. + * + * @returns {number} + * @memberof Game_Troop + */ + goldTotal(): number; + /** + * Returns the gold rate based on game party gold rate. + * + * @returns {number} + * @memberof Game_Troop + */ + goldRate(): number; + /** + * Creates the drop items for all members of the enemy troop, and + * returns the item information. + * @returns {Array} + * @memberof Game_Troop + */ + makeDropItems(): rm.types.BaseItem[]; + static LETTER_TABLE_HALF: string[]; + static LETTER_TABLE_FULL: string[]; +} + +/** + * The game object class for game variables. + */ +declare class Game_Variables { + constructor(); + _data: number[]; + initialize(): void; + clear(): void; + value(variableId: number): number; + setValue(variableId: number, value: number): void; + onChange(): void; +} + +declare namespace rm.types { + /** + * The data class for vehicles. + */ + export type SystemVehicle = { + /** + * The vehicle's BGM (RPG.AudioFile). + */ + bgm: rm.types.AudioFile; + /** + * The index of the vehicle's walking graphic (0..7). + */ + characterIndex: number; + /** + * The file name of the vehicle's walking graphic. + */ + characterName: string; + /** + * The map ID of the vehicle's initial position. + */ + startMapId: number; + /** + * The map's x-coordinate of the vehicle's initial position. + */ + startX: number; + /** + * The map's y-coordinate of the vehicle's initial position. + */ + startY: number; + } +} + +/** + * The game object class for a vehicle. + */ +declare class Game_Vehicle extends Game_Character { + constructor(type: string); + _type: string; + _mapId: number; + _altitude: number; + _driving: boolean; + _bgm: rm.types.AudioFile; + initMembers(): void; + /** + * Returns true if the vehicle is a boat. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + isBoat(): boolean; + /** + * Returns true if the vehicle is a ship. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + isShip(): boolean; + /** + * Returns true if the vehicle is an airship. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + isAirship(): boolean; + /** + * Resets the direction of the vehicle. + * + * @memberof Game_Vehicle + */ + resetDirection(): void; + initMoveSpeed(): void; + /** + * Returns the current vehicle. + * + * @returns {RPG.System.Vehicle} + * @memberof Game_Vehicle + */ + vehicle(): rm.types.SystemVehicle; + loadSystemSettings(): void; + /** + * Refreshes the game vehicle. + * + * @memberof Game_Vehicle + */ + refresh(): void; + setLocation(mapId: number, x: number, y: number): void; + pos(x: number, y: number): boolean; + isMapPassable(x: number, y: number, d: rm.types.Direction): boolean; + /** + * Gets on the vehicle. + * + * @memberof Game_Vehicle + */ + getOn(): void; + /** + * Gets off the vehicle. + * + * @memberof Game_Vehicle + */ + getOff(): void; + /** + * Sets the bgm associated with the vehicle. + * + * @param {RPG.AudioFile} bgm + * @memberof Game_Vehicle + */ + setBgm(bgm: rm.types.AudioFile): void; + /** + * Plays the bgm associated with the vehicle. + * + * @memberof Game_Vehicle + */ + playBgm(): void; + /** + * Syncs the vehicle with the player. + * + * @memberof Game_Vehicle + */ + syncWithPlayer(): void; + /** + * Returns the screen y position of the vehicle. + * + * @returns {number} + * @memberof Game_Vehicle + */ + screenY(): number; + /** + * Returns the shadow x position of the vehicle's shadow. + * + * @returns {number} + * @memberof Game_Vehicle + */ + shadowX(): number; + /** + * Returns the shadow y position of the vehicle's shadow. + * + * @returns {number} + * @memberof Game_Vehicle + */ + shadowY(): number; + /** + * Returns the shadow opacity of the vehicle's shadow. + * + * @returns {number} + * @memberof Game_Vehicle + */ + shadowOpacity(): number; + /** + * Returns true if the vehicle can move. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + canMove(): boolean; + /** + * Updates the vehicle. + * + * @memberof Game_Vehicle + */ + update(): void; + /** + * Updates the airship. + * + * @memberof Game_Vehicle + */ + updateAirship(): void; + /** + * Updates airship altitude. + * + * @memberof Game_Vehicle + */ + updateAirshipAltitude(): void; + /** + * Returns the max altitude of the vehicle. + * + * @returns {number} + * @memberof Game_Vehicle + */ + maxAltitude(): number; + /** + * Returns true if the vehicle is at it's lowest altitude. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + isLowest(): boolean; + /** + * Returns true if the vehicle is at it's highest altitude. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + isHighest(): boolean; + /** + * Returns true if take off is ok. + * + * @returns {Bool} + * @memberof Game_Vehicle + */ + isTakeoffOk(): boolean; + /** + * Returns true if the vehicle is capable of landing at the specified + * x, y coordinate, with the specified direction (d). + * @param {number} x + * @param {number} y + * @param {number} d + * @returns {Bool} + * @memberof Game_Vehicle + */ + isLandOk(x: number, y: number, d: rm.types.Direction): boolean; +} + +declare class Scene_Base extends Stage { + constructor(); + _windowLayer: WindowLayer; + /** + * Initializes the scene. + * @return Void + */ + initialize(): void; + /** + * Creates the scene's important properties. + */ + create(): void; + /** + * Returns whether the scene is active or not. + * @return Bool + */ + isActive(): boolean; + /** + * Returns if the scene is ready or not. + * @return Bool + */ + isReady(): boolean; + /** + * Starts the scene. + */ + start(): void; + /** + * Updates the scene. + */ + update(): void; + /** + * Stops the scene. + */ + stop(): void; + /** + * Checks if the Scene is busy processing an event + * or other conditions. + * @return Bool + */ + isBusy(): boolean; + /** + * Terminates/ends the scene. + */ + terminate(): void; + /** + * Creates the window layer on the current scene + * for displaying any and all windows. + */ + createWindowLayer(): void; + /** + * Adds a child window to the window layer for processing. + * @param window + */ + addWindow(window: Window_Base): void; + /** + * Request a fadeIn screen process + * @param duration [duration=30] The time the process will take to fadeIn the screen. + * @param white [white=false] If true the fadeIn will process with a white color else it will be black. + */ + startFadeIn(duration: number, white: boolean): void; + /** + * Request a fadeOut screen process + * @param duration [duration=30] The time the process will take to fadeOut the screen. + * @param white [white=false] If true the fadeOut will process with a white color else it will be black. + */ + startFadeOut(duration: number, white: boolean): void; + createFadeSprite(white: boolean): void; + /** + * Updates the scene's fade + */ + updateFade(): void; + updateChildren(): void; + /** + * Pops the current scene and returns to the previous scene if available. + */ + popScene(): void; + /** + * Checks for game over. + */ + checkGameOver(): void; + fadeOutAll(): void; + /** + * Returns the fade speed. + * @return Int + */ + fadeSpeed(): number; + /** + * Returns the slow fade speed. + * @return Int + */ + slowFadeSpeed(): number; +} + +/** + * Scene class of the battle screen. + */ +declare class Scene_Battle extends Scene_Base { + protected constructor(); + updateBattleProcess(): void; + isAnyInputWindowActive(): boolean; + changeInputWindow(): void; + /** + * Stops the battle scene. + * + * @memberof Scene_Battle + */ + stop(): void; + /** + * Returns true if the battle needs a slow fade out. + * + * @returns {boolean} + * @memberof Scene_Battle + */ + needsSlowFadeOut(): boolean; + /** + * Updates the status window on the battle scene. + * + * @memberof Scene_Battle + */ + updateStatusWindow(): void; + /** + * Updates the position of the battle scene windows. + * + * @memberof Scene_Battle + */ + updateWindowPositions(): void; + /** + * Creates all the display objects including: + * the spritesheet, window layer, windows, and more. + * + * @memberof Scene_Battle + */ + createDisplayObjects(): void; + /** + * Creates the spriteset within + * the battle scene. This includes + * sprites for actors, enemies, etc. + * @memberof Scene_Battle + */ + createSpriteset(): void; + /** + * Creates all the windows within the + * battle scene. + * @memberof Scene_Battle + */ + createAllWindows(): void; + /** + * Creates the log window. + * + * @memberof Scene_Battle + */ + createLogWindow(): void; + createStatusWindow(): void; + createPartyCommandWindow(): void; + /** + * Creates the actor command window. + * + * @memberof Scene_Battle + */ + createActorCommandWindow(): void; + /** + * Creates the help window. + * + * @memberof Scene_Battle + */ + createHelpWindow(): void; + /** + * Creates the skill window. + * + * @memberof Scene_Battle + */ + createSkillWindow(): void; + /** + * Creates the item window. + * + * @memberof Scene_Battle + */ + createItemWindow(): void; + /** + * Creates the actor window. + * + * @memberof Scene_Battle + */ + createActorWindow(): void; + /** + * Creates the enemy window. + * + * @memberof Scene_Battle + */ + createEnemyWindow(): void; + /** + * Creates the message window on the battle scene. + * + * @memberof Scene_Battle + */ + createMessageWindow(): void; + /** + * Creates the scroll text window. + * + * @memberof Scene_Battle + */ + createScrollTextWindow(): void; + refreshStatus(): void; + startPartyCommandSelection(): void; + /** + * Handler for the fight command on battle start.. + * + * @memberof Scene_Battle + */ + commandFight(): void; + /** + * Handler for the escape command on battle start. + * + * @memberof Scene_Battle + */ + commandEscape(): void; + startActorCommandSelection(): void; + /** + * Handler for the attack command. + * + * @memberof Scene_Battle + */ + commandAttack(): void; + /** + * + * Handler for the skill command. + * + * @memberof Scene_Battle + */ + commandSkill(): void; + /** + * Handler for the guard command. + * + * @memberof Scene_Battle + */ + commandGuard(): void; + /** + * Handler for the item command. + * + * @memberof Scene_Battle + */ + commandItem(): void; + /** + * Selects the next command in the battle scene. + * + * @memberof Scene_Battle + */ + selectNextCommand(): void; + /** + * Selects the previous command in the battle scene. + * + * @memberof Scene_Battle + */ + selectPreviousCommand(): void; + selectActorSelection(): void; + onActorOk(): void; + onActorCancel(): void; + selectEnemySelection(): void; + /** + * Handler for when an enemy is selected. + * + * @memberof Scene_Battle + */ + onEnemyOk(): void; + onEnemyCancel(): void; + /** + * Handler for when a skill is selected. + * + * @memberof Scene_Battle + */ + onSkillOk(): void; + onSkillCancel(): void; + onItemOk(): void; + onItemCancel(): void; + onSelectAction(): void; + endCommandSelection(): void; +} + +declare class Scene_Boot extends Scene_Base { + protected constructor(); + _databaseLoaded: boolean; + /** + * Loads the system images upon booting the game. + */ + loadSystemImages(): void; + /** + * Loads the system window image for showing all windows in game. + */ + loadSystemWindowImage(): void; + /** + * Returns true if the game font is loaded. + * @return Bool + */ + isGameFontLoaded(): boolean; + updateDocumentTitle(): void; + /** + * Checks the player location upon booting the game. + */ + checkPlayerLocation(): void; +} + +/** + * The super class of all menu-type scenes + */ +declare class Scene_MenuBase extends Scene_Base { + protected constructor(); + /** + * Returns the current game actor. + * + * @returns {Game_Actor} + * @memberof Scene_MenuBase + */ + actor(): Game_Actor; + /** + * Updates the current actor. + * + * @memberof Scene_MenuBase + */ + updateActor(): void; + /** + * Creates the background of the base menu scene. + * + * @memberof Scene_MenuBase + */ + createBackground(): void; + /** + * Sets the background opacity of the base menu scene background. + * + * @param {number} opacity + * @memberof Scene_MenuBase + */ + setBackgroundOpacity(opacity: number): void; + /** + * Creates the help window. + * + * @memberof Scene_MenuBase + */ + createHelpWindow(): void; + /** + * Moves to the next actor in the party. + * + * @memberof Scene_MenuBase + */ + nextActor(): void; + /** + * Moves to the previous actor in the party. + * + * @memberof Scene_MenuBase + */ + previousActor(): void; + onActorChange(): void; +} + +/** + * Scene class of the debug menu screen. + */ +declare class Scene_Debug extends Scene_MenuBase { + protected constructor(); + /** + * Creates the range window. + * + * @memberof Scene_Debug + */ + createRangeWindow(): void; + /** + * Creates the edit window. + * + * @memberof Scene_Debug + */ + createEditWindow(): void; + /** + * Creates the debug help .window. + * + * @memberof Scene_Debug + */ + createDebugHelpWindow(): void; + onRangeOk(): void; + onEditCancel(): void; + refreshHelpWindow(): void; + /** + * Returns the help text within the + * debug scene. + * @returns {String} + * @memberof Scene_Debug + */ + helpText(): string; +} + +/** + * Scene class of the equipment screen. + */ +declare class Scene_Equip extends Scene_MenuBase { + protected constructor(); + /** + * Creates the status window within the equip scene. + * + * @memberof Scene_Equip + */ + createStatusWindow(): void; + /** + * Creates the status window within the equip scene. + * + * @memberof Scene_Equip + */ + createCommandWindow(): void; + /** + * Creates the slot window within the equip scene. + * + * @memberof Scene_Equip + */ + createSlotWindow(): void; + /** + * Creates the item window within the equip scene. + * + * @memberof Scene_Equip + */ + createItemWindow(): void; + /** + * Refreshes the actor within the equip scene. + * + * @memberof Scene_Equip + */ + refreshActor(): void; + /** + * Handler for the equip command. + * + * @memberof Scene_Equip + */ + commandEquip(): void; + /** + * Handler for the optimize command. + * + * @memberof Scene_Equip + */ + commandOptimize(): void; + commandClear(): void; + onSlotOk(): void; + onSlotCancel(): void; + onItemOk(): void; + onItemCancel(): void; + onActorChange(): void; +} + +/** + * Super class of Scene_Save and Scene_Load + */ +declare class Scene_File extends Scene_MenuBase { + protected constructor(); + /** + * Returns the index of the first + * save file. + * @returns {number} + * @memberof Scene_File + */ + firstSavefileIndex(): number; + /** + * Returns the current savefileId. + * + * @memberof Scene_File + */ + savefileId(): number; + createHelpWindow(): void; + createListWindow(): void; + /** + * The current mode of the scene; + * the modes are 'save' or 'load'. + * @memberof Scene_File + */ + mode(): void; + activateListWindow(): void; + helpWindowText(): string; + /** + * Handler for when a + * save file is selected within the file scene. + * @memberof Scene_File + */ + onSavefileOk(): void; +} + +/** + * Scene class of the game end screen. + */ +declare class Scene_GameEnd extends Scene_MenuBase { + protected constructor(); + stop(): void; + /** + * Creates the background for + * the game end scene. + * @memberof Scene_GameEnd + */ + createBackground(): void; + /** + * Creates the command window + * for the game end screen. + * @memberof Scene_GameEnd + */ + createCommandWindow(): void; + /** + * Handler for when to title + * is clicked within the game end screen. + * @memberof Scene_GameEnd + */ + commandToTitle(): void; +} + +/** + * Scene class of the game over screen. + */ +declare class Scene_Gameover extends Scene_Base { + protected constructor(); + stop(): void; + /** + * Plays the game over music + * within the game over scene. + * @memberof Scene_Gameover + */ + playGameoverMusic(): void; + /** + * Creates the background of + * the game over scene. + * @memberof Scene_Gameover + */ + createBackground(): void; + isTriggered(): boolean; + /** + * Returns to the title scene (Scene_Title). + * @memberof Scene_Gameover + */ + gotoTitle(): void; +} + +/** + * Super class of all public function item(skill, items, etc) screen scenes. + * Super class of Scene_Item & Scene_Skill. + */ +declare class Scene_ItemBase extends Scene_Base { + protected constructor(); + /** + * Creates the actor window within the base item scene. + * + * @memberof Scene_ItemBase + */ + createActorWindow(): void; + /** + * Returns the item attached to the item window within the base item scene. + * + * @returns {*} + * @memberof Scene_ItemBase + */ + item(): any; + /** + * Returns the current game actor. + * + * @returns {Game_Actor} + * @memberof Scene_ItemBase + */ + user(): Game_Actor; + /** + * Returns true if the cursor is left. + * + * @returns {boolean} + * @memberof Scene_ItemBase + */ + isCursorLeft(): boolean; + /** + * Shows the sub window. + * + * @param {Window_Base} window + * @memberof Scene_ItemBase + */ + showSubWindow(window: Window_Base): void; + /** + * Hides the sub window. + * + * @param {Window_Base} window + * @memberof Scene_ItemBase + */ + hideSubWindow(window: Window_Base): void; + onActorOk(): void; + onActorCancel(): void; + determineItem(): void; + /** + * Uses the current item. + * + * @memberof Scene_ItemBase + */ + useItem(): void; + /** + * Activates the item window. + * + * @memberof Scene_ItemBase + */ + activateItemWindow(): void; + itemTargetActors(): Game_Actor; + /** + * Returns true if the user (game actor) can use the item. + * + * @returns {boolean} + * @memberof Scene_ItemBase + */ + canUse(): boolean; + /** + * Returns true if the item effects are valid on the public function target(the user). + * + * @returns {boolean} + * @memberof Scene_ItemBase + */ + isItemEffectsValid(): boolean; + applyItem(): void; + /** + * Checks the common event set on the item. + * + * @memberof Scene_ItemBase + */ + checkCommonEvent(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Scene_Item + * + * The scene class of the item screen. + * @class Scene_Item + * @extends {Scene_ItemBase} + */ +declare class Scene_Item extends Scene_ItemBase { + protected constructor(); + /** + * Creates the category window on the + * item scene. + * @memberof Scene_Item + */ + createCategoryWindow(): void; + /** + * Creates the item window on the item + * scene. + * @memberof Scene_Item + */ + createItemWindow(): void; + /** + * Handler for when a cataegory is selected + * on the item scene. + * @memberof Scene_Item + */ + onCategoryOk(): void; + /** + * Handler for when an item is selected + * on the item scene. + * @memberof Scene_Item + */ + onItemOk(): void; + /** + * Handler for when an item selection + * is canceled on the item scene. + * @memberof Scene_Item + */ + onItemCancel(): void; + /** + * Plays a sound effect when the + * item is confirmed. + * @memberof Scene_Item + */ + playSeForItem(): void; +} + +/** + * The scene class of the load game screen. + */ +declare class Scene_Load extends Scene_File { + protected constructor(); + /** + * Returns the mode of the + * load scene. + * @returns {string} + * @memberof Scene_Load + */ + mode(): string; + /** + * Returns the help window text on the + * game load scene. + * @returns {string} + * @memberof Scene_Load + */ + helpWindowText(): string; + firstSavefileIndex(): number; + onSavefileOk(): void; + onLoadSuccess(): void; + onLoadFailure(): void; + reloadMapIfUpdated(): void; +} + +/** + * The scene class for the map screen. + */ +declare class Scene_Map extends Scene_Base { + protected constructor(); + menuCalling: boolean; + /** + * Handler for when the map scene is loaded. + * + * @memberof Scene_Map + */ + onMapLoaded(): void; + /** + * Speeds up the updateMain if + * the map scene is in fast forward mode. + * @memberof Scene_Map + */ + updateMainMultiply(): void; + /** + * Updates the main $game globals + * if the map scene is active. + * @memberof Scene_Map + */ + updateMain(): void; + /** + * Returns true if the player + * is holding down the confirm button to + * fast forward through text. + * @returns {boolean} + * @memberof Scene_Map + */ + isFastForward(): boolean; + /** + * Stops the map scene and prepares + * for a new scene. + * @memberof Scene_Map + */ + stop(): void; + /** + * Returns true if the map scene needs a slow fade in. + * + * @returns {boolean} + * @memberof Scene_Map + */ + needsFadeIn(): boolean; + /** + * Returns true if the map scene needs a slow fade out. + * + * @returns {boolean} + * @memberof Scene_Map + */ + needsSlowFadeOut(): boolean; + updateWaitCount(): boolean; + /** + * Constantly checks if the player + * is touching the map, then processes + * a map touch for mouse based player character movement. + * @memberof Scene_Map + */ + updateDestination(): void; + /** + * Returns true if the map scene is + * active and the player can move. Used for + * mouse movement on the map scene. + * @returns {boolean} + * @memberof Scene_Map + */ + isMapTouchOk(): boolean; + /** + * Processes the map touch and turns it + * into coordinates for the player character to move to. + * @memberof Scene_Map + */ + processMapTouch(): void; + isSceneChangeOk(): boolean; + /** + * Updates the scene. + * + * @memberof Scene_Map + */ + updateScene(): void; + /** + * Creates all the display objects on the map scene; + * this includes the sprites, window layer, windows, and more. + * @memberof Scene_Map + */ + createDisplayObjects(): void; + /** + * Creates the spriteset on the map scene; + * this shows all the characters and events on the map. + * @memberof Scene_Map + */ + createSpriteset(): void; + /** + * Creates all the windows on the map scene + * contains other window creation methods. + * @memberof Scene_Map + */ + createAllWindows(): void; + /** + * Creates the map name window within + * the map scene; display map name. + * @memberof Scene_Map + */ + createMapNameWindow(): void; + /** + * Creates the message window for displaying + * text on the map scene. Commonly used with the + * showText command. + * @memberof Scene_Map + */ + createMessageWindow(): void; + /** + * Creates a scrolling text window on the map scene. + * + * @memberof Scene_Map + */ + createScrollTextWindow(): void; + /** + * Checks if the player is transferring; + * if the player is transferring, move to a new map scene. + * @memberof Scene_Map + */ + updateTransferPlayer(): void; + /** + * Processes starting an encounter on the map scene. + * + * @memberof Scene_Map + */ + updateEncounter(): void; + /** + * Processes calling the menu on the map scene. + * + * @memberof Scene_Map + */ + updateCallMenu(): void; + /** + * Returns true if the menu is enabled + * in the database. + * @returns {boolean} + * @memberof Scene_Map + */ + isMenuEnabled(): boolean; + /** + * Returns true if the menu is called + * via an input trigger. + * @returns {boolean} + * @memberof Scene_Map + */ + isMenuCalled(): boolean; + /** + * Calls the standard RPGMakerMV menu scene. + * + * @memberof Scene_Map + */ + callMenu(): void; + /** + * Checks if debug is called via input trigger + * and starts the debug scene. + * + * @memberof Scene_Map + */ + updateCallDebug(): void; + /** + * Returns true if the debug + * scene is called via button press and in play test mode. + * @returns {boolean} + * @memberof Scene_Map + */ + isDebugCalled(): void; + fadeInForTransfer(): void; + fadeOutForTransfer(): void; + /** + * Launches into the battle scene. + * + * @memberof Scene_Map + */ + launchBattle(): void; + /** + * Stops all audio on battle start. + * + * @memberof Scene_Map + */ + stopAudioOnBattleStart(): void; + /** + * Starts the encounter effect on the map scene. + * + * @memberof Scene_Map + */ + startEncounterEffect(): void; + updateEncounterEffect(): void; + /** + * Takes a snapshot of the map scene for displaying + * on the battle scene if no battleback is present. + * @memberof Scene_Map + */ + snapForBattleBackground(): void; + /** + * Starts a flash encounter effect on the map scene + * given a duration of the flash. + * @param {number} duration + * @memberof Scene_Map + */ + startFlashForEncounter(duration: number): void; + /** + * Returns the speed of the encounter effect. + * + * @returns {number} + * @memberof Scene_Map + */ + encounterEffectSpeed(): number; +} + +/** + * The menu scene in your RPGMakerMV game. + */ +declare class Scene_Menu extends Scene_MenuBase { + protected constructor(); + /** + * Creates the main menu window on the + * menu scene; contains the commands for + * menu usage. + * @memberof Scene_Menu + */ + createCommandWindow(): void; + /** + * Creates the gold window on the menu scene. + * + * @memberof Scene_Menu + */ + createGoldWindow(): void; + /** + * Creates the status window on the menu scene. + * + * @memberof Scene_Menu + */ + createStatusWindow(): void; + /** + * Handler for what to do when the 'item' + * command is clicked. + * @memberof Scene_Menu + */ + commandItem(): void; + commandPersonal(): void; + commandFormation(): void; + /** + * Handler for what to do when the 'option' + * command is clicked. + * @memberof Scene_Menu + */ + commandOptions(): void; + /** + * Handler for what to do when the 'save' + * command is clicked. + * @memberof Scene_Menu + */ + commandSave(): void; + /** + * Handler for what to do when the 'game end' + * command is clicked. + * @memberof Scene_Menu + */ + commandGameEnd(): void; + onPersonalOk(): void; + onPersonalCancel(): void; + onFormationOk(): void; + onFormationCancel(): void; +} + +/** + * Scene class of the name input screen. + */ +declare class Scene_Name extends Scene_MenuBase { + protected constructor(); + /** + * Prepares the name input scene for giving the specified + * actor at actorId a name with a maximum number of characters + * given by maxLength. + * @param {number} actorId + * @param {number} maxLength + * @memberof Scene_Name + */ + prepare(actorId: number, maxLength: number): void; + /** + * Creates the edit window. + * + * @memberof Scene_Name + */ + createEditWindow(): void; + /** + * Creates the input window. + * + * @memberof Scene_Name + */ + createInputWindow(): void; + /** + * Handler for when ok is processed on the name input scene. + * + * @memberof Scene_Name + */ + onInputOk(): void; +} + +/** + * Scene class of the options screen. + */ +declare class Scene_Options extends Scene_MenuBase { + protected constructor(); + createOptionsWindow(): void; +} + +/** + * Save game screen scene for RPGMakerMV. + */ +declare class Scene_Save extends Scene_File { + protected constructor(); + /** + * Returns the mode of the + * save scene. + * @returns {string} + * @memberof Scene_Save + */ + mode(): string; + helpWindowText(): string; + /** + * Returns the index of the first + * save file within the save scene. + * @returns {number} + * @memberof Scene_Save + */ + firstSavefileIndex(): number; + /** + * Handler for when a save file + * is confirmed within the save scene. + * @memberof Scene_Save + */ + onSavefileOk(): void; + /** + * Handler for when save is a success. + * + * @memberof Scene_Save + */ + onSaveSuccess(): void; + /** + * Handler for when save fails. + * + * @memberof Scene_Save + */ + onSaveFailure(): void; +} + +declare namespace rm.types { + export const enum Money { + base = -1, + } +} + +/** + * Scene class of the shop screen. + */ +declare class Scene_Shop extends Scene_MenuBase { + protected constructor(); + prepare(goods: any[][], purchaseOnly: boolean): void; + /** + * Creates the gold window on the shop scene. + * + * @memberof Scene_Shop + */ + createGoldWindow(): void; + /** + * Creates the command window for buying or selling. + * + * @memberof Scene_Shop + */ + createCommandWindow(): void; + createDummyWindow(): void; + /** + * Creates the number input window on the shop scene. + * + * @memberof Scene_Shop + */ + createNumberWindow(): void; + /** + * Creates the status window. + * + * @memberof Scene_Shop + */ + createStatusWindow(): void; + /** + * Creates the buy window. + * + * @memberof Scene_Shop + */ + createBuyWindow(): void; + /** + * Creates the category window. + * + * @memberof Scene_Shop + */ + createCategoryWindow(): void; + /** + * Creates the sell window. + * + * @memberof Scene_Shop + */ + createSellWindow(): void; + /** + * Activates the buy window within the shop scene. + * + * @memberof Scene_Shop + */ + activateBuyWindow(): void; + /** + * Activates the sell window within the shop scene. + * + * @memberof Scene_Shop + */ + activateSellWindow(): void; + /** + * Handler for pressing buy within the shop scene. + * + * @memberof Scene_Shop + */ + commandBuy(): void; + /** + * Handler for pressing sell within the shop scene. + * + * @memberof Scene_Shop + */ + commandSell(): void; + /** + * Handler for when buying is confirmed. + * + * @memberof Scene_Shop + */ + onBuyOk(): void; + /** + * Handler for when buying is cancelled. + * + * @memberof Scene_Shop + */ + onBuyCancel(): void; + onCategoryOk(): void; + onCategoryCancel(): void; + onSellOk(): void; + onSellCancel(): void; + onNumberOk(): void; + onNumberCancel(): void; + /** + * Amount of item to buy. + * @param number + */ + doBuy(number: number): void; + /** + * Amount of item to sell. + * @param number + */ + doSell(number: number): void; + endNumberInput(): void; + /** + * Returns the maximum number bought. + * + * @returns {number} + * @memberof Scene_Shop + */ + maxBuy(): number; + /** + * Returns the maximum number sold. + * + * @returns {number} + * @memberof Scene_Shop + */ + maxSell(): number; + /** + * Returns the player gold within + * the shop scene. + * @returns {number} + * @memberof Scene_Shop + */ + money(): rm.types.Money; + /** + * Returns the currency unit of the + * game within the shop scene. + * @returns {string} + * @memberof Scene_Shop + */ + currencyUnit(): string; + /** + * Returns the buying price for the current item. + * + * @returns {number} + * @memberof Scene_Shop + */ + buyingPrice(): rm.types.Money; + /** + * Returns the selling price for the current item. + * + * @returns {number} + * @memberof Scene_Shop + */ + sellingPrice(): rm.types.Money; +} + +/** + * The scene class of the skill screen. + */ +declare class Scene_Skill extends Scene_ItemBase { + protected constructor(); + /** + * Creates the window for skill types + * within the skill scene. + * @memberof Scene_Skill + */ + createSkillTypeWindow(): void; + /** + * Creates the status window within + * the skill scene. + * @memberof Scene_Skill + */ + createStatusWindow(): void; + /** + * Creates the item window + * within the skill scene. + * @memberof Scene_Skill + */ + createItemWindow(): void; + /** + * Refreshes the current actor displayed in the Skill + * window with updated information on changes. + */ + refreshActor(): void; + /** + * Handler for when a skill is + * selected/confirmed within the skill scene. + * @memberof Scene_Skill + */ + commandSkill(): void; + /** + * Function to run when selection is cancelled + * on the skill scene. + */ + onItemCancel(): void; + /** + * Plays a sound effect on item + * confirmation withiin the skill scene. + * @memberof Scene_Skill + */ + playSeForItem(): void; + /** + * Handler for when an an actor is + * changed within the skill scene. + * @memberof Scene_Skill + */ + onActorChange(): void; +} + +/** + * Scene class of the status screen in RPGMakerMV. + */ +declare class Scene_Status extends Scene_MenuBase { + protected constructor(); + /** + * Refreshes the actor within the status scene. + * + * @memberof Scene_Status + */ + refreshActor(): void; + /** + * Handler for when the actor is changed within the status scene. + * + * @memberof Scene_Status + */ + onActorChange(): void; +} + +declare class Scene_Title extends Scene_Base { + protected constructor(); + /** + * The command window for title scene commands like new game, continue, or options. + */ + _commandWindow: Window_TitleCommand; + /** + * The background sprite which loads the $dataSystem.title1Name image. + */ + _backSprite1: Sprite; + /** + * The background sprite which loads the $dataSystem.title2Name image. + */ + _backSprite2: Sprite; + /** + * The sprite which holds the game title text. + */ + _gameTitleSprite: Sprite; + /** + * Creates the title scene background. + */ + createBackground(): void; + /** + * Creates the title screen foreground. + */ + createForeground(): void; + /** + * Draws the game title. + */ + drawGameTitle(): void; + /** + * Scales the background images and centers it. + */ + adjustBackground(): void; + /** + * Creates the command window and sets it's handlers. + */ + createCommandWindow(): void; + commandWindowRect(): Rectangle; + centerSprite(sprite: Sprite): void; + /** + * Handler for the new game command. + */ + commandNewGame(): void; + /** + * Handler for the continue command. + */ + commandContinue(): void; + /** + * Handler for the options command. + */ + commandOptions(): void; + /** + * Plays the title screen music upon entering the scene. + */ + playTitleMusic(): void; +} + +declare namespace rm.types { + /** + * The data class for the timing of an animation's SE and flash effects. + */ + export type AnimationTiming = { + /** + * The color of the flash (Color). + */ + flashColor: number[]; + /** + * The duration of the flash. + */ + flashDuration: number; + /** + * The flash area (0: none, 1: target, 2: screen; 3: hide target). + */ + flashScope: number; + /** + * The frame number. 1 less than the number displayed in RPG Maker. + */ + frame: number; + /** + * The sound effect or SE (RPG.AudioFile). + */ + se: rm.types.AudioFile; + } +} + +declare namespace rm.types { + /** + * The data class for animation. + */ + export type Animation = { + /** + * The adjustment value for the hue of the first animation's graphic (0..360). + */ + animation1Hue: string; + /** + * The file name of the first animation's graphic. + */ + animation1Name: string; + /** + * The adjustment value for the hue of the second animation's graphic (0..360). + */ + animation2Hue: number; + /** + * The file name of the second animation's graphic. + */ + animation2Name: string; + /** + * Number of frames. + */ + frameMax: number; + /** + * The three-dimensional array containing the frame contents. + */ + frames: number[][][]; + /** + * The animation ID. + */ + id: number; + /** + * The animation name. + */ + name: string; + /** + * The base position (0: head, 1: center, 2: feet, 3: screen). + */ + position: number; + /** + * Timing for SE and flash effects. An RPG.Animation.Timing array. + */ + timings: rm.types.AnimationTiming[]; + } +} + +declare class Sprite_Base extends Sprite { + constructor(); + /** + * The animation sprites assigned to the + * sprite object. + * @protected + * @type {Array} + * @memberof Sprite_Base + */ + _animationSprites: Sprite_Animation[]; + /** + * The target that will have the animations applied + * to it. + * @protected + * @type {Sprite_Base} + * @memberof Sprite_Base + */ + _effectTarget: Sprite_Base; + /** + * Determines sprite's visibility + */ + _hiding: boolean; + /** + * Initializes the sprite. + * + * @memberof Sprite_Base + */ + initialize(): void; + /** + * Hides the sprite. + */ + hide(): void; + /** + * Shows the sprite. + */ + show(): void; + /** + * Updadtes the visibility of the sprite based + * on the _hiding property. + * @memberof Sprite_Base + */ + updateVisibility(): void; + /** + * Updates the animation sprites, cloning them; + * if the sprite is playing, pushes the sprites into + * animation sprites, otherwise the sprite is removed. + * @memberof Sprite_Base + */ + updateAnimationSprites(): void; + /** + * Starts a new animation on the current + * sprite by assigning a new Sprite_Animation object to the + * sprite's parent. + * @param {RPG.Animation} animation + * @param {boolean} mirror + * @param {number} delay + * @memberof Sprite_Base + */ + startAnimation(animation: rm.types.Animation, mirror: boolean, delay: number): void; + /** + * Returns true if an animation is currently playing. + * @returns {boolean} + * @memberof Sprite_Base + */ + isAnimationPlaying(): boolean; +} + +declare class Sprite_Battler extends Sprite_Base { + protected constructor(); + _battler: Game_Battler; + _homeX: number; + _homeY: number; + _offsetX: number; + _offsetY: number; + _targetOffsetX: number; + _targetOffsetY: number; + _movementDuration: number; + _selectionEffectCount: number; + initMembers(): void; + setHome(x: number, y: number): void; + /** + * Updates the main loop of the sprite battler. + */ + updateMain(): void; + /** + * Updates the bitmap of the sprite battler. + */ + updateBitmap(): void; + /** + * Updates movement on the sprite battler. + */ + updateMove(): void; + /** + * Updates the position of the sprite battler. + */ + updatePosition(): void; + /** + * Updates the sprite battler animation. + */ + updateAnimation(): void; +} + +declare namespace rm.types { + export type Motion = { + index: number; + loop: boolean; + } +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Actor + * + * The sprite for displaying an actor. + */ +declare class Sprite_Actor extends Sprite_Battler { + /** + * Creates an instance of Sprite_Actor; can be passed + * a battler on creation. + * @param {Game_Actor} [battler] + * @memberof Sprite_Actor + */ + constructor(battler?: Game_Actor); + _battlerName: string; + _motion: rm.types.Motion; + _motionCount: number; + _pattern: rm.types.CharacterPattern; + _mainSprite: Sprite_Base; + _shadowSprite: Sprite; + _weaponSprite: Sprite_Weapon; + _stateSprite: Sprite_StateOverlay; + _actor: Game_Actor; + initialize(battler?: Game_Actor): void; + /** + * Creates the main sprite of the sprite actor. + * + * @memberof Sprite_Actor + */ + createMainSprite(): void; + /** + * Creates the shadow sprite of the sprite actor. + * + * @memberof Sprite_Actor + */ + createShadowSprite(): void; + /** + * Sets the weapon sprite of the sprite actor. + * + * @memberof Sprite_Actor + */ + createWeaponSprite(): void; + /** + * Creates the state sprite of the sprite actor. + * + * @memberof Sprite_Actor + */ + createStateSprite(): void; + /** + * Sets the battler of the sprite actor. + * + * @param {Game_Actor} battler + * @memberof Sprite_Actor + */ + setBattler(battler: Game_Actor): void; + /** + * Moves the sprite actor to the start position. + * + * @memberof Sprite_Actor + */ + moveToStartPosition(): void; + setActorHome(index: number): void; + updateShadow(): void; + /** + * Sets up motion on the sprite actor. + * + * @memberof Sprite_Actor + */ + setupMotion(): void; + /** + * Sets up weapon animation on the sprite actor. + * + * @memberof Sprite_Actor + */ + setupWeaponAnimation(): void; + /** + * Starts the motion given the specified motion + * type. + * @param {string} motionType + * @memberof Sprite_Actor + */ + startMotion(motionType: string): void; + updateTargetPosition(): void; + /** + * Updates the sprite actor's movement. + * + * @memberof Sprite_Actor + */ + updateMove(): void; + /** + * Updates the sprite actor's motion. + * + * @memberof Sprite_Actor + */ + updateMotion(): void; + updateMotionCount(): void; + /** + * Returns the speed of the motion for the sprite actor. + * + * @returns {Int} + * @memberof Sprite_Actor + */ + motionSpeed(): number; + /** + * Refreshes the motion of the sprite actor. + * + * @memberof Sprite_Actor + */ + refreshMotion(): void; + /** + * Starts the entry motion of the sprite actor. + * + * @memberof Sprite_Actor + */ + startEntryMotion(): void; + /** + * Has the sprite actor step forward. + * + * @memberof Sprite_Actor + */ + stepForward(): void; + /** + * Has the sprite actor step back. + * + * @memberof Sprite_Actor + */ + stepBack(): void; + /** + * Has the sprite actor retreat. + * + * @memberof Sprite_Actor + */ + retreat(): void; + damageOffsetX(): number; + damageOffsetY(): number; + static MOTIONS: { abnormal: rm.types.Motion, chant: rm.types.Motion, damage: rm.types.Motion, dead: rm.types.Motion, dying: rm.types.Motion, escape: rm.types.Motion, evade: rm.types.Motion, guard: rm.types.Motion, item: rm.types.Motion, missile: rm.types.Motion, skill: rm.types.Motion, sleep: rm.types.Motion, spell: rm.types.Motion, swing: rm.types.Motion, thrust: rm.types.Motion, victory: rm.types.Motion, wait: rm.types.Motion, walk: rm.types.Motion }; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Animation + * + * The sprite for displaying an animation. + */ +declare class Sprite_Animation extends Sprite { + protected constructor(); + /** + * { + * key: Animation + * }; + */ + _checker1: { [key: string]: any }; + _target: Sprite_Base; + _animation: rm.types.Animation; + _mirror: boolean; + _delay: number; + _rate: number; + _duration: number; + _flashColor: number[]; + _flashDuration: number; + _screenFlashDuration: number; + _hidingDuration: number; + _bitmap1: Bitmap; + _bitmap2: Bitmap; + _cellSprites: Sprite[]; + _screenFlashSprite: ScreenSprite; + _duplicated: boolean; + _reduceArtifacts: boolean; + initMembers(): void; + setup(target: Sprite_Base, animation: rm.types.Animation, mirror: boolean, delay: number): void; + /** + * Removes the sprite animation. + * + * @memberof Sprite_Animation + */ + remove(): void; + setupRate(): void; + setupDuration(): void; + /** + * Updates the flash animation of the sprite animation. + * + * @memberof Sprite_Animation + */ + updateFlash(): void; + updateScreenFlash(): void; + /** + * Returns the absolute x position of the sprite animation. + * + * @returns {number} + * @memberof Sprite_Animation + */ + absoluteX(): number; + /** + * Returns the absolute y position of the sprite aniamtion. + * + * @returns {number} + * @memberof Sprite_Animation + */ + absoluteY(): number; + /** + * Updates the hiding of the sprite animation. + * + * @memberof Sprite_Animation + */ + updateHiding(): void; + /** + * Returns true if the sprite animation is playing. + * + * @returns {boolean} + * @memberof Sprite_Animation + */ + isPlaying(): boolean; + /** + * Loads the bitmaps of the sprite animation. + * + * @memberof Sprite_Animation + */ + loadBitmaps(): void; + /** + * Returns true if the sprite animation is ready. + * + * @returns {boolean} + * @memberof Sprite_Animation + */ + isReady(): boolean; + /** + * Create the sprites of the sprite animation. + * + * @memberof Sprite_Animation + */ + createSprites(): void; + /** + * Create the cell sprites of the sprite animation. + * + * @memberof Sprite_Animation + */ + createCellSprites(): void; + /** + * Create the screen flash sprite of the sprite animation. + * + * @memberof Sprite_Animation + */ + createScreenFlashSprite(): void; + /** + * Updates the main loop of the sprite animation. + * + * @memberof Sprite_Animation + */ + updateMain(): void; + /** + * Updates the position of the sprite animation. + * + * @memberof Sprite_Animation + */ + updatePosition(): void; + /** + * Updates the frame of the sprite aniamtion. + * + * @memberof Sprite_Animation + */ + updateFrame(): void; + /** + * Returns the current frame index of the sprite aniamtion. + * + * @returns {number} + * @memberof Sprite_Animation + */ + currentFrameIndex(): number; + updateAllCellSprites(frame: number[][]): void; + updateCellSprite(sprite: Sprite, cell: number[]): void; + processTimingData(timing: rm.types.AnimationTiming): void; + startFlash(color: number[], duration: number): void; + startScreenFlash(color: number[], duration: number): void; + /** + * Starts hiding the sprite animation. + * + * @param {number} duration The duration of the hide. + * @memberof Sprite_Animation + */ + startHiding(duration: number): void; + /** + * Structure + * { + * key: Animation + * }; + */ + static _checker2: { [key: string]: any }; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Balloon + * + * The sprite for displaying a balloon icon. + */ +declare class Sprite_Balloon extends Sprite_Base { + protected constructor(); + _balloonId: rm.types.BalloonId; + _duration: number; + initMembers(): void; + loadBitmap(): void; + setup(balloonId: rm.types.BalloonId): void; + /** + * Updates the balloon sprite. + * + * @memberof Sprite_Balloon + */ + update(): void; + /** + * Updates the balloon sprite frame. + * + * @memberof Sprite_Balloon + */ + updateFrame(): void; + /** + * Returns the speed of the balloon animation. + * + * @returns {number} + * @memberof Sprite_Balloon + */ + speed(): number; + /** + * Returns the wait time. + * + * @returns {number} + * @memberof Sprite_Balloon + */ + waitTime(): number; + /** + * Returns the frame index of the balloon animation. + * + * @returns {number} + * @memberof Sprite_Balloon + */ + frameIndex(): number; + /** + * Returns true if the balloon animation is playing. + * + * @returns {boolean} + * @memberof Sprite_Balloon + */ + isPlaying(): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Button + * + * The sprite for displaying a button. + */ +declare class Sprite_Button extends Sprite { + protected constructor(); + _touching: boolean; + _coldFrame: Rectangle; + _hotFrame: Rectangle; + _clickHandler: () => void; + /** + * Update method, which checks if the sprite is being touched and updates + * the current frame. + * + * @memberof Sprite_Button + */ + updateFrame(): void; + /** + * Set the button sprites cold frame. + * + * @param {Int} x + * @param {Int} y + * @param {Int} width + * @param {Int} height + * + * @memberof Sprite_Button + * + */ + setColdFrame(x: number, y: number, width: number, height: number): void; + /** + * Set the button sprites hot frame + * + * @param {Int} x + * @param {Int} y + * @param {Int} width + * @param {Int} height + * + * @memberof Sprite_Button + * + */ + setHotFrame(x: number, y: number, width: number, height: number): void; + /** + * Creates a new handler and binds it to the button. + * + * @param {function} height + * @memberof Sprite_Button + */ + setClickHandler(method: () => void): void; + /** + * Calls the handler method bound to the button. + * + * @param {function} height + * @memberof Sprite_Button + */ + callClickHandler(): void; + /** + * Processes weather or not the button is being touched and calls the handler + * bound to the button. + * @memberof Sprite_Button + */ + processTouch(): void; + /** + * Returns true if the sprite button is currently active. + * @returns {Bool} + * @memberof Sprite_Button + */ + isActive(): boolean; + /** + * Returns true is the button is presently being touched. + * @returns {Bool} + * @memberof Sprite_Button + */ + isButtonTouched(): boolean; + /** + * Changes the x coordinate of the screen to local sprite x coordinate. + * @param {Int} x + * @returns {Int} + * @memberof Sprite_Button + */ + canvasToLocalX(x: number): number; + /** + * Changes the y coordinate of the screen + * to local sprite y coordinate. + * @param {Int} y + * @returns {Int} + * @memberof Sprite_Button + */ + canvasToLocalY(y: number): number; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Character + * + * The sprite for displaying a character. + */ +declare class Sprite_Character extends Sprite_Base { + /** + * Creates an instance of Sprite_Character. + * @param {Game_Character} character + * @memberof Sprite_Character + */ + constructor(character: Game_Character); + /** + * The Game_Character object assigned + * to the sprite. + * @private var + * @type {Game_Character} + * @memberof Sprite_Character + */ + _character: Game_Character; + _balloonDuration: number; + _tilesetId: number; + _upperBody: Sprite; + _lowerBody: Sprite; + _bushDepth: number; + /** + * The current balloon sprite + * assigned to the sprite. + * @private var + * @type {Sprite_Balloon} + * @memberof Sprite_Character + */ + _balloonSprite: Sprite_Balloon; + initialize(character: Game_Character): void; + initMembers(): void; + /** + * Sets the current Game_Character object + * attached to the sprite. + * @param {Game_Character} character + * @memberof Sprite_Character + */ + setCharacter(character: Game_Character): void; + /** + * Returns true if the Game_Character object + * tileId is greater than 0. + * @returns {Bool} + * @memberof Sprite_Character + */ + isTile(): boolean; + tilesetBitmap(tileId: number): Bitmap; + /** + * Updates the bitmap of the sprite character. + * + * @memberof Sprite_Character + */ + updateBitmap(): void; + /** + * Returns true if the sprite character image has changed. + * + * @returns {Bool} + * @memberof Sprite_Character + */ + isImageChanged(): boolean; + setTileBitmap(): void; + /** + * Sets the sprite character bitmap. + * + * @memberof Sprite_Character + */ + setCharacterBitmap(): void; + /** + * Updates the sprite character frame. + * + * @memberof Sprite_Character + */ + updateFrame(): void; + /** + * Updates the sprite character tile frame. + * + * @memberof Sprite_Character + */ + updateTileFrame(): void; + /** + * Updates the sprite character -- character frame. + * + * @memberof Sprite_Character + */ + updateCharacterFrame(): void; + characterBlockX(): number; + characterBlockY(): number; + /** + * Returns the character x pattern. + * + * @returns {number} + * @memberof Sprite_Character + */ + characterPatternX(): rm.types.CharacterPattern; + /** + * Returns the character y pattern. + * + * @returns {number} + * @memberof Sprite_Character + */ + characterPatternY(): rm.types.CharacterPattern; + /** + * Returns the pattern width. + * + * @returns {number} + * @memberof Sprite_Character + */ + patternWidth(): number; + /** + * Returns the pattern height. + * + * @returns {number} + * @memberof Sprite_Character + */ + patternHeight(): number; + updateHalfBodySprites(): void; + createHalfBodySprites(): void; + /** + * Updates the position of the sprite character. + * + * @memberof Sprite_Character + */ + updatePosition(): void; + updateAnimation(): void; + updateOther(): void; + setupAnimation(): void; + /** + * Sets up the Game_Character object + * balloon sprite, and calls the startBalloon method. + * @memberof Sprite_Character + */ + setupBalloon(): void; + /** + * Starts the balloon sprite on the + * Game_Character object. + * @memberof Sprite_Character + */ + startBalloon(): void; + /** + * Processes the balloon sprite, calls + * the endBaloon method if the balloon sprite is done playing. + * @memberof Sprite_Character + */ + updateBalloon(): void; + /** + * Ends the balloon sprite, removing it from + * the Game_Character object sprite. + * @memberof Sprite_Character + */ + endBalloon(): void; + /** + * Returns true if a balloon animation + * is playing on the character. + * @returns {Bool} + * @memberof Sprite_Character + */ + isBalloonPlaying(): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Damage + * + * The sprite for displaying a popup damage. + */ +declare class Sprite_Damage extends Sprite { + protected constructor(); + __duration: number; + /** + * Array of 3 numbers of RGB + */ + _flashColor: number[]; + _flashDuration: number; + _damageBitmap: Bitmap; + setup(target: Game_Actor): void; + setupCriticalEffect(): void; + /** + * Returns the digit width of the sprite damage. + * + * @returns {number} + * @memberof Sprite_Damage + */ + digitWidth(): number; + /** + * Returns the digit height of the sprite damage. + * + * @returns {number} + * @memberof Sprite_Damage + */ + digitHeight(): number; + /** + * Creates the miss display of the damage sprite. + * + * @memberof Sprite_Damage + */ + createMiss(): void; + createDigits(baseRow: number, value: number): void; + /** + * Creates the child sprite of the damage sprite for displaying damage. + * + * @returns {Sprite} + * @memberof Sprite_Damage + */ + createChildSprite(): Sprite; + updateChild(sprite: Sprite): void; + /** + * Updates the flash of the damage sprite. + * + * @memberof Sprite_Damage + */ + updateFlash(): void; + /** + * Updates the opacity of the damage sprite. + * + * @memberof Sprite_Damage + */ + updateOpacity(): void; + /** + * Returns true if the damage sprite is playing. + * + * @returns {boolean} + * @memberof Sprite_Damage + */ + isPlaying(): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Destination + * + * The sprite for displaying the destination place of the touch input. + */ +declare class Sprite_Destination extends Sprite { + protected constructor(); + _frameCount: number; + /** + * Creates the destination bitmap of the destination sprite. + * + * @memberof Sprite_Destination + */ + createBitmap(): void; + /** + * Updates the position of the destination sprite. + * + * @memberof Sprite_Destination + */ + updatePosition(): void; + /** + * Updates the destination sprite animation. + * + * @memberof Sprite_Destination + */ + updateAnimation(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Enemy + * + * The sprite for displaying an enemy. + */ +declare class Sprite_Enemy extends Sprite_Battler { + constructor(battler: Game_Enemy); + _enemy: Game_Enemy; + _appeared: boolean; + _battlerName: string; + _battlerHue: number; + _effectType: string; + _effectDuration: number; + _shake: number; + _stateIconSprite: Sprite_StateIcon; + initialize(battler: Game_Enemy): void; + createStateIconSprite(): void; + /** + * Sets the battler to an instance of game enemy. + * + * @param {Game_Enemy} battler Instance of game enemy. + * @memberof Sprite_Enemy + */ + setBattler(battler: Game_Enemy): void; + loadBitmap(name: string, hue: number): void; + /** + * Updates the state sprite on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + updateStateSprite(): void; + initVisibility(): void; + setupEffect(): void; + startEffect(effectType: string): void; + /** + * Starts the appearinig effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + startAppear(): void; + /** + * Starts the disappearing effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + startDisappear(): void; + /** + * Starts the whiten effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + startWhiten(): void; + /** + * Starts the blink effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + startBlink(): void; + /** + * Starts the collapse effect of the sprite + * enemy. + * @memberof Sprite_Enemy + */ + startCollapse(): void; + /** + * Starts the boss collapse effect of the sprite + * enemy. + * @memberof Sprite_Enemy + */ + startBossCollapse(): void; + /** + * Starts the instant collapse effect of the sprite enemy. + * + * @memberof Sprite_Enemy + */ + startInstantCollapse(): void; + updateEffect(): void; + /** + * Returns true if the effect type on the sprite enemy + * is not null. + * @returns {Bool} + * @memberof Sprite_Enemy + */ + isEffecting(): boolean; + /** + * Revers the sprite enemy to a normal state. + * + * @memberof Sprite_Enemy + */ + revertToNormal(): void; + /** + * Updates the whiten effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + updateWhiten(): void; + /** + * Updates the blink effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + updateBlink(): void; + /** + * Updates the appear effect on the sprite enemy. + * + * @memberof Sprite_Enemy + */ + updateAppear(): void; + updateDisappear(): void; + /** + * Updates the collapse effect. + * + * @memberof Sprite_Enemy + */ + updateCollapse(): void; + /** + * Updates the boss collapse effect. + * + * @memberof Sprite_Enemy + */ + updateBossCollapse(): void; + /** + * Updates the instant collapse effect. + * + * @memberof Sprite_Enemy + */ + updateInstantCollapse(): void; + damageOffsetX(): number; + damageOffsetY(): number; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Picture + * + * The sprite for displaying a picture. + */ +declare class Sprite_Picture { + constructor(pictureId: number); + _pictureId: number; + _pictureName: string; + _isPicture: boolean; + picture(): Game_Picture; + updateBitmap(): void; + updateOrigin(): void; + updatePosition(): void; + updateScale(): void; + updateTone(): void; + updateOther(): void; + loadBitmap(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_StateIcon + * + * The sprite for displaying state icons. + */ +declare class Sprite_StateIcon extends Sprite { + protected constructor(); + _battler: Game_Battler; + _iconIndex: number; + _animationCount: number; + _animationIndex: number; + /** + * Initializes the sprite state icon properties. + * + * @memberof Sprite_StateIcon + */ + initMembers(): void; + /** + * Loads the bitmap of the sprite state icon. + * + * @memberof Sprite_StateIcon + */ + loadBitmap(): void; + setup(battler: Game_Battler): void; + animationWait(): number; + /** + * Updates the icon displayed in the icon sprite. + * + * @memberof Sprite_StateIcon + */ + updateIcon(): void; + /** + * Updates the state icon sprite frame. + * + * @memberof Sprite_StateIcon + */ + updateFrame(): void; + static _iconWidth: number; + static _iconHeight: number; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_StateOverlay + * + * The sprite for displaying an overlay image for a state. + */ +declare class Sprite_StateOverlay extends Sprite_Base { + protected constructor(); + _battler: Game_Battler; + _overlayIndex: number; + _animationCount: number; + _pattern: number; + /** + * Initialize the overlay sprite properties. + * + * @memberof Sprite_StateOverlay + */ + initMembers(): void; + /** + * Loads the bitmap of the overlay sprite. + * + * @memberof Sprite_StateOverlay + */ + loadBitmap(): void; + setup(battler: Game_Battler): void; + animationWait(): number; + /** + * Updates the overlay sprite pattern. + * + * @memberof Sprite_StateOverlay + */ + updatePattern(): void; + /** + * Updates the overlay sprite frame. + * + * @memberof Sprite_StateOverlay + */ + updateFrame(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Timer + * + * The sprite for displaying the timer. + */ +declare class Sprite_Timer extends Sprite { + protected constructor(); + _seconds: number; + /** + * Creates the bitmap of the sprite timer. + * + * @memberof Sprite_Timer + */ + createBitmap(): void; + /** + * Updates the bitmap of the sprite timer. + * + * @memberof Sprite_Timer + */ + updateBitmap(): void; + /** + * Redraws the sprite timer. + * + * @memberof Sprite_Timer + */ + redraw(): void; + /** + * Returns the text of the timer. + * + * @returns {string} The text displayed on the timer. + * @memberof Sprite_Timer + */ + timerText(): string; + /** + * Updates the positon of the sprite timer. + * + * @memberof Sprite_Timer + */ + updatePosition(): void; + /** + * Updates the visibility of the sprite timer. + * + * @memberof Sprite_Timer + */ + updateVisibility(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Sprite_Weapon + * + * The sprite for displaying a weapon image for attacking. + */ +declare class Sprite_Weapon extends Sprite_Base { + protected constructor(); + _weaponImageId: rm.types.WeaponImageId; + _animaationCount: number; + _pattern: number; + /** + * Initializes the members of the weapon sprite object. + * + * @memberof Sprite_Weapon + */ + initMembers(): void; + setup(weaponImageId: rm.types.WeaponImageId): void; + animationWait(): number; + /** + * Updates the pattern of the weapon sprite. + * + * @memberof Sprite_Weapon + */ + updatePattern(): void; + /** + * Loads the bitmap of the weapon sprite. + * + * @memberof Sprite_Weapon + */ + loadBitmap(): void; + /** + * Updates the weapon sprite frames. + * + * @memberof Sprite_Weapon + */ + updateFrame(): void; + /** + * Returns true if the weapon sprite is playing. + * + * @returns {boolean} + * @memberof Sprite_Weapon + */ + isPlaying(): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Spriteset_Base + * + * The superdeclare class of Spriteset_Map and Spriteset_Battle. + */ +declare class Spriteset_Base extends Sprite { + protected constructor(); + _tone: number[]; + _baseSprite: Sprite; + _blackScreen: ScreenSprite; + _toneFilter: ToneFilter; + _toneSprite: ToneSprite; + _pictureContainer: Sprite; + _timerSprite: Sprite_Timer; + _flashSprite: ScreenSprite; + _fadeSprite: ScreenSprite; + /** + * Creates the lower layer including the base sprites. + * + * @memberof Spriteset_Base + */ + createLowerLayer(): void; + /** + * Creates the upper layer including the pictures, + * timer, and screen sprites. + * @memberof Spriteset_Base + */ + createUpperLayer(): void; + /** + * Create the base sprite. + * + * @memberof Spriteset_Base + */ + createBaseSprite(): void; + /** + * Creates the tone changer sprite. + * + * @memberof Spriteset_Base + */ + createToneChanger(): void; + /** + * Creates the WebGL toner. + * + * @memberof Spriteset_Base + */ + createWebGLToneChanger(): void; + /** + * Creates the Canvas tone. + * + * @memberof Spriteset_Base + */ + createCanvasToneChanger(): void; + /** + * Creates a new sprite picture on the spritesetb ase. + * + * @memberof Spriteset_Base + */ + createPictures(): void; + /** + * Creates a new Sprite timer on the spriteset base. + * + * @memberof Spriteset_Base + */ + createTimer(): void; + /** + * Creates the screen sprite. + * + * @memberof Spriteset_Base + */ + createScreenSprites(): void; + /** + * Updates the screen sprites on the spriteset base. + * + * @memberof Spriteset_Base + */ + updateScreenSprites(): void; + updateToneChanger(): void; + /** + * Updates the WebGL tone changer. + * + * @memberof Spriteset_Base + */ + updateWebGLToneChanger(): void; + /** + * Updates the Canvas tone changer. + * + * @memberof Spriteset_Base + */ + updateCanvasToneChanger(): void; + /** + * Updates the position of spriteset base. + * + * @memberof Spriteset_Base + */ + updatePosition(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Spriteset_Battle + * + * The set of sprites on the battle screen. + */ +declare class Spriteset_Battle extends Spriteset_Base { + protected constructor(); + _battlebackLocated: boolean; + _backgroundSprite: Sprite; + _battleField: Sprite; + _back1Sprite: TilingSprite; + _back2Sprite: TilingSprite; + _enemySprites: Sprite_Enemy[]; + _actorSprites: Sprite_Actor[]; + /** + * Creates the background of the battle spriteset. + * + * @memberof Spriteset_Battle + */ + createBackground(): void; + /** + * Creates the battlefield of the battle spriteset. + * + * @memberof Spriteset_Battle + */ + createBattleField(): void; + /** + * Creates the battleback of the battle spriteset. + * + * @memberof Spriteset_Battle + */ + createBattleback(): void; + /** + * Updates the battleback of the battle spriteset. + * + * @memberof Spriteset_Battle + */ + updateBattleback(): void; + /** + * Locates the battleback and adjusts the coordinates of the + * battleback. + * @memberof Spriteset_Battle + */ + locateBattleback(): void; + /** + * Returns battleb ack 2 of the battle spriteset. + * + * @returns {Bitmap} Instance of the Bitmap class. + * @memberof Spriteset_Battle + */ + battleback1Bitmap(): Bitmap; + /** + * Returns battleback 2 of the battle spriteset. + * + * @returns {Bitmap} Instance of the Bitmap class. + * @memberof Spriteset_Battle + */ + battleback2Bitmap(): Bitmap; + /** + * + * + * @returns {string} Name of battleback 1 bitmap. + * @memberof Spriteset_Battle + */ + battleback1Name(): string; + /** + * + * + * @returns {string} Name of battleback 2 bitmap. + * @memberof Spriteset_Battle + */ + battleback2Name(): string; + /** + * Returns the battleback 1 name as a string. + * + * @returns {string} Name of overworld battleback 1 bitmap. + * @memberof Spriteset_Battle + */ + overworldBattleback1Name(): string; + /** + * Returns the battleback 2 name as a string. + * + * @returns {string} Name of overworld battleback 2 bitmap. + * @memberof Spriteset_Battle + */ + overworldBattleback2Name(): string; + /** + * + * + * @returns {string} Name of the normal battleback 1 bitmap. + * @memberof Spriteset_Battle + */ + normalBattleback1Name(): string; + /** + * + * + * @returns {string} Name of the normal battleback 2 bitmap. + * @memberof Spriteset_Battle + */ + normalBattleback2Name(): string; + /** + * Given the specified terrtain type, return + * the battleback 1 name. + * @param {number} type Terrain type. + * @returns {string} Name of the terrtain battleback 1 bitmap. + * @memberof Spriteset_Battle + */ + terrainBattleback1Name(type: number): string; + /** + * Given the specified terrain type, return + * the battleback 2 name. + * @param {number} type Terrain type. + * @returns {string} Name of the terrain battleback 2 bitmap. + * @memberof Spriteset_Battle + */ + terrainBattleback2Name(type: number): string; + /** + * + * + * @returns {string} Name of the default battleback 1 name. + * @memberof Spriteset_Battle + */ + defaultBattleback1Name(): string; + /** + * + * + * @returns {string} Name of the default battleback 2 name. + * @memberof Spriteset_Battle + */ + defaultBattleback2Name(): string; + /** + * + * + * @returns {string} Name of the ship battleback 1 bitmap. + * @memberof Spriteset_Battle + */ + shipBattleback1Name(): string; + /** + * + * + * @returns {string} Name of the ship battleback 2 bitmap. + * @memberof Spriteset_Battle + */ + shipBattleback2Name(): string; + autotileType(z: number): number; + /** + * Creates sprite enemies for the battle spriteset. + * + * @memberof Spriteset_Battle + */ + createEnemies(): void; + compareEnemySprite(a: Sprite_Enemy, b: Sprite_Enemy): number; + /** + * Creates sprite actors for the battle spriteset. + * + * @memberof Spriteset_Battle + */ + createActors(): void; + /** + * Updates the actor sprites on the battle spriteset. + * + * @memberof Spriteset_Battle + */ + updateActors(): void; + /** + * Returns all battler sprites on the battle spriteset. + * + * @returns {Array} + * @memberof Spriteset_Battle + */ + battlerSprites(): Sprite_Battler[]; + /** + * Returns true if animation is playing on the battle spriteset. + * + * @returns {boolean} + * @memberof Spriteset_Battle + */ + isAnimationPlaying(): boolean; + isEffecting(): boolean; + /** + * Returns true if any sprite actor or enemy is moving. + * + * @returns {boolean} Representing whether any battle participants are moving. + * @memberof Spriteset_Battle + */ + isAnyoneMoving(): boolean; + /** + * Returns true if the battle spriteset is busy. + * + * @returns {boolean} + * @memberof Spriteset_Battle + */ + isBusy(): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Spriteset_Map + * + * The set of sprites on the map screen. + */ +declare class Spriteset_Map extends Spriteset_Base { + protected constructor(); + _parallax: TilingSprite; + _tilemap: Tilemap | ShaderTilemap; + _tileset: rm.types.Tileset; + _characterSprites: Sprite_Character[]; + _shadowSprite: Sprite; + _destinationSprite: Sprite_Destination; + _weather: Weather; + _parallaxName: string; + /** + * Hides the map spriteset character sprites. + * + * @memberof Spriteset_Map + */ + hideCharacters(): void; + /** + * Creates the map spriteset parallax. + * + * @memberof Spriteset_Map + */ + createParallax(): void; + /** + * Creates the map spriteset tile map. + * + * @memberof Spriteset_Map + */ + createTilemap(): void; + /** + * Loads the map spriteset tileset. + * + * @memberof Spriteset_Map + */ + loadTileset(): void; + /** + * Creates the map spriteset character sprite. + * + * @memberof Spriteset_Map + */ + createCharacters(): void; + /** + * Creates the map spriteset shadow sprite. + * + * @memberof Spriteset_Map + */ + createShadow(): void; + /** + * Creates the map spriteset destination sprite. + * + * @memberof Spriteset_Map + */ + createDestination(): void; + /** + * Creates the map spriteset weather. + * + * @memberof Spriteset_Map + */ + createWeather(): void; + /** + * Updates the map spriteset tileset. + * + * @memberof Spriteset_Map + */ + updateTileset(): void; + updateParallax(): void; + /** + * Updates the map spriteset tile map. + * + * @memberof Spriteset_Map + */ + updateTilemap(): void; + /** + * Updates the map spriteset shadow. + * + * @memberof Spriteset_Map + */ + updateShadow(): void; + /** + * Updates the map spriteset weather. + * + * @memberof Spriteset_Map + */ + updateWeather(): void; +} + +declare class Window_Selectable extends Window_Base { + constructor(x: number, y: number, width: number, height: number); + initialize(x: number, y: number, height: number, width: number): void; + /** + * Returns the current position of the _index property. + * + * @returns {Int} + * @memberof Window_Selectable + */ + index(): number; + /** + * Returns true if the _cursorFixed property is true; + * this means the cursor is locked to a position. + * @returns {boolean} + * @memberof Window_Selectable + */ + cursorFixed(): boolean; + /** + * Sets the _cursorFixed property of the + * window. + * @param {boolean} cursorFixed + * @memberof Window_Selectable + */ + setCursorFixed(cursorFixed: boolean): void; + cursorAll(): boolean; + setCursorAll(cursorAll: boolean): void; + /** + * Returns the maximum number of columns + * for the window. + * @returns {number} + * @memberof Window_Selectable + */ + maxCols(): number; + /** + * Returns the maximum number of items within the window; + * useful to overwrite when creating a new window. + * This method is used to calculate the number of rows and more. + * @returns {number} + * @memberof Window_Selectable + */ + maxItems(): number; + spacing(): number; + /** + * Returns the width of an item within the window; + * determines the width of a column. + * @returns {number} + * @memberof Window_Selectable + */ + itemWidth(): number; + /** + * Returns the height of an item within the window; + * determines the height of a row. + * @returns {number} + * @memberof Window_Selectable + */ + itemHeight(): number; + /** + * Selects the current index within the window given a number. + * + * @param {number} index + * @memberof Window_Selectable + */ + select(index: number): void; + /** + * Deselects the currently selected index. + * + * @memberof Window_Selectable + */ + deselect(): void; + /** + * Reselects the index based on the window's _index property. + * + * @memberof Window_Selectable + */ + reselect(): void; + row(): number; + topRow(): number; + maxTopRow(): number; + /** + * Sets the current top row of the given a number. + * The top row will then be moved to an index + * of the window. + * @param {number} row + * @memberof Window_Selectable + */ + setTopRow(row: number): void; + resetScroll(): void; + maxPageRows(): number; + maxPageItems(): number; + /** + * Returns true if the window is horizontal; + * means the window only has a single row. + * @returns {boolean} + * @memberof Window_Selectable + */ + isHorizontal(): boolean; + bottomRow(): number; + setBottomRow(row: number): void; + /** + * Creates a new rectangle based on itemWidth and itemHeight. + * The rectangle is mainly used for positioning items within + * the selectable window. + * @param {number} index + * @returns {Rectangle} + * @memberof Window_Selectable + */ + itemRect(index: number): Rectangle; + /** + * Creates a new rectangle based on itemWidth and itemHeight + * The rectangle is used for positioning text within + * the selectable window. + * @param {number} index + * @returns {Rectangle} + * @memberof Window_Selectable + */ + itemRectForText(index: number): Rectangle; + setHelpWindow(helpWindow: Window_Help): void; + /** + * Shows the attached help window. + * + * @memberof Window_Selectable + */ + showHelpWindow(): void; + /** + * Hides the attached help window. + * + * @memberof Window_Selectable + */ + hideHelpWindow(): void; + /** + * Creates a new handler with the symbol as the handler name + * and a method (JS function) bound to it. + * @param {string} symbol + * @param {*} method + * @memberof Window_Selectable + */ + setHandler(symbol: string, method: any): void; + isHandled(symbol: string): boolean; + callHandler(symbol: string): void; + isOpenAndActive(): boolean; + isCursorMovable(): boolean; + /** + * Moves the cursor down; if wrap is passed + * as true, then it will return to the top when + * at the end of the list. + * @param {boolean} wrap + * @memberof Window_Selectable + */ + cursorDown(wrap: boolean): void; + /** + * Moves the cursor up; if wrap is passed + * as true, then it will return to the bottom + * when at the top of the list. + * @param {boolean} wrap + * @memberof Window_Selectable + */ + cursorUp(wrap: boolean): void; + cursorRight(wrap: boolean): void; + cursorLeft(wrap: boolean): void; + cursorPagedown(): void; + cursorPageup(): void; + scrollDown(): void; + scrollUp(): void; + updateArrows(): void; + /** + * Handles the processing of cursor movement. + * + * @memberof Window_Selectable + */ + processCursorMove(): void; + /** + * Handles the process of attached handlers. + * + * @memberof Window_Selectable + */ + processHandling(): void; + /** + * Handles the processing of the scroll wheel within + * the window. + * @memberof Window_Selectable + */ + processWheel(): void; + /** + * Handles the processing of touch input. + * + * @memberof Window_Selectable + */ + processTouch(): void; + isTouchedInsideFrame(): boolean; + onTouch(triggered: boolean): void; + hitTest(x: number, y: number): number; + isContentsArea(x: number, y: number): boolean; + /** + * Determines if touch ok is enabled as an option; + * this means whether you can confirm the selection + * of an item within the window with touch input. + * @returns {boolean} + * @memberof Window_Selectable + */ + isTouchOkEnabled(): boolean; + /** + * Determines if ok is enabled as an option; + * this means whether you can confirm selection + * of an item within the window. + * @returns {boolean} + * @memberof Window_Selectable + */ + isOkEnabled(): boolean; + isCancelEnabled(): boolean; + isOkTriggered(): boolean; + isCancelTriggered(): boolean; + processOk(): void; + callOkHandler(): void; + processCancel(): void; + callCancelHandler(): void; + processPageup(): void; + processPagedown(): void; + updateInputData(): void; + updateCursor(): void; + /** + * Determines if the cursor is visible within + * the window. + * @returns {boolean} + * @memberof Window_Selectable + */ + isCursorVisible(): boolean; + ensureCursorVisible(): void; + callUpdateHelp(): void; + updateHelp(): void; + setHelpWindowItem(item: any): void; + isCurrentItemEnabled(): boolean; + /** + * Draws all items within the window; this method + * cals drawItem multiple times. + * @memberof Window_Selectable + */ + drawAllItems(): void; + drawItem(index: number): void; + clearItem(index: number): void; + redrawItem(index: number): void; + redrawCurrentItem(): void; + /** + * Refreshes the window contents. + * + * @memberof Window_Selectable + */ + refresh(): void; +} + +declare class Window_Command extends Window_Selectable { + /** + * Creates an instance of Window_Command. + * @param {number} x + * @param {number} y + * @memberof Window_Command + */ + constructor(x: number, y: number); + initialize(x: number, y: number): void; + /** + * Returns the width of the window; + * default is 240. + * @returns {number} + * @memberof Window_Command + */ + windowWidth(): number; + /** + * Returns the height of the window; + * takes the visible rows and passes it to the fittingHeight method. + * @returns {number} + * @memberof Window_Command + */ + windowHeight(): number; + /** + * Returns the number of visible rows within the window. + * + * @returns {number} + * @memberof Window_Command + */ + numVisibleRows(): number; + /** + * Returns the maximum number of items within the window. + * + * @returns {number} + * @memberof Window_Command + */ + maxItems(): number; + /** + * Clears the list of commands from the window; + * this is useful for refreshing changing commands. + * @memberof Window_Command + */ + clearCommandList(): void; + /** + * Convenient method for overwriting and adding + * commands with the addCommand method. + * @memberof Window_Command + */ + makeCommandList(): void; + /** + * Adds commands to the window list with the specified + * parameters. The actual command can be found as an object. + * @param {String} name + * @param {String} symbol + * @param {boolean} enabled + * @param {(any | object)} [ext] + * @memberof Window_Command + */ + addCommand(name: string, symbol: string, enabled: boolean, ext?: any): void; + /** + * Returns the command name given an index. + * + * @param {number} index + * @returns {String} + * @memberof Window_Command + */ + commandName(index: number): string; + /** + * Returns the command symbol given an index. + * + * @param {number} index + * @returns {String} + * @memberof Window_Command + */ + commandSymbol(index: number): string; + /** + * Determines if the command is enabled; + * checks the enabled property of the command. + * @param {number} index + * @returns {boolean} + * @memberof Window_Command + */ + isCommandEnabled(index: number): boolean; + /** + * Returns the command object at the current index. + * + * @returns {object} + * @memberof Window_Command + */ + currentData(): any; + /** + * Returns the command symbol at the current index. + * + * @returns {String} + * @memberof Window_Command + */ + currentSymbol(): string; + /** + * Returns the ext property of the command at the current index. + * + * @returns {(any | object)} + * @memberof Window_Command + */ + currentExt(): any; + /** + * Finds a command object and returns the index number based + * on the symbol property. + * @param {String} symbol + * @returns {number} + * @memberof Window_Command + */ + findSymbol(symbol: string): boolean; + /** + * Selects a command object based on the symbol property. + * + * @param {String} symbol + * @memberof Window_Command + */ + selectSymbol(symbol: string): void; + /** + * Finds a command object and returns the index number + * based on the ext property. + * @param {(any | object)} ext + * @returns {number} + * @memberof Window_Command + */ + findExt(ext: any): number; + /** + * Selects a command object based on the ext property. + * + * @param {(any | object)} ext + * @memberof Window_Command + */ + selectExt(ext: any): void; + /** + * Returns the text align of the commands; + * possible values are: 'left', 'center', 'right'. + * @returns {String} + * @memberof Window_Command + */ + itemTextAlign(): string; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ActorCommand + * + * The window for selecting an actor's action on the battle screen. + * @class Window_ActorCommand + */ +declare class Window_ActorCommand extends Window_Command { + constructor(); + /** + * Adds the attack command to the actor command window. + * + * @memberof Window_ActorCommand + */ + addAttackCommand(): void; + /** + * Adds the skill command to the actor command window. + * + * @memberof Window_ActorCommand + */ + addSkillCommands(): void; + /** + * Adds the guard command to the actor command window. + * + * @memberof Window_ActorCommand + */ + addGuardCommand(): void; + /** + * Adds the item command to the actor command window. + * + * @memberof Window_ActorCommand + */ + addItemCommand(): void; + /** + * Sets up the actor command window with a specified actor. + * + * @param {Game_Actor} actor + * @memberof Window_ActorCommand + */ + setup(actor: Game_Actor): void; + selectLast(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_BattleStatus + * + * The window for displaying the status of party members on the battle screen. + * @class Window_BattleStatus + */ +declare class Window_BattleStatus extends Window_Selectable { + constructor(); + /** + * Returns the window width. + * + * @returns {number} + * @memberof Window_BattleStatus + */ + windowWidth(): number; + /** + * Returns the window height. + * + * @returns {number} + * @memberof Window_BattleStatus + */ + windowHeight(): number; + /** + * Returns the number of visible rows. + * + * @returns {number} + * @memberof Window_BattleStatus + */ + numVisibleRows(): number; + basicAreaRect(index: number): Rectangle; + /** + * returns a rectangle for the gauges in the gauge area. + * + * @param {number} index + * @returns {Rectangle} + * @memberof Window_BattleStatus + */ + gaugeAreaRect(index: number): Rectangle; + /** + * Returns the width of the guage area. + * + * @returns {number} + * @memberof Window_BattleStatus + */ + gaugeAreaWidth(): number; + /** + * Draws the basic area for actors within the battle status window. + * + * @param {Rectangle} rect + * @param {Game_Actor} actor + * @memberof Window_BattleStatus + */ + drawBasicArea(rect: Rectangle, actor: Game_Actor): void; + /** + * Draws the gauge area for the actors within the battle status window. + * + * @param {Rectangle} rect + * @param {Game_Actor} actor + * @memberof Window_BattleStatus + */ + drawGaugeArea(rect: Rectangle, actor: Game_Actor): void; + /** + * Draws the gauges in the basic area with tp included. + * + * @param {Rectangle} rect + * @param {Game_Actor} actor + * @memberof Window_BattleStatus + */ + drawGaugeAreaWithTp(rect: Rectangle, actor: Game_Actor): void; + /** + * Draws the gauges in the basic area without tp included. + * + * @param {Rectangle} rect + * @param {Game_Actor} actor + * @memberof Window_BattleStatus + */ + drawGaugeAreaWithoutTp(rect: Rectangle, actor: Game_Actor): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_BattleActor + * + * The window for selecting a target actor on the battle screen. + * @class Window_BattleActor + */ +declare class Window_BattleActor extends Window_BattleStatus { + constructor(x: number, y: number); + initialize(x: number, y: number): void; + /** + * Selects an actor within the battle actor window. + * + * @param {number} index + * @memberof Window_BattleActor + */ + select(index: number): void; + /** + * Returns the current selected actor. + * + * @returns {Game_Actor} + * @memberof Window_BattleActor + */ + actor(): Game_Actor; +} + +/** + * ----------------------------------------------------------------------------- + * Window_BattleEnemy + * + * The window for selecting a target enemy on the battle screen. + * @class Window_BattleEnemy + */ +declare class Window_BattleEnemy extends Window_Selectable { + constructor(x: number, y: number); + initialize(x: number, y: number): void; + /** + * Returns the window width. + * + * @returns {number} + * @memberof Window_BattleEnemy + */ + windowWidth(): number; + /** + * Returns the window height. + * + * @returns {number} + * @memberof Window_BattleEnemy + */ + windowHeight(): number; + /** + * Returns the number of visible rows. + * + * @returns {number} + * @memberof Window_BattleEnemy + */ + numVisibleRows(): number; + /** + * Returns the current enemy. + * + * @returns {Game_Enemy} + * @memberof Window_BattleEnemy + */ + enemy(): Game_Enemy; + /** + * Returns the current index selected. + * + * @returns {number} + * @memberof Window_BattleEnemy + */ + enemyIndex(): number; + /** + * Selects a specified enemy using the index. + * + * @param {number} index + * @memberof Window_BattleEnemy + */ + select(index: number): void; +} + +declare class Window_ItemList extends Window_Selectable { + constructor(x: number, y: number, width: number, height: number); + initialize(x: number, y: number, width: number, height: number): void; + needsNumber(): boolean; + selectLast(): void; + makeItemList(): void; + numberWidth(): number; +} + +/** + * ----------------------------------------------------------------------------- + * Window_BattleItem + * + * The window for selecting an item to use on the battle screen. + * @class Window_BattleItem + */ +declare class Window_BattleItem extends Window_ItemList { + constructor(x: number, y: number, width: number, height: number); + initialize(x: number, y: number, width: number, height: number): void; + includes(item: rm.types.UsableItem): boolean; +} + +/** + * ----------------------------------------------------------------------------- + * Window_BattleLog + * + * The window for displaying battle progress. No frame is displayed, but it is + * handled as a window for convenience. + * @class Window_BattleLog + */ +declare class Window_BattleLog extends Window_Base { + constructor(); + initialize(): void; + setSpriteset(spriteset: Spriteset_Battle): void; + windowWidth(): number; + windowHeight(): number; + maxLines(): number; + createBackBitmap(): void; + createBackSprite(): void; + numLines(): number; + messageSpeed(): number; + isBusy(): boolean; + updateWait(): boolean; + updateWaitCount(): boolean; + updateWaitMode(): boolean; + setWaitMode(waitMode: string): void; + callNextMethod(): void; + isFastForward(): boolean; + push(methodName: string, args: any[]): void; + clear(): void; + wait(): void; + waitForEffect(): void; + waitForMovement(): void; + addText(text: string): void; + pushBaseLine(): void; + popBaseLine(): void; + waitForNewLine(): void; + popupDamage(target: Game_Battler): void; + performActionStart(subject: Game_Battler, action: Game_Action): void; + performAction(subject: Game_Battler, action: Game_Action): void; + performActionEnd(subject: Game_Battler): void; + performDamage(target: Game_Battler): void; + performMiss(target: Game_Battler): void; + performRecovery(target: Game_Battler): void; + performEvasion(target: Game_Battler): void; + performMagicEvasion(target: Game_Battler): void; + performCounter(target: Game_Battler): void; + performReflection(target: Game_Battler): void; + performSubstitute(substitute: Game_Battler, target: Game_Battler): void; + performCollapse(target: Game_Battler): void; + showAnimation(subject: Game_Battler, targets: Game_Battler, animationId: number): void; + showAttackAnimation(subject: Game_Battler, targets: Game_Battler): void; + showActorAttackAnimation(subject: Game_Battler, targets: Game_Battler): void; + showEnemyAttackAnimation(subject: Game_Battler, targets: Game_Battler): void; + showNormalAnimation(targets: Game_Battler, animationId: number, mirror: boolean): void; + animationBaseDelay(): number; + animationNextDelay(): number; + drawBackground(): void; + backRect(): Rectangle; + backColor(): string; + backPaintOpacity(): number; + drawLineText(index: number): void; + startTurn(): void; + startAction(subject: Game_Battler, action: Game_Action, targets: Game_Battler[]): void; + endAction(subject: Game_Battler): void; + displayCurrentState(subject: Game_Battler): void; + displayRegeneration(subject: Game_Battler): void; + displayAction(subject: Game_Battler, item: rm.types.UsableItem): void; + displayCounter(target: Game_Battler): void; + displayReflection(target: Game_Battler): void; + displaySubstitute(substitute: Game_Battler, target: Game_Battler): void; + displayActionResults(subject: Game_Battler, targt: Game_Battler): void; + displayFailure(target: Game_Battler): void; + displayCritical(target: Game_Battler): void; + displayDamage(target: Game_Battler): void; + displayMiss(target: Game_Battler): void; + displayEvasion(target: Game_Battler): void; + displayHpDamage(target: Game_Battler): void; + displayMpDamage(target: Game_Battler): void; + displayTpDamage(target: Game_Battler): void; + displayAffectedStatus(target: Game_Battler): void; + displayAutoAffectedStatus(target: Game_Battler): void; + displayChangedStates(target: Game_Battler): void; + displayAddedStates(target: Game_Battler): void; + displayRemovedStates(target: Game_Battler): void; + displayChangedBuffs(target: Game_Battler): void; + /** + * + * @param target + * @param buffs list of integers representing buff Ids + * @param fmt + */ + displayBuffs(target: Game_Battler, buffs: number[], fmt: string): void; + makeHpDamageText(target: Game_Battler): void; + makeMpDamageText(target: Game_Battler): string; + makeTpDamageText(target: Game_Battler): string; +} + +declare namespace rm.types { + export const enum SkillTypeIdA { + base = -1, + } +} + +/** + * ----------------------------------------------------------------------------- + * Window_SkillList + * + * The window for selecting a skill on the skill screen. + * @class Window_SkillList + */ +declare class Window_SkillList extends Window_Selectable { + constructor(x: number, y: number, witth: number, height: number); + _actor: Game_Actor; + /** + * Returns the Skill Type Id, which is an Int. + */ + _stypeId: rm.types.SkillTypeIdA; + _data: rm.types.Skill[]; + initialize(x: number, y: number, width: number, height: number): void; + /** + * Sets the current actor of the skill list window. + * + * @param {Game_Actor} actor + * @memberof Window_SkillList + */ + setActor(actor: Game_Actor): void; + /** + * Sets the skill type id of the skill list window. + * + * @param {number} stypeId - Integer + * @memberof Window_SkillList + */ + setStypeId(stypeId: rm.types.SkillTypeIdA): void; + /** + * Returns the current skill at the window index + * loaded from the databse. + * + * @returns {RPG.Skill} + * @memberof Window_SkillList + */ + item(): rm.types.Skill; + /** + * Returns true if the given skill is included. + * + * @param {RPG.Skill} item + * @returns {boolean} + * @memberof Window_SkillList + */ + includes(item: rm.types.Skill): boolean; + /** + * Returns true if the given skill is enabled. + * + * @param {RPG.Skill} item + * @returns {boolean} + * @memberof Window_SkillList + */ + isEnabled(item: rm.types.Skill): boolean; + /** + * Creates the item list. + * + * @memberof Window_SkillList + */ + makeItemList(): void; + selectLast(): void; + costWidth(): number; + drawSkillCost(skill: rm.types.Skill, x: number, y: number, width: number): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_BattleSkill + * + * The window for selecting a skill to use on the battle screen. + * @class Window_BattleSkill + */ +declare class Window_BattleSkill extends Window_SkillList { + constructor(x: number, y: number, width: number, height: number); + initialize(x: number, y: number, width: number, height: number): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ChoiceList + * + * The window used for the event command [Show Choices]. + * @class Window_ChoiceList + */ +declare class Window_ChoiceList extends Window_Command { + constructor(messageWindow: Window_Message); + initialize(messageWindow: Window_Message): void; + start(): void; + selectDefault(): void; + updatePlacement(): void; + updateBackground(): void; + maxChoiceWidth(): number; + textWidthEx(text: string): number; +} + +/** + * ----------------------------------------------------------------------------- + * Window_DebugEdit + * + * The window for displaying switches and variables on the debug screen. + * @class Window_DebugEdit + */ +declare class Window_DebugEdit extends Window_Selectable { + constructor(x: number, y: number, width: number); + itemName(dataId: number): string; + itemStatus(dataId: string): string; + setMode(mode: string): void; + setTopId(id: number): void; + currentId(): number; + updateSwitch(): void; + updateVariable(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_DebugRange + * + * The window for selecting a block of switches/variables on the debug screen. + * @class Window_DebugRange + */ +declare class Window_DebugRange extends Window_Selectable { + constructor(x: number, y: number); + windowWidth(): number; + windowHeight(): number; + mode(): string; + topId(): number; + setEditWindow(editWindow: Window_DebugEdit): void; +} + +declare class Window_HorzCommand extends Window_Command { + constructor(x: number, y: number); +} + +declare class Window_EquipCommand extends Window_HorzCommand { + protected constructor(); +} + +/** + * ----------------------------------------------------------------------------- + * Window_EquipItem + * + * The window for selecting an equipment item on the equipment screen. + * @class Window_EquipItem + */ +declare class Window_EquipItem { + constructor(x: number, y: number, width: number, height: number); + setActor(actor: Game_Actor): void; + setSlotId(slotId: number): void; + includes(item: rm.types.EquipItem): boolean; + isEnabled(item: rm.types.EquipItem): boolean; + setStatusWindow(statusWindow: Window_EquipStatus): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_EquipSlot + * + * The window for selecting an equipment slot on the equipment screen. + * @class Window_EquipSlot + */ +declare class Window_EquipSlot extends Window_Selectable { + constructor(x: number, y: number, width: number, height: number); + initialize(x: number, y: number, width: number, height: number): void; + /** + * Sets the current game actor. + * + * @param {Game_Actor} actor + * @memberof Window_EquipSlot + */ + setActor(actor: Game_Actor): void; + /** + * Returns the current equip item. + * + * @returns {RPG.EquipItem} + * @memberof Window_EquipSlot + */ + item(): rm.types.EquipItem; + /** + * Returns the name of the slot at the specified index. + * + * @param {number} index + * @returns {string} + * @memberof Window_EquipSlot + */ + slotName(index: number): string; + /** + * Returns true if the current slot is enabled. + * + * @param {number} index + * @returns {boolean} + * @memberof Window_EquipSlot + */ + isEnabled(index: number): boolean; + /** + * Sets the status window within the equip slot window. + * + * @param {Window_EquipStatus} statusWindow + * @memberof Window_EquipSlot + */ + setStatusWindow(statusWindow: Window_EquipStatus): void; + /** + * Sets the item window within the equip slot window. + * + * @param {Window_EquipItem} itemWindow + * @memberof Window_EquipSlot + */ + setItemWindow(itemWindow: Window_EquipItem): void; +} + +declare class Window_EquipStatus extends Window_Base { + protected constructor(); +} + +/** + * ----------------------------------------------------------------------------- + * Window_EventItem + * + * The window used for the event command [Select Item]. + * @class Window_EventItem + */ +declare class Window_EventItem extends Window_ItemList { + constructor(messageWindow: Window_Message); + /** + * Returns the height off the window. + * + * @returns {number} + * @memberof Window_EventItem + */ + windowHeight(): number; + /** + * Returns the number of visible rows. + * + * @returns {number} + * @memberof Window_EventItem + */ + numVisibleRows(): number; + /** + * Starts the event item window. + * + * @memberof Window_EventItem + */ + start(): void; + updatePlacement(): void; + includes(item: rm.types.BaseItem): boolean; + isEnabled(item: rm.types.BaseItem): boolean; + onOk(): void; + onCancel(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_GameEnd + * + * The window for selecting "Go to Title" on the game end screen. + * @class Window_GameEnd + */ +declare class Window_GameEnd extends Window_Base { + constructor(); + updatePlacement(): void; +} + +declare class Window_Gold extends Window_Base { + constructor(x: number, y: number); + /** + * Returns the $gameParty gold as a number. + * + * @returns {number} + * @memberof Window_Gold + */ + value(): number; + /** + * Returns the RPGMakerMV database currency + * as a string. + * @returns {string} + * @memberof Window_Gold + */ + currencyUnit(): string; +} + +declare class Window_Help extends Window_Base { + /** + * Creates an instance of Window_Help. + * @param {number} numLines + * @memberof Window_Help + */ + constructor(numLines: number); + /** + * Sets the _text property of the window; + * this text will be displayed within the window. + * @param {string} text + * @memberof Window_Help + */ + setText(text: string): void; + clear(): void; + /** + * Sets the current item of the help window. + * + * @param {RPG.BaseItem} item + * @memberof Window_Help + */ + setItem(item: rm.types.BaseItem): void; +} + +declare class Window_ItemCategory extends Window_HorzCommand { + protected constructor(); +} + +/** + * ----------------------------------------------------------------------------- + * Window_MapName + * + * The window for displaying the map name on the map screen. + * @class Window_MapName + */ +declare class Window_MapName extends Window_Base { + constructor(); + /** + * Returns the window width. + * + * @returns {number} + * @memberof Window_MapName + */ + windowWidth(): number; + /** + * Returns the window height. + * + * @returns {number} + * @memberof Window_MapName + */ + windowHeight(): number; + updateFadeIn(): void; + updateFadeOut(): void; + /** + * Windows the map name window. + * + * @memberof Window_MapName + */ + refresh(): void; + /** + * Draws the background of the map name window. + * + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @memberof Window_MapName + */ + drawBackground(x: number, y: number, width: number, height: number): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_MenuStatus + * + * The window for displaying party member status on the menu screen. + * @class Window_MenuStatus + * @extends {Window_Selectable} + */ +declare class Window_MenuStatus extends Window_Selectable { + /** + * Creates an instance of Window_MenuStatus. + * @param {number} x + * @param {number} y + * @memberof Window_MenuStatus + */ + constructor(x: number, y: number); + /** + * Window width. + * @return Int + */ + windowWidth(): number; + /** + * Window height. + * @return Int + */ + windowHeight(): number; + /** + * Returns the height of each item (actor status) in the main menu + * window. + * @returns {number} + * @memberof Window_MenuStatus + */ + itemHeight(): number; + /** + * Returns the number of visible rows in + * menu status. + * @returns {number} + * @memberof Window_MenuStatus + */ + numVisibleRows(): number; + /** + * Loads the images for the main menu status window. + * + * @memberof Window_MenuStatus + */ + loadImages(): void; + /** + * Draws the item background at the given index. + * + * @param {number} index + * @memberof Window_MenuStatus + */ + drawItemBackground(index: number): void; + drawItemImage(index: number): void; + drawItemStatus(index: number): void; + selectLast(): void; + /** + * Determines if the window is in formation mode; + * if true, the player can select characters to swap + * positions with. + * @returns {boolean} + * @memberof Window_MenuStatus + */ + formationMode(): boolean; + /** + * Sets the formation mode to true or false. + * + * @param {boolean} formationMode + * @memberof Window_MenuStatus + */ + setFormationMode(formationMode: boolean): void; + pendingIndex(): number; + setPendingIndex(index: number): void; +} + +declare class Window_MenuActor extends Window_MenuStatus { + constructor(); + initialize(): void; + selectForItem(item: rm.types.BaseItem): void; +} + +declare class Window_MenuCommand extends Window_Command { + constructor(x: number, y: number); + /** + * Adds the standard game commands to the + * RPGMakerMV main menu. + * @memberof Window_MenuCommand + */ + addMainCommands(): void; + /** + * Adds the standard formation command to the + * RPGMakerMV main menu. + * @memberof Window_MenuCommand + */ + addFormationCommand(): void; + /** + * Adds any user created commands to the + * RPGMakerMV main menu. + * @memberof Window_MenuCommand + */ + addOriginalCommands(): void; + /** + * Adds the save command to the + * RPGMakerMV main menu. + * @memberof Window_MenuCommand + */ + addSaveCommand(): void; + addGameEndCommand(): void; + /** + * Checks if the standard game commands for the menu + * are needed based on database system options. + * @param {string} name + * @returns {boolean} + * @memberof Window_MenuCommand + */ + needsCommand(name: string): boolean; + /** + * Determines if the main commands are enabled; + * this is based on the settings in the database. + * @returns {boolean} + * @memberof Window_MenuCommand + */ + areMainCommandsEnabled(): boolean; + /** + * Determines if the option command is enabled; + * based on the setting in the database. + * @returns {boolean} + * @memberof Window_MenuCommand + */ + isOptionsEnabled(): boolean; + /** + * Determines if the save command is enabled; + * based on the setting in the database. + * @returns {boolean} + * @memberof Window_MenuCommand + */ + isSaveEnabled(): boolean; + /** + * Selects the last command in menu. + * + * @memberof Window_MenuCommand + */ + selectLast(): void; + static initCommandPosition(): void; + static _lastCommandSymbol: any; +} + +declare class Window_Message extends Window_Base { + protected constructor(); + initialize(): void; + initMembers(): void; + /** + * Processes normal characters displayed within the message window. + * @param textState + */ + processNormalCharacter(textState: string): void; + /** + * Returns the sub windows attached to the message window. + * + * @returns {Array} + * @memberof Window_Message + */ + subWindows(): Window_Base[]; + /** + * Creates the sub windows for the message window. + * + * @memberof Window_Message + */ + createSubWindows(): void; + /** + * Returns the width of the window. + * + * @returns {number} + * @memberof Window_Message + */ + windowWidth(): number; + /** + * Returns the height of the window. + * + * @returns {number} + * @memberof Window_Message + */ + windowHeight(): number; + /** + * Returns the number of visible rows within the message window. + * + * @returns {number} + * @memberof Window_Message + */ + numVisibleRows(): number; + checkToNotClose(): void; + /** + * Returns true if the message window can start. + * + * @returns {boolean} + * @memberof Window_Message + */ + canStart(): boolean; + /** + * Starts the displaying of the message within the message window. + * + * @memberof Window_Message + */ + startMessage(): void; + /** + * Updates the placement of the message window. + * + * @memberof Window_Message + */ + updatePlacement(): void; + /** + * Clears the message window flags for + * fast text, pause skip, and line show fast + */ + clearFlags(): void; + /** + * Sets the background type of the window in terms + * of transparency. + * 0, + * 1, + * 2 + */ + setBackgroundType(backgroundType: number): void; + /** + * Processes the escape characters in the message window. + * @param code + * @param textState + */ + processEscapeCharacter(code: string, textState: string): void; + /** + * Starts the wait count for the message window. + * @param count + */ + startWait(count: number): void; + /** + * Starts the pause for the window. + * Sets the wait count to 10 and pauses + * the window. + */ + startPause(): void; + /** + * Updates the background of the message window. + * + * @memberof Window_Message + */ + updateBackground(): void; + /** + * Terminates the message and closes the gold and message window. + * + * @memberof Window_Message + */ + terminateMessage(): void; + /** + * Updates the wait of the message window. + * + * @returns {Bool} + * @memberof Window_Message + */ + updateWait(): boolean; + updateLoading(): boolean; + /** + * Updates input when the message window is processing. + * + * @returns {Bool} + * @memberof Window_Message + */ + updateInput(): boolean; + /** + * Returns true if any sub window is active. + * + * @returns {Bool} + * @memberof Window_Message + */ + isAnySubWindowActive(): boolean; + /** + * Updates the message. + * + * @returns {Bool} + * @memberof Window_Message + */ + updateMessage(): boolean; + /** + * Handler for when there is no text left to display within + * the message window. + * @memberof Window_Message + */ + onEndOfText(): void; + startInput(): boolean; + /** + * Returns true if the ok or cancel inputs have been triggered + * multiple times. + * @returns {Bool} + * @memberof Window_Message + */ + isTriggered(): boolean; + /** + * Returns true if the message window still has text + * and settings have not changed. + * @returns {Bool} + * @memberof Window_Message + */ + doesContinue(): boolean; + /** + * Returns true if the message window settings have been changed. + * + * @returns {Bool} + * @memberof Window_Message + */ + areSettingsChanged(): boolean; + updateShowFast(): void; + newPage(textState: rm.types.TextState): void; + loadMessageFace(): void; + drawMessageFace(): void; + newLineX(): number; + processNewLine(textState: rm.types.TextState): void; + processNewPage(textState: rm.types.TextState): void; +} + +declare class Window_NameBox extends Window_Base { + constructor(); + baseTextRect(): Rectangle; +} + +/** + * ----------------------------------------------------------------------------- + * Window_NameEdit + * + * The window for editing an actor's name on the name input screen. + * @class Window_NameEdit + */ +declare class Window_NameEdit { + /** + * Creates an instance of Window_NameEdit. + * @param {Game_Actor} actor + * @param {number} maxLength + * @memberof Window_NameEdit + */ + constructor(actor: Game_Actor, maxLength: number); + /** + * Returns the window width. + * + * @returns {number} + * @memberof Window_NameEdit + */ + windowWidth(): number; + /** + * Returns the window height. + * + * @returns {number} + * @memberof Window_NameEdit + */ + windowHeight(): number; + restoreDefault(): boolean; + add(ch: string): boolean; + back(): boolean; + /** + * Returns the width of the character face. + * + * @returns {number} + * @memberof Window_NameEdit + */ + faceWidth(): number; + /** + * Returns the width of a character. + * + * @returns {number} + * @memberof Window_NameEdit + */ + charWidth(): number; + left(): number; + underlineRect(index: number): Rectangle; + /** + * Returns the color of the underline as a css color String. + * + * @returns {String} + * @memberof Window_NameEdit + */ + underlineColor(): string; + /** + * Draws the underline at the given index of the window. + * + * @param {number} index + * @memberof Window_NameEdit + */ + drawUnderline(index: number): void; + /** + * Draws a character within the window at the specified index. + * + * @param {number} index + * @memberof Window_NameEdit + */ + drawChar(index: number): void; + /** + * Refreshes the window contents. + * + * @memberof Window_NameEdit + */ + refresh(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_NameInput + * + * The window for selecting text characters on the name input screen. + * @class Window_NameInputt + */ +declare class Window_NameInput extends Window_Selectable { + constructor(editWindow: Window_NameEdit); + /** + * Returns the window height. + * + * @returns {number} + * @memberof Window_NameInput + */ + windowHeight(): number; + /** + * Returns the table of characters to input. + * + * @returns {Array>} + * @memberof Window_NameInput + */ + table(): string[][]; + character(): string; + isPageChange(): boolean; + isOk(): boolean; + processJump(): void; + processBack(): void; + onNameAdd(): void; + onNameOk(): void; + static LATIN1: string[]; + static LATIN2: string[]; + static RUSSIA: string[]; + static JAPAN1: string[]; + static JAPAN2: string[]; + static JAPAN3: string[]; +} + +declare class Window_NumberInput extends Window_Selectable { + constructor(messageWindow: Window_Message); + start(): void; + updatePlacement(): void; + /** + * Returns the window width. + * + * @returns {number} + * @memberof Window_NumberInput + */ + windowWidth(): number; + /** + * Returns the window height. + * + * @returns {number} + * @memberof Window_NumberInput + */ + windowHeight(): number; + /** + * Returns the item width. + * + * @returns {number} + * @memberof Window_NumberInput + */ + itemWidth(): number; + /** + * Creates the number input window buttons. + * + * @memberof Window_NumberInput + */ + createButtons(): void; + /** + * Places the number input window buttons. + * + * @memberof Window_NumberInput + */ + placeButtons(): void; + updateButtonsVisiblity(): void; + showButtons(): void; + hideButtons(): void; + buttonY(): number; + processDigitChange(): void; + changeDigit(up: boolean): void; + onButtonUp(): void; + onButtonDown(): void; + onButtonOk(): void; +} + +declare class Window_Options extends Window_Command { + constructor(); + updatePlacement(): void; + addGeneralOptions(): void; + addVolumeOptions(): void; + statusWidth(): number; + statusText(index: number): string; + isVolumeSymbol(symbol: string): boolean; + booleanStatusText(value: boolean): string; + volumeStatusText(value: number): string; + volumeOffset(): number; + changeValue(symbol: string, value: boolean | number): void; + getConfigValue(symbol: string): boolean; + setConfigValue(symbol: string, volume: boolean | number): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_PartyCommand + * + * The window for selecting whether to fight or escape on the battle screen. + * @class Window_PartyCommand + */ +declare class Window_PartyCommand extends Window_Command { + constructor(); + setup(): void; +} + +declare namespace rm.windows { + export type Info = { + key: string; + } +} + +declare class Window_SavefileList extends Window_Selectable { + constructor(x: number, y: number, width: number, height: number); + /** + * Sets the mode of the save file window. + * + * @param {string} mode + * @memberof Window_SavefileList + */ + setMode(mode: string): void; + /** + * Returns the maximum number of visible items. + * + * @returns {number} + * @memberof Window_SavefileList + */ + maxVisibleItems(): number; + itemHeight(): number; + /** + * Draws the file id at the specified x and y coordinates. + * + * @param {number} id + * @param {number} x + * @param {number} y + * @memberof Window_SavefileList + */ + drawFileId(id: number, x: number, y: number): void; + drawContents(info: rm.windows.Info, rect: Rectangle, valid: boolean): void; + drawGameTitle(info: rm.windows.Info, x: number, y: number, width: number): void; + drawPartyCharacters(info: rm.windows.Info, x: number, y: number): void; + /** + * Draws the current playtime at the specified x and y coordinates within the given + * width. + * @param {{key: string}} info + * @param {number} x + * @param {number} y + * @param {number} width + * @memberof Window_SavefileList + */ + drawPlaytime(info: rm.windows.Info, x: number, y: number, width: number): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ScrollText + * + * The window for displaying scrolling text. No frame is displayed, but it + * is handled as a window for convenience. + * @class Window_ScrollText + */ +declare class Window_ScrollText extends Window_Base { + constructor(); + /** + * Starts the displaying of a message in the scroll text window. + * + * @memberof Window_ScrollText + */ + startMessage(): void; + refresh(): void; + updateMessage(): void; + scrollSpeed(): number; + /** + * Returns true if the scene is in fast forward mode. + * + * @returns {boolean} + * @memberof Window_ScrollText + */ + isFastForward(): boolean; + /** + * Returns the fast forward rate of the scroll text window. + * + * @returns {number} + * @memberof Window_ScrollText + */ + fastForwardRate(): number; + /** + * Terminates the message and the scroll text window is hidden. + * + * @memberof Window_ScrollText + */ + terminateMessage(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ShopBuy + * + * The window for selecting an item to buy on the shop screen. + * @class Window_ShopBuy + */ +declare class Window_ShopBuy extends Window_Selectable { + /** + * Creates an instance of Window_ShopBuy. + * @param {number} x + * @param {number} y + * @param {number} height + * @param {Array>} shopGoods + * @memberof Window_ShopBuy + */ + constructor(x: number, y: number, height: number, shopGoods: any[][]); + /** + * Returns the width of the window. + * + * @returns {number} + * @memberof Window_ShopBuy + */ + windowWidth(): number; + /** + * Returns the current item of the window. + * + * @returns {RPG.BaseItem} + * @memberof Window_ShopBuy + */ + item(): rm.types.BaseItem; + setMoney(money: number): void; + /** + * Returns the p rice of an item + * @param item + * @return Int + */ + price(item: rm.types.BaseItem): number; + /** + * Checks if the current item is enabled (can be bought/sold). + * + * @param {RPG.BaseItem} item + * @returns {boolean} + * @memberof Window_ShopBuy + */ + isEnabled(item: rm.types.BaseItem): boolean; + /** + * Creates a list of items for the shop window. + * + * @memberof Window_ShopBuy + */ + makeItemList(): void; + /** + * Sets the status window for the shop buy window. + * @param statusWindow + */ + setStatusWindow(statusWindow: Window_ShopStatus): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ShopCommand + * + * The window for selecting buy/sell on the shop screen. + * @class Window_ShopCommand + */ +declare class Window_ShopCommand extends Window_HorzCommand { + protected constructor(); + _purchaseOnly: boolean; + /** + * Determines the width of the shop buy/sell window; + * also determines if the shop is purchase only. + * @param {number} width + * @param {boolean} purchaseOnly + * @memberof Window_ShopCommand + */ + initialize(width: number, purchaseOnly: boolean): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ShopNumber + * + * The window for inputting quantity of items to buy or sell on the shop + * screen. + * @class Window_ShopNumber + */ +declare class Window_ShopNumber extends Window_Selectable { + /** + * Creates an instance of Window_ShopNumber. + * @param {number} x + * @param {number} y + * @param {number} height + * @memberof Window_ShopNumber + */ + constructor(x: number, y: number, height: number); + /** + * Returns the width of the window. + * + * @returns {number} + * @memberof Window_ShopNumber + */ + windowWidth(): number; + number(): number; + setup(item: rm.types.BaseItem, max: number, price: number): void; + setCurrencyUnit(currencyUnit: string): void; + createButtons(): void; + placeButtons(): void; + updateButtonsVisiblity(): void; + /** + * Shows the quantity input buttons. + * + * @memberof Window_ShopNumber + */ + showButtons(): void; + /** + * Hides the quantity input buttons. + * + * @memberof Window_ShopNumber + */ + hideButtons(): void; + drawMultiplicationSign(): void; + /** + * Draws the number. + */ + drawNumber(): void; + /** + * Draws the total price of the selected + * quantity of item. + * @memberof Window_ShopNumber + */ + drawTotalPrice(): void; + /** + * Item y position. + * @return Int + */ + itemY(): number; + /** + * Y position of the price. + * @return Int + */ + priceY(): number; + /** + * Y position of the button. + * @return Int + */ + buttonY(): number; + /** + * Returns the width of the cursor. + * + * @returns {number} + * @memberof Window_ShopNumber + */ + cursorWidth(): number; + /** + * Cursor x position. + * @return Int + */ + cursorX(): number; + /** + * The max number of digits for the shop number display + * window. + */ + maxDigits(): number; + /** + * Processes the change in quantity. + * + * @memberof Window_ShopNumber + */ + processNumberChange(): void; + /** + * Changes the quantity, given a number. + * + * @param {number} amount + * @memberof Window_ShopNumber + */ + changeNumber(amount: number): void; + /** + * Handle for button up event. + */ + onButtonUp(): void; + /** + * Handler for button up event 2. + */ + onButtonUp2(): void; + /** + * Handler for button down event. + */ + onButtonDown(): void; + /** + * Handler for button down event. + */ + onButtonDown2(): void; + /** + * Handler for button ok event. + */ + onButtonOk(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_ShopSell + * + * The window for selecting an item to sell on the shop screen. + * @class Window_ShopSell + */ +declare class Window_ShopSell extends Window_ItemList { + constructor(x: number, y: number, width: number, height: number); + /** + * Determines if the item is sellable, otherwise, greyed out. + * + * @param {RPG.BaseItem} item + * @returns {boolean} + * @memberof Window_ShopSell + */ + isEnabled(item: rm.types.BaseItem): boolean; +} + +declare namespace rm.types { + export const enum EquipTypeId { + base = -1, + } +} + +/** + * ----------------------------------------------------------------------------- + * Window_ShopStatus + * + * The window for displaying number of items in possession and the actor's + * equipment on the shop screen. + * @class Window_ShopStatus + */ +declare class Window_ShopStatus extends Window_Base { + /** + * Creates an instance of Window_ShopStatus. + * @param {number} x + * @param {number} y + * @param {number} width + * @param {number} height + * @memberof Window_ShopStatus + */ + constructor(x: number, y: number, width: number, height: number); + /** + * Refreshes the window contents. + * + * @memberof Window_ShopStatus + */ + refresh(): void; + /** + * Sets the item in the window shop status for display. + */ + setItem(item: rm.types.BaseItem): void; + /** + * Returns true if the item in the + * shop status window is an equippable item. + */ + isEquipItem(): boolean; + drawPossession(x: number, y: number): void; + /** + * Draw Equip Information. + */ + drawEquipInfo(x: number, y: number): void; + statusMembers(): Game_Actor[]; + /** + * Returns the page size. + * + * @returns {number} + * @memberof Window_ShopStatus + */ + pageSize(): number; + /** + * Returns the max number of pages. + * + * @returns {number} + * @memberof Window_ShopStatus + */ + maxPages(): number; + drawActorEquipInfo(x: number, y: number, actor: Game_Actor): void; + drawActorParamChange(x: number, y: number, actor: Game_Actor, item1: rm.types.EquipItem): void; + /** + * Returns the parameter id. + * + * @returns {number} + * @memberof Window_ShopStatus + */ + paramId(): number; + /** + * Returns the current item equiped by the given actor when + * the respective equipment Id is passed. + * @param {Game_Actor} actor + * @param {number} etypeId + * @returns {RPG.EquipItem} + * @memberof Window_ShopStatus + */ + currentEquippedItem(actor: Game_Actor, etypeId: rm.types.EquipTypeId): rm.types.EquipItem; + /** + * Updates the current page. + * + * @memberof Window_ShopStatus + */ + updatePage(): void; + /** + * Determines if page can be changed. + * + * @returns {boolean} + * @memberof Window_ShopStatus + */ + isPageChangeEnabled(): boolean; + isPageChangeRequested(): boolean; + /** + * Determines if the window is touched within it's frame. + * + * @returns {boolean} + * @memberof Window_ShopStatus + */ + isTouchedInsideFrame(): boolean; + /** + * Changes the current page. + * + * @memberof Window_ShopStatus + */ + changePage(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_SkillStatus + * + * The window for displaying the skill user's status on the skill screen. + * @class Window_SkillStatus + */ +declare class Window_SkillStatus extends Window_Base { + /** + * Creates an instance of Window_SkillStatus. + * @param x + * @param y + * @param width + * @param height + * @memberof Window_SkillStatus + */ + constructor(x: number, y: number, width: number, height: number); + /** + * Sets the current actor for the window. + * + * @param {Game_Actor} actor + * @memberof Window_SkillStatus + */ + setActor(actor: Game_Actor): void; + /** + * Refreshes the window contents. + * + * @memberof Window_SkillStatus + */ + refresh(): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_SkillType + * + * The window for selecting a skill type on the skill screen. + * @class Window_SkillType + */ +declare class Window_SkillType extends Window_Command { + /** + * Creates an instance of Window_SkillType. + * @param x + * @param y + * @memberof Window_SkillType + */ + constructor(x: number, y: number); + /** + * Sets the current actor for the skill type window. + * + * @param {Game_Actor} actor + * @memberof Window_SkillType + */ + setActor(actor: Game_Actor): void; + /** + * Sets the skill window for the current skill type. + * + * @param {Window_SkillList} skillWindow + * @memberof Window_SkillType + */ + setSkillWindow(skillWindow: Window_SkillList): void; + /** + * Selects the last command in the window. + * + * @memberof Window_SkillType + */ + selectLast(): void; +} + +declare class Window_Status extends Window_Selectable { + constructor(x: number, y: number, width: number, height: number); + initialize(x: number, y: number, width: number, height: number): void; + /** + * Sets the skill type id of the skill list window. + * + * @param {number} stypeId + * @memberof Window_SkillList + */ + setStypeId(stypeId: number): void; + /** + * Returns the current skill from the databse. + * + * @returns {RPG.Skill} + * @memberof Window_SkillList + */ + item(): rm.types.Skill; + /** + * Returns true if the given skill is included. + * + * @param {RPG.Skill} item + * @returns {boolean} + * @memberof Window_SkillList + */ + includes(item: rm.types.Skill): boolean; + /** + * Returns true if the given skill is enabled. + * + * @param {RPG.Skill} item + * @returns {boolean} + * @memberof Window_SkillList + */ + isEnabled(item: rm.types.Skill): boolean; + /** + * Creates the item list. + * + * @memberof Window_SkillList + */ + makeItemList(): void; + selectLast(): void; + costWidth(): number; + drawSkillCost(skill: rm.types.Skill, x: number, y: number, width: number): void; + /** + * Sets the current actor of the skill list window. + * + * @param {Game_Actor} actor + * @memberof Window_SkillList + */ + setActor(actor: Game_Actor): void; +} + +/** + * ----------------------------------------------------------------------------- + * Window_TitleCommand + * + * The window for selecting New Game/Continue on the title screen. + * @class Window_TitleCommand + */ +declare class Window_TitleCommand extends Window_Command { + protected constructor(); + updatePlacement(): void; + isContinueEnabled(): boolean; + initCommandPosition(): void; + selectLast(): void; +} + + +interface AttackMotion { + /** + * The type of the motion. + */ + type: number; + + /** + * The ID of the weapon image. + */ + weaponImageId: number; +} + +interface Terms { + /** + * The basic status. A string array with the following subscripts: + * + * 0: Level + * 1: Level (short) + * 2: HP + * 3: HP (short) + * 4: MP + * 5: MP (short) + * 6: TP + * 7: TP (short) + * 8: EXP + * 9: EXP (short) + */ + basic: Array; + + /** + * Parameters. A string array with the following subscripts: + * + * 0: Maximum hit points + * 1: Maximum magic points + * 2: Attack power + * 3: Defense power + * 4: Magic attack power + * 5: Magic defense power + * 6: Agility + * 7: Luck + * 8: Hit + * 9: Evasion + */ + params: Array; + + /** + * 0: Fight + * 1: Escape + * 2: Attack + * 3: Defend + * 4: Item + * 5: Skill + * 6: Equip + * 7: Status + * 8: Sort + * 9: Save + * 10: Exit Game + * 11: Option + * 12: Weapon + * 13: Armor + * 14: Key Item + * 15: Change Equipment + * 16: Ultimate Equipment + * 17: Remove All + * 18: New Game + * 19: Continue + * 20: (not used) + * 21: Go to Title + * 22: Cancel + * 23: (not used) + * 24: Buy + * 25: Sell + */ + commands: Array; + + /** + * The messages. + */ + messages: { [key: string]: string }; +} + +interface TestBattler { + /** + * The actor ID. + */ + actorId: number; + + /** + * The actor's level. + */ + level: number; + + /** + * The actor's equipment. An array of weapon IDs or armor IDs with the following subscripts: + * + * 0: Weapon + * 1: Shield + * 2: Head + * 3: Body + * 4: Accessory + */ + equips: Array; +} + +type MapInfo = { + /** + * The map name. + */ + name: string; + + /** + * The parent map ID. + */ + parentId: number; + + /** + * The map tree display order, which is used internally. + */ + order: number; +} + +interface MetaData { + /** + * The text of the note. + */ + note: string; + + /** + * The Meta. + */ + meta: { [key: string]: any }; +} + +/** + * The data class for maps. + */ +interface Map extends MetaData { + /** + * The map's display name. + */ + displayName: string; + + /** + * The map's tile set. + */ + tilesetId: number; + + /** + * The map's width. + */ + width: number; + + /** + * The map's height. + */ + height: number; + + /** + * The scroll type (0: No Loop, 1: Vertical Loop, 2: Horizontal Loop, 3: Both Loop). + */ + scrollType: number; + + /** + * The truth value indicating whether the battle background specification is enabled. + */ + specifyBattleback: boolean; + + /** + * The file name of the floor graphic if the battle background specification is enabled. + */ + battleback1Name: string; + + /** + * The file name of the wall graphic if the battle background specification is enabled. + */ + battleback2_name: string; + + /** + * The truth value indicating whether BGM autoswitching is enabled. + */ + autoplayBgm: boolean; + + /** + * The name of that BGM (RPG.AudioFile) if BGM autoswitching is enabled. + */ + bgm: rm.types.AudioFile; + + /** + * The truth value indicating whether BGS autoswitching is enabled. + */ + autoplayBgs: boolean; + + /** + * The name of that BGS (RPG.AudioFile) if BGS autoswitching is enabled. + */ + bgs: rm.types.AudioFile; + + /** + * The truth value of the [Disable Dashing] option. + */ + disableDashing: boolean; + + /** + * An encounter list. A RPG.Map.Encounter ID array. + */ + encounterList: Array; + + /** + * The average number of steps between encounters. + */ + encounterStep: number; + + /** + * The file name of the parallax background's graphic. + */ + parallaxName: string; + + /** + * The truth value of the [Loop Horizontal] option for the parallax background. + */ + parallaxLoopX: boolean; + + /** + * The truth value of the [Loop Vertical] option for the parallax background. + */ + parallaxLoopY: boolean; + + /** + * The automatic x-axis scrolling speed for the parallax background. + */ + parallaxSx: number; + + /** + * The automatic y-axis scrolling speed for the parallax background. + */ + parallaxSy: number; + + /** + * The truth value of the [Show in the Editor] option for the parallax background. + */ + parallaxShow: boolean; + + /** + * The map data. A 3-dimensional tile ID array (Table). + */ + data: Array; + + /** + * The array of RPG.Event data. + */ + events: Array; +} + +interface System { + /** + * The game title. + */ + gameTitle: string; + + /** + * A random number used for update checks. The number changes every time data is saved in RPG Maker. + */ + versionId: number; + + /** + * The locale string such as "ja_JP" and "en_US". + */ + locale: string; + + /** + * The initial party. An array of actor IDs. + */ + partyMembers: Array; + + /** + * The unit of currency. + */ + currencyUnit: string; + + /** + * The window color. + */ + windowTone: Array; + + /** + * The array of System.AttackMotion data. + */ + attackMotions: Array; + + /** + * A list of elements. A string array using element IDs as subscripts, with the element in the 0 position being nil. + */ + elements: Array; + + /** + * he equipment type. A string array with the following subscripts: + * 1: Weapon + * 2: Shield + * 3: Head + * 4: Body + * 5: Accessory + */ + equipTypes: Array; + + /** + * A list of skill types. A string array using skill type IDs as subscripts, with the element in the 0 position being nil. + */ + skillTypes: Array; + + /** + * A list of weapon types. A string array using weapon type IDs as subscripts, with the element in the 0 position being nil. + */ + weaponTypes: Array; + + /** + * A list of armor types. A string array using armor type IDs as subscripts, with the element in the 0 position being nil. + */ + armorTypes: Array; + + /** + * A switch name list. A string array using switch IDs as subscripts, with the element in the 0 position being nil. + */ + switches: Array; + + /** + * A variable name list. A string array using variable IDs as subscripts, with the element in the 0 position being nil. + */ + variables: Array; + + /** + * Boat settings (RPG.System.Vehicle). + */ + boat: rm.types.SystemVehicle; + + /** + * Ship settings (RPG.System.Vehicle). + */ + ship: rm.types.SystemVehicle; + + /** + * Airship settings (RPG.System.Vehicle). + */ + airship: rm.types.SystemVehicle; + + /** + * The file name of the title (background) graphic. + */ + title1Name: string; + + /** + * The file name of the title (frame) graphic. + */ + title2Name: string; + + /** + * The truth value of the [Draw Game Title] option. + */ + optDrawTitle: boolean; + + /** + * The truth value of the [Start Transparent] option. + */ + optTransparent: boolean; + + /** + * The truth value of the [Show Player Followers] option. + */ + optFollowers: boolean; + + /** + * The truth value of the [K.O. by Slip Damage] option. + */ + optSlipDeath: boolean; + + /** + * The truth value of the [K.O. by Floor Damage] option. + */ + optFloorDeath: boolean; + + /** + * The truth value of the [Display TP in Battle] option. + */ + optDisplayTp: boolean; + + /** + * The truth value of the [Reserve Members' EXP] option. + */ + optExtraExp: boolean; + + /** + * The truth value of the [use side-view battle] option. + */ + optSideView: boolean; + + /** + * The title BGM (RPG.AudioFile). + */ + titleBgm: rm.types.AudioFile; + + /** + * The battle BGM (RPG.AudioFile). + */ + battleBgm: rm.types.AudioFile; + + /** + * The battle end ME (RPG.AudioFile). + */ + battleEndMe: rm.types.AudioFile; + + /** + * The gameover ME (RPG.AudioFile). + */ + gameoverMe: rm.types.AudioFile; + + /** + * Sound effects. An RPG.SE array. + */ + sounds: Array; + + /** + * The map ID of the player's initial position. + */ + startMapId: number; + + /** + * The map's x-coordinate of the player's initial position. + */ + startX: number; + + /** + * The map's y-coordinate of the player's initial position. + */ + startY: number; + + /** + * Terms (RPG.System.Terms). + */ + terms: Terms; + + /** + * Party settings for battle tests. An RPG.System.TestBattler array. + */ + testBattlers: Array; + + /** + * The enemy troop ID for battle tests. + */ + testTroopId: number; + + /** + * The file name of the battle background (floor) graphic for use in editing enemy troops and battle tests. + */ + battleback1Name: string; + + /** + * The file name of the battle background (wall) graphic for use in editing enemy troops and battle tests. + */ + battleback2Name: string; + + /** + * The battler graphic file name for use in editing animations. + */ + battlerName: string; + + /** + * The adjustment value for the battler graphic's hue (0..360) for use in editing animations. + */ + battlerHue: number; + + /** + * The ID of the map currently being edited. For internal use. + */ + editMapId: number; +} + + + +/** @global RPGMaker Plugin's Object */ +declare var $plugins: Array; +/** @global RPGMakerMV Actor data. */ +declare var $dataActors: Array; +/** @global RPGMakerMV Class data. */ +declare var $dataClasses: Array; +/** @global RPGMakerMV Skill data. */ +declare var $dataSkills: Array; +/** @global RPGMakerMV Item data. */ +declare var $dataItems: Array; +/** @global RPGMakerMV Weapon data. */ +declare var $dataWeapons: Array; +/** @global RPGMakerMV Armor data. */ +declare var $dataArmors: Array; +/** @global RPGMakerMV Enemy data. */ +declare var $dataEnemies: Array; +/** @global RPGMakerMV Troop data. */ +declare var $dataTroops: Array; +/** @global RPGMakerMV State data. */ +declare var $dataStates: Array; +/** @global RPGMakerMV Animation data. */ +declare var $dataAnimations: Array; +/** @global RPGMakerMV Tileset data. */ +declare var $dataTilesets: Array; +/** @global RPGMakerMV CommonEvent data. */ +declare var $dataCommonEvents: Array; +/** @global RPGMakerMV System data. */ +declare var $dataSystem: System; +/** @global RPGMakerMV MapInfo data. */ +declare var $dataMapInfos: Array; +/** @global RPGMakerMV Map data for the current map. */ +declare var $dataMap: Map; +/** @global RPGMakerMV Temporary game data; not saved with the game. */ +declare var $gameTemp: Game_Temp; +/** @global RPGMakerMV Game System data; saved with the game. + * @type {Game_Temp} +*/ +declare var $gameSystem: Game_System; +/** @global RPGMakerMV Game Screen; contains properties and methods + * for adjusting the game screen. + * @type {Game_Screen} + */ +declare var $gameScreen: Game_Screen; +declare var $gameTimer: Game_Timer; +/** @global RPGMakerMV Game Message; contains properties and methods + * for displaying messages in the game message window. + * @type {Game_Message} +*/ +declare var $gameMessage: Game_Message; +/** @global RPGMakerMV Game Switches; contains properties and methods + * for modifying in game switches while the game is running. + * These are boolean values: true or false. + * @type {Game_Switches} + */ +declare var $gameSwitches: Game_Switches; +/** @global RPGMakerMV Game Variables; contains properties and methods + * for modifying the values of game variables. + * The variables can contain anything. + * @type {Game_Variables} + */ +declare var $gameVariables: Game_Variables; +declare var $gameSelfSwitches: Game_SelfSwitches; +declare var $gameActors: Game_Actors; +/** @global RPGmakerMV Game Party; contains properties and methods + * for interacting with the game party. Some of the methods include + * number of party members, etc. + * @type {Game_Party} + */ +declare var $gameParty: Game_Party; +/** @global RPGMakerMV Game Troop; contains properties and methods + * for interacting with the game troops. Some of the methods include + * enemy data, enemy names, etc. + * @type {Game_Troop} + */ +declare var $gameTroop: Game_Troop; +/** @global RPGMakerMV Game Map; contains properties and methods + * for interacting with the game map. Some of these methods include + * interacting with the map's game_interpreter, and event information. + * @type {Game_Map} + */ +declare var $gameMap: Game_Map; +/** @global RPGMakerMV Game Player; contains properties and methods + * for interacting with the game player. Some of these methods + * include interacting with the player's position and move route. + * @type {Game_Player} + */ +declare var $gamePlayer: Game_Player; +declare var $testEvent: Array; \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..2b6a808 --- /dev/null +++ b/js/main.js @@ -0,0 +1,9 @@ +//============================================================================= +// main.js +//============================================================================= + +PluginManager.setup($plugins); + +window.onload = function () { + SceneManager.run(Scene_Boot); +}; \ No newline at end of file diff --git a/js/plugins.js b/js/plugins.js new file mode 100644 index 0000000..110119c --- /dev/null +++ b/js/plugins.js @@ -0,0 +1,49 @@ +// Generated by RPG Maker. +// Do not edit this file directly. +var $plugins = +[ +{"name":"Community_Basic","status":true,"description":"Plugin used to set basic parameters.","parameters":{"cacheLimit":"20","screenWidth":"1024","screenHeight":"560","changeWindowWidthTo":"","changeWindowHeightTo":"","renderingMode":"auto","alwaysDash":"off"}}, +{"name":"MadeWithMv","status":false,"description":"Show a Splash Screen \"Made with MV\" and/or a Custom Splash Screen before going to main screen.","parameters":{"Show Made With MV":"true","Made with MV Image":"MadeWithMv","Show Custom Splash":"false","Custom Image":"","Fade Out Time":"120","Fade In Time":"120","Wait Time":"160"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"SF_Core","status":true,"description":"core lib for salted fish plugins","parameters":{}}, +{"name":"SF_Objects","status":true,"description":"objects lib for salted fish plugins","parameters":{}}, +{"name":"SF_Managers","status":true,"description":"Managers lib for salted fish plugins","parameters":{}}, +{"name":"SF_SkipLoadError","status":true,"description":"try to skip load errors","parameters":{}}, +{"name":"SF_Sprites","status":true,"description":"sprite base for salted fish plugins","parameters":{}}, +{"name":"SF_Windows","status":true,"description":"window base for salted fish plugins","parameters":{}}, +{"name":"SF_Scenes","status":true,"description":"scenes lib for salted fish plugins","parameters":{}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"SF_WindowScrollCommand","status":true,"description":"v1.0 Allows you to scroll text in selected commands.","parameters":{}}, +{"name":"SF_InputBindControl","status":true,"description":"v1.0 support add anf remove input event listener","parameters":{}}, +{"name":"SF_AutoRevive","status":true,"description":"v1.0.0 - Automatically revive dead party members.","parameters":{}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"YEP_CoreEngine","status":true,"description":"v1.31 [v1.0] 系统 - 引擎核心","parameters":{"---屏幕---":"","屏幕宽度":"1024","屏幕高度":"560","屏幕重置-战斗背景":"false","屏幕重置-标题":"true","屏幕重置-游戏结束":"true","控制台":"true","是否重置角色战斗位置":"true","游戏字体加载延时":"0","是否锁定实际比例":"false","是否自动释放缓存":"true","---金钱---":"","金钱最大值":"99999999","金钱字体大小":"20","金钱图标":"163","金钱超出消息":"数不尽","---物品---":"","物品最大值":"9999","物品字体大小":"20","---能力值---":"","角色等级最大值":"99","角色生命最大值":"9999","角色魔法最大值":"9999","角色属性最大值":"999","敌人生命最大值":"999999","敌人魔法最大值":"9999","敌人属性最大值":"999","---战斗---":"","动画速度":"4","是否闪烁选中目标":"false","遇敌动画是否显示角色":"false","战斗结束是否显示角色":"false","---地图优化---":"","角色生命变化时是否刷新":"true","角色魔法变化时是否刷新":"true","角色怒气变化时是否刷新":"false","---字体---":"","中文模式的字体":"SimHei, Heiti TC, sans-serif","日韩模式的字体":"Dotum, AppleGothic, sans-serif","默认模式的字体":"GameFont, Verdana, Arial, Courier New","默认字体大小":"28","默认对齐方式":"left","---窗口---":"","是否使用数字逗号分割":"true","默认行高":"36","默认图标大小":"32","默认图标高度":"32","默认脸图宽度":"144","默认脸图高度":"144","默认窗口内边距":"18","默认文本内边距":"6","默认窗口透明度":"192","YEP条是否描边":"true","默认YEP条行高":"18","是否绘制YEP怒气条":"true","---窗口颜色---":"","颜色-普通文本":"0","颜色-系统文本":"16","颜色-角色垂死":"17","颜色-角色死亡":"18","颜色-YEP条背景色":"19","颜色-生命条左":"20","颜色-生命条右":"21","颜色-魔法条左":"22","颜色-魔法条右":"23","颜色-魔法消耗":"23","颜色-强化":"24","颜色-弱化":"25","颜色-怒气条左":"28","颜色-怒气条右":"29","颜色-怒气消耗":"29"}}, +{"name":"YEP_SaveCore","status":true,"description":"v1.06 存档核心☁️","parameters":{"---General---":"","Max Files":"24","Saved Icon":"231","Empty Icon":"230","Return After Saving":"false","Auto New Index":"true","---Action Window---":"","Load Command":"加载","Save Command":"保存","Delete Command":"删除","---Help Window---":"","Select Help":"请选择一个文件槽","Load Help":"加载当前进度","Save Help":"保存当前进度","Delete Help":"删除当前进度","---Delete---":"","Delete Filename":"Damage2","Delete Volume":"100","Delete Pitch":"150","Delete Pan":"0","---Info Window---":"","Show Game Title":"true","Invalid Game Text":"这是另一个游戏的保存。","Empty Game Text":"Empty","Map Display Name":"true","Party Display":"2","Party Y Position":"this.lineHeight() + Window_Base._faceHeight","Show Actor Names":"true","Name Font Size":"20","Show Actor Level":"true","Level Font Size":"20","Level Format":"\\c[16]%1 \\c[0]%3","Data Font Size":"20","Data Column 1":"empty, playtime, save count, gold count","Data Column 2":"location, variable 1, variable 2, variable 3","Data Column 3":"empty, variable 4, variable 5, variable 6","Data Column 4":"","---Vocabulary---":"","Map Location":"","Playtime":"游戏时间:","Save Count":"保存次数:","Gold Count":"%1:","---Technical---":"","Save Mode":"web","Local Config":"config.rpgsave","Local Global":"global.rpgsave","Local Save":"file%1.rpgsave","Web Config":"RPG %1 Config","Web Global":"RPG %1 Global","Web Save":"RPG %1 File%2","---Confirmation---":"","Load Confirmation":"true","Load Text":"是否要加载此保存文件?","Save Confirmation":"true","Save Text":"是否覆盖此保存文件?","Delete Confirmation":"true","Delete Text":"是否删除此保存文件?","Confirm Yes":"是","Confirm No":"否"}}, +{"name":"YEP_OptionsCore","status":true,"description":"v1.01 选项核心☁️","parameters":{"---Categories---":"","OptionsCategories":"[\"{\\\"Name\\\":\\\"\\\\\\\\i[87]General\\\",\\\"---Settings---\\\":\\\"\\\",\\\"HelpDesc\\\":\\\"\\\\\\\"General settings that alter the way the game behaves.\\\\\\\"\\\",\\\"OptionsList\\\":\\\"[\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]Always Dash\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Player walks when OFF. Player dashes when ON.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nHolding SHIFT switches between walking and dashing.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"alwaysDash\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]Command Remember\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Game remembers the last command selected during battle.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"commandRemember\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]ATB Speed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Determines how fast the ATB Gauge fills up during battle.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"atbSpeed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"if (Imported.YEP_X_BattleSysATB) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = $gameSystem.getBattleSystem() === 'atb';\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(13);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(5);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 10) value = 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 10) value = 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value < 1) value = 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]Enemy Difficulty\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Determines the level strength of enemies.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"difficultySlider\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"if (Imported.YEP_X_DifficultySlider) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = $gameSystem.showDifficultySlider();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / Yanfly.Param.DSliderMaxDif;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(28);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(29);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += Yanfly.Param.DSliderChange;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > Yanfly.Param.DSliderMaxDif) value = Yanfly.Param.DSliderMinDif;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(Yanfly.Param.DSliderMinDif, Yanfly.Param.DSliderMaxDif);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += Yanfly.Param.DSliderChange;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(Yanfly.Param.DSliderMinDif, Yanfly.Param.DSliderMaxDif);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= Yanfly.Param.DSliderChange;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(Yanfly.Param.DSliderMinDif,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nYanfly.Param.DSliderMaxDif);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]Message Speed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Changes the speed text is displayed during messages.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"messageSpeed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = Imported.YEP_X_MessageSpeedOpt;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = ((value) / 10).clamp(0, 1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 10) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n var gaugeColor1 = this.textColor(14);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n var gaugeColor2 = this.textColor(6);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n var gaugeColor1 = this.textColor(20);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n var gaugeColor2 = this.textColor(21);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 11) value = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 11);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 11);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 11);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[87]Quest Window\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Show a window displaying the currently active\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nquest on the screen while exploring.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"mapQuestWindow\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = Imported.YEP_X_MapQuestWindow;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"none\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\"]\\\"}\",\"{\\\"Name\\\":\\\"\\\\\\\\i[80]Audio\\\",\\\"---Settings---\\\":\\\"\\\",\\\"HelpDesc\\\":\\\"\\\\\\\"Adjust the audio settings for the game.\\\\\\\"\\\",\\\"OptionsList\\\":\\\"[\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[80]Master Volume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Adjusts the overall volume of the game.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"masterVolume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(22);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(23);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[80]BGM Volume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Adjusts the volume of the background music.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"bgmVolume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[80]BGS Volume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Adjusts the volume of the background sound effects.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"bgsVolume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[80]ME Volume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Adjusts the volume of the melody effects\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nsuch as fanfares.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"meVolume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[80]SE Volume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Adjusts the volume of the sound effects.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"seVolume\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"none\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\"]\\\"}\",\"{\\\"Name\\\":\\\"\\\\\\\\i[302]Visual\\\",\\\"---Settings---\\\":\\\"\\\",\\\"HelpDesc\\\":\\\"\\\\\\\"Settings that adjust the visual properties of the game.\\\\\\\"\\\",\\\"OptionsList\\\":\\\"[\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[309]Window Tone: Red\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Changes the window tone's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[2]red\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] value.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nHold SHIFT while pressing LEFT/RIGHT to adjust more.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"windowToneRed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[0];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = (value + 255) / 510;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(10);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(value, titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $dataSystem.windowTone[0];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'red');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[0];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += offset;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'red');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[0];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= offset;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'red');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = !!config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[311]Window Tone: Green\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Changes the window tone's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[3]green\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] value.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nHold SHIFT while pressing LEFT/RIGHT to adjust more.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"windowToneGreen\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = (value + 255) / 510;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(3);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(11);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(value, titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $dataSystem.windowTone[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'green');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += offset;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'green');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[1];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= offset;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'green');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = !!config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[312]Window Tone: Blue\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Changes the window tone's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[1]blue\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] value.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nHold SHIFT while pressing LEFT/RIGHT to adjust more.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"windowToneBlue\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[2];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar rate = (value + 255) / 510;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(9);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(value, titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $dataSystem.windowTone[2];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'blue');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[2];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += offset;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'blue');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[2];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= offset;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'blue');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ConfigManager[symbol] = !!config[symbol];\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"none\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"if (Imported.YEP_StaticTilesOption) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else if (Imported.YEP_BattleAniSpeedOpt) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else if (Imported.YEP_X_ActSeqPack3) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else if (Imported.YEP_SynchFpsOption) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[302]Animated Tiles\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Turns animated tiles ON or OFF.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"animateTiles\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = Imported.YEP_StaticTilesOption;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[302]Battle Animation Speed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Changes the speed of battle animations.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"battleAniSpeed\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = Imported.YEP_BattleAniSpeedOpt;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar quarterWidth = statusWidth / 4;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 4);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(4);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 0, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 3);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(3);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 1, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(2);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 2, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(1);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 3, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nif (value <= 0) value = 4;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(1, 4);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(1, 4);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvalue = value.clamp(1, 4);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[302]Battle Camera\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"If ON, the camera in battle will move around.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nIf OFF, the camera in battle will be locked in place.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"battleCamera\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = Imported.YEP_X_ActSeqPack3;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[302]Synch Monitor FPS\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Turn this ON if your monitor runs above 60 FPS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nto synchronize the game to run at 60 FPS.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"synchFps\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = Imported.YEP_SynchFpsOption;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"none\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\"]\\\"}\",\"{\\\"Name\\\":\\\"\\\\\\\\i[83]Controls\\\",\\\"---Settings---\\\":\\\"\\\",\\\"HelpDesc\\\":\\\"\\\\\\\"Change the way you can control the game.\\\\\\\"\\\",\\\"OptionsList\\\":\\\"[\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[83]Gamepad Config\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Configure the game's gamepad settings.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"gamepadConfig\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"if (Imported.GamepadConfig && Input.isControllerConnected()) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = !Utils.isMobileDevice();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.playOkSound();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nSceneManager.push(Scene_GamepadConfig);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\i[83]Keyboard Config\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Configure the game's keyboard settings.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"keyConfig\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"if (Imported.YEP_KeyboardConfig) {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = !Utils.isMobileDevice();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.playOkSound();\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\nSceneManager.push(Scene_KeyConfig);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"{\\\\\\\\\\\\\\\"Name\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Settings---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"HelpDesc\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Symbol\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"none\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ShowHide\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Enable\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"Ext\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"---Functions---\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"MakeCommandCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DrawItemCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"ProcessOkCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorRightCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"CursorLeftCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"DefaultConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"SaveConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"LoadConfigCode\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"}\\\\\\\"]\\\"}\"]","---Options Menu---":"","AllCommand":"\\i[160]All","AllHelpDesc":"\"游戏所有设置的列表。\"","ExitCommand":"\\i[16]Exit","ExitHelpDesc":"\"退出“选项”菜单。\"","---Options Settings---":"","CategoryWidth":"240","StatusWidth":"400","VolumeOffset":"10","WindowToneOffset":"5"}}, +{"name":"YEP_BuffsStatesCore","status":true,"description":"v1.12a 效果状态核心☁️","parameters":{"---Turn指示器---":"","Show Turns":"true","Font Size":"16","Turn Alignment":"right","Turn Buffer X":"-3","Turn Buffer Y":"-6","State Color":"0","Buff Color":"24","Debuff Color":"2","---敌人图标---":"","Show Enemy Icons":"true","Enemy Buff Turn":"true","Enemy State Turn":"true","Enemy State Counter":"true","---Buff设置---":"","Default Limit":"4","Maximum Limit":"8","Buff Formula":"this._buffs[paramId] * 0.25 + 1.0","Show Buff Rate":"false","---状态设置---":"","Reapply Rules":"1","Show Enemy Turns":"true","---计数器设置---":"","Counter Font Size":"16","Counter Alignment":"center","Counter Buffer X":"0","Counter Buffer Y":"8","Counter Color":"0"}}, +{"name":"YEP_DamageCore","status":true,"description":"v1.06 伤害核心☁️","parameters":{"---破环上限---":"","Enable Cap":"false","Maximum Damage":"9999","Maximum Healing":"9999","---破坏步骤---":"","Damage Step 1":"baseDamage = this.modifyBaseDamage(value, baseDamage, target);","Damage Step 2":"baseDamage *= this.calcElementRate(target);","Damage Step 3":"","Damage Step 4":"","Damage Step 5":"","Damage Step 6":"critical = this.modifyCritical(critical, baseDamage, target);","Damage Step 7":"target.result().critical = critical;","Damage Step 8":"value = baseDamage;","Damage Step 9":"","Damage Step 10":"if (baseDamage > 0) {","Damage Step 11":"value = this.applyDamageRate(value, baseDamage, target);","Damage Step 12":"","Damage Step 13":"","Damage Step 14":"","Damage Step 15":"","Damage Step 16":"","Damage Step 17":"","Damage Step 18":"}","Damage Step 19":"","Damage Step 20":"if (baseDamage < 0) {","Damage Step 21":"value = this.applyHealRate(value, baseDamage, target);","Damage Step 22":"","Damage Step 23":"","Damage Step 24":"","Damage Step 25":"","Damage Step 26":"","Damage Step 27":"","Damage Step 28":"}","Damage Step 29":"","Damage Step 30":"if (critical) {","Damage Step 31":"value = this.applyCriticalRate(value, baseDamage, target);","Damage Step 32":"","Damage Step 33":"","Damage Step 34":"","Damage Step 35":"","Damage Step 36":"","Damage Step 37":"","Damage Step 38":"}","Damage Step 39":"","Damage Step 40":"if (this.isPhysical()) {","Damage Step 41":"value = this.applyPhysicalRate(value, baseDamage, target);","Damage Step 42":"","Damage Step 43":"","Damage Step 44":"","Damage Step 45":"","Damage Step 46":"","Damage Step 47":"value = this.applyFlatPhysical(value, baseDamage, target);","Damage Step 48":"}","Damage Step 49":"","Damage Step 50":"if (this.isMagical()) {","Damage Step 51":"value = this.applyMagicalRate(value, baseDamage, target);","Damage Step 52":"","Damage Step 53":"","Damage Step 54":"","Damage Step 55":"","Damage Step 56":"","Damage Step 57":"value = this.applyFlatMagical(value, baseDamage, target);","Damage Step 58":"}","Damage Step 59":"","Damage Step 60":"if (baseDamage > 0) {","Damage Step 61":"value = this.applyFlatDamage(value, baseDamage, target);","Damage Step 62":"","Damage Step 63":"","Damage Step 64":"","Damage Step 65":"","Damage Step 66":"","Damage Step 67":"","Damage Step 68":"}","Damage Step 69":"","Damage Step 70":"if (baseDamage < 0) {","Damage Step 71":"value = this.applyFlatHeal(value, baseDamage, target);","Damage Step 72":"","Damage Step 73":"","Damage Step 74":"","Damage Step 75":"","Damage Step 76":"","Damage Step 77":"","Damage Step 78":"}","Damage Step 79":"","Damage Step 80":"if (critical) {","Damage Step 81":"value = this.applyFlatCritical(value, baseDamage, target);","Damage Step 82":"","Damage Step 83":"","Damage Step 84":"","Damage Step 85":"","Damage Step 86":"","Damage Step 87":"","Damage Step 88":"}","Damage Step 89":"","Damage Step 90":"value = this.applyVariance(value, item.damage.variance);","Damage Step 91":"","Damage Step 92":"","Damage Step 93":"","Damage Step 94":"","Damage Step 95":"value = this.applyGuard(value, target);","Damage Step 96":"","Damage Step 97":"","Damage Step 98":"","Damage Step 99":"value = this.applyFlatGlobal(value, baseDamage, target);","Damage Step 100":"value = this.applyMinimumDamage(value, baseDamage, target);"}}, +{"name":"YEP_SkillCore","status":true,"description":"v1.11 技能核心☁️","parameters":{"---全局---":"","Cost Padding":"4","Command Alignment":"center","Window Columns":"2","---HP 费用---":"","HP Format":"%1%2","HP Font Size":"20","HP Text Color":"18","HP Icon":"162","---MP 费用---":"","MP Format":"%1%2","MP Font Size":"20","MP Text Color":"23","MP Icon":"165","---TP 费用---":"","TP Format":"%1%2","TP Font Size":"20","TP Text Color":"29","TP Icon":"164"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"YEP_EventChasePlayer","status":true,"description":"v1.05 事件追逐☁️","parameters":{"Sight Lock":"300","See Player":"true","Alert Timer":"120","Alert Balloon":"1","Alert Sound":"Attack1","Alert Common Event":"0","Return After":"true","Return Wait":"180"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"YEP_X_SkillCooldowns","status":true,"description":"v1.11 技能冷却☁️","parameters":{"---冷却时间---":"","Cooldown Format":"%1CD","Cooldown Font Size":"20","Cooldown Text Color":"6","Cooldown Icon":"75","Cooldown After Battle":"-10","Cooldown Steps":"5","Cooldown Bypass":"1 2 3 4 5 6 7","---热身---":"","Warmup Format":"%1WU","Warmup Font Size":"20","Warmup Text Color":"4","Warmup Icon":"75","---战斗核心---":"","Time Based":"false","Turn Time":"100"}}, +{"name":"YEP_X_SkillCostItems","status":true,"description":"v1.03 技能消耗物品☁️","parameters":{"---全局---":"","Cost Style":"2","Font Size":"20","Amount Format":"×%1","Amount Y Buffer":"4","---计量表---":"","Gauge Color 1":"13","Gauge Color 2":"5","Display Name":"true","Text Color":"16"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"SF_SkillUpdate","status":true,"description":"v1.0 Allows you to auto Update skills.","parameters":{}}, +{"name":"SF_QuestSystem","status":true,"description":"v1.0 Allows you to show quests.","parameters":{"Quest List Window":"","Quest List Window X":"260","Quest List Window Y":"90","Quest List Window Width":"120","Quest List Window Height":"370","Quest List Window Font Size":"18","Quest Detail Window":"","Quest Detail Window X":"380","Quest Detail Window Y":"90","Quest Detail Window Width":"440","Quest Detail Window Height":"370","Quest Detail Window Font Size":"18","Quest Editor":"","Quest Editor Enable":"false","Quest List Info X":"0","Quest List Info Y":"90","Quest List Info Width":"240","Quest List Info Height":"370","Quest List Info Font Size":"18"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"MOG_ActorHud","status":true,"description":"(v2.0 *) Adiciona uma Hud com os parâmetros do personagem.","parameters":{"-> MAIN <<<<<<<<<<<<<<<<<<<<<<<":"","Initial Visible":"true","Hud X-Axis":"0","Hud Y-Axis":"0","Smart Fade":"true","Auto Fade":"true","":"","-> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<<":"","Layout Overlay Visible":"false","Layout Overlay X-Axis":"0","Layout Overlay Y-Axis":"0","-> FACE <<<<<<<<<<<<<<<<<<<<<<<":"","Face Visible":"true","Face X-Axis":"51","Face Y-Axis":"50","Face Priority":"1","-> NAME <<<<<<<<<<<<<<<<<<<<<<<":"","Name Visible":"false","Name X-Axis":"5","Name Y-Axis":"20","Name Font Size":"20","Name Bold Size":"4","Name Font Italic":"false","-> HP <<<<<<<<<<<<<<<<<<<<<<<":"","HP Meter Visible":"true","HP Meter X-Axis":"110","HP Meter Y-Axis":"33","HP Meter Angle":"0","HP Meter Flow Anime":"true","HP Meter Flow Speed":"4","HP Number Visible":"false","HP Number Align":"0","HP Number X-Axis":"270","HP Number Y-Axis":"70","MaxHP Number Visible":"false","MaxHP Number X-Axis":"185","MaxHP Number Y-Axis":"40","HP Icon Visible":"false","HP Icon Half Mode":"false","HP Icon Max Colors":"2","HP Icon Max Rows":"10","HP Icon Max Columns":"2","HP Icon X-Axis":"143","HP Icon Y-Axis":"85","HP Icon Space X":"0","HP Icon Space Y":"0","HP Icon Zoom Anime":"true","-> MP <<<<<<<<<<<<<<<<<<<<<<<":"","MP Meter Visible":"true","MP Meter X-Axis":"110","MP Meter Y-Axis":"48","MP Meter Angle":"0","MP Meter Flow Anime":"true","MP Meter Flow Speed":"4","MP Number Visible":"false","MP Number Align":"0","MP Number X-Axis":"287","MP Number Y-Axis":"100","MaxMP Number Visible":"false","MaxMP Number X-Axis":"196","MaxMP Number Y-Axis":"78","MP Icon Visible":"false","MP Icon Half Mode":"false","MP Icon Max Colors":"2","MP Icon Max Rows":"10","MP Icon Max Columns":"2","MP Icon X-Axis":"143","MP Icon Y-Axis":"120","MP Icon Space X":"0","MP Icon Space Y":"0","MP Icon Zoom Anime":"true","-> TP <<<<<<<<<<<<<<<<<<<<<<<":"","TP Meter Visible":"false","TP Meter X-Axis":"143","TP Meter Y-Axis":"50","TP Meter Angle":"0","TP Meter Flow Anime":"true","TP Meter Flow Speed":"4","TP Number Visible":"false","TP Number Align":"0","TP Number X-Axis":"270","TP Number Y-Axis":"130","MaxTP Number Visible":"false","MaxTP Number X-Axis":"185","MaxTP Number Y-Axis":"116","TP Icon Visible":"false","TP Icon Half Mode":"false","TP Icon Max Colors":"2","TP Icon Max Rows":"10","TP Icon Max Columns":"2","TP Icon X-Axis":"143","TP Icon Y-Axis":"50","TP Icon Space X":"0","TP Icon Space Y":"0","TP Icon Zoom Anime":"true","-> EXP <<<<<<<<<<<<<<<<<<<<<<<":"","EXP Meter Visible":"true","EXP Meter X-Axis":"110","EXP Meter Y-Axis":"63","EXP Meter Angle":"0","Level Number Visible":"false","Level Number Align":"1","Level Number X-Axis":"65","Level Number Y-Axis":"153","-> STATES <<<<<<<<<<<<<<<<<<<<<<<":"","States Visible":"false","States X-Axis":"5","States Y-Axis":"64"}}, +{"name":"MOG_ATB","status":true,"description":"(v0.3 *) Sistema de batalha em tempo real.","parameters":{"ATB Mode":"0","ATB Max Value":"4000","Turn Duration":"480","States Duration":"180","Escape Duration":"180","Skip Emerge Message":"true","Full SE":"audio/se/Book1","Change Actor Left":"pagedown","Change Actor Right":"pageup","Escape Button":"cancel","Escape Layout X":"600","Escape Layout Y":"64","Escape Gauge X":"6","Escape Gauge Y":"16"}}, +{"name":"MOG_ATB_Gauge","status":true,"description":"(v1.0) Apresenta a Hud de ATB para MOG_ATB.","parameters":{"Hud Angle":"0","Hud X-Axis":"740","Hud Y-Axis":"45","Enemy X-Axis Offset":"16","Actor X-Axis Offset":"-16","Active X-Axis":"-3","Active Y-Axis":"30","Gauge Size":"160","Skill Visible":"true","Skill Zoom":"0.6","Skill X-Axis":"0","Skill Y-Axis":"0"}}, +{"name":"MOG_BattleHud","status":true,"description":"(v5.04 *) Permite customizar o layout de batalha.","parameters":{"-> MAIN <<<<<<<<<<<<<<<<<<<<<<<":"","Hud X-Axis":"-90","Hud Y-Axis":"500","Hud Space X":"0","Hud Space Y":"0","Hud Slide X":"0","Hud Slide Y":"0","Vertical Mode":"false","Max Battle Members":"6","":"","-> LAYOUT OVERLAY <<<<<<<<<<<<<<<<<<<<<<<":"","Layout2 Visible":"true","Layout2 X-Axis":"0","Layout2 Y-Axis":"0","-> TURN <<<<<<<<<<<<<<<<<<<<<<<":"","Turn Visible":"true","Turn X-Axis":"-5","Turn Y-Axis":"-5","Turn Rotation Speed":"0","Turn Zoom Animation":"false","-> FACE <<<<<<<<<<<<<<<<<<<<<<<":"","Face Visible":"true","Face X-Axis":"70","Face Y-Axis":"29","Face Shake Animation":"true","Face Zoom Animation":"true","Face Frame Animation":"false","Face Priority":"1","-> NAME <<<<<<<<<<<<<<<<<<<<<<<":"","Name Visible":"false","Name X-Axis":"0","Name Y-Axis":"0","Name Align":"0","Name Font Size":"20","Name Bold Size":"4","Name Font Italic":"false","-> HP <<<<<<<<<<<<<<<<<<<<<<<":"","HP Meter Visible":"true","HP Meter X-Axis":"124","HP Meter Y-Axis":"13","HP Meter Angle":"0","HP Meter Flow Anime":"false","HP Number Visible":"true","HP Number Align type":"0","HP Number X-Axis":"220","HP Number Y-Axis":"0","MaxHP Number Visible":"false","MaxHP Number X-Axis":"0","MaxHP Number Y-Axis":"0","-> MP <<<<<<<<<<<<<<<<<<<<<<<":"","MP Meter Visible":"true","MP Meter X-Axis":"124","MP Meter Y-Axis":"32","MP Meter Angle":"0","MP Meter Flow Anime":"false","MP Number Visible":"true","MP Number Align type":"0","MP Number X-Axis":"220","MP Number Y-Axis":"19","MaxMP Number Visible":"false","MaxMP Number X-Axis":"0","MaxMP Number Y-Axis":"0","-> TP <<<<<<<<<<<<<<<<<<<<<<<":"","TP Meter Visible":"true","TP Meter X-Axis":"124","TP Meter Y-Axis":"51","TP Meter Angle":"0","TP Meter Flow Anime":"false","TP Number Visible":"true","TP Number Align type":"0","TP Number X-Axis":"220","TP Number Y-Axis":"38","MaxTP Number Visible":"false","MaxTP Number X-Axis":"0","MaxTP Number Y-Axis":"0","-> ATB <<<<<<<<<<<<<<<<<<<<<<<":"","ATB Meter Visible":"true","ATB Meter X-Axis":"0","ATB Meter Y-Axis":"61","ATB Meter Angle":"0","ATB Meter Flow Anime":"false","-> STATES <<<<<<<<<<<<<<<<<<<<<<<":"","States Visible":"true","States X-Axis":"3","States Y-Axis":"24","States Mode":"0","States Max":"4","States Align":"0","-> W COMMAND <<<<<<<<<<<<<<<<<<<<<<<":"","Command Auto Adjust":"1","W Command X-Axis":"20","W Command Y-Axis":"270","W Command Width":"192","W Command Height":"180","W Command Slide X":"0","W Command Slide Y":"0","Layout Command":"true","L Command X-Axis":"-25","L Command Y-Axis":"-35","-> W PARTY <<<<<<<<<<<<<<<<<<<<<<<":"","W Party X-Axis":"325","W Party Y-Axis":"170","W Party Width":"192","W Party Height":"110","W Party Slide X":"0","W Party Slide Y":"0","Layout Party":"true","L Party X-Axis":"-325","L Party Y-Axis":"-42","-> W HELP <<<<<<<<<<<<<<<<<<<<<<<":"","W Help X-Axis":"0","W Help Y-Axis":"0","W Help Width":"816","W Help Height":"108","W Help Slide X":"0","W Help Slide Y":"0","Layout Help":"true","L Help X-Axis":"0","L Help Y-Axis":"0","-> W SKILL <<<<<<<<<<<<<<<<<<<<<<<":"","W Skill X-Axis":"0","W Skill Y-Axis":"444","W Skill Width":"816","W Skill Height":"180","W Skill maxCols":"2","W Skill Slide X":"0","W Skill Slide Y":"0","Layout Skill":"true","L Skill X-Axis":"0","L Skill Y-Axis":"-67","-> W ITEM <<<<<<<<<<<<<<<<<<<<<<<":"","W Item X-Axis":"0","W Item Y-Axis":"444","W Item Width":"816","W Item Height":"180","W Item maxCols":"2","W Item Slide X":"0","W Item Slide Y":"0","Layout Item":"true","L Item X-Axis":"0","L Item Y-Axis":"-67","-> W ACTOR <<<<<<<<<<<<<<<<<<<<<<<":"","W Actor X-Axis":"0","W Actor Y-Axis":"444","W Actor Width":"816","W Actor Height":"180","W Actor maxCols":"1","W Actor Slide X":"0","W Actor Slide Y":"0","Layout Actor":"true","L Actor X-Axis":"0","L Actor Y-Axis":"-67","-> W ENEMY <<<<<<<<<<<<<<<<<<<<<<<":"","W Enemy X-Axis":"0","W Enemy Y-Axis":"444","W Enemy Width":"816","W Enemy Height":"180","W Enemy maxCols":"2","W Enemy Slide X":"0","W Enemy Slide Y":"0","Layout Enemy":"true","L Enemy X-Axis":"0","L Enemy Y-Axis":"-67","-> SCREEN LAYOUT <<<<<<<<<<<<<<<<<<<<<<<":"","Screen Layout":"true","Screen X-Axis":"0","Screen Y-Axis":"0","-> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<<":"","Custom Position 1":"25,465","Custom Position 2":"290,465","Custom Position 3":"555,465","Custom Position 4":"25,545","Custom Position 5":"290,545","Custom Position 6":"555,545","Custom Position 7":"","Custom Position 8":""}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"XdRs_MiniMap","status":true,"description":"实景小地图 。","parameters":{"key":"77","width":"Graphics.width / 6","height":"Graphics.height / 6","miniSize":"24","dpFollower":"Y","dpHide":"Y","dpDc1":"Y","dpDc2":"Y","dpMapName":"Y","dpPlace":"Y","dpScale":"Y","color1":"200,0,200","color2":"0,200,0","color3":"0,255,200","icon1":"320","icon2":"320","icon3":"65","icon4":"324","icon5":"117","icon6":"32","icon7":"48"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"SF_ExtraEvent","status":true,"description":"This plugin provide extra event.","parameters":{"ExportMapExtraEvent":"true"}}, +{"name":"SF_MapNameWindow","status":true,"description":"v1.0 Adds a window to the map screen that displays the name of the map.","parameters":{"Map Name Window":"","Map Name Window X":"Math.round(Graphics.boxWidth*5/6)-110","Map Name Window Y":"0","Map Name Window Width":"100","Map Name Window Height":"36","Map Name Window Font Size":"12"}}, +{"name":"--------------------","status":true,"description":"------------------------------------------------------------","parameters":{}}, +{"name":"SF_SceneTitle","status":true,"description":"Scene Title","parameters":{}}, +{"name":"SF_SceneMenu","status":true,"description":"Scene Menu","parameters":{}}, +{"name":"SF_SceneActorSelect","status":true,"description":"v1.0.0 Allows you to select an actor from the scene.","parameters":{}}, +{"name":"SF_TestPlugins","status":true,"description":"","parameters":{}} +]; diff --git a/js/plugins/--------------------.js b/js/plugins/--------------------.js new file mode 100644 index 0000000..58aa3b6 --- /dev/null +++ b/js/plugins/--------------------.js @@ -0,0 +1,6 @@ +//============================================================================= + /*: + * @plugindesc ------------------------------------------------------------ + * @author Yanfly Engine Plugins + */ +//============================================================================= diff --git a/js/plugins/AltMenuScreen.js b/js/plugins/AltMenuScreen.js new file mode 100644 index 0000000..5003d2e --- /dev/null +++ b/js/plugins/AltMenuScreen.js @@ -0,0 +1,92 @@ +//============================================================================= +// AltMenuScreen.js +//============================================================================= + +/*: + * @plugindesc Alternative menu screen layout. + * @author Yoji Ojima + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc メニュー画面のレイアウトを変更します。 + * @author Yoji Ojima + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + 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; + }; + + Window_MenuCommand.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_MenuCommand.prototype.maxCols = function() { + return 4; + }; + + Window_MenuCommand.prototype.numVisibleRows = function() { + return 2; + }; + + Window_MenuStatus.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_MenuStatus.prototype.windowHeight = function() { + var h1 = this.fittingHeight(1); + var h2 = this.fittingHeight(2); + return Graphics.boxHeight - h1 - h2; + }; + + Window_MenuStatus.prototype.maxCols = function() { + return 4; + }; + + Window_MenuStatus.prototype.numVisibleRows = function() { + return 1; + }; + + Window_MenuStatus.prototype.drawItemImage = function(index) { + var actor = $gameParty.members()[index]; + var rect = this.itemRectForText(index); + var w = Math.min(rect.width, 144); + var h = Math.min(rect.height, 144); + var lineHeight = this.lineHeight(); + this.changePaintOpacity(actor.isBattleMember()); + this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h); + this.changePaintOpacity(true); + }; + + Window_MenuStatus.prototype.drawItemStatus = function(index) { + 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/AltSaveScreen.js b/js/plugins/AltSaveScreen.js new file mode 100644 index 0000000..867b434 --- /dev/null +++ b/js/plugins/AltSaveScreen.js @@ -0,0 +1,134 @@ +//============================================================================= +// AltSaveScreen.js +//============================================================================= + +/*: + * @plugindesc Alternative save/load screen layout. + * @author Yoji Ojima + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc セーブ/ロード画面のレイアウトを変更します。 + * @author Yoji Ojima + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var _Scene_File_create = Scene_File.prototype.create; + Scene_File.prototype.create = function() { + _Scene_File_create.call(this); + this._listWindow.height = this._listWindow.fittingHeight(8); + var x = 0; + var y = this._listWindow.y + this._listWindow.height; + var width = Graphics.boxWidth; + var height = Graphics.boxHeight - y; + this._statusWindow = new Window_SavefileStatus(x, y, width, height); + this._statusWindow.setMode(this.mode()); + this._listWindow.statusWindow = this._statusWindow; + this._listWindow.callUpdateHelp(); + this.addWindow(this._statusWindow); + }; + + var _Scene_File_start = Scene_File.prototype.start; + Scene_File.prototype.start = function() { + _Scene_File_start.call(this); + this._listWindow.ensureCursorVisible(); + this._listWindow.callUpdateHelp(); + }; + + Window_SavefileList.prototype.windowWidth = function() { + return Graphics.boxWidth; + }; + + Window_SavefileList.prototype.maxCols = function() { + return 4; + }; + + Window_SavefileList.prototype.numVisibleRows = function() { + return 5; + }; + + Window_SavefileList.prototype.spacing = function() { + return 8; + }; + + Window_SavefileList.prototype.itemHeight = function() { + return this.lineHeight() * 2; + }; + + var _Window_SavefileList_callUpdateHelp = + Window_SavefileList.prototype.callUpdateHelp; + Window_SavefileList.prototype.callUpdateHelp = function() { + _Window_SavefileList_callUpdateHelp.call(this); + if (this.active && this.statusWindow) { + this.statusWindow.setId(this.index() + 1); + } + }; + + function Window_SavefileStatus() { + this.initialize.apply(this, arguments); + } + + Window_SavefileStatus.prototype = Object.create(Window_Base.prototype); + Window_SavefileStatus.prototype.constructor = Window_SavefileStatus; + + Window_SavefileStatus.prototype.initialize = function(x, y, width, height) { + Window_Base.prototype.initialize.call(this, x, y, width, height); + this._id = 1; + }; + + Window_SavefileStatus.prototype.setMode = function(mode) { + this._mode = mode; + }; + + Window_SavefileStatus.prototype.setId = function(id) { + this._id = id; + this.refresh(); + }; + + Window_SavefileStatus.prototype.refresh = function() { + this.contents.clear(); + var id = this._id; + var valid = DataManager.isThisGameFile(id); + var info = DataManager.loadSavefileInfo(id); + var rect = this.contents.rect; + this.resetTextColor(); + if (this._mode === 'load') { + this.changePaintOpacity(valid); + } + this.drawFileId(id, rect.x, rect.y); + if (info) { + this.changePaintOpacity(valid); + this.drawContents(info, rect, valid); + this.changePaintOpacity(true); + } + }; + + Window_SavefileStatus.prototype.drawFileId = function(id, x, y) { + this.drawText(TextManager.file + ' ' + id, x, y, 180); + }; + + Window_SavefileStatus.prototype.drawContents = function(info, rect, valid) { + var bottom = rect.y + rect.height; + var playtimeY = bottom - this.lineHeight(); + this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192); + if (valid) { + this.drawPartyfaces(info, rect.x, bottom - 144); + } + this.drawText(info.playtime, rect.x, playtimeY, rect.width, 'right'); + }; + + Window_SavefileStatus.prototype.drawPartyfaces = function(info, x, y) { + if (info && info.faces) { + for (var i = 0; i < info.faces.length; i++) { + var data = info.faces[i]; + this.drawFace(data[0], data[1], x + i * 150, y); + } + } + }; + +})(); diff --git a/js/plugins/Community_Basic.js b/js/plugins/Community_Basic.js new file mode 100644 index 0000000..f85823d --- /dev/null +++ b/js/plugins/Community_Basic.js @@ -0,0 +1,137 @@ +/*: + * @plugindesc Plugin used to set basic parameters. + * @author RM CoreScript team + * + * @help This plugin does not provide plugin commands. + * +* @param cacheLimit + * @desc For setting the upper limit of image memory cache. (MPix) + * @default 10 + * + * @param screenWidth +* @desc For setting the screen width. + * @default 816 + * + * @param screenHeight + * @desc For setting the screen height. + * @default 624 + * + * @param changeWindowWidthTo + * @desc If set, change window width to this value + * + * @param changeWindowHeightTo + * @desc If set, change window height to this value + * + * @param renderingMode + * @desc Rendering mode (canvas/webgl/auto) + * @default auto + * + * @param alwaysDash + * @desc To set initial value as to whether the player always dashes. (on/off) + * @default off + */ + +/*:ja + * @plugindesc 基本的なパラメーターを設定するプラグインです。 + * @author RM CoreScript team + * + * @help このプラグインにはプラグインコマンドはありません。 + * + * @param cacheLimit + * @desc 画像のメモリへのキャッシュの上限値 (MPix) + * @default 10 + * + * @param screenWidth + * @desc 画面サイズの幅 + * @default 816 + * + * @param screenHeight + * @desc 画面サイズの高さ + * @default 624 + * + * @param changeWindowWidthTo + * @desc 値が設定された場合、ウインドウの幅を指定した値に変更 + * + * @param changeWindowHeightTo + * @desc 値が設定された場合、ウインドウの高さを指定した値に変更 + * + * @param renderingMode + * @desc レンダリングモード (canvas/webgl/auto) + * @default auto + * + * @param alwaysDash + * @desc プレイヤーが常時ダッシュするかどうかの初期値 (on/off) + * @default off + */ + +(function() { + function toNumber(str, def) { + return isNaN(str) ? def : +(str || def); + } + + var parameters = PluginManager.parameters('Community_Basic'); + var cacheLimit = toNumber(parameters['cacheLimit'], 10); + var screenWidth = toNumber(parameters['screenWidth'], 816); + var screenHeight = toNumber(parameters['screenHeight'], 624); + var renderingMode = parameters['renderingMode'].toLowerCase(); + var alwaysDash = parameters['alwaysDash'].toLowerCase() === 'on'; + var windowWidthTo = toNumber(parameters['changeWindowWidthTo'], 0); + var windowHeightTo = toNumber(parameters['changeWindowHeightTo'], 0); + + var windowWidth; + var windowHeight; + + if(windowWidthTo){ + windowWidth = windowWidthTo; + }else if(screenWidth !== SceneManager._screenWidth){ + windowWidth = screenWidth; + } + + if(windowHeightTo){ + windowHeight = windowHeightTo; + }else if(screenHeight !== SceneManager._screenHeight){ + windowHeight = screenHeight; + } + + + ImageCache.limit = cacheLimit * 1000 * 1000; + SceneManager._screenWidth = screenWidth; + SceneManager._screenHeight = screenHeight; + SceneManager._boxWidth = screenWidth; + SceneManager._boxHeight = screenHeight; + + SceneManager.preferableRendererType = function() { + if (Utils.isOptionValid('canvas')) { + return 'canvas'; + } else if (Utils.isOptionValid('webgl')) { + return 'webgl'; + } else if (renderingMode === 'canvas') { + return 'canvas'; + } else if (renderingMode === 'webgl') { + return 'webgl'; + } else { + return 'auto'; + } + }; + + var _ConfigManager_applyData = ConfigManager.applyData; + ConfigManager.applyData = function(config) { + _ConfigManager_applyData.apply(this, arguments); + if (config['alwaysDash'] === undefined) { + this.alwaysDash = alwaysDash; + } + }; + + + var _SceneManager_initNwjs = SceneManager.initNwjs; + SceneManager.initNwjs = function() { + _SceneManager_initNwjs.apply(this, arguments); + + if (Utils.isNwjs() && windowWidth && windowHeight) { + var dw = windowWidth - window.innerWidth; + var dh = windowHeight - window.innerHeight; + window.moveBy(-dw / 2, -dh / 2); + window.resizeBy(dw, dh); + } + }; +})(); \ No newline at end of file diff --git a/js/plugins/EnemyBook.js b/js/plugins/EnemyBook.js new file mode 100644 index 0000000..7e0f059 --- /dev/null +++ b/js/plugins/EnemyBook.js @@ -0,0 +1,347 @@ +//============================================================================= +// EnemyBook.js +//============================================================================= + +/*: + * @plugindesc Displays detailed statuses of enemies. + * @author Yoji Ojima + * + * @param Unknown Data + * @desc The index name for an unknown enemy. + * @default ?????? + * + * @help + * + * Plugin Command: + * EnemyBook open # Open the enemy book screen + * EnemyBook add 3 # Add enemy #3 to the enemy book + * EnemyBook remove 4 # Remove enemy #4 from the enemy book + * EnemyBook complete # Complete the enemy book + * EnemyBook clear # Clear the enemy book + * + * Enemy Note: + * # Description text in the enemy book, line 1 + * # Description text in the enemy book, line 2 + * # This enemy does not appear in the enemy book + */ + +/*:ja + * @plugindesc モンスター図鑑です。敵キャラの詳細なステータスを表示します。 + * @author Yoji Ojima + * + * @param Unknown Data + * @desc 未確認の敵キャラの索引名です。 + * @default ?????? + * + * @help + * + * プラグインコマンド: + * EnemyBook open # 図鑑画面を開く + * EnemyBook add 3 # 敵キャラ3番を図鑑に追加 + * EnemyBook remove 4 # 敵キャラ4番を図鑑から削除 + * EnemyBook complete # 図鑑を完成させる + * EnemyBook clear # 図鑑をクリアする + * + * 敵キャラのメモ: + * # 説明1行目 + * # 説明2行目 + * # 図鑑に載せない場合 + */ + +(function() { + + var parameters = PluginManager.parameters('EnemyBook'); + var unknownData = String(parameters['Unknown Data'] || '??????'); + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'EnemyBook') { + switch (args[0]) { + case 'open': + SceneManager.push(Scene_EnemyBook); + break; + case 'add': + $gameSystem.addToEnemyBook(Number(args[1])); + break; + case 'remove': + $gameSystem.removeFromEnemyBook(Number(args[1])); + break; + case 'complete': + $gameSystem.completeEnemyBook(); + break; + case 'clear': + $gameSystem.clearEnemyBook(); + break; + } + } + }; + + Game_System.prototype.addToEnemyBook = function(enemyId) { + if (!this._enemyBookFlags) { + this.clearEnemyBook(); + } + this._enemyBookFlags[enemyId] = true; + }; + + Game_System.prototype.removeFromEnemyBook = function(enemyId) { + if (this._enemyBookFlags) { + this._enemyBookFlags[enemyId] = false; + } + }; + + Game_System.prototype.completeEnemyBook = function() { + this.clearEnemyBook(); + for (var i = 1; i < $dataEnemies.length; i++) { + this._enemyBookFlags[i] = true; + } + }; + + Game_System.prototype.clearEnemyBook = function() { + this._enemyBookFlags = []; + }; + + Game_System.prototype.isInEnemyBook = function(enemy) { + if (this._enemyBookFlags && enemy) { + return !!this._enemyBookFlags[enemy.id]; + } else { + return false; + } + }; + + var _Game_Troop_setup = Game_Troop.prototype.setup; + Game_Troop.prototype.setup = function(troopId) { + _Game_Troop_setup.call(this, troopId); + this.members().forEach(function(enemy) { + if (enemy.isAppeared()) { + $gameSystem.addToEnemyBook(enemy.enemyId()); + } + }, this); + }; + + var _Game_Enemy_appear = Game_Enemy.prototype.appear; + Game_Enemy.prototype.appear = function() { + _Game_Enemy_appear.call(this); + $gameSystem.addToEnemyBook(this._enemyId); + }; + + var _Game_Enemy_transform = Game_Enemy.prototype.transform; + Game_Enemy.prototype.transform = function(enemyId) { + _Game_Enemy_transform.call(this, enemyId); + $gameSystem.addToEnemyBook(enemyId); + }; + + function Scene_EnemyBook() { + this.initialize.apply(this, arguments); + } + + Scene_EnemyBook.prototype = Object.create(Scene_MenuBase.prototype); + Scene_EnemyBook.prototype.constructor = Scene_EnemyBook; + + Scene_EnemyBook.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); + }; + + Scene_EnemyBook.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this._indexWindow = new Window_EnemyBookIndex(0, 0); + this._indexWindow.setHandler('cancel', this.popScene.bind(this)); + var wy = this._indexWindow.height; + var ww = Graphics.boxWidth; + var wh = Graphics.boxHeight - wy; + this._statusWindow = new Window_EnemyBookStatus(0, wy, ww, wh); + this.addWindow(this._indexWindow); + this.addWindow(this._statusWindow); + this._indexWindow.setStatusWindow(this._statusWindow); + }; + + function Window_EnemyBookIndex() { + this.initialize.apply(this, arguments); + } + + Window_EnemyBookIndex.prototype = Object.create(Window_Selectable.prototype); + Window_EnemyBookIndex.prototype.constructor = Window_EnemyBookIndex; + + Window_EnemyBookIndex.lastTopRow = 0; + Window_EnemyBookIndex.lastIndex = 0; + + Window_EnemyBookIndex.prototype.initialize = function(x, y) { + var width = Graphics.boxWidth; + var height = this.fittingHeight(6); + Window_Selectable.prototype.initialize.call(this, x, y, width, height); + this.refresh(); + this.setTopRow(Window_EnemyBookIndex.lastTopRow); + this.select(Window_EnemyBookIndex.lastIndex); + this.activate(); + }; + + Window_EnemyBookIndex.prototype.maxCols = function() { + return 3; + }; + + Window_EnemyBookIndex.prototype.maxItems = function() { + return this._list ? this._list.length : 0; + }; + + Window_EnemyBookIndex.prototype.setStatusWindow = function(statusWindow) { + this._statusWindow = statusWindow; + this.updateStatus(); + }; + + Window_EnemyBookIndex.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + this.updateStatus(); + }; + + Window_EnemyBookIndex.prototype.updateStatus = function() { + if (this._statusWindow) { + var enemy = this._list[this.index()]; + this._statusWindow.setEnemy(enemy); + } + }; + + Window_EnemyBookIndex.prototype.refresh = function() { + this._list = []; + for (var i = 1; i < $dataEnemies.length; i++) { + var enemy = $dataEnemies[i]; + if (enemy.name && enemy.meta.book !== 'no') { + this._list.push(enemy); + } + } + this.createContents(); + this.drawAllItems(); + }; + + Window_EnemyBookIndex.prototype.drawItem = function(index) { + var enemy = this._list[index]; + var rect = this.itemRectForText(index); + var name; + if ($gameSystem.isInEnemyBook(enemy)) { + name = enemy.name; + } else { + name = unknownData; + } + this.drawText(name, rect.x, rect.y, rect.width); + }; + + Window_EnemyBookIndex.prototype.processCancel = function() { + Window_Selectable.prototype.processCancel.call(this); + Window_EnemyBookIndex.lastTopRow = this.topRow(); + Window_EnemyBookIndex.lastIndex = this.index(); + }; + + function Window_EnemyBookStatus() { + this.initialize.apply(this, arguments); + } + + Window_EnemyBookStatus.prototype = Object.create(Window_Base.prototype); + Window_EnemyBookStatus.prototype.constructor = Window_EnemyBookStatus; + + Window_EnemyBookStatus.prototype.initialize = function(x, y, width, height) { + Window_Base.prototype.initialize.call(this, x, y, width, height); + this._enemy = null; + this._enemySprite = new Sprite(); + this._enemySprite.anchor.x = 0.5; + this._enemySprite.anchor.y = 0.5; + this._enemySprite.x = width / 2 - 20; + this._enemySprite.y = height / 2; + this.addChildToBack(this._enemySprite); + this.refresh(); + }; + + Window_EnemyBookStatus.prototype.setEnemy = function(enemy) { + if (this._enemy !== enemy) { + this._enemy = enemy; + this.refresh(); + } + }; + + Window_EnemyBookStatus.prototype.update = function() { + Window_Base.prototype.update.call(this); + if (this._enemySprite.bitmap) { + var bitmapHeight = this._enemySprite.bitmap.height; + var contentsHeight = this.contents.height; + var scale = 1; + if (bitmapHeight > contentsHeight) { + scale = contentsHeight / bitmapHeight; + } + this._enemySprite.scale.x = scale; + this._enemySprite.scale.y = scale; + } + }; + + Window_EnemyBookStatus.prototype.refresh = function() { + var enemy = this._enemy; + var x = 0; + var y = 0; + var lineHeight = this.lineHeight(); + + this.contents.clear(); + + if (!enemy || !$gameSystem.isInEnemyBook(enemy)) { + this._enemySprite.bitmap = null; + return; + } + + var name = enemy.battlerName; + var hue = enemy.battlerHue; + var bitmap; + if ($gameSystem.isSideView()) { + bitmap = ImageManager.loadSvEnemy(name, hue); + } else { + bitmap = ImageManager.loadEnemy(name, hue); + } + this._enemySprite.bitmap = bitmap; + + this.resetTextColor(); + this.drawText(enemy.name, x, y); + + x = this.textPadding(); + y = lineHeight + this.textPadding(); + + for (var i = 0; i < 8; i++) { + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.param(i), x, y, 160); + this.resetTextColor(); + this.drawText(enemy.params[i], x + 160, y, 60, 'right'); + y += lineHeight; + } + + var rewardsWidth = 280; + x = this.contents.width - rewardsWidth; + y = lineHeight + this.textPadding(); + + this.resetTextColor(); + this.drawText(enemy.exp, x, y); + x += this.textWidth(enemy.exp) + 6; + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.expA, x, y); + x += this.textWidth(TextManager.expA + ' '); + + this.resetTextColor(); + this.drawText(enemy.gold, x, y); + x += this.textWidth(enemy.gold) + 6; + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.currencyUnit, x, y); + + x = this.contents.width - rewardsWidth; + y += lineHeight; + + for (var j = 0; j < enemy.dropItems.length; j++) { + var di = enemy.dropItems[j]; + if (di.kind > 0) { + var item = Game_Enemy.prototype.itemObject(di.kind, di.dataId); + this.drawItemName(item, x, y, rewardsWidth); + y += lineHeight; + } + } + + var descWidth = 480; + x = this.contents.width - descWidth; + y = this.textPadding() + lineHeight * 7; + this.drawTextEx(enemy.meta.desc1, x, y + lineHeight * 0, descWidth); + this.drawTextEx(enemy.meta.desc2, x, y + lineHeight * 1, descWidth); + }; + +})(); diff --git a/js/plugins/GameusQuestSystem.js b/js/plugins/GameusQuestSystem.js new file mode 100644 index 0000000..a11f846 --- /dev/null +++ b/js/plugins/GameusQuestSystem.js @@ -0,0 +1,1059 @@ +//============================================================================= +// Gameus Quest System +// Author gameus +// Version 1.0 +//----------------------------------------------------------------------------- +// Intro: +// This is a (for the most part) basic quest system. Has a basic layout to help +// players keep track of all the different quests they might encounter. Also +// gives you plenty of commands and script calls to keep track of said quests +// behind the scenes. +// +// Features: +// Simple UI to keep track of quests with some customization options +// Friendly commands to track/complete/fail/reset/count/progress quests +// Auto rewards upon quest completion (optional) +// Quest categories (optional) +// Full blown quest editor included +// +// +// Instructions: +// Place in your plugins folder and save as 'GameusQuestSystem.js' +// Configure the options as you please. +// +// I highly recommend checking out the demo (includes Quest Editor) +// http://jugglingcode.com/scripts/MV/QuestSystem/Demo.zip +// +// Credits: +// gameus ~ For creating it. +//============================================================================= + +/*: + * @plugindesc v1.0 - A simplistic quest system with various customization options. + * @author gameus + * + * @param Auto Rewards + * @desc True or False. Tells the script whether or not to automatically give quest rewards upon completion. + * @default true + * + * @param --------------- + * + * @param Words + * + * @param --------------- + * + * @param Hidden Reward Text + * @desc The text used to hide rewards + * @default ?????? + * + * @param No Quests Text + * @desc The text used for "No Quests" + * @default No Quests + * + * @param All Word + * @desc Word for "All" + * @default All + * + * @param Completed Word + * @desc Word for "Completed" + * @default Completed + * + * @param Failed Word + * @desc Word for "Failed" + * @default Failed + * + * @param In-Progress Word + * @desc Word for "In-Progress" + * @default In-Progress + * + * @param Steps Word + * @desc Word for "Steps" + * @default Steps + * + * @param Rewards Word + * @desc Word for "Rewards" + * @default Rewards + * + * @param --------------- + * + * @param Display Options + * + * @param --------------- + * + * @param Reverse Layout + * @desc Reverses the quest log layout + * @default false + * + * @param Filter Position + * @desc Positions the filter window. Can use Top or Bottom + * @default Top + * + * @param Use Categories + * @desc Use customizable sub-categories e.g. "Story", "Crafting", "Gathering" quests. + * @default true + * + * @param Show Empty Categories + * @desc 0 - Don't show; 1 - Show but greyed out; 2 - Show, but with "No Quests" under it + * @default 0 + * + * @param Show Quest Count + * @desc This shows the quest count for each category. + * @default true + * + * @param Bullet Character + * @desc The character used to display each step and reward + * @default - + * + * @param Max Steps + * @desc Defines the number of steps to show at once under a quest info. Will only show steps you've completed or are already on. + * @default 3 + * + * @param --------------- + * + * @param Image Options + * + * @param --------------- + * + * @param Use Icons + * @desc Option to allow quest icons + * @default true + * + * @param Completed Image + * @desc Image that's drawn over a quest when it's completed. Leave blank for no image + * + * @param Completed Image Opacity + * @desc The opacity for the above image + * @default 128 + * + * @param Failed Image + * @desc Image that's drawn over a quest if it's marked as failed. Leave blank for no image + * + * @param Failed Image Opacity + * @desc The opacity for the above image + * @default 128 + * + * @help + * Report any bugs, editor or plugin related here: + * http://forums.rpgmakerweb.com/index.php?/topic/49234-gameus-quest-system/ + * Before reporting a bug, check the version of editor/plugin to see if you're using an outdated version + * + * I highly recommend checking out the demo found here: + * http://jugglingcode.com/scripts/MV/QuestSystem/Demo.zip + * ---------------------------------------------------- + * These are a list of following Plugin Commands: + * ---------------------------------------------------- + * Quest Add QuestID + * Activates a quest. + * + * Quest NextStep QuestID + * Progresses the quest to the next step. + * + * Quest BackStep QuestID + * Makes the quest go back a step, allowing for steps to be failed. + * + * Quest Complete QuestID + * Completes the quest, if Auto Reward is on, the script will give out the rewards. + * + * Quest Fail QuestID + * Fails the quest. + * + * Quest Remove QuestID + * Removes the quest from the quest log, allowing it to be reset. + * + * Quest Reset QuestID + * Resets the step and status of a quest. NOTE: Any switches/variables you might have set during a quest, WILL have to be reset manually. + * + * Quest Open + * This opens up the quest log. Alternatively, there's a script call you can use below. + * + * ---------------------------------------------------- + * Here's a list of script calls you can use in a conditional branch: + * ---------------------------------------------------- + * SceneManager.push(Scene_Quest) + * This opens up the quest scene, for those who enjoy script calls or are using it in a different plugin + * + * $gameQuests.get(quest_id).completed() + * $gameQuests.get(quest_id).failed() + * $gameQuests.get(quest_id).inProgress() + * These calls are used to check the progress of a quest + * Note, even if the party does not have the quest yet, these will return true/false. + * + * $gameParty.hasQuest(quest_id) + * This is how you check if the party has activated the quest yet. Use in conjunction with the above script calls + * + * $gameParty.hasQuests([quest ids], filter) + * Not to be confused with the one above, this checks multiple quests the party has and see if they match the filter. + * Filter can be "progress", "completed", or "failed" + * Returns true if all the input quests match the filter AND the party has them active. e.g. Can be used to see if the party has completed a range of quests before moving on + * + * $gameQuests.get(quest_id).currentStep === step_number + * This is how you check which step a quest is on. step_number starts from 0. NOTE: This will still return a number even if the quest hasn't been activated. + * + * $gameQuests.get(quest_id).status === "status" + * This will return what status the quest is. "status" can be "progress", "completed", or "failed" + * + * $gameQuests.totalQuests(filter) + * This gets you a total number of quests by the filter. Filter can be "all", "progress", "completed", or "failed". This applies to all quests. + * + * $gameParty.totalQuests(filter) + * Does the same as above, but only applies to the quests that the party has. + * + */ + + // Import 'Quest System' +var GameusScripts = GameusScripts || {}; +GameusScripts["Config"] = GameusScripts["Config"] || {}; +GameusScripts["QuestSystem"] = 1.0; +GameusScripts["Config"]["QuestSystem"] = PluginManager.parameters("GameusQuestSystem"); + +// Initialize global quest variables +var $dataQuests = null; +var $gameQuests = null; + + +// Load quest data +DataManager._databaseFiles.push( + {name: "$dataQuests", src: "Quests.json"} + +); + +//--------------------------------------------------------------------------------------------- +// Alias methods +//--------------------------------------------------------------------------------------------- + gameus_Quest_Party_Initialize = Game_Party.prototype.initialize; + gameus_Quest_Data_Initialize = DataManager.createGameObjects; + gameus_Quest_Save_Data = DataManager.makeSaveContents; + gameus_Quest_Load_Data = DataManager.extractSaveContents; + gameus_Quest_Plugin_Commands = Game_Interpreter.prototype.pluginCommand; + +//--------------------------------------------------------------------------------------------- +// Plugin Commands +//--------------------------------------------------------------------------------------------- + Game_Interpreter.prototype.pluginCommand = function(command, args) { + gameus_Quest_Plugin_Commands.call(this, command, args); + if (command.toLowerCase() === "quest") { + switch (args[0].toLowerCase()) { + case 'open': + SceneManager.push(Scene_Quest); + break; + case 'add': + $gameParty.addQuest(Number(args[1])); + break; + case 'remove': + $gameParty.removeQuest(Number(args[1])); + break; + case 'complete': + $gameQuests.get(Number(args[1])).complete(); + break; + case 'fail': + $gameQuests.get(Number(args[1])).fail(); + break; + case 'reset': + $gameQuests.get(Number(args[1])).reset(); + break; + case 'nextstep': + $gameQuests.get(Number(args[1])).nextStep(); + break; + case 'backstep': + $gameQuests.get(Number(args[1])).backStep(); + break; + } + } + }; +//--------------------------------------------------------------------------------------------- +// DataManager +//--------------------------------------------------------------------------------------------- + DataManager.makeSaveContents = function() { + contents = gameus_Quest_Save_Data.call(this); + // Include the quests in the save file + contents.quests = $gameQuests; + return contents; + }; + + DataManager.extractSaveContents = function(contents) { + gameus_Quest_Load_Data.call(this, contents); + // Then take them back because we really don't trust banks + $gameQuests = contents.quests; + }; + + DataManager.createGameObjects = function() { + gameus_Quest_Data_Initialize.call(this); + // Create global quests + $gameQuests = new Game_Quests(); + }; + +//--------------------------------------------------------------------------------------------- +// Game_Party +//--------------------------------------------------------------------------------------------- + Game_Party.prototype.initialize = function() { + gameus_Quest_Party_Initialize.call(this); + // Initialize quest data + this.quests = []; + }; + + Game_Party.prototype.addQuest = function(quest_id) { + // Does party already have quest? + if (this.quests.indexOf(quest_id) < 0) { + // If not, give that crap to them. They don't have a choice now. + this.quests.push(quest_id); + } + }; + + // Removes the quest from the party. NOTE: This does NOT reset the quest + Game_Party.prototype.removeQuest = function(quest_id) { + // Check if quest exists + if (this.quests.indexOf(quest_id) > -1) { + // I was wrong... + var index = this.quests.indexOf(quest_id); + this.quests.splice(index, 1); + } + }; + + // Returns total number of quests the party has + // filter can be "all", "progress" "completed" or "failed" + Game_Party.prototype.totalQuests = function(filter) { + // Returns a list of ALL quests + if (filter === undefined || filter === "all") + return this.quests.length; + // Time to cycle through quests....(dammit, I did this exact thing in the quest list window) + var count = 0; + for (var i = 0; i < this.quests.length; i += 1) { + var q = $gameQuest.get(this.quests[i]); + if (q.status === filter.toLowerCase()) + count += 1; + } + return count; + }; + + // Gets all quest id's + Game_Party.prototype.getQuests = function(filter) { + // Returns a list of ALL quests + if (filter === undefined || filter === "all") + return this.quests; + // Time to cycle through quests....(dammit, I did this exact thing in the quest list window) + var data = []; + for (var i = 0; i < this.quests.length; i += 1) { + var q = $gameQuest.get(this.quests[i]); + if (q.status === filter.toLowerCase()) + data.push(q.questId); + } + return data; + }; + + // This method is actually extremely useless. Ignore it for now. + Game_Party.prototype.getQuest = function(index) { + return $gameQuests.get(this.quests[index]); + }; + + Game_Party.prototype.hasQuest = function(quest_id){ + // Returns whether or not they have the quest + return this.quests.indexOf(quest_id) > -1; + }; + + // This checks a list of quests and its status. + // If the party has all and they match the input filter, it returns true + // Used to check a range of quests completion + Game_Party.prototype.hasQuests = function(quests, filter) { + flag = true; + for (var i = 0; i < quests.length; i += 1) { + if (!this.hasQuest(quests[i])) + flag = false; + if ($gameQuests.get(quests[i]).status !== filter) + flag = false; + } + return flag; + } + +//--------------------------------------------------------------------------------------------- +// Game_Quest +//--------------------------------------------------------------------------------------------- + function Game_Quest() { + this.initialize.apply(this, arguments); + }; + + Game_Quest.prototype.initialize = function(questId) { + var questData = $dataQuests[questId]; + this.questId = questId; + this.rawData = questData; + this.cat = questData.cat; + this.name = questData.name; + this.desc = questData.desc; + this.rewards = questData.rewards; + this.icon = questData.icon; + this.steps = questData.steps; + this.maxSteps = this.steps.length; + this.currentStep = 0; + this.status = "progress"; + }; + + Game_Quest.prototype.giveRewards = function() { + for (var i = 0; i < this.rewards.length; i += 1) { + var reward = this.rewards[i]; + switch (reward[0]) { + case "item": + item = $dataItems[reward[1]]; + $gameParty.gainItem(item, Number(reward[2])); + break; + case "armor": + item = $dataArmors[reward[1]]; + $gameParty.gainItem(item, Number(reward[2])); + break; + case "weapon": + item = $dataWeapons[reward[1]]; + $gameParty.gainItem(item, Number(reward[2])); + break; + case "xp": + for (var j = 0; j < $gameParty.members().length; j++) { + $gameParty.members()[j].gainExp(reward[1]); + }; + break; + case "gold": + $gameParty.gainGold(Number(reward[1])); + break; + } + } + }; + + Game_Quest.prototype.completed = function() { + return this.status == "completed"; + } + + Game_Quest.prototype.inProgress = function() { + return this.status == "progress"; + } + + Game_Quest.prototype.failed = function() { + return this.status == "failed"; + } + + Game_Quest.prototype.nextStep = function() { + this.currentStep = this.currentStep + 1 > this.maxSteps - 1 ? this.maxSteps - 1 : this.currentStep + 1; + }; + + Game_Quest.prototype.backStep = function() { + this.currentStep = this.currentStep - 1 < 0 ? 0 : this.currentStep - 1; + }; + + Game_Quest.prototype.currentStep = function() { + return this.currentStep; + }; + + Game_Quest.prototype.fail = function() { + this.status = "failed"; + }; + + Game_Quest.prototype.complete = function() { + if ((GameusScripts["Config"]["QuestSystem"]["Auto Rewards"] || "false").toLowerCase() === "true") { + this.giveRewards(); + } + this.currentStep = this.maxSteps - 1; + this.status = "completed"; + }; + + Game_Quest.prototype.reset = function() { + this.status = "progress"; + this.currentStep = 0; + }; + +//--------------------------------------------------------------------------------------------- +// Game_Quests +//--------------------------------------------------------------------------------------------- + function Game_Quests() { + this.initialize.apply(this, arguments); + }; + + Game_Quests.prototype.initialize = function() { + this.data = []; + }; + + Game_Quests.prototype.get = function(quest_id) { + if ($dataQuests[quest_id]) { + if (!this.data[quest_id]) { + this.data[quest_id] = new Game_Quest(quest_id); + } + return this.data[quest_id]; + } + return null; + }; + + Game_Quests.prototype.categories = function() { + if ($dataQuests[0]) + return $dataQuests[0]; + return null; + }; + + Game_Quests.prototype.totalQuests = function(filter) { + // Returns a list of ALL quests + if (filter === undefined || filter === "all") + return $dataQuests.length; + // Time to cycle through quests....(dammit, I did this exact thing in the quest list window) + var count = 0; + for (var i = 0; i < $dataQuests.length; i += 1) { + var q = this.get(this.quests[i]); + if (q.status === filter.toLowerCase()) + count += 1; + } + return data; + }; +//--------------------------------------------------------------------------------------------- +// Window_Base +//--------------------------------------------------------------------------------------------- + Window_Base.prototype.sliceText = function(text, width) { + var words = text.split(" "); + if (words.length === 1) + return words; + var result = []; + var current_text = words.shift(); + for (var i = 0; i < words.length; i += 1) { + var word = words[i]; + var textW = this.contents.measureTextWidth(current_text + " " + word); + if (textW > width) { + result.push(current_text); + current_text = word; + } else { + current_text += " " + word; + } + if (i >= words.length - 1) + result.push(current_text) + } + return result + } +//--------------------------------------------------------------------------------------------- +// Window_QuestInfo +//--------------------------------------------------------------------------------------------- + function Window_QuestInfo() { + this.initialize.apply(this, arguments); + } + + Window_QuestInfo.prototype = Object.create(Window_Selectable.prototype); + Window_QuestInfo.prototype.constructor = Window_QuestInfo; + + Window_QuestInfo.prototype.initialize = function() { + var xx = (GameusScripts["Config"]["QuestSystem"]["Reverse Layout"] || "false").toLowerCase() === "true" ? 0 : 320; + this.failedImg = GameusScripts["Config"]["QuestSystem"]["Failed Image"] || ''; + this.completedImg = GameusScripts["Config"]["QuestSystem"]["Completed Image"] || ''; + if (this.failedImg !== '') + this.failedImg = ImageManager.loadPicture(this.failedImg, 0); + if (this.completedImg !== '') + this.completedImg = ImageManager.loadPicture(this.completedImg, 0); + this.quest = 0; + this.offY = 0; + this.lineY = 0; + this.resizeFlag = false; + Window_Selectable.prototype.initialize.call(this, xx, 0, Graphics.boxWidth - 320, Graphics.boxHeight); + this.questBitmap = new Bitmap(this.contentsWidth(), this.contentsHeight()); + this.refresh(); + }; + + Window_QuestInfo.prototype.setQuest = function(quest_id) { + this.quest = quest_id; + this.offY = 0; + this.resizeFlag = false; + this.createQuestBitmap(); + this.refresh(); + }; + + Window_QuestInfo.prototype.refresh = function() { + this.contents.clear(); + if (this.quest > 0) { + this.contents.blt(this.questBitmap, 0, this.offY, this.contentsWidth(), this.contentsHeight(), 0, 0, this.contentsWidth(), this.contentsHeight()); + } + } + + // This function is used to keep track of the height of the bitmap, has to be called after every line of text drawn + Window_QuestInfo.prototype.write = function() { + this.lineY += this.lineHeight() + this.textPadding(); + if (this.lineY > this.questBitmap.height) { + this.questBitmap.resize(this.questBitmap.width, this.lineY); + this.resizeFlag = true; + } + } + + Window_QuestInfo.prototype.createQuestBitmap = function() { + this.questBitmap.clear(); + if (this.quest > 0) { + this.questBitmap.paintOpacity = 255; + var q = $gameQuests.get(this.quest); + this.drawQuestInfo(q); + this.drawQuestSteps(q); + this.drawQuestRewards(q); + // Check for resize, then redraw + if (this.resizeFlag) { + this.resizeFlag = false; + this.createQuestBitmap(); + } + if (this.failedImg !== '' && q.status === "failed") { + this.questBitmap.paintOpacity = Number(GameusScripts["Config"]["QuestSystem"]["Failed Image Opacity"] || 128); + this.questBitmap.blt(this.failedImg, 0, 0, this.failedImg.width, this.failedImg.height, + this.contentsWidth() / 2 - this.failedImg.width / 2, + this.contentsHeight() / 2 - this.failedImg.height / 2); + } + if (this.completedImg !== '' && q.status === "completed") { + this.questBitmap.paintOpacity = Number(GameusScripts["Config"]["QuestSystem"]["Completed Image Opacity"] || 128); + this.questBitmap.blt(this.completedImg, 0, 0, this.completedImg.width, this.completedImg.height, + this.contentsWidth() / 2 - this.completedImg.width / 2, + this.contentsHeight() / 2 - this.completedImg.height / 2); + } + } + }; + + Window_QuestInfo.prototype.drawQuestInfo = function(q) { + var headerX = 0; + this.questBitmap.paintOpacity = 255; + this.lineY = 0; + if (q.icon > -1) { + this.drawIcon(q.icon, 0, this.lineY); + headerX = 40; + } + this.questBitmap.textColor = this.systemColor(); + this.questBitmap.drawText(q.name, headerX, this.lineY, this.contentsWidth() - headerX, this.lineHeight()); + this.write(); + this.questBitmap.textColor = this.normalColor(); + var lines = this.sliceText(q.desc, this.contentsWidth()); + for (var i = 0; i < lines.length; i += 1) { + this.questBitmap.drawText(lines[i], 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.write(); + } + this.drawHorzLine(this.lineY); + this.write(); + } + + Window_QuestInfo.prototype.drawQuestSteps = function(q) { + // Draw the quest steps + var bullet = String(GameusScripts["Config"]["QuestSystem"]["Bullet Character"] || "-" ) + " "; + this.questBitmap.textColor = this.systemColor(); + this.questBitmap.drawText("Steps", 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.write(); + this.questBitmap.textColor = this.normalColor(); + var maxSteps = Number(GameusScripts["Config"]["QuestSystem"]["Max Steps"] || 3); + if (maxSteps === 0) + maxSteps = q.steps.length; + if (q.currentStep >= q.steps.length) + q.currentStep = q.steps.length - 1; + var startStep = Math.max(0, q.currentStep - maxSteps + 1); + var drawableSteps = q.steps.slice(startStep, q.currentStep + 1); + for (var i = 0; i < drawableSteps.length; i += 1) { + var step = drawableSteps[i]; + var stepText = bullet + step[0]; + if (step[1] === true) { + var varVal = $gameVariables.value(step[2]); + var maxVal = step[3]; + if (step[4]) + stepText += " " + String(Math.floor(varVal / maxVal * 100)) + "%"; + else + stepText += " " + String(varVal) + " / " + String(maxVal); + } + lines = this.sliceText(stepText, this.contentsWidth()); + var done = i + startStep < q.currentStep || (q.status === "completed" || q.status === "failed"); + this.questBitmap.paintOpacity = done ? 160 : 255 + for (var j = 0; j < lines.length; j += 1) { + var bulletOffset = 0; + if (j > 0) + bulletOffset += this.contents.measureTextWidth(bullet); + this.questBitmap.drawText(lines[j], bulletOffset, this.lineY, this.contentsWidth(), this.lineHeight()); + this.write(); + } + } + this.drawHorzLine(this.lineY); + this.write(); + } + + Window_QuestInfo.prototype.drawQuestRewards = function(q) { + var bullet = String(GameusScripts["Config"]["QuestSystem"]["Bullet Character"] || "-" ) + " "; + // Draw Rewards + this.questBitmap.textColor = this.systemColor(); + this.questBitmap.drawText("Rewards", 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.write(); + this.questBitmap.textColor = this.normalColor(); + for (var i = 0; i < q.rewards.length; i += 1) { + var reward = q.rewards[i]; + // If the reward is hidden and quest not completed yet... + if (reward[3] === true && q.status !== "completed") { + // Draw this shit as hidden + var hidden = bullet + (GameusScripts["Config"]["QuestSystem"]["Hidden Reward Text"] || "??????"); + this.questBitmap.drawText(hidden, 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.write(); + continue; + } + var item = null; + var amount = null; + var done = (q.status === "completed" || q.status === "failed"); + this.questBitmap.paintOpacity = done ? 160 : 255 + switch (reward[0]) { + case "item": + item = $dataItems[reward[1]]; + amount = reward[2]; + this.questBitmap.drawText(bullet, 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.drawItemName(item, this.contents.measureTextWidth(bullet), this.lineY, this.contentsWidth()); + this.questBitmap.drawText("x" + String(amount), 0, this.lineY, this.contentsWidth(), this.lineHeight(), "right"); + this.write(); + break; + case "armor": + item = $dataArmors[reward[1]]; + amount = reward[2]; + this.questBitmap.drawText(bullet, 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.drawItemName(item, this.contents.measureTextWidth(bullet), this.lineY, this.contentsWidth()); + this.questBitmap.drawText("x" + String(amount), 0, this.lineY, this.contentsWidth(), this.lineHeight(), "right"); + this.write(); + break; + case "weapon": + item = $dataWeapons[reward[1]]; + amount = reward[2]; + this.questBitmap.drawText(bullet, 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.drawItemName(item, this.contents.measureTextWidth(bullet), this.lineY, this.contentsWidth()); + this.questBitmap.drawText("x" + String(amount), 0, this.lineY, this.contentsWidth(), this.lineHeight(), "right"); + this.write(); + break; + case "xp": + amount = reward[1]; + this.questBitmap.drawText(bullet + TextManager.exp, 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.questBitmap.drawText("x" + String(amount), 0, this.lineY, this.contentsWidth(), this.lineHeight(), "right"); + this.write(); + break; + case "gold": + amount = reward[1]; + this.questBitmap.drawText(bullet + TextManager.currencyUnit, 0, this.lineY, this.contentsWidth(), this.lineHeight()); + this.questBitmap.drawText("x" + String(amount), 0, this.lineY, this.contentsWidth(), this.lineHeight(), "right"); + this.write(); + break; + case "custom": + amount = this.sliceText(bullet + reward[1], this.contentsWidth()); + for (var j = 0; j < amount.length; j += 1) { + var bulletOffset = 0; + if (j > 0) + bulletOffset += this.contents.measureTextWidth(bullet); + this.questBitmap.drawText(amount[j], bulletOffset, this.lineY, this.contentsWidth(), this.lineHeight()); + this.write(); + } + break; + } + } + } + + // Borrow some drawing methods since we're drawing to a secondary bitmap + Window_QuestInfo.prototype.drawItemName = function(item, x, y, width) { + width = width || 312; + if (item) { + var iconBoxWidth = Window_Base._iconWidth + 8; + this.questBitmap.textColor = this.normalColor(); + this.drawIcon(item.iconIndex, x - 2, y + 2); + this.questBitmap.drawText(item.name, x + iconBoxWidth, y, width - iconBoxWidth, this.lineHeight()); + } + }; + + Window_QuestInfo.prototype.drawIcon = function(iconIndex, x, y) { + var bitmap = ImageManager.loadSystem('IconSet'); + var pw = Window_Base._iconWidth; + var ph = Window_Base._iconHeight; + var sx = iconIndex % 16 * pw; + var sy = Math.floor(iconIndex / 16) * ph; + this.questBitmap.blt(bitmap, sx, sy, pw, ph, x, y); + }; + + Window_QuestInfo.prototype.drawHorzLine = function(y) { + var lineY = y + this.lineHeight() / 2 - 1; + this.questBitmap.paintOpacity = 48; + this.questBitmap.fillRect(0, lineY, this.contentsWidth(), 2, this.normalColor()); + this.questBitmap.paintOpacity = 255; + }; + + // Update the up/down arrows to indicate scrolling is available + Window_QuestInfo.prototype.updateArrows = function() { + this.downArrowVisible = (this.questBitmap.height > this.contentsHeight() && this.offY < this.questBitmap.height - this.contentsHeight()); + this.upArrowVisible = this.offY > 0; + }; + + // Override the arrow key controls so we can scroll instead, let's be honest, that's way cooler + Window_QuestInfo.prototype.isCursorMovable = function() { + return (this.isOpenAndActive()); + }; + + Window_QuestInfo.prototype.cursorDown = function(wrap) { + if (this.questBitmap.height > this.contentsHeight() && this.offY < this.questBitmap.height - this.contentsHeight()) { + SoundManager.playCursor(); + this.offY += this.lineHeight() + this.textPadding(); + this.refresh(); + } + }; + + Window_QuestInfo.prototype.cursorUp = function(wrap) { + if (this.offY > 0) { + SoundManager.playCursor(); + this.offY -= this.lineHeight() + this.textPadding(); + if (this.offY < 0) + this.offY = 0; + this.refresh(); + } + }; + + Window_QuestInfo.prototype.cursorPagedown = function() { + this.cursorDown(); + }; + + Window_QuestInfo.prototype.cursorPageup = function() { + this.cursorUp(); + }; + + Window_QuestInfo.prototype.cursorRight = function(wrap) { + // We are basically... + }; + + Window_QuestInfo.prototype.cursorLeft = function(wrap) { + // ...screwing the system + }; + +//--------------------------------------------------------------------------------------------- +// Window_Quests +//--------------------------------------------------------------------------------------------- + function Window_Quests() { + this.initialize.apply(this, arguments); + }; + + Window_Quests.prototype = Object.create(Window_Command.prototype); + Window_Quests.prototype.constructor = Window_Quests; + + Window_Quests.prototype.initialize = function() { + var xx = (GameusScripts["Config"]["QuestSystem"]["Reverse Layout"] || "false").toLowerCase() === "true" ? Graphics.boxWidth - 320 : 0; + var yy = String(GameusScripts["Config"]["QuestSystem"]["Filter Position"]).toLowerCase() === "top" ? this.fittingHeight(1) : 0; + // Stores all quests available from $gameParty + this.qFilters = ["all", "progress", "completed", "failed"]; + this.filterIndex = 0; + this.data = []; + this.cats = $gameQuests.categories(); + this.expanded = []; + for (var i = 0; i < this.cats.length; i += 1) + this.expanded[i] = false; + this.filter = "all"; + this.refreshQuests(); + Window_Command.prototype.initialize.call(this, xx, yy); + }; + + Window_Quests.prototype.windowWidth = function() { + return 320; + }; + + Window_Quests.prototype.numVisibleRows = function() { + return 10; + }; + + Window_Quests.prototype.windowHeight = function() { + return Graphics.boxHeight - this.fittingHeight(1) + } + + Window_Quests.prototype.drawItem = function(index) { + var item = this._list[index]; + var rect = this.itemRectForText(index); + var align = this.itemTextAlign(); + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + var tempX = 0; + if (item.symbol === "quest") { + var q = $gameQuests.get(Number(item.ext)); + if (q.icon > -1 && (GameusScripts["Config"]["QuestSystem"]["Use Icons"]).toLowerCase() === "true") { + this.drawIcon(q.icon, rect.x + 8, rect.y + 2); + tempX = 40; + } + } + this.drawText(this.commandName(index), rect.x + tempX / 2, rect.y, rect.width, align); + }; + + + Window_Quests.prototype.questData = function(quest_id) { + return $gameQuests.get(quest_id); + }; + + Window_Quests.prototype.refreshQuests = function() { + this.data = $gameParty.getQuests(); + this.cats = $gameQuests.categories(); + this.counter = []; + for (var i = 0; i < this.cats.length; i += 1) + this.expanded[i] = false; + for (var i = 0; i < this.cats.length; i += 1) { + this.counter[i] = 0; + for (var j = 0; j < this.data.length; j += 1) { + var q = $gameQuests.get(this.data[j]); + if (q.cat == i && (this.filter == q.status || this.filter == "all")) + this.counter[i] += 1; + } + } + }; + + Window_Quests.prototype.setFilter = function(filter) { + this.filter = filter; + }; + + Window_Quests.prototype.toggle = function(cat) { + this.expanded[cat] = !this.expanded[cat]; + this.refresh(); + }; + + Window_Quests.prototype.makeCommandList = function() { + var q; + var flag = false; + var count = ""; + var useCats = (GameusScripts["Config"]["QuestSystem"]['Use Categories'] || "false").toLowerCase(); + var catMode = Number(GameusScripts["Config"]["QuestSystem"]["Show Empty Categories"] || 0); + var showCount = (GameusScripts["Config"]["QuestSystem"]["Show Quest Count"] || "false").toLowerCase(); + if (useCats === "true") { + for (var i = 0; i < this.cats.length; i += 1) { + flag = true; + if (showCount === "true") + count = " (" + String(this.counter[i]) + ")"; + if (catMode == 1 && this.counter[i] == 0) + flag = false; + if (catMode > 0 || this.counter[i] > 0) + this.addCommand(this.cats[i] + count, "cat", flag, String(i)); + if (this.expanded[i]) { + flag = false; + for (var j = 0; j < this.data.length; j += 1) { + q = $gameQuests.get(this.data[j]); + if ((q.status == this.filter || this.filter == "all") && i == q.cat) { + flag = true; + this.addCommand(" " + q.name, "quest", true, q.questId); + } + } + if (!flag) + this.addCommand(" " + GameusScripts["Config"]["QuestSystem"]["No Quests Text"] || "No Quests", "none"); + } + } + } else { + for (var i = 0; i < this.data.length; i += 1) { + q = $gameQuests.get(this.data[i]); + if (q.status == this.filter || this.filter == "all") + this.addCommand(q.name, "quest", true, q.questId); + } + } + if (this._list.length < 1) { + this.addCommand(GameusScripts["Config"]["QuestSystem"]["No Quests Text"] || "No Quests", "none"); + } + }; + + Window_Quests.prototype.cursorRight = function(wrap) { + this.filterIndex = this.filterIndex + 1 > 3 ? 0 : this.filterIndex + 1; + this.filter = this.qFilters[this.filterIndex]; + this.refreshQuests(); + this.refresh(); + this.select(0); + }; + + Window_Quests.prototype.cursorLeft = function(wrap) { + this.filterIndex = this.filterIndex - 1 < 0 ? 3 : this.filterIndex - 1; + this.filter = this.qFilters[this.filterIndex]; + this.refreshQuests(); + this.refresh(); + this.select(0); + }; +//--------------------------------------------------------------------------------------------- +// Window_QuestFilter +//--------------------------------------------------------------------------------------------- + function Window_QuestFilter() { + this.initialize.apply(this, arguments); + } + + Window_QuestFilter.prototype = Object.create(Window_Base.prototype); + Window_QuestFilter.prototype.constructor = Window_QuestFilter; + + Window_QuestFilter.prototype.initialize = function() { + this.qFilters = [ + GameusScripts["Config"]["QuestSystem"]["All Word"] || "All", + GameusScripts["Config"]["QuestSystem"]["Progress Word"] || "In-Progress", + GameusScripts["Config"]["QuestSystem"]["Completed Word"] || "Completed", + GameusScripts["Config"]["QuestSystem"]["Failed Word"] || "Failed", + ]; + var xx = (GameusScripts["Config"]["QuestSystem"]["Reverse Layout"] || "false").toLowerCase() === "true" ? Graphics.boxWidth - 320 : 0; + var yy = String(GameusScripts["Config"]["QuestSystem"]["Filter Position"]).toLowerCase() === "top" ? 0 : Graphics.boxHeight - this.windowHeight(); + this.filterIndex = 0; + this.filter = ""; + var width = this.windowWidth(); + var height = this.windowHeight(); + Window_Base.prototype.initialize.call(this, xx, yy, width, height); + this.refresh(); + }; + + Window_QuestFilter.prototype.windowWidth = function() { + return 320; + }; + + Window_QuestFilter.prototype.windowHeight = function() { + return this.fittingHeight(1); + }; + + Window_QuestFilter.prototype.refresh = function() { + if (this.filter == this.qFilters[this.filterIndex]) + return; + this.filter = this.qFilters[this.filterIndex]; + this.contents.clear(); + this.drawText(this.filter, 0, 0, this.contentsWidth(), "center"); + }; +//--------------------------------------------------------------------------------------------- +// Scene_Quest +//--------------------------------------------------------------------------------------------- + function Scene_Quest() { + this.initialize.apply(this, arguments); + }; + + Scene_Quest.prototype = Object.create(Scene_MenuBase.prototype); + Scene_Quest.prototype.constructor = Scene_Quest; + + Scene_Quest.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); + }; + + Scene_Quest.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this.qFilters = ["all", "progress", "completed", "failed"]; + this.createQuestWindow(); + }; + + Scene_Quest.prototype.createQuestWindow = function() { + this.oldIndex = 0; + this.questWindow = new Window_Quests(); + this.questWindow.setHandler("cat", this.handleCategory.bind(this)); + this.questWindow.setHandler("quest", this.handleQuest.bind(this)); + this.questWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this.questWindow); + this.questInfo = new Window_QuestInfo(); + this.questInfo.setHandler("cancel", this.cancelInfo.bind(this)); + this.addWindow(this.questInfo); + this.questFilter = new Window_QuestFilter(); + this.addWindow(this.questFilter); + }; + + Scene_Quest.prototype.update = function() { + var index = this.questWindow.index(); + if (this.oldIndex != index) { + var q = this.questWindow._list[index]; + if (q.symbol === "quest") + this.questInfo.setQuest(q.ext); + else + this.questInfo.setQuest(-1); + this.oldIndex = index; + } + this.questFilter.filterIndex = this.questWindow.filterIndex; + this.questFilter.refresh(); + Scene_Base.prototype.update.call(this); + }; + + Scene_Quest.prototype.cancelInfo = function() { + this.questWindow.activate(); + this.questInfo.deactivate(); + } + + Scene_Quest.prototype.handleQuest = function() { + this.questWindow.deactivate(); + this.questInfo.activate(); + }; + + Scene_Quest.prototype.handleCategory = function() { + var catIndex = this.questWindow.currentExt(); + this.questWindow.toggle(catIndex); + this.questWindow.refresh(); + this.questWindow.activate(); + }; + + // This is used to open up the Quest Log from the menu + // Used in conjunction with Yanfly's Menu plugin + Scene_Menu.prototype.commandQuest = function() { + SceneManager.push(Scene_Quest); + }; + \ No newline at end of file diff --git a/js/plugins/ItemBook.js b/js/plugins/ItemBook.js new file mode 100644 index 0000000..0ee0d9e --- /dev/null +++ b/js/plugins/ItemBook.js @@ -0,0 +1,383 @@ +//============================================================================= +// ItemBook.js +//============================================================================= + +/*: + * @plugindesc Displays detailed statuses of items. + * @author Yoji Ojima + * + * @param Unknown Data + * @desc The index name for an unknown item. + * @default ?????? + * + * @param Price Text + * @desc The text for "Price". + * @default Price + * + * @param Equip Text + * @desc The text for "Equip". + * @default Equip + * + * @param Type Text + * @desc The text for "Type". + * @default Type + * + * @help + * + * Plugin Command: + * ItemBook open # Open the item book screen + * ItemBook add weapon 3 # Add weapon #3 to the item book + * ItemBook add armor 4 # Add armor #4 to the item book + * ItemBook remove armor 5 # Remove armor #5 from the item book + * ItemBook remove item 6 # Remove item #6 from the item book + * ItemBook complete # Complete the item book + * ItemBook clear # Clear the item book + * + * Item (Weapon, Armor) Note: + * # This item does not appear in the item book + */ + +/*:ja + * @plugindesc アイテム図鑑です。アイテムの詳細なステータスを表示します。 + * @author Yoji Ojima + * + * @param Unknown Data + * @desc 未確認のアイテムの索引名です。 + * @default ?????? + * + * @param Price Text + * @desc 「価格」の文字列です。 + * @default 価格 + * + * @param Equip Text + * @desc 「装備」の文字列です。 + * @default 装備 + * + * @param Type Text + * @desc 「タイプ」の文字列です。 + * @default タイプ + * + * @help + * + * プラグインコマンド: + * ItemBook open # 図鑑画面を開く + * ItemBook add weapon 3 # 武器3番を図鑑に追加 + * ItemBook add armor 4 # 防具4番を図鑑に追加 + * ItemBook remove armor 5 # 防具5番を図鑑から削除 + * ItemBook remove item 6 # アイテム6番を図鑑から削除 + * ItemBook complete # 図鑑を完成させる + * ItemBook clear # 図鑑をクリアする + * + * アイテム(武器、防具)のメモ: + * # 図鑑に載せない場合 + */ + +(function() { + + var parameters = PluginManager.parameters('ItemBook'); + var unknownData = String(parameters['Unknown Data'] || '??????'); + var priceText = String(parameters['Price Text'] || 'Price'); + var equipText = String(parameters['Equip Text'] || 'Equip'); + var typeText = String(parameters['Type Text'] || 'Type'); + + var _Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function(command, args) { + _Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'ItemBook') { + switch (args[0]) { + case 'open': + SceneManager.push(Scene_ItemBook); + break; + case 'add': + $gameSystem.addToItemBook(args[1], Number(args[2])); + break; + case 'remove': + $gameSystem.removeFromItemBook(args[1], Number(args[2])); + break; + case 'complete': + $gameSystem.completeItemBook(); + break; + case 'clear': + $gameSystem.clearItemBook(); + break; + } + } + }; + + Game_System.prototype.addToItemBook = function(type, dataId) { + if (!this._ItemBookFlags) { + this.clearItemBook(); + } + var typeIndex = this.itemBookTypeToIndex(type); + if (typeIndex >= 0) { + this._ItemBookFlags[typeIndex][dataId] = true; + } + }; + + Game_System.prototype.removeFromItemBook = function(type, dataId) { + if (this._ItemBookFlags) { + var typeIndex = this.itemBookTypeToIndex(type); + if (typeIndex >= 0) { + this._ItemBookFlags[typeIndex][dataId] = false; + } + } + }; + + Game_System.prototype.itemBookTypeToIndex = function(type) { + switch (type) { + case 'item': + return 0; + case 'weapon': + return 1; + case 'armor': + return 2; + default: + return -1; + } + }; + + Game_System.prototype.completeItemBook = function() { + var i; + this.clearItemBook(); + for (i = 1; i < $dataItems.length; i++) { + this._ItemBookFlags[0][i] = true; + } + for (i = 1; i < $dataWeapons.length; i++) { + this._ItemBookFlags[1][i] = true; + } + for (i = 1; i < $dataArmors.length; i++) { + this._ItemBookFlags[2][i] = true; + } + }; + + Game_System.prototype.clearItemBook = function() { + this._ItemBookFlags = [[], [], []]; + }; + + Game_System.prototype.isInItemBook = function(item) { + if (this._ItemBookFlags && item) { + var typeIndex = -1; + if (DataManager.isItem(item)) { + typeIndex = 0; + } else if (DataManager.isWeapon(item)) { + typeIndex = 1; + } else if (DataManager.isArmor(item)) { + typeIndex = 2; + } + if (typeIndex >= 0) { + return !!this._ItemBookFlags[typeIndex][item.id]; + } else { + return false; + } + } else { + return false; + } + }; + + var _Game_Party_gainItem = Game_Party.prototype.gainItem; + Game_Party.prototype.gainItem = function(item, amount, includeEquip) { + _Game_Party_gainItem.call(this, item, amount, includeEquip); + if (item && amount > 0) { + var type; + if (DataManager.isItem(item)) { + type = 'item'; + } else if (DataManager.isWeapon(item)) { + type = 'weapon'; + } else if (DataManager.isArmor(item)) { + type = 'armor'; + } + $gameSystem.addToItemBook(type, item.id); + } + }; + + function Scene_ItemBook() { + this.initialize.apply(this, arguments); + } + + Scene_ItemBook.prototype = Object.create(Scene_MenuBase.prototype); + Scene_ItemBook.prototype.constructor = Scene_ItemBook; + + Scene_ItemBook.prototype.initialize = function() { + Scene_MenuBase.prototype.initialize.call(this); + }; + + Scene_ItemBook.prototype.create = function() { + Scene_MenuBase.prototype.create.call(this); + this._indexWindow = new Window_ItemBookIndex(0, 0); + this._indexWindow.setHandler('cancel', this.popScene.bind(this)); + var wy = this._indexWindow.height; + var ww = Graphics.boxWidth; + var wh = Graphics.boxHeight - wy; + this._statusWindow = new Window_ItemBookStatus(0, wy, ww, wh); + this.addWindow(this._indexWindow); + this.addWindow(this._statusWindow); + this._indexWindow.setStatusWindow(this._statusWindow); + }; + + function Window_ItemBookIndex() { + this.initialize.apply(this, arguments); + } + + Window_ItemBookIndex.prototype = Object.create(Window_Selectable.prototype); + Window_ItemBookIndex.prototype.constructor = Window_ItemBookIndex; + + Window_ItemBookIndex.lastTopRow = 0; + Window_ItemBookIndex.lastIndex = 0; + + Window_ItemBookIndex.prototype.initialize = function(x, y) { + var width = Graphics.boxWidth; + var height = this.fittingHeight(6); + Window_Selectable.prototype.initialize.call(this, x, y, width, height); + this.refresh(); + this.setTopRow(Window_ItemBookIndex.lastTopRow); + this.select(Window_ItemBookIndex.lastIndex); + this.activate(); + }; + + Window_ItemBookIndex.prototype.maxCols = function() { + return 3; + }; + + Window_ItemBookIndex.prototype.maxItems = function() { + return this._list ? this._list.length : 0; + }; + + Window_ItemBookIndex.prototype.setStatusWindow = function(statusWindow) { + this._statusWindow = statusWindow; + this.updateStatus(); + }; + + Window_ItemBookIndex.prototype.update = function() { + Window_Selectable.prototype.update.call(this); + this.updateStatus(); + }; + + Window_ItemBookIndex.prototype.updateStatus = function() { + if (this._statusWindow) { + var item = this._list[this.index()]; + this._statusWindow.setItem(item); + } + }; + + Window_ItemBookIndex.prototype.refresh = function() { + var i, item; + this._list = []; + for (i = 1; i < $dataItems.length; i++) { + item = $dataItems[i]; + if (item.name && item.itypeId === 1 && item.meta.book !== 'no') { + this._list.push(item); + } + } + for (i = 1; i < $dataWeapons.length; i++) { + item = $dataWeapons[i]; + if (item.name && item.meta.book !== 'no') { + this._list.push(item); + } + } + for (i = 1; i < $dataArmors.length; i++) { + item = $dataArmors[i]; + if (item.name && item.meta.book !== 'no') { + this._list.push(item); + } + } + this.createContents(); + this.drawAllItems(); + }; + + Window_ItemBookIndex.prototype.drawItem = function(index) { + var item = this._list[index]; + var rect = this.itemRect(index); + var width = rect.width - this.textPadding(); + if ($gameSystem.isInItemBook(item)) { + this.drawItemName(item, rect.x, rect.y, width); + } else { + var iw = Window_Base._iconWidth + 4; + this.drawText(unknownData, rect.x + iw, rect.y, width - iw); + } + }; + + Window_ItemBookIndex.prototype.processCancel = function() { + Window_Selectable.prototype.processCancel.call(this); + Window_ItemBookIndex.lastTopRow = this.topRow(); + Window_ItemBookIndex.lastIndex = this.index(); + }; + + function Window_ItemBookStatus() { + this.initialize.apply(this, arguments); + } + + Window_ItemBookStatus.prototype = Object.create(Window_Base.prototype); + Window_ItemBookStatus.prototype.constructor = Window_ItemBookStatus; + + Window_ItemBookStatus.prototype.initialize = function(x, y, width, height) { + Window_Base.prototype.initialize.call(this, x, y, width, height); + }; + + Window_ItemBookStatus.prototype.setItem = function(item) { + if (this._item !== item) { + this._item = item; + this.refresh(); + } + }; + + Window_ItemBookStatus.prototype.refresh = function() { + var item = this._item; + var x = 0; + var y = 0; + var lineHeight = this.lineHeight(); + + this.contents.clear(); + + if (!item || !$gameSystem.isInItemBook(item)) { + return; + } + + this.drawItemName(item, x, y); + + x = this.textPadding(); + y = lineHeight + this.textPadding(); + + var price = item.price > 0 ? item.price : '-'; + this.changeTextColor(this.systemColor()); + this.drawText(priceText, x, y, 120); + this.resetTextColor(); + this.drawText(price, x + 120, y, 120, 'right'); + y += lineHeight; + + if (DataManager.isWeapon(item) || DataManager.isArmor(item)) { + var etype = $dataSystem.equipTypes[item.etypeId]; + this.changeTextColor(this.systemColor()); + this.drawText(equipText, x, y, 120); + this.resetTextColor(); + this.drawText(etype, x + 120, y, 120, 'right'); + y += lineHeight; + + var type; + if (DataManager.isWeapon(item)) { + type = $dataSystem.weaponTypes[item.wtypeId]; + } else { + type = $dataSystem.armorTypes[item.atypeId]; + } + this.changeTextColor(this.systemColor()); + this.drawText(typeText, x, y, 120); + this.resetTextColor(); + this.drawText(type, x + 120, y, 120, 'right'); + + x = this.textPadding() + 300; + y = lineHeight + this.textPadding(); + for (var i = 2; i < 8; i++) { + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.param(i), x, y, 160); + this.resetTextColor(); + this.drawText(item.params[i], x + 160, y, 60, 'right'); + y += lineHeight; + } + } + + x = 0; + y = this.textPadding() * 2 + lineHeight * 7; + this.drawTextEx(item.description, x, y); + }; + +})(); diff --git a/js/plugins/MOG_ATB.js b/js/plugins/MOG_ATB.js new file mode 100644 index 0000000..e41e4b2 --- /dev/null +++ b/js/plugins/MOG_ATB.js @@ -0,0 +1,1702 @@ +//============================================================================= +// MOG_ATB.js +//============================================================================= + +/*: + * @plugindesc (v0.3 *) Sistema de batalha em tempo real. + * @author Moghunter + * + * @param ATB Mode + * @desc Definição do Modo de ATB. + * 0 Wait / 1 SemiActive-I / 2 SemiActive-II / 3 Full Active + * @default 2 + * @type select + * @option Wait + * @value 0 + * @option Semi Active I + * @value 1 + * @option Semi Active II + * @value 2 + * @option Full Active + * @value 3 + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param ATB Max Value + * @desc Definição do tempo máximo de ATB (Velocidade). + * @default 4000 + * @type number + * + * @param Turn Duration + * @desc Definição da duração do turno. + * @default 480 + * @type number + * + * @param States Duration + * @desc Definição da duração das condições. + * @default 180 + * @type number + * + * @param Escape Duration + * @desc Definição do tempo para escapar. + * @default 180 + * @type number + * + * @param Skip Emerge Message + * @desc Desativar a janela de mensagem de emergir. + * @default true + * @type boolean + * + * @param Full SE + * @desc Definição do som quando o ATB atingir o nível máximo. + * @type file + * @default audio/se/Book1 + * + * @param Change Actor Left + * @desc Definição do botão para mudar o personagem. + * @default pagedown + * + * @param Change Actor Right + * @desc Definição do botão para mudar o personagem. + * @default pageup + * + * @param Escape Button + * @desc Definição do botão para escapar. + * @default cancel + * + * @param Escape Layout X + * @desc Definição da posição do layout de fugir X-axis. + * @default 600 + * @type number + * + * @param Escape Layout Y + * @desc Definição da posição do layout de fugir Y-axis. + * @default 64 + * @type number + * + * @param Escape Gauge X + * @desc Definição da posição do medidor de fugir X-axis. + * @default 6 + * @type number + * + * @param Escape Gauge Y + * @desc Definição da posição do medidor de fugir Y-axis. + * @default 16 + * @type number + * + * @help + * ============================================================================= + * +++ MOG - Active Time Battle [ATB] (v0.3 *) +++ + * By Moghunter + * https://mogplugins.wordpress.com + * ============================================================================= + * Sistema de batalha em tempo real. + * + * ============================================================================= + * IMAGES + * ============================================================================= + * As imagens deverão ser gravadas na pasta. (img/atb/) + * Imagens necessárias. + * + * Escape_A.png + * Escape_B.png + * + * ============================================================================= + * PLUGIN COMMAND + * ============================================================================= + * Para definir o modo do ATB utilize o comando abaixo. + * + * atb_mode : MODE + * + * 0 - Wait + * - Os inimigos não atacam na seleção de comando. + * 1 - Semi Active I + * - Os inimigos não atacam na seleção de items/skills e seleção de alvo. + * 2 - Semi Active II + * - Os inimigos não atacam na seleção de items/skills. + * 3 - Full Active + * - Os inimigos atacam em qualquer situação. + * + * ============================================================================= + * CAST TIME + * ============================================================================= + * Para definir o tempo de ativar uma ação (magias), defina pelo valor da + * velocidade (Speed) da ação da habilidade ou item. + * + * ============================================================================= + * STATE DURATION + * ============================================================================= + * Para definir o tempo da duração da condição, defina um valor em + * + * Durations in Turns + * + * ============================================================================= + * BUTTONS + * ============================================================================= + * Q - Selecionar o personagem da direita. + * W - Selecionar o personagem da esquerda. + * X - Escapar + * + * ============================================================================= + * - WHAT'S NEW (version 0.3b) + * ============================================================================= + * - (BUG FIX) - Correção de não poder mudar de personagem durante a ação. + * + */ + +//============================================================================= +// ** PLUGIN PARAMETERS +//============================================================================= +  var Imported = Imported || {}; +  Imported.MOG_ATB = true; +  var Moghunter = Moghunter || {}; + +  Moghunter.parameters = PluginManager.parameters('MOG_ATB'); + Moghunter.atb_Mode = Number(Moghunter.parameters['ATB Mode'] || 3); + Moghunter.atb_MaxValue = Number(Moghunter.parameters['ATB Max Value'] || 4000); + Moghunter.atb_TurnDuration = Number(Moghunter.parameters['Turn Duration'] || 480); + Moghunter.atb_StatesDuration = Number(Moghunter.parameters['States Duration'] || 180); + Moghunter.atb_SkipEmerge = String(Moghunter.parameters['Skip Emerge Message'] || 'true'); + Moghunter.atb_EscapeDuration = Number(Moghunter.parameters['Escape Duration'] || 180); + + Moghunter.atb_EscapeGaugeX = Number(Moghunter.parameters['Escape Layout X'] || 600); + Moghunter.atb_EscapeGaugeY = Number(Moghunter.parameters['Escape Layout Y'] || 64); + Moghunter.atb_EscapeGaugeX2 = Number(Moghunter.parameters['Escape Gauge X'] || 6); + Moghunter.atb_EscapeGaugeY2 = Number(Moghunter.parameters['Escape Gauge Y'] || 16); + Moghunter.atb_EscapeButton = String(Moghunter.parameters['Escape Button'] || 'cancel'); + Moghunter.atb_FullSE = String(Moghunter.parameters['Full SE'] || 'Book1'); + Moghunter.atb_NextActorLeft = String(Moghunter.parameters['Change Actor Left'] || 'pagedown'); + Moghunter.atb_NextActorRight = String(Moghunter.parameters['Change Actor Right'] || 'pageup'); + +//============================================================================= +// ** Game Temp +//============================================================================= + +//============================== +// * Initialize +//============================== +var _mog_atb_gtemp_initialize = Game_Temp.prototype.initialize; +Game_Temp.prototype.initialize = function() { + _mog_atb_gtemp_initialize.call(this); + this._atbForceHideWindows = false; + this._atbEscape = [0,1,false]; + this._atbWinData = [false,false,false]; + this._atbWaitTemp = [0,0,0]; + this._atbneedRefWind = false; + this._atbBattleEnd = false; + this._atbInTurn = false; + this._battleEnd = false; +}; + +//============================================================================= +// ** Game System +//============================================================================= + +//============================== +// * Initialize +//============================== +var _mog_atb_gsys_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() { + _mog_atb_gsys_initialize.call(this); + this._atbEventPhase = [0,0,0,false,false]; + this._atbEventPhase[1] = Math.max(Moghunter.atb_TurnDuration,120); + this._atbEspcapeDuration = Math.max(Moghunter.atb_EscapeDuration,60); + this._atbMode = [Moghunter.atb_Mode,false]; +}; + +//============================== +// * Play Sound MX 2 +//============================== +SoundManager.playSoundMX2 = function(fileName){ + var se = {}; + var file = fileName.split('/'); + var fileReal = file[file.length - 1]; + se.name = String(fileReal); + se.pitch = 100; + se.volume = 100; + AudioManager.playSe(se); +}; + +//============================================================================= +// ** Game_Interpreter +//============================================================================= + +//============================== +// * PluginCommand +//============================== +var _mog_atb_pluginCommand = Game_Interpreter.prototype.pluginCommand +Game_Interpreter.prototype.pluginCommand = function(command, args) { + _mog_atb_pluginCommand.call(this,command, args) + this.setATBParInt(command, args); + return true; +}; + +//============================== +// * set ATB ParInt +//============================== +Game_Interpreter.prototype.setATBParInt = function(command, args) { + if (command === "atb_mode" && args[1]) { + var mode = Math.min(Math.max(Number(args[1]),0),3); + $gameSystem._atbMode[0] = mode; + }; +}; + +//============================================================================= +// ** Game Battler Base +//============================================================================= + +//============================== +// * Init Members +//============================== +var _mog_atb_gbbase_initMembers = Game_BattlerBase.prototype.initMembers; +Game_BattlerBase.prototype.initMembers = function() { + _mog_atb_gbbase_initMembers.call(this); + this.initATBSetup(); +}; + +//============================== +// * Init ATB Setup +//============================== +Game_BattlerBase.prototype.initATBSetup = function() { + this._atb = 0; + this._max_atb = Math.max(Moghunter.atb_MaxValue,100); + this._wait_atb = 0; + this._cast_atb = [null,0,1]; + this._atbItem = null; + this._inSelection = false; + this._intTurn = false; + this._stateTime = Math.max(Moghunter.atb_StatesDuration,60); + this._stateDuration = []; + this._buffTime = Math.max(Moghunter.atb_StatesDuration,60); + this._buffDuration = [0,0,0,0,0,0,0,0]; +}; + +//============================== +// * ATB +//============================== +Game_BattlerBase.prototype.atb = function() { + return this._atb; +}; + +//============================== +// * Max ATB +//============================== +Game_BattlerBase.prototype.maxAtb = function() { + return this._max_atb; +}; + +//============================== +// * ATB Speed +//============================== +Game_BattlerBase.prototype.atbSpeed = function() { + return this.agi; +}; + +//============================== +// * Die +//============================== +var _mog_atb_gbbase_die = Game_BattlerBase.prototype.die; +Game_BattlerBase.prototype.die = function() { + _mog_atb_gbbase_die.call(this); + if ($gameParty.inBattle()) { + if (this.needForceClearSelection()){ + this.refreshCommandSelectionATB(); + }; + $gameTemp._atbneedRefWind = true; + this.clearATB(); + }; +}; + +//============================== +// * Need Force Clear Selection +//============================== +Game_BattlerBase.prototype.needForceClearSelection = function() { + if (!BattleManager._atbBattlerInput) {return false}; + if (BattleManager._atbBattlerInput[0] != this) {return false}; + if (this.isRestricted()) {return true}; + if (this.isDead()) {return true} + return false; +}; + +//============================== +// * Refresh +//============================== +var _mog_atb_gBat_refresh = Game_Battler.prototype.refresh; +Game_Battler.prototype.refresh = function() { + _mog_atb_gBat_refresh.call(this); + if (this.needForceClearSelection()){ + this.refreshCommandSelectionATB(); + }; +}; + +//============================== +// * refresh Command Selection ATB +//============================== +Game_BattlerBase.prototype.refreshCommandSelectionATB = function() { + BattleManager.selectionComAtbClear() + BattleManager._atbBattlerInput = [null,false]; + $gameTemp._atbForceHideWindows = true; +}; + +//============================== +// * clear ATB +//============================== +Game_BattlerBase.prototype.clearATB = function() { + this._atb = 0; + this._wait_atb = 0; + this._intTurn = false + this._atbItem = null; + this.clearActions() + this.clearCast(); +}; + +//============================== +// * clear Cast +//============================== +Game_BattlerBase.prototype.clearCast = function() { + this._cast_atb = [null,0,1]; +}; + +//============================== +// * is Max ATB +//============================== +Game_BattlerBase.prototype.isMaxAtb = function() { + return this.atb() >= this.maxAtb(); +}; + +//******************************* +// * is Chanting *(Overwritten)* +//******************************* +Game_Battler.prototype.isChanting = function() { + if (this._cast_atb[1] > 0) {return true}; +}; + +//============================== +// * is Casting +//============================== +Game_BattlerBase.prototype.isCasting = function() { + return this._cast_atb[0]; +}; + +//============================== +// * update Count Atb +//============================== +Game_BattlerBase.prototype.updateCountAtb = function() { + this._atb += this.atbSpeed(); +}; + +//******************************* +// * Can Input *(Overwritten)* +//******************************* +Game_BattlerBase.prototype.canInput = function() { + if (!this.isAppeared()) {return false}; + if (this.isRestricted()) {return false}; + if (this.isAutoBattle()) {return false}; + if (!this.isMaxAtb()) {return false}; + if (this.isCasting()) {return false}; + if (this._intTurn) {return false}; + if (this._atbItem) {return false}; + return true; +}; + +//============================== +// * Can Move Atb +//============================== +Game_BattlerBase.prototype.canMoveAtb = function() { + if (!this.isAppeared()) {return false}; + if ($gameSystem._atbEventPhase[3]) {return false}; + if (Imported.MOG_BattleCameraFrontal && $gameSystem._atbMode[0] < 3) { + if ($gameTemp._bcam.atbwaitFocus && $gameTemp._bcam.sMov) {return false}; + }; + return true; +}; + +//============================== +// * Can Fill ATB +//============================== +Game_BattlerBase.prototype.canFillATB = function() { + if (this.restriction() >= 4) {return false}; + if (this._wait_atb > 0) {return false}; + return true; +}; + +//******************************* +// * On End Turn *(Overwritten)* +//******************************* +Game_Battler.prototype.onTurnEnd = function() { + this.clearResult(); +}; + +//============================== +// * clear States +//============================== +var _mog_atb_gbatbase_clearStates = Game_BattlerBase.prototype.clearStates; +Game_BattlerBase.prototype.clearStates = function() { + _mog_atb_gbatbase_clearStates.call(this); + this._stateDuration = []; +}; + +//============================== +// * Reset States Counts +//============================== +var _mog_atb_gbatbase_resetStateCounts = Game_BattlerBase.prototype.resetStateCounts; +Game_BattlerBase.prototype.resetStateCounts = function(stateId) { + _mog_atb_gbatbase_resetStateCounts.call(this,stateId); + if (!this._stateDuration[stateId]) { + this._stateDuration[stateId] = this._stateTime + }; + if (this._stateDuration[stateId] < 60) { + this._stateDuration[stateId] = this._stateTime; + }; +}; + +//============================== +// * erase State +//============================== +var _mog_atb_gbatbase_eraseState = Game_BattlerBase.prototype.eraseState; +Game_BattlerBase.prototype.eraseState = function(stateId) { + _mog_atb_gbatbase_eraseState.call(this,stateId); + delete this._stateDuration[stateId]; +}; + +//============================== +// * update State Turns ATB +//============================== +Game_BattlerBase.prototype.updateStateTurns_ATB = function() { + this._states.forEach(function(stateId) { + if (this._stateDuration[stateId] == null) { + this._stateDuration[stateId] = 0 + } + this._stateDuration[stateId]--; + if (this._stateDuration[stateId] <= 0) { + this._stateDuration[stateId] = this._stateTime; + if (this._stateTurns[stateId] > 0) { + this._stateTurns[stateId]--; + }; + this.executeStatesEffect_ATB(stateId); + }; + }, this); +}; + +//============================== +// * executeStatesEffect_ATB +//============================== +Game_BattlerBase.prototype.executeStatesEffect_ATB = function(stateId) { + this.regenerateAll(); + this.startDamagePopup(); + if (this._stateTurns[stateId] === 0) {this.eraseState(stateId)}; +}; + +//============================== +// * remove Guard State +//============================== +Game_BattlerBase.prototype.removeGuardState = function(stateId) { + this.states().forEach(function(state) { + for (var i = 0; i < state.traits.length; i++) { + var effect = state.traits[i] + if (effect.dataId === 1) { + this.eraseState(state.id) + }; + }; + }, this); +}; + +//============================== +// * clear Buffs +//============================== +var _mog_atb_gBatbase_clearBuffs = Game_BattlerBase.prototype.clearBuffs; +Game_BattlerBase.prototype.clearBuffs = function() { + _mog_atb_gBatbase_clearBuffs.call(this); + this._buffDuration = [0,0,0,0,0,0,0,0]; +}; + +//============================== +// * erase Buff +//============================== +var _mog_atb_gBatbase_eraseBuff = Game_BattlerBase.prototype.eraseBuff; +Game_BattlerBase.prototype.eraseBuff = function(paramId) { + _mog_atb_gBatbase_eraseBuff.call(this,paramId) + this._buffDuration[paramId] = 0; +}; + +//============================== +// * update Buff Turn ATB +//============================== +Game_BattlerBase.prototype.updateBuffTurns_ATB = function() { + for (var i = 0; i < this._buffTurns.length; i++) { + if (this._buffDuration[i] == null) { + this._buffDuration[i] = 0 + }; + this._buffDuration[i]--; + if (this._buffDuration[i] <= 0) { + this._buffDuration[i] = this._buffTime; + if (this._buffTurns[i] > 0) { + this._buffTurns[i]--; + this.executeBuffEffect_ATB(i) + }; + }; + }; +}; + +//============================== +// * executeBuffEffect_ATB +//============================== +Game_BattlerBase.prototype.executeBuffEffect_ATB = function(buffId) { + if (this._buffTurns[buffId] === 0) {this.removeBuff(buffId)}; +}; + +//============================================================================= +// ** Game Battler +//============================================================================= + +//============================== +// * perform Action End +//============================== +var _mog_atb_gBat_performActionEnd = Game_Battler.prototype.performActionEnd; +Game_Battler.prototype.performActionEnd = function() { + _mog_atb_gBat_performActionEnd.call(this); + this.setActionState('undecided'); +}; + +//============================================================================= +//============================================================================= +// ** Battle Manager +//============================================================================= +//============================================================================= + +//============================== +// * init Members +//============================== +var _mog_atb_btmngr_initMembers = BattleManager.initMembers; +BattleManager.initMembers = function() { + _mog_atb_btmngr_initMembers.call(this); + this.setupATB(); +}; + +//============================== +// * setup ATB +//============================== +BattleManager.setupATB = function() { + this._atbBattler = null; + this._atbBattlerInput = [null,false]; + $gameTemp._atbEscape = [0,$gameSystem._atbEspcapeDuration,false]; + $gameTemp._battleEnd = false; + $gameTemp._atbBattleEnd = false; + $gameTemp._atbWaitTemp = [0,40,0]; + $gameTemp._atbneedRefWind = false; + $gameTemp._atbInTurn = false; + $gameSystem._atbEventPhase[0] = 0; + $gameSystem._atbEventPhase[3] = false; +}; + +//============================== +// * clear ATB Base +//============================== +BattleManager.clearATBBase = function() { + $gameTemp._atbForceHideWindows = true; + $gameTemp._atbEscape[0] = 0; + this._atbBattler = null; + this._atbBattlerInput = [null,false]; + this._actorIndex = -1; + $gameSystem._atbEventPhase[0] = 0; + $gameSystem._atbEventPhase[3] = false; +}; + +//============================== +// * prepare Initial ATB Value +//============================== +BattleManager.prepareInitialATBValue = function() { + for (var i = 0; i < $gameParty.members().length; i++) { + var battler = $gameParty.members()[i]; + battler.clearATB(); + battler._wait_atb = 5; + var per = battler._max_atb * 30 / 100; + var value = Math.randomInt(per); + if (this._preemptive) { + value += (per * 2); + }; + battler._atb = Math.floor(value); + }; + for (var i = 0; i < $gameTroop.members().length; i++) { + var battler = $gameTroop.members()[i]; + battler.clearATB(); + battler._wait_atb = 5; + var per = battler._max_atb * 30 / 100; + var value = Math.randomInt(per); + if (this._surprise) { + value += (per * 2); + }; + battler._atb = Math.floor(value); + }; + this.clearATBBase(); +}; + +//============================== +// * clear ATB Value Party +//============================== +BattleManager.clearATBValueParty = function() { + for (var i = 0; i < $gameParty.members().length; i++) { + var battler = $gameParty.members()[i]; + battler.clearATB(); + battler.setActionState('undecided') + }; + if ($gameTemp._battleEnd || $gameSystem._atbBattleEnd) { + for (var i = 0; i < $gameTroop.members().length; i++) { + var battler = $gameTroop.members()[i]; + battler.clearATB(); + }; + }; + this.clearATBBase(); +}; + +//============================== +// * need Update ATB Basic +//============================== +BattleManager.needUpdate_ATBBasic = function() { + if (this._phase == 'action') {return false}; + if (this._phase == 'turn') {return false}; + if ($gameTemp._atbBattleEnd) {return false}; + if ($gameMessage.isBusy()) {return false}; + if ($gameTemp._battleEnd) {return false}; + if ($gameSystem._atbEventPhase[3]) {return false}; + if ($gameTemp._atbWaitTemp[0] > 0) {return false} + if ($gameTemp._atbWaitTemp[1] > 0) {return false} + if ($gameSystem._atbMode[1]) {return false}; + return true; +}; + +//============================== +// * need Update ATB +//============================== +BattleManager.needUpdate_ATB = function() { + if (this._phase === 'action') {return false}; + if (this._phase === 'turn') {return false}; + if (BattleManager.isBusy()) {return false}; + if ($gameTemp._atbInTurn) {return false}; + return true; +}; + +//============================== +// * Update ATB +//============================== +BattleManager.update_ATB = function() { + if (this.actor()) {this.updateCheckActorPar(this.actor())}; + this.allBattleMembers().forEach(function(battler) { + if (battler.canMoveAtb() && !battler.isDead()) {this.updateBattlers_ATB(battler)}; + }, this); +}; + +//============================== +// * need Force Clear Command +//============================== +BattleManager.needForceClearCommand = function(battler) { + if (!battler) {return true}; + if (battler.restriction() > 0) {return true}; + if (battler._intTurn) {return true}; + if (!battler.isMaxAtb()) {return true}; + if (!battler.currentAction()) {return true}; + if (battler.isCasting()) {return true}; + return false; +}; + +//============================== +// * Update Check Actor Par +//============================== +BattleManager.updateCheckActorPar = function(battler) { + if (this.needForceClearCommand(battler)) { + if (battler) { + battler._intTurn = false + battler._atbItem = null; + battler.clearActions() + battler.clearCast(); + }; + this.selectionComAtbClear(); + }; +}; + +//============================== +// * Update Battlers ATB +//============================== +BattleManager.updateBattlers_ATB = function(battler) { + if (battler._wait_atb > 0) {battler._wait_atb--}; + if (battler.canFillATB()) {this.updateFill_ATB(battler)}; + this.updateStateBuffTurn_ATB(battler); +}; + +//============================== +// * Update State Buff Turn_ATB +//============================== +BattleManager.updateStateBuffTurn_ATB = function(battler) { + battler.updateStateTurns_ATB(); + battler.updateBuffTurns_ATB(); +}; + +//============================== +// * update par Correction +//============================== +BattleManager.updateParCorretionBattler_ATB = function(battler) { + battler._intTurn = false; + battler._atbItem = null; +}; + +//============================== +// * update Fill ATB +//============================== +BattleManager.updateFill_ATB = function(battler) { + if (!battler.isMaxAtb()) { + battler.updateCountAtb(); + this.updateParCorretionBattler_ATB(battler) + if (battler.isMaxAtb()) {this.executeATBFullEffect(battler)}; + } else { + this.updateBattlerFull_ATB(battler); + }; +}; + +//============================== +// * executeATBFullEffect +//============================== +BattleManager.executeATBFullEffect = function(battler) { + if (battler._atb > battler._max_atb) {battler._atb = battler._max_atb}; + if (battler.isActor()) {SoundManager.playSoundMX2(Moghunter.atb_FullSE)}; + battler.removeGuardState(); +}; + +//============================== +// * update Battler Full ATB +//============================== +BattleManager.updateBattlerFull_ATB = function(battler) { + if (!this._atbBattler) { + if (battler.isCasting(battler)) { + this.updateATBCast_ATB(battler); + } else { + this.prepareNextSubject_ATB(battler); + }; + }; +}; + +//============================== +// * update Battler Full ATB +//============================== +BattleManager.updateATBCast_ATB = function(battler) { + battler._cast_atb[1]++; + if (battler._cast_atb[1] >= battler._cast_atb[2]) {this.prepareNextSubjectCast_ATB(battler);}; +}; + +//============================== +// * update Escape +//============================== +BattleManager.canEscape_ATB = function(active) { + if (!active) {return false}; + if (!this._canEscape) {return false}; + if (!Input.isPressed(Moghunter.atb_EscapeButton)) {return false}; + return true; +}; + +//============================== +// * update Escape ATB +//============================== +BattleManager.updateEscape_ATB = function(active) { + if ($gameTemp._atbEscape[2]) {return}; + if (this.canEscape_ATB(active)) { + $gameTemp._atbEscape[0]++; + if ($gameTemp._atbEscape[0] >= $gameTemp._atbEscape[1]) { + $gameTemp._atbEscape[2] = true; + $gameTemp._atbEscape[0] = $gameTemp._atbEscape[1]; + this.executeEscape_ATB(); + }; + } else { + if ($gameTemp._atbEscape[0] > 0) { + $gameTemp._atbEscape[0] -= 2; + if ($gameTemp._atbEscape <= 0) { + $gameTemp._atbEscape[0] = 0; + }; + }; + }; +}; + +//============================== +// * execute Escape ATB +//============================== +BattleManager.executeEscape_ATB = function() { + this._escapeRatio = 100; + this.processEscape(); + $gameTemp._battleEnd = true; + $gameTemp._atbBattleEnd = true; + this.selectionComAtbClear(); + this._escaped = true; + this.clearATBValueParty(); +}; + +//============================== +// * prepare Next Subject Cast +//============================== +BattleManager.prepareNextSubjectCast_ATB = function(battler) { + var item = battler._cast_atb[0]; + if (battler.canUse(item)) { + this._atbBattler = battler; + this._atbBattler._atbItem = item; + } else { + battler.clearATB(); + }; +}; + +//============================== +// * prepare Next Subject ATB +//============================== +BattleManager.prepareNextSubject_ATB = function(battler) { + if (battler.isEnemy()) { + this.prepareActionEnemy(battler); + } else { + if (battler.isConfused()) { + this.prepareConfusionActionActor(battler); + } else if (this.needPrepareSelection(battler)) { + this.prepareCommandSelection(battler); + } else {; + if (battler._atbItem) { + this._atbBattler = battler; + battler._intTurn = true; + }; + }; + }; +}; + +//============================== +// * prepare Confusion Action +//============================== +BattleManager.prepareConfusionActionActor = function(battler) { + battler.clearActions() + battler.makeActions(); + var action = battler.currentAction(); + if (action && action.item() && battler.canUse(action.item())) { + battler._atbItem = action.item() + this._atbBattler = battler; + } else { + battler.clearATB(); + }; +}; + +//============================== +// * need Prepare Action Actor +//============================== +BattleManager.needPrepareActionActor = function(action) { + if (!action) {return false}; + if (!this._atbBattlerInput) {return false}; + if (!this._atbBattlerInput[0]) {return false}; + if (!this._atbBattlerInput[0].currentAction()) {return false}; + if (!this._atbBattlerInput[0].currentAction().item()) {return false}; + return true; +}; + +//============================== +// * selection Com Atb Cler +//============================== +BattleManager.selectionComAtbClear = function() { + var action = BattleManager.inputtingAction(); + var actor = this.actor(); + var active = false + if (this.needPrepareActionActor(action)) { + this.prepareActionActor(this._atbBattlerInput[0]); + active = true; + }; + this._atbBattlerInput = [null,false]; + this._actorIndex = -1; + if (actor) { + if (!this._atbBattler && active && !actor.isCasting()) { + this.updateBattlerFull_ATB(actor) + } else { + actor.setActionState('done'); + }; + }; +}; + +//******************************* +// * start Input *(Overwritten)* +//******************************* +BattleManager.startInput = function() { + if (!this._atbBattler) {return}; + this._atbBattler._intTurn = true; + this.startTurn(); +}; + +//============================== +// * needPrepare Action Actor +//============================== +BattleManager.prepareActionActor = function(battler) { + var action = battler.currentAction(); + if (action && action.item() && battler.canUse(action.item())) { + var castTime = Math.abs(action.item().speed); + if (castTime > 0 && battler.guardSkillId() != action.item().id) { + battler._cast_atb = [action.item(),0,castTime]; + } else { + battler._atbItem = action.item(); + }; + } else { + battler.clearATB(); + }; +}; + +//============================== +// * prepare Action Enemy +//============================== +BattleManager.prepareActionEnemy = function(battler) { + battler.makeActions(); + var action = battler.currentAction(); + if (action && action.item() && battler.canUse(action.item())) { + battler._atbItem = action.item(); + var castTime = Math.abs(action.item().speed) + if (castTime > 0 && battler.guardSkillId() != action.item().id) { + battler._cast_atb = [action.item(),0,castTime]; + } else { + this._atbBattler = battler; + }; + } else { + battler.clearATB(); + }; +}; + +//============================== +// * end Action +//============================== +var _mog_atb_bMngr_endAction = BattleManager.endAction; +BattleManager.endAction = function() { + _mog_atb_bMngr_endAction.call(this); + if (this._subject) { + this._subject.clearATB(); + this._subject._wait_atb = 5; + }; + $gameTemp._atbInTurn = false; +}; + +//******************************* +// * updateTurnEnd (Overwritten)* +//******************************* +BattleManager.updateTurnEnd = function() { + this._atbBattler = null; + this._phase = 'start' + $gameTemp._atbInTurn = false; +}; + +//******************************* +// * get Next Subject *(Overwritten)* +//******************************* +BattleManager.getNextSubject = function() { + for (;;) { + var battler = this._actionBattlers.shift(); + if (!battler) { + return null; + } + if (battler.isBattleMember() && battler.isAlive() && battler._intTurn) { + return battler; + }; + }; +}; + +//******************************* +// * is Inputting *(Overwritten)* +//******************************* +BattleManager.isInputting = function() { + return this._atbBattlerInput[0]; +}; + +//============================== +// * gget Available Actors +//============================== +BattleManager.getAvailableActors = function(index,value) { + var battler = null + if (value > 0) { + for (var i = index; i < $gameParty.battleMembers().length; i++) { + var actor = $gameParty.battleMembers()[i]; + if (actor && actor.canInput() && this.actor() != actor) { + battler = actor; + break; + }; + }; + } else if (value < 0) { + for (var i = index; i >= 0; i--) { + var actor = $gameParty.battleMembers()[i]; + if (actor && actor.canInput() && this.actor() != actor) { + battler = actor; + break; + }; + }; + }; + return battler; +}; + +//============================== +// * change Actor Button +//============================== +BattleManager.changeActorButton_ATB = function(value) { + var currentActor = this.actor(); + var battler = null; + var index = this._actorIndex; + var maxBatMembers = $gameParty.battleMembers().length + index += value; + if (index >= maxBatMembers) { + index = 0; + } else if (index < 0) { + index = maxBatMembers - 1; + }; + if (value > 0) { + battler = this.getAvailableActors(index,value); + if (!battler) { + battler = this.getAvailableActors(0,value); + }; + } else if (value < 0) { + battler = this.getAvailableActors(index,value); + if (!battler) { + battler = this.getAvailableActors(maxBatMembers - 1,value); + }; + }; + if (battler) { + currentActor.clearActions() + SoundManager.playCursor(); + this.selectionComAtbClear() + this.prepareCommandSelection(battler); + currentActor.setActionState('undecided') + }; +}; + +//============================== +// * prepare Command Selection +//============================== +BattleManager.setActorIndexATB = function(battler) { + for (var i = 0; i < $gameParty.members().length; i++) { + var actor = $gameParty.members()[i]; + if (battler === actor) {return i}; + }; + return -1; +}; + +//============================== +// * prepare Command Selection +//============================== +BattleManager.prepareCommandSelection = function(battler) { + battler.clearActions() + this._atbBattlerInput = [battler,false]; + this._actorIndex = this.setActorIndexATB(battler); + battler.makeActions(); + battler._atbItem = null; + battler.setActionState('inputting'); +}; + +//============================== +// * need Prepare Selection +//============================== +BattleManager.needPrepareSelection = function(battler) { + if (this._atbBattlerInput[0]) {return false}; + if (!battler.canInput()) {return false}; + if (battler._atbItem) {return false}; + if (battler._intTurn) {return false}; + return true +}; + +//============================== +// * end Battle +//============================== +var _mog_atb_btmngr_endBattle = BattleManager.endBattle; +BattleManager.endBattle = function(result) { + $gameTemp._atbForceHideWindows = true; + this.clearATBValueParty(); + _mog_atb_btmngr_endBattle.call(this,result); +}; + +//============================== +// * can Use Item ATB +//============================== +BattleManager.canUseItemATB = function() { + if (!this._atbBattler._atbItem) {return false}; + if (!this._atbBattler.canUse(this._atbBattler._atbItem)) {return false}; + return true; +}; + +//******************************* +// * start Turn *(Overwritten)* +//******************************* +BattleManager.startTurn = function() { + $gameTemp._atbInTurn = false; + if (!this._atbBattler) {return}; + if (!this.canUseItemATB()) { + this._atbBattler.clearATB(); + this._atbBattler = null; + this._phase = 'start' + return; + }; + this._phase = 'turn'; + $gameTemp._atbInTurn = true; + this._actionBattlers = [this._atbBattler] + if (this._atbBattler.isActor()) {this._atbBattler.requestMotionRefresh()}; + this._atbBattler.requestMotionRefresh() + this._logWindow.startTurn(); +}; + +//============================== +// * can Event Turn ATB +//============================== +BattleManager.canUpdateEventTurnATB = function() { + if ($gameSystem._atbEventPhase[3]) {return false}; + return true; +}; + +//============================== +// * Update Event Turn ATB +//============================== +BattleManager.updateEventTurnATB = function() { + $gameSystem._atbEventPhase[0]++; + if ($gameSystem._atbEventPhase[0] >= $gameSystem._atbEventPhase[1]) { + $gameSystem._atbEventPhase[0] = 0; + this.refreshEventPhase_ATB() + }; +}; + +//============================== +// * can Event Phase +//============================== +BattleManager.canUpdateEventPhase = function() { + if ($gameTemp._battleEnd) {return false}; + return $gameSystem._atbEventPhase[3]; +}; + +//============================== +// * Update Event Phase +//============================== +BattleManager.updateEventPhase = function() { + var active = $gameSystem._atbEventPhase[3]; + if (this.isActionForced()) { + this.processForcedAction(); + $gameSystem._atbEventPhase[3] = true; + } else { + $gameSystem._atbEventPhase[3] = this.updateEventMain(); + }; + if (active != $gameSystem._atbEventPhase[3]) { + $gameTemp._atbWinData[1] = true; + $gameTemp._atbWaitTemp[0] = 10; + }; +}; + +//============================== +// * refresh Event Phase ATB +//============================== +BattleManager.refreshEventPhase_ATB = function() { + $gameTroop.increaseTurn(); + $gameSystem._atbEventPhase[3] = this.updateEventMain(); + $gameTemp._atbWinData[0] = $gameSystem._atbEventPhase[3]; +}; + +//============================== +// * display Start Messages +//============================== +var _mog_atb_BatMngr_displayStartMessages = BattleManager.displayStartMessages; +BattleManager.displayStartMessages = function() { + if (String(Moghunter.atb_SkipEmerge) == 'true') {return}; + _mog_atb_BatMngr_displayStartMessages.call(this); +}; + +//============================== +// * processVictory +//============================== +var _mog_atbSprt_processVictory = BattleManager.processVictory; +BattleManager.processVictory = function() { + $gameTemp._battleEnd = true; + _mog_atbSprt_processVictory.call(this); +}; + +//============================== +// * processAbort +//============================== +var _mog_atbSprt_processAbort = BattleManager.processAbort; +BattleManager.processAbort = function() { + $gameTemp._battleEnd = true; + _mog_atbSprt_processAbort.call(this); +}; + +//============================== +// * processDefeat +//============================== +var _mog_atbSprt_processDefeat = BattleManager.processDefeat; +BattleManager.processDefeat = function() { + $gameTemp._battleEnd = true; + _mog_atbSprt_processDefeat.call(this); +}; + +//============================================================================= +//============================================================================= +// ** Scene Battle +//============================================================================= +//============================================================================= + +//============================== +// * Start +//============================== +var _mog_atb_sBat_start = Scene_Battle.prototype.start; +Scene_Battle.prototype.start = function() { + _mog_atb_sBat_start.call(this); + BattleManager.prepareInitialATBValue(); + $gameSystem._atbEventPhase[3] = BattleManager.updateEventMain(); +}; + +//******************************* +// * Update Battle Process *(Overwritten)* +//******************************* +Scene_Battle.prototype.updateBattleProcess = function() { + if (Imported.MOG_EmergeMotion && $gameTemp.needSkipBattleProcessEM()) { + $gameTemp._emerging[1]--; + if ($gameTemp._emergingInt > 0) {$gameTemp._emergingInt--}; + return; + }; + this.updateCommandsATB(); + if (!BattleManager.isAborting() || BattleManager.isBattleEnd()) { + if (BattleManager.canUpdateEventPhase()) {BattleManager.updateEventPhase()}; + if (BattleManager.needUpdate_ATBBasic()) { + if (BattleManager.canUpdateEventTurnATB()) {BattleManager.updateEventTurnATB()}; + BattleManager.update_ATB(); + if ($gameSystem._atbMode[0] > 0 && !$gameTemp._atbInTurn) { + BattleManager.updateEscape_ATB(this._actorCommandWindow.active); + }; + + }; + if ($gameSystem._atbMode[0] === 0) { + BattleManager.updateEscape_ATB(this._actorCommandWindow.active); + }; + BattleManager.update(); + if (this.canStartCommandSelection()) { + BattleManager._atbBattlerInput[1] = true + this.changeInputWindow() + }; + }; + if (Imported.MOG_BalloonActionName) {this.updateBalloonName()}; +}; + +//============================== +// * update +//============================== +var _mog_atb_sBat_update = Scene_Battle.prototype.update; +Scene_Battle.prototype.update = function() { + _mog_atb_sBat_update.call(this); + this.updateAtbScBat(); +}; + +//============================== +// * update Atb Sc Bat +//============================== +Scene_Battle.prototype.updateAtbScBat = function() { + if ($gameTemp._atbForceHideWindows) {this.forceHideWindows()}; + if ($gameTemp._atbWinData[0]) {this.forceHideWindowsTemp()}; + if ($gameTemp._atbWinData[1]) {this.loadWindowAtbData()}; + if ($gameTemp._atbneedRefWind) {this.forceRefreshWindowATB()}; + if ($gameTemp._atbWaitTemp[0] > 0) {$gameTemp._atbWaitTemp[0]--}; + if ($gameTemp._atbWaitTemp[1] > 0) {$gameTemp._atbWaitTemp[1]--}; + $gameSystem._atbMode[1] = !this.canUpdateAtbMode(); + if (this._actorCommandWindow.isClosed() && this._actorCommandWindow.active && BattleManager.actor()) { + this._actorCommandWindow.open(); + }; +}; + +//============================== +// * force Refresh WindowATB +//============================== +Scene_Battle.prototype.forceRefreshWindowATB = function() { + $gameTemp._atbneedRefWind = false; + if (this._enemyWindow.active) { + if (this._enemyWindow.enemy().isDead()) { + this._enemyWindow.refresh() + this._enemyWindow.select(0); + if (!this._enemyWindow.enemy()) { + this.onEnemyCancel(); + }; + }; + }; +}; + +//============================== +// * can Update Atb Mode +//============================== +Scene_Battle.prototype.canUpdateAtbMode = function() { + if ($gameSystem._atbMode[0] === 0) { + if (this._partyCommandWindow.active) {return false}; + if (this._actorCommandWindow.active) {return false}; + if (this._actorWindow.active) {return false}; + if (this._enemyWindow.active) {return false}; + if (this._skillWindow.active) {return false}; + if (this._itemWindow.active) {return false}; + } else if ($gameSystem._atbMode[0] === 1) { + if (this._actorWindow.active) {return false}; + if (this._enemyWindow.active) {return false}; + if (this._skillWindow.active) {return false}; + if (this._itemWindow.active) {return false}; + } else if ($gameSystem._atbMode[0] === 2) { + if (this._skillWindow.active) {return false}; + if (this._itemWindow.active) {return false}; + }; + return true; +}; + +//============================== +// * forceHideWindowsTemp +//============================== +Scene_Battle.prototype.forceHideWindowsTemp = function() { + $gameTemp._atbWinData[0] = false; + this.saveWindowAtbData(); + this.disableAllWindowATB(); +}; + +//============================== +// * create Display Objects +//============================== +var _mog_atb_sBat_createDisplayObjects = Scene_Battle.prototype.createDisplayObjects; +Scene_Battle.prototype.createDisplayObjects = function() { + _mog_atb_sBat_createDisplayObjects.call(this); + this.saveWindowAtbData(); +}; + +//============================== +// * load Window Atb Data +//============================== +Scene_Battle.prototype.disableAllWindowATB = function() { + this._partyCommandWindow.visible = false; + this._partyCommandWindow.active = false; + this._actorCommandWindow.visible = false; + this._actorCommandWindow.active = false; + this._actorWindow.visible = false; + this._actorWindow.active = false; + this._enemyWindow.visible = false; + this._enemyWindow.active = false; + this._skillWindow.visible = false; + this._skillWindow.active = false; + this._itemWindow.visible = false; + this._itemWindow.active = false; +}; + +//============================== +// * save Window Atb Data +//============================== +Scene_Battle.prototype.saveWindowAtbData = function() { + $gameTemp._atbWinData[0] = false; + this._partyCommandWindowData = {}; + this._partyCommandWindowData.visible = this._partyCommandWindow.visible; + this._partyCommandWindowData.active = this._partyCommandWindow.active; + + this._actorCommandWindowData = {}; + this._actorCommandWindowData.visible = this._actorCommandWindow.visible; + this._actorCommandWindowData.active = this._actorCommandWindow.active; + + this._actorWindowData = {}; + this._actorWindowData.visible = this._actorWindow.visible; + this._actorWindowData.active = this._actorWindow.active; + + this._enemyWindowData = {}; + this._enemyWindowData.visible = this._enemyWindow.visible; + this._enemyWindowData.active = this._enemyWindow.active; + + this._skillWindowData = {}; + this._skillWindowData.visible = this._skillWindow.visible; + this._skillWindowData.active = this._skillWindow.active; + + this._itemWindowData = {}; + this._itemWindowData.visible = this._itemWindow.visible; + this._itemWindowData.active = this._itemWindow.active; +}; + +//============================== +// * load Window Atb Data +//============================== +Scene_Battle.prototype.loadWindowAtbData = function() { + $gameTemp._atbWinData[1] = false; + if (!this._actorWindowData) {return}; + this._partyCommandWindow.visible = this._partyCommandWindowData.visible; + this._partyCommandWindow.active = this._partyCommandWindowData.active; + + this._actorCommandWindow.visible = this._actorCommandWindowData.visible; + this._actorCommandWindow.active = this._actorCommandWindowData.active; + if (this._actorCommandWindow.active) { + this._actorCommandWindow.open(); + }; + this._actorWindow.visible = this._actorWindowData.visible; + this._actorWindow.active = this._actorWindowData.active; + + this._enemyWindow.visible = this._enemyWindowData.visible; + this._enemyWindow.active = this._enemyWindowData.active; + + this._skillWindow.visible = this._skillWindowData.visible; + this._skillWindow.active = this._skillWindowData.active; + + this._itemWindow.visible = this._itemWindowData.visible; + this._itemWindow.active = this._itemWindowData.active; +}; + +//============================== +// * force Hide Windows +//============================== +Scene_Battle.prototype.forceHideWindows = function() { + $gameTemp._atbForceHideWindows = false; + this._partyCommandWindow.close(); + this._partyCommandWindow.active = false; + this._actorCommandWindow.close(); + this._actorCommandWindow.active = false; + this._actorWindow.hide(); + this._actorWindow.active = false; + this._enemyWindow.hide(); + + this._enemyWindow.active = false; + this._skillWindow.hide(); + this._skillWindow.active = false; + this._itemWindow.hide(); + this._itemWindow.active = false; +}; + +//============================== + +// * can Start Command Selection +//============================== +Scene_Battle.prototype.canStartCommandSelection = function() { + if (!BattleManager._atbBattlerInput[0]) {return false}; + if (BattleManager._atbBattlerInput[1]) {return false}; + return true; +}; + +//============================== +// * update Commands ATB +//============================== +Scene_Battle.prototype.updateCommandsATB = function() { + if (this._actorCommandWindow.active) { + if (Input.isTriggered(Moghunter.atb_NextActorLeft)) { + BattleManager.changeActorButton_ATB(1); + } else if (Input.isTriggered(Moghunter.atb_NextActorRight)) { + BattleManager.changeActorButton_ATB(-1); + }; + }; +}; + +//******************************* +// * Select Next Command *(Overwritten)* +//******************************* +Scene_Battle.prototype.selectNextCommand = function() { + BattleManager.selectionComAtbClear(); + this.endCommandSelection(); +}; + +//============================== +// * create Actor Command Window +//============================== +var _mog_atb_createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow; +Scene_Battle.prototype.createActorCommandWindow = function() { + _mog_atb_createActorCommandWindow.call(this) + this._actorCommandWindow.setHandler('cancel', null); +}; + +//============================================================================= +//============================================================================= +// ** SPRITES +//============================================================================= +//============================================================================= + + +//============================== +// * load ATB Icon +//============================== +ImageManager.loadATBIcon = function(filename) { + return this.loadBitmap('img/atb/', filename, 0, true); +}; + +//============================================================================= +// ** Window Battle Actor +//============================================================================= + +//============================== +// * Update +//============================== +var _mog_atb_wBatActor_update = Window_BattleActor.prototype.update; +Window_BattleActor.prototype.update = function() { + if (!BattleManager.actor()) {return}; + _mog_atb_wBatActor_update.call(this); +}; + +//============================================================================= +// ** Window Battle Enemy +//============================================================================= + +//============================== +// * Update +//============================== +var _mog_atb_wBatEnemy_update = Window_BattleEnemy.prototype.update; +Window_BattleEnemy.prototype.update = function() { + if (!BattleManager.actor()) {return}; + _mog_atb_wBatEnemy_update.call(this); +}; + +//============================================================================= +// ** Window Actor Command +//============================================================================= + +//============================== +// * Update +//============================== +var _mog_atb_wActCom_processOk = Window_ActorCommand.prototype.processOk; +Window_ActorCommand.prototype.processOk = function() { + if (!BattleManager.actor()) {return}; + if ($gameTroop.isAllDead()) {return}; + _mog_atb_wActCom_processOk.call(this); +}; + +//******************************* +// * cursor Page Down *(Overwritten)* +//******************************* +Window_ActorCommand.prototype.cursorPagedown = function() { +}; + +//******************************* +// * cursor Page UP *(Overwritten)* +//******************************* +Window_ActorCommand.prototype.cursorPageup = function() { +}; + +//============================================================================= +// ** Sprite Actor +//============================================================================= + +//============================== +// * is Moving +//============================== +Sprite_Actor.prototype.isMoving = function() { + if (this._actor && !this._actor._intTurn) {return false}; + return this._movementDuration > 0; +}; + +//============================================================================= +// ** Scene Base +//============================================================================= + +//============================== +// ** create Hud Field +//============================== +Scene_Base.prototype.createHudField = function() { + this._hudField = new Sprite(); + this._hudField.z = 10; + this.addChild(this._hudField); +}; + +//============================== +// ** sort MZ +//============================== +Scene_Base.prototype.sortMz = function() { + this._hudField.children.sort(function(a, b){return a.mz-b.mz}); +}; + + +//============================== +// * Create Escape Gauge ATB +//============================== +Scene_Base.prototype.createEscapeGaugeATB = function() { + this._escapeGaugeATB = new EscapeGaugeATB(); + this._escapeGaugeATB.mz = 140; + this._hudField.addChild(this._escapeGaugeATB); +}; + +//============================================================================= +// ** Scene Battle +//============================================================================= + +//============================== +// ** create Spriteset +//============================== +var _mog_atbEscapeGauge_sbattle_createSpriteset = Scene_Battle.prototype.createSpriteset; +Scene_Battle.prototype.createSpriteset = function() { + _mog_atbEscapeGauge_sbattle_createSpriteset.call(this); + if (!this._hudField) {this.createHudField()}; + this.createEscapeGaugeATB(); + this.sortMz(); +}; + +//============================================================================= +// ** EscapeGaugeATB +//============================================================================= +function EscapeGaugeATB() { + this.initialize.apply(this, arguments); +} + +EscapeGaugeATB.prototype = Object.create(Sprite.prototype); +EscapeGaugeATB.prototype.constructor = EscapeGaugeATB; + +//============================== +// * Initialize +//============================== +EscapeGaugeATB.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this.setup(); + this.createSprites(); +}; + +//============================== +// * Setup +//============================== +EscapeGaugeATB.prototype.setup = function() { + this.opacity = 0; + this.x = Moghunter.atb_EscapeGaugeX; + this.y = Moghunter.atb_EscapeGaugeY; +}; + +//============================== +// * create Sprites +//============================== +EscapeGaugeATB.prototype.createSprites = function() { + this.createLayout(); + this.createGauge(); +}; + +//============================== +// * create Layout +//============================== +EscapeGaugeATB.prototype.createLayout = function() { + this._layout = new Sprite(ImageManager.loadATBIcon("Escape_A")); + this.addChild(this._layout); +}; + +//============================== +// * create Gauge +//============================== +EscapeGaugeATB.prototype.createGauge = function() { + this._gauge = new Sprite(ImageManager.loadATBIcon("Escape_B")); + this._gauge.x = Moghunter.atb_EscapeGaugeX2; + this._gauge.y = Moghunter.atb_EscapeGaugeY2; + this.addChild(this._gauge); +}; + +//============================== +// * Update Gauge +//============================== +EscapeGaugeATB.prototype.updateGauge = function() { + var cw = this._gauge.bitmap.width; + var ch = this._gauge.height; + var rg = cw * $gameTemp._atbEscape[0] / $gameTemp._atbEscape[1]; + this._gauge.setFrame(0,0,rg,ch); +}; + +//============================== +// * need Fade +//============================== +EscapeGaugeATB.prototype.needFade = function() { + if ($gameTemp._atbEscape[0] <= 0) {return true}; + if ($gameMessage.isBusy()) {return true}; + if ($gameTemp._battleEnd) {return true}; + return false; +}; + +//============================== +// * Update Visible +//============================== +EscapeGaugeATB.prototype.updateVisible = function() { + if (this.needFade()) { + this.opacity -= 10; + } else { + this.opacity += 10; + }; +}; + +//============================== +// * Update +//============================== +EscapeGaugeATB.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateVisible(); + this.updateGauge(); +}; + diff --git a/js/plugins/MOG_ATB_Gauge.js b/js/plugins/MOG_ATB_Gauge.js new file mode 100644 index 0000000..3eb1660 --- /dev/null +++ b/js/plugins/MOG_ATB_Gauge.js @@ -0,0 +1,491 @@ +//============================================================================= +// MOG_ATB_Gauge.js +//============================================================================= + +/*: + * @plugindesc (v1.0) Apresenta a Hud de ATB para MOG_ATB. + * @author Moghunter + * + * @param Hud Angle + * @desc Definição do ângulo da hud. + * @default 0 + * + * @param Hud X-Axis + * @desc Definição X-Axis da hud. + * @default 740 + * + * @param Hud Y-Axis + * @desc Definição Y-Axis da hud. + * @default 45 + * + * @param Enemy X-Axis Offset + * @desc Definição X-Axis offset do ícone dos inimigos. + * @default 16 + * + * @param Actor X-Axis Offset + * @desc Definição X-Axis offset do ícone dos aliados. + * @default -16 + * + * @param Active X-Axis + * @desc Definição X-Axis quando o battler está em turno. + * @default -3 + * + * @param Active Y-Axis + * @desc Definição Y-Axis quando o battler está em turno. + * @default 30 + * + * @param Gauge Size + * @desc Definição do tamanho do medidor. + * @default 160 + * + * @param Skill Visible + * @desc Apresentar o Ícone de habilidade. + * @default true + * + * @param Skill Zoom + * @desc Definição do zoom do ícone de habilidade. + * @default 0.6 + * + * @param Skill X-Axis + * @desc Definição X-Axis do ícone de habilidade. + * @default 0 + * + * @param Skill Y-Axis + * @desc Definição Y-Axis do ícone de habilidade. + * @default 0 + * + * @help + * ============================================================================= + * +++ MOG - ATB Gauge (v1.0) +++ + * By Moghunter + * https://mogplugins.wordpress.com + * ============================================================================= + * Apresenta a Hud de ATB para MOG_ATB. + * + * ============================================================================= + * IMAGES + * ============================================================================= + * As imagens deverão ser gravadas na pasta (img/atb/) + * Para nomear o ícones dos battlers, nomeie da seguinte forma. + * + * Actor_ + ACTOR_ID.png + * Enemy_ + ACTOR_ID.png + * + * Ex + * + * Actor_1.png + * Actor_2.png + * ... + * Enemy_1.png + * Enemy_2.png + * ... + */ + +//============================================================================= +// ** PLUGIN PARAMETERS +//============================================================================= +  var Imported = Imported || {}; +  Imported.MOG_ATB_Gauge = true; +  var Moghunter = Moghunter || {}; + + Moghunter.parameters = PluginManager.parameters('MOG_ATB_Gauge'); + Moghunter.atbIconAngle = Number(Moghunter.parameters['Hud Angle'] || 0); + Moghunter.atbIcon_GaugeX = Number(Moghunter.parameters['Hud X-Axis'] || 740); + Moghunter.atbIcon_GaugeY = Number(Moghunter.parameters['Hud Y-Axis'] || 45); + Moghunter.atbIcon_enemyX = Number(Moghunter.parameters['Enemy X-Axis Offset'] || 16); + Moghunter.atbIcon_actorX = Number(Moghunter.parameters['Actor X-Axis Offset'] || -16); + Moghunter.atbIcon_inTurnX = Number(Moghunter.parameters['Active X-Axis'] || -3); + Moghunter.atbIcon_inTurnY = Number(Moghunter.parameters['Active Y-Axis'] || 30); + Moghunter.atbIcon_GaugeSize = Number(Moghunter.parameters['Gauge Size'] || 160); + Moghunter.atbIcon_SkillVisible = String(Moghunter.parameters['Skill Visible'] || 'true'); + Moghunter.atbIcon_SkillScale = Number(Moghunter.parameters['Skill Zoom'] || 0.6); + Moghunter.atbIcon_SkillX = Number(Moghunter.parameters['Skill X-Axis'] || 0); + Moghunter.atbIcon_SkillY = Number(Moghunter.parameters['Skill Y-Axis'] || 0); + + +//============================== +// * load ATB Icon +//============================== +ImageManager.loadATBIcon = function(filename) { + return this.loadBitmap('img/atb/', filename, 0, true); +}; + +//============================================================================= +// ** Game Temp +//============================================================================= + +//============================== +// * Initialize +//============================== +var _mog_atb_gTemp_initialize = Game_Temp.prototype.initialize +Game_Temp.prototype.initialize = function() { + _mog_atb_gTemp_initialize.call(this); + this._refreshATBGauge = false;; +}; + +//============================================================================= +// ** Scene Base +//============================================================================= + +//============================== +// ** create Hud Field +//============================== +Scene_Base.prototype.createHudField = function() { + this._hudField = new Sprite(); + this._hudField.z = 10; + this.addChild(this._hudField); +}; + +//============================== +// ** sort MZ +//============================== +Scene_Base.prototype.sortMz = function() { + this._hudField.children.sort(function(a, b){return a.mz-b.mz}); +}; + +//============================================================================= +// ** Scene Battle +//============================================================================= + +//============================== +// ** create Spriteset +//============================== +var _mog_atbGauge_sbattle_createSpriteset = Scene_Battle.prototype.createSpriteset; +Scene_Battle.prototype.createSpriteset = function() { + _mog_atbGauge_sbattle_createSpriteset.call(this); + if (!this._hudField) {this.createHudField()}; + this.createATBGauge(); + this.sortMz(); +}; + +//============================== +// ** create ATB Gauge +//============================== +Scene_Battle.prototype.createATBGauge = function() { + this._atbGauge = new ATB_Gauge() + this._atbGauge.mz = 125; + this._hudField.addChild(this._atbGauge); +}; + +//============================== +// ** remove ATB Gauge +//============================== +Scene_Battle.prototype.removeATBGauge = function() { + if (!this._atbGauge) {return}; + this._hudField.removeChild(this._atbGauge); +}; + +//============================== +// ** refresh ATB Gauge +//============================== +Scene_Battle.prototype.refreshATBGauge = function() { + $gameTemp._refreshATBGauge = false; + this.removeATBGauge(); + this.createATBGauge(); +}; + +//============================== +// ** Update +//============================== +var _mog_atbGauge_Sbat_update = Scene_Battle.prototype.update; +Scene_Battle.prototype.update = function() { + _mog_atbGauge_Sbat_update.call(this); + if ($gameTemp._refreshATBGauge) {this.refreshATBGauge()}; +}; + +//============================================================================= +// ** Spriteset Map +//============================================================================= + +//============================================================================= +// ** ATB Icon Gauge +//============================================================================= +function ATB_Gauge() { + this.initialize.apply(this, arguments); +}; + +ATB_Gauge.prototype = Object.create(Sprite.prototype); +ATB_Gauge.prototype.constructor = ATB_Gauge; + +//============================== +// * Initialize +//============================== +ATB_Gauge.prototype.initialize = function() { + Sprite.prototype.initialize.call(this); + this._angle = Moghunter.atbIconAngle * Math.PI / 180; + this.rotation = this._angle; + this._iconImg = ImageManager.loadSystem("IconSet"); + this._skillIcon = String(Moghunter.atbIcon_SkillVisible) == "true" ? true : false; + this.refreshBattlers(); + this.createLayout(); + this.createIcons(); +}; + +//============================== +// * refresh Battlers +//============================== +ATB_Gauge.prototype.refreshBattlers = function() { + this._battlers = []; + for (var i = 0; i < $gameParty.battleMembers().length; i++) { + var battler = $gameParty.battleMembers()[i]; + this._battlers.push(battler); + }; + for (var i = 0; i < $gameTroop.members().length; i++) { + var battler = $gameTroop.members()[i]; + this._battlers.push(battler); + }; +}; + +//============================== +// * battlers +//============================== +ATB_Gauge.prototype.battlers = function() { + if (this._battlers) {return this._battlers}; + return []; +}; + +//============================== +// * At +//============================== +ATB_Gauge.prototype.atb = function(battler) { + if (Imported.MOG_ATB) {return battler.atb()}; + return -1; +} + +//============================== +// * Maxatb +//============================== +ATB_Gauge.prototype.maxatb = function(battler) { + if (Imported.MOG_ATB) {return battler.maxAtb()}; + return 1; +}; + +//============================== +// * Cast AT +//============================== +ATB_Gauge.prototype.cast_at = function(battler) { + if (Imported.MOG_ATB) {return battler._cast_atb[1]}; + return 0; +}; + +//============================== +// * Cast Max AT +//============================== +ATB_Gauge.prototype.cast_max_at = function(battler) { + if (Imported.MOG_ATB) {return battler._cast_atb[2]}; + return 1; +}; + +//============================== +// * Is Casting +//============================== +ATB_Gauge.prototype.is_casting = function(battler) { + if (!battler) {return false}; + if (Imported.MOG_ATB) {return battler.isCasting()}; + return false; +}; + +//============================== +// * Is Max Atb +//============================== +ATB_Gauge.prototype.inTurn = function(battler) { + if (!battler.isMaxAtb()) {return false}; + if (!battler._intTurn) {return false} + return true; +}; + +//============================== +// * Is Max Atb +//============================== +ATB_Gauge.prototype.is_max_at = function(battler) { + return this.atb(battler) >= this.maxatb(battler); +}; + +//============================== +// * Is Max Cast +//============================== +ATB_Gauge.prototype.is_max_cast = function(battler) { + return this.cast_at(battler) >= this.cast_max_at(battler); +}; + +//============================== +// * Item +//============================== +ATB_Gauge.prototype.item = function(battler) { + if (!battler) {return null}; + return battler._cast_atb[0]; + return null +}; + +//============================== +// * Create Layout +//============================== +ATB_Gauge.prototype.createLayout = function() { + this.x = Moghunter.atbIcon_GaugeX; + this.y = Moghunter.atbIcon_GaugeY; + this._layout = new Sprite(ImageManager.loadATBIcon("ATB_Gauge")); + this._layout.anchor.x = 0.5; + this.addChild(this._layout); +}; + +//============================== +// * Create Icons +//============================== +ATB_Gauge.prototype.createIcons = function() { + this._iconField = new Sprite(); + this.addChild(this._iconField); + this._icons = []; + this._skillIcons = []; + for (var i = 0; i < this.battlers().length; i++) { + var battler = this.battlers()[i]; + if (battler.isActor()) { + var name = "Actor_" + String(battler._actorId); + } else { + var name = "Enemy_" + String(battler._enemyId); + }; + this._icons[i] = new Sprite(ImageManager.loadATBIcon(name)); + this._icons[i].battler = battler; + this._icons[i].anchor.x = 0.5; + this._icons[i].anchor.y = 0.5; + this._icons[i].opacity = 0 + this._icons[i].nx = 0; + this._icons[i].ny = 0; + this._icons[i].rotation = -this._angle + this._iconField.addChild(this._icons[i]); + if (this._skillIcon) {this.createSkillIcon(i,this._icons[i])}; + }; +}; + +//============================== +// * Index +//============================== +ATB_Gauge.prototype.createSkillIcon = function(i,sprite) { + this._skillIcons[i] = new Sprite(); + this._skillIcons[i].item = null; + this._skillIcons[i].org = [Moghunter.atbIcon_SkillX,Moghunter.atbIcon_SkillY]; + this._skillIcons[i].scale.x = Moghunter.atbIcon_SkillScale; + this._skillIcons[i].scale.y = Moghunter.atbIcon_SkillScale; + this._skillIcons[i].rotation = this._icons[i].rotation; + sprite.addChild(this._skillIcons[i]); +}; + +//============================== +// * Height EX +//============================== +ATB_Gauge.prototype.heightEX = function(battler,type) { + return 1; +}; + +//============================== +// * update Icon +//============================== +ATB_Gauge.prototype.updateIcon = function(sprite,index) { + var battler = sprite.battler; + if (battler.isDead()) { + sprite.opacity -= 15; + } else { + sprite.opacity += 15; + if (this.is_casting(battler)) { + var h = Moghunter.atbIcon_GaugeSize * this.cast_at(battler) / this.cast_max_at(battler); + var h2 = this.heightEX(battler,1); + } else { + var h = Moghunter.atbIcon_GaugeSize * this.atb(battler) / this.maxatb(battler); + var h2 = this.heightEX(battler,0); + }; + if (this.inTurn(battler)) { + sprite.nx = Moghunter.atbIcon_inTurnX; + sprite.ny = Moghunter.atbIcon_inTurnY; + } else { + sprite.nx = battler.isActor() ? Moghunter.atbIcon_actorX : Moghunter.atbIcon_enemyX; + sprite.ny = this._layout.height - h + h2; + }; + }; + sprite.x = this.mvto(sprite.x,sprite.nx); + sprite.y = this.mvto(sprite.y,sprite.ny); + if (this._skillIcon) {this.updateSkillIcon(this._skillIcons[index],sprite,battler)}; +}; + +//============================== +// * updateSkillIcon +//============================== +ATB_Gauge.prototype.updateSkillIcon = function(spriteskill,spriteicon,battler) { + spriteskill.x = spriteskill.org[0]; + spriteskill.y = spriteskill.org[1]; + spriteskill.opacity = spriteicon.opacity; + spriteskill.visible = spriteicon.visible; + if (spriteskill.item != this.item(battler)) {this.refreshIconSkill(spriteskill,battler)}; +}; + +//============================== +// * refresh Icon Skill +//============================== +ATB_Gauge.prototype.refreshIconSkill = function(spriteskill,battler) { + spriteskill.item = this.item(battler); + if (spriteskill.item) { + var iconIndex = spriteskill.item.iconIndex; + var pw = Window_Base._iconWidth; + var ph = Window_Base._iconHeight; + var sx = iconIndex % 16 * pw; + var sy = Math.floor(iconIndex / 16) * ph; + spriteskill.bitmap = this._iconImg; + spriteskill.setFrame(sx, sy, pw, ph); + } else { + spriteskill.bitmap = null; + }; + spriteskill.visible = spriteskill.item != null ? true : false; +}; + +//============================== +// * mv to +//============================== +ATB_Gauge.prototype.mvto = function(value,real_value) { + if (value == real_value) {return value}; + var dnspeed = 5 + (Math.abs(value - real_value) / 10); + if (value > real_value) {value -= dnspeed; + if (value < real_value) {value = real_value};} + else if (value < real_value) {value += dnspeed; + if (value > real_value) {value = real_value}; + }; + return Math.floor(value); +}; + +//============================== +// * need Fade +//============================== +ATB_Gauge.prototype.needFade = function() { + if ($gameMessage.isBusy()) {return true}; + if ($gameTemp._battleEnd) {return true}; + if ($gameTemp._atbBattleEnd) {return true}; + return false; +}; + +//============================== +// * Update Visible +//============================== +ATB_Gauge.prototype.updateVisible = function() { + if (this.needFade()) { + this.opacity -= 10; + } else { + this.opacity += 10; + }; +}; + + +//============================== +// * update Sort Y +//============================== +ATB_Gauge.prototype.updateSortY = function() { + this._iconField.children.sort(function(b, a){return a.y-b.y}) +}; + +//============================== +// * update +//============================== +ATB_Gauge.prototype.update = function() { + Sprite.prototype.update.call(this); + this.updateVisible(); + this.updateSortY(); + for (var i = 0; i < this._icons.length; i++) { + this.updateIcon(this._icons[i],i); + }; +}; \ No newline at end of file diff --git a/js/plugins/MOG_ActorHud.js b/js/plugins/MOG_ActorHud.js new file mode 100644 index 0000000..9d1745c --- /dev/null +++ b/js/plugins/MOG_ActorHud.js @@ -0,0 +1,2418 @@ +//============================================================================= +// MOG_ActorHud.js (Template - 01) +//============================================================================= + +/*: + * @plugindesc (v2.0 *) Adiciona uma Hud com os parâmetros do personagem. + * @author Moghunter + * + * @param -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Initial Visible + * @desc Ativar a Hud no inicio do jogo. + * @default true + * @type boolean + * @on Visible From Start + * @off Hide + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud X-Axis + * @desc Definição da posição X-Axis da Hud. + * @default 0 + * @type number + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud Y-Axis + * @desc Definição da posição Y-Axis da Hud. + * @default 440 + * @type number + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Smart Fade + * @desc Ativa transparência na hud quando a hud estiver acima do personagem. + * @default true + * @type boolean + * @on Overlapping Character + * @off Always Visible + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Auto Fade + * @desc Oculta na hud quando a janela de messagem estiver ativada. + * @default true + * @type boolean + * @on Window Message + * @off Always Visible + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Layout Overlay Visible + * @desc Apresentar o segundo layout acima dos medidores e face. + * @default false + * @type boolean + * @on Show + * @off Hide + * @parent -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Overlay X-Axis + * @desc Definição da posição X-Axis da face. + * @default 0 + * @type number + * @parent -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Overlay Y-Axis + * @desc Definição da posição Y-Axis da face. + * @default 0 + * @type number + * @parent -> LAYOUT 2 <<<<<<<<<<<<<<<<<<<<<<< + * + * + * @param + * + * @param -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Face Visible + * @desc Apresentar a imagem da face. + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face X-Axis + * @desc Definição da posição X-Axis da face. + * @default 55 + * @type number + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Y-Axis + * @desc Definição da posição Y-Axis da face. + * @default 100 + * @type number + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Priority + * @desc Prioridade da Face. (0 Low - 1 High) + * @default 1 + * @type select + * @option (0) Below the Layout + * @value 0 + * @option (1) Above the Layout + * @value 1 + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Name Visible + * @desc Apresentar o nome do personagem. + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name X-Axis + * @desc Definição da posição X-Axis do nome. + * @default 5 + * @type number + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Y-Axis + * @desc Definição da posição Y-Axis do nome. + * @default 20 + * @type number + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Font Size + * @desc Definição do tamanho da fonte do nome. + * @default 20 + * @type number + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Bold Size + * @desc Definição do tamanho do contorno. + * @default 4 + * @type number + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Font Italic + * @desc Ativar fonte em itálico. + * @default false + * @type boolean + * @on Enable + * @off Disable + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> HP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param HP Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de HP + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de HP. + * @default 143 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de HP. + * @default 85 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Flow Anime + * @text Gauge Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default true + * @type boolean + * @on Enable + * @off Disable + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Flow Speed + * @text Gauge Gradient Speed + * @desc Define a velocidade de animação do gradient. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default 4 + * @type number + * @min 1 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number Visible + * @desc Apresentar o numero de HP + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number Align + * @desc Definição do alinhamento dos números. + * 0 - Espquerda 1 - Centro 2 - Direita + * @default 0 + * @type select + * @option Left + * @value 0 + * @option Center + * @value 1 + * @option Right + * @value 2 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number X-Axis + * @desc Definição da posição X-Axis do numero de HP. + * @default 270 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number Y-Axis + * @desc Definição da posição Y-Axis do numero de HP. + * @default 70 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxHP Number Visible + * @desc Apresentar o numero de HP maximo. + * @default false + * @type boolean + * @on Show + * @off Hide + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxHP Number X-Axis + * @desc Definição da posição X-Axis do numero de HP maximo. + * @default 185 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxHP Number Y-Axis + * @desc Definição da posição Y-Axis do numero de HP maximo. + * @default 40 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Visible + * @desc Apresentar o ícone de HP. + * @default false + * @type boolean + * @on Show + * @off Hide + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Half Mode + * @desc Um ícone equivale a 2 pontos de HP. + * @default false + * @type boolean + * @on Enable (Zelda Style) + * @off Disable + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Max Colors + * @desc Quantidade de cores do ícone. + * A imagem será dividida pelo número de cores. + * @default 2 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Max Rows + * @desc Quantidade de ícones por linha. + * @default 10 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Max Columns + * @desc Quantidade de linhas. + * @default 2 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon X-Axis + * @desc Quantidade X-Axis dos ícones. + * @default 143 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Y-Axis + * @desc Quantidade Y-Axis dos ícones. + * @default 85 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Space X + * @desc Definição do espaço entre os ícones na horizontal. + * @default 0 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Space Y + * @desc Definição do espaço entre os ícones na vertical. + * @default 0 + * @type number + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Icon Zoom Anime + * @desc Ativar a animação de zoom no último ícone. + * @type boolean + * @on Enable + * @off Disable + * @default true + + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> MP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param MP Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de MP + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de MP. + * @default 160 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de MP. + * @default 115 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Flow Anime + * @text Gauge Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default true + * @type boolean + * @on Enable + * @off Disable + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Flow Speed + * @text Gauge Gradient Speed + * @desc Define a velocidade de animação do gradient. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default 4 + * @type number + * @min 1 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number Visible + * @desc Apresentar o numero de MP + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number Align + * @desc Definição do alinhamento dos números. + * 0 - Espquerda 1 - Centro 2 - Direita + * @default 0 + * @type select + * @option Left + * @value 0 + * @option Center + * @value 1 + * @option Right + * @value 2 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number X-Axis + * @desc Definição da posição X-Axis do numero de MP. + * @default 287 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number Y-Axis + * @desc Definição da posição Y-Axis do numero de MP. + * @default 100 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxMP Number Visible + * @desc Apresentar o numero de MP maximo. + * @default false + * @type boolean + * @on Show + * @off Hide + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxMP Number X-Axis + * @desc Definição da posição X-Axis do numero de MP maximo. + * @default 196 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxMP Number Y-Axis + * @desc Definição da posição Y-Axis do numero de MP maximo. + * @default 78 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Visible + * @desc Apresentar o ícone de MP. + * @default false + * @type boolean + * @on Show + * @off Hide + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Half Mode + * @desc Um ícone equivale a 2 pontos de MP. + * @default false + * @type boolean + * @on Enable (Zelda Style) + * @off Disable + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Max Colors + * @desc Quantidade de cores do ícone. + * A imagem será dividida pelo número de cores. + * @default 2 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Max Rows + * @desc Quantidade de ícones por linha. + * @default 10 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Max Columns + * @desc Quantidade de linhas. + * @default 2 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon X-Axis + * @desc Quantidade X-Axis dos ícones. + * @default 143 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Y-Axis + * @desc Quantidade Y-Axis dos ícones. + * @default 120 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Space X + * @desc Definição do espaço entre os ícones na horizontal. + * @default 0 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Space Y + * @desc Definição do espaço entre os ícones na vertical. + * @default 0 + * @type number + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Icon Zoom Anime + * @desc Ativar a animação de zoom no último ícone. + * @default true + * @type boolean + * @on Enable + * @off Disable + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> TP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param TP Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de TP + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de TP. + * @default 143 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de TP. + * @default 145 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Flow Anime + * @text Gauge Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default true + * @type boolean + * @on Enable + * @off Disable + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Flow Speed + * @text Gauge Gradient Speed + * @desc Define a velocidade de animação do gradient. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default 4 + * @type number + * @min 1 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number Visible + * @desc Apresentar o numero de TP. + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number Align + * @desc Definição do alinhamento dos números. + * 0 - Espquerda 1 - Centro 2 - Direita + * @default 0 + * @type select + * @option Left + * @value 0 + * @option Center + * @value 1 + * @option Right + * @value 2 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number X-Axis + * @desc Definição da posição X-Axis do numero de TP. + * @default 270 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number Y-Axis + * @desc Definição da posição Y-Axis do numero de TP. + * @default 130 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxTP Number Visible + * @desc Apresentar o numero de TP maximo. + * @default false + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxTP Number X-Axis + * @desc Definição da posição X-Axis do numero de TP maximo. + * @default 185 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxTP Number Y-Axis + * @desc Definição da posição Y-Axis do numero de TP maximo. + * @default 116 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Visible + * @desc Apresentar o ícone de TP. + * @default false + * @type boolean + * @on Show + * @off Hide + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Half Mode + * @desc Um ícone equivale a 2 pontos de TP. + * @default false + * @type boolean + * @on Enable (Zelda Style) + * @off Disable + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Max Colors + * @desc Quantidade de cores do ícone. + * A imagem será dividida pelo número de cores. + * @default 2 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Max Rows + * @desc Quantidade de ícones por linha. + * @default 10 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Max Columns + * @desc Quantidade de linhas. + * @default 2 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon X-Axis + * @desc Quantidade X-Axis dos ícones. + * @default 143 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Y-Axis + * @desc Quantidade Y-Axis dos ícones. + * @default 50 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Space X + * @desc Definição do espaço entre os ícones na horizontal. + * @default 0 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Space Y + * @desc Definição do espaço entre os ícones na vertical. + * @default 0 + * @type number + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Icon Zoom Anime + * @desc Ativar a animação de zoom no último ícone. + * @default true + * @type boolean + * @on Enable + * @off Disable + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param EXP Meter Visible + * @desc Apresentar o medidor de EXP + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param EXP Meter X-Axis + * @desc Definição da posição X-Axis do medidor de EXP. + * @default 127 + * @type number + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param EXP Meter Y-Axis + * @desc Definição da posição Y-Axis do medidor de EXP. + * @default 173 + * @type number + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param EXP Meter Angle + * @desc Ángulo do medidor. + * @default 0 + * @type number + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Level Number Visible + * @desc Apresentar o numero de Level. + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Level Number Align + * @desc Definição do alinhamento dos números. + * 0 - Espquerda 1 - Centro 2 - Direita + * @default 1 + * @type select + * @option Left + * @value 0 + * @option Center + * @value 1 + * @option Right + * @value 2 + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Level Number X-Axis + * @desc Definição da posição X-Axis do numero de Level. + * @default 65 + * @type number + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Level Number Y-Axis + * @desc Definição da posição Y-Axis do numero de Level. + * @default 153 + * @type number + * @parent -> EXP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param States Visible + * @desc Apresentar o numero as condições. + * @default true + * @type boolean + * @on Show + * @off Hide + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States X-Axis + * @desc Definição da posição X-Axis das condições. + * @default 5 + * @type number + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States Y-Axis + * @desc Definição da posição Y-Axis das condições. + * @default 64 + * @type number + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @help + * ============================================================================= + * +++ MOG Actor Hud (v2.0) +++ + * By Moghunter + * https://atelierrgss.wordpress.com/ + * ============================================================================= + * Adiciona uma Hud com os parâmetros do personagem. + * + * ============================================================================= + * - REQUIRED FILES + * ============================================================================= + * Serão necessários os arquivos. (img/actorhud/) + * + * HP_Meter.png + * HP_Number.png + * MP_Meter.png + * MP_Number.png + * TP_Meter.png + * TP_Number.png + * Layout.png + * LV_Number.png + * EXP_Meter.png + * + * ============================================================================= + * Para nomear as faces dos battlers basta nomear da seguinte forma. + * + * Face_ + ACTOR_ID.png + * + * Face_1.png + * Face_2.png + * Face_3.png + * ... + * + * ============================================================================= + * - PLUGIN COMMANDS + * ============================================================================= + * Para ocultar ou apresentar a hud use os códigos abaixo. + * + * hide_actor_hud + * show_actor_hud + * + * ============================================================================ + * - WHAT'S NEW (version 2.0) + * ============================================================================ + * - (NEW) - Plugins parameters compatíveis com RM1.5+ + * - (NEW) - Adição da segunda camada de Layout (Overlay). + * - (NEW) - Possibilidade de mudar a velocidade de animação do gradient. + * - (BUG FIX) - Correção de resetar a animação de gradiente ao voltar do menu. + * - (BUG FIX) - Correção de resetar a transparência ao voltar do menu. + */ + +//============================================================================= +// ** PLUGIN PARAMETERS +//============================================================================= +  var Imported = Imported || {}; +  Imported.MOG_ActorHud = true; +  var Moghunter = Moghunter || {}; + +  Moghunter.parameters = PluginManager.parameters('MOG_ActorHud'); + + // HUD POSITION + Moghunter.ahud_pos_x = Number(Moghunter.parameters['Hud X-Axis'] || 0); + Moghunter.ahud_pos_y = Number(Moghunter.parameters['Hud Y-Axis'] || 440); + Moghunter.ahud_fade_limit = Number(Moghunter.parameters['Fade Max'] || 90); + Moghunter.ahud_layout2_visible = String(Moghunter.parameters['Layout Overlay Visible'] || true); + Moghunter.ahud_layout2_x = Number(Moghunter.parameters['Layout Overlay X-Axis'] || 0); + Moghunter.ahud_layout2_y = Number(Moghunter.parameters['Layout Overlay Y-Axis'] || 0); + + // FACE POSITION + Moghunter.ahud_face_visible = String(Moghunter.parameters['Face Visible'] || true); + Moghunter.ahud_face_shake = String(Moghunter.parameters['Face Shake Animation'] || true); + Moghunter.ahud_face_zoom = String(Moghunter.parameters['Face Zoom Animation'] || true); + Moghunter.ahud_face_animated = String(Moghunter.parameters['Face Frame Animation'] || false); + Moghunter.ahud_face_pos_x = Number(Moghunter.parameters['Face X-Axis'] || 55); + Moghunter.ahud_face_pos_y = Number(Moghunter.parameters['Face Y-Axis'] || 100); + Moghunter.ahud_face_priority = Number(Moghunter.parameters['Face Priority'] || 1); + + // NAME POSITION + Moghunter.ahud_name_visible = String(Moghunter.parameters['Name Visible'] || true); + Moghunter.ahud_name_font_size = Number(Moghunter.parameters['Name Font Size'] || 20); + Moghunter.ahud_name_font_bold_size = Number(Moghunter.parameters['Name Bold Size'] || 4); + Moghunter.ahud_name_font_italic = String(Moghunter.parameters['Name Font Italic'] || false); + Moghunter.ahud_name_pos_x = Number(Moghunter.parameters['Name X-Axis'] || 5); + Moghunter.ahud_name_pos_y = Number(Moghunter.parameters['Name Y-Axis'] || 20); + + // HP ICON POSITION + Moghunter.ahud_hp_icon_visible = String(Moghunter.parameters['HP Icon Visible'] || 'false'); + Moghunter.ahud_hp_icon_halfMode = String(Moghunter.parameters['HP Icon Half Mode'] || 'false'); + Moghunter.ahud_hp_icon_colorMax = Number(Moghunter.parameters['HP Icon Max Colors'] || 2); + Moghunter.ahud_hp_icon_rows = Number(Moghunter.parameters['HP Icon Max Rows'] || 10); + Moghunter.ahud_hp_icon_cols = Number(Moghunter.parameters['HP Icon Max Columns'] || 2); + Moghunter.ahud_hp_icon_pos_x = Number(Moghunter.parameters['HP Icon X-Axis'] || 143); + Moghunter.ahud_hp_icon_pos_y = Number(Moghunter.parameters['HP Icon Y-Axis'] || 85); + Moghunter.ahud_hp_icon_space_x = Number(Moghunter.parameters['HP Icon Space X'] || 0); + Moghunter.ahud_hp_icon_space_y = Number(Moghunter.parameters['HP Icon Space Y'] || 0); + Moghunter.ahud_hp_icon_zoomAnime = String(Moghunter.parameters['HP Icon Zoom Anime'] || 'true'); + + // MP ICON POSITION + Moghunter.ahud_mp_icon_visible = String(Moghunter.parameters['MP Icon Visible'] || 'false'); + Moghunter.ahud_mp_icon_halfMode = String(Moghunter.parameters['MP Icon Half Mode'] || 'false'); + Moghunter.ahud_mp_icon_colorMax = Number(Moghunter.parameters['MP Icon Max Colors'] || 2); + Moghunter.ahud_mp_icon_rows = Number(Moghunter.parameters['MP Icon Max Rows'] || 10); + Moghunter.ahud_mp_icon_cols = Number(Moghunter.parameters['MP Icon Max Columns'] || 2); + Moghunter.ahud_mp_icon_pos_x = Number(Moghunter.parameters['MP Icon X-Axis'] || 143); + Moghunter.ahud_mp_icon_pos_y = Number(Moghunter.parameters['MP Icon Y-Axis'] || 125); + Moghunter.ahud_mp_icon_space_x = Number(Moghunter.parameters['MP Icon Space X'] || 0); + Moghunter.ahud_mp_icon_space_y = Number(Moghunter.parameters['MP Icon Space Y'] || 0); + Moghunter.ahud_mp_icon_zoomAnime = String(Moghunter.parameters['MP Icon Zoom Anime'] || 'true'); + + // TP ICON POSITION + Moghunter.ahud_tp_icon_visible = String(Moghunter.parameters['TP Icon Visible'] || 'false'); + Moghunter.ahud_tp_icon_halfMode = String(Moghunter.parameters['TP Icon Half Mode'] || 'false'); + Moghunter.ahud_tp_icon_colorMax = Number(Moghunter.parameters['TP Icon Max Colors'] || 2); + Moghunter.ahud_tp_icon_rows = Number(Moghunter.parameters['TP Icon Max Rows'] || 10); + Moghunter.ahud_tp_icon_cols = Number(Moghunter.parameters['TP Icon Max Columns'] || 2); + Moghunter.ahud_tp_icon_pos_x = Number(Moghunter.parameters['TP Icon X-Axis'] || 143); + Moghunter.ahud_tp_icon_pos_y = Number(Moghunter.parameters['TP Icon Y-Axis'] || 50); + Moghunter.ahud_tp_icon_space_x = Number(Moghunter.parameters['TP Icon Space X'] || 0); + Moghunter.ahud_tp_icon_space_y = Number(Moghunter.parameters['TP Icon Space Y'] || 0); + Moghunter.ahud_tp_icon_zoomAnime = String(Moghunter.parameters['TP Icon Zoom Anime'] || 'true'); + + // HP METER POSITION + Moghunter.ahud_hp_meter_visible = String(Moghunter.parameters['HP Meter Visible'] || true); + Moghunter.ahud_hp_meter_pos_x = Number(Moghunter.parameters['HP Meter X-Axis'] || 143); + Moghunter.ahud_hp_meter_pos_y = Number(Moghunter.parameters['HP Meter Y-Axis'] || 85); + Moghunter.ahud_hp_meter_rotation = Number(Moghunter.parameters['HP Meter Angle'] || 0); + Moghunter.ahud_hp_meter_flow = String(Moghunter.parameters['HP Meter Flow Anime'] || true); + Moghunter.ahud_hp_flowSpd = Number(Moghunter.parameters['HP Meter Flow Speed'] || 2); + + // HP NUMBER POSITION + Moghunter.ahud_hp_number_visible = String(Moghunter.parameters['HP Number Visible'] || true); + Moghunter.ahud_hp_number_align = Number(Moghunter.parameters['HP Number Align'] || 0); + Moghunter.ahud_hp_number_pos_x = Number(Moghunter.parameters['HP Number X-Axis'] || 270); + Moghunter.ahud_hp_number_pos_y = Number(Moghunter.parameters['HP Number Y-Axis'] || 70); + Moghunter.ahud_maxhp_number_visible = String(Moghunter.parameters['MaxHP Number Visible'] || false); + Moghunter.ahud_maxhp_number_pos_x = Number(Moghunter.parameters['MaxHP Number X-Axis'] || 125); + Moghunter.ahud_maxhp_number_pos_y = Number(Moghunter.parameters['MaxHP Number Y-Axis'] || 13); + + // MP METER POSITION + Moghunter.ahud_mp_meter_visible = String(Moghunter.parameters['MP Meter Visible'] || true); + Moghunter.ahud_mp_meter_pos_x = Number(Moghunter.parameters['MP Meter X-Axis'] || 160); + Moghunter.ahud_mp_meter_pos_y = Number(Moghunter.parameters['MP Meter Y-Axis'] || 115); + Moghunter.ahud_mp_meter_rotation = Number(Moghunter.parameters['MP Meter Angle'] || 0); + Moghunter.ahud_mp_meter_flow = String(Moghunter.parameters['MP Meter Flow Anime'] || true); + Moghunter.ahud_mp_flowSpd = Number(Moghunter.parameters['MP Meter Flow Speed'] || 2); + + // MP NUMBER POSITION + Moghunter.ahud_mp_number_visible = String(Moghunter.parameters['MP Number Visible'] || true); + Moghunter.ahud_mp_number_align = Number(Moghunter.parameters['MP Number Align'] || 0); + Moghunter.ahud_mp_number_pos_x = Number(Moghunter.parameters['MP Number X-Axis'] || 287); + Moghunter.ahud_mp_number_pos_y = Number(Moghunter.parameters['MP Number Y-Axis'] || 100); + Moghunter.ahud_maxmp_number_visible = String(Moghunter.parameters['MaxMP Number Visible'] || false); + Moghunter.ahud_maxmp_number_pos_x = Number(Moghunter.parameters['MaxMP Number X-Axis'] || 196); + Moghunter.ahud_maxmp_number_pos_y = Number(Moghunter.parameters['MaxMP Number Y-Axis'] || 78); + + // TP METER POSITION + Moghunter.ahud_tp_meter_visible = String(Moghunter.parameters['TP Meter Visible'] || true); + Moghunter.ahud_tp_meter_pos_x = Number(Moghunter.parameters['TP Meter X-Axis'] || 143); + Moghunter.ahud_tp_meter_pos_y = Number(Moghunter.parameters['TP Meter Y-Axis'] || 145); + Moghunter.ahud_tp_meter_rotation = Number(Moghunter.parameters['TP Meter Angle'] || 0); + Moghunter.ahud_tp_meter_flow = String(Moghunter.parameters['TP Meter Flow Anime'] || false); + Moghunter.ahud_tp_flowSpd = Number(Moghunter.parameters['TP Meter Flow Speed'] || 2); + + // TP NUMBER POSITION + Moghunter.ahud_tp_number_visible = String(Moghunter.parameters['TP Number Visible'] || true); + Moghunter.ahud_tp_number_align = Number(Moghunter.parameters['TP Number Align'] || 0); + Moghunter.ahud_tp_number_pos_x = Number(Moghunter.parameters['TP Number X-Axis'] || 270); + Moghunter.ahud_tp_number_pos_y = Number(Moghunter.parameters['TP Number Y-Axis'] || 130); + Moghunter.ahud_maxtp_number_visible = String(Moghunter.parameters['MaxTP Number Visible'] || false); + Moghunter.ahud_maxtp_number_pos_x = Number(Moghunter.parameters['MaxTP Number X-Axis'] || 185); + Moghunter.ahud_maxtp_number_pos_y = Number(Moghunter.parameters['MaxTP Number Y-Axis'] || 116); + + // Level NUMBER POSITION + Moghunter.ahud_level_number_visible = String(Moghunter.parameters['Level Number Visible'] || true); + Moghunter.ahud_level_number_align = Number(Moghunter.parameters['Level Number Align'] || 1); + Moghunter.ahud_level_number_pos_x = Number(Moghunter.parameters['Level Number X-Axis'] || 65); + Moghunter.ahud_level_number_pos_y = Number(Moghunter.parameters['Level Number Y-Axis'] || 153); + + // EXP METER POSITION + Moghunter.ahud_exp_meter_visible = String(Moghunter.parameters['EXP Meter Visible'] || true); + Moghunter.ahud_exp_meter_pos_x = Number(Moghunter.parameters['EXP Meter X-Axis'] || 127); + Moghunter.ahud_exp_meter_pos_y = Number(Moghunter.parameters['EXP Meter Y-Axis'] || 173); + Moghunter.ahud_exp_meter_rotation = Number(Moghunter.parameters['EXP Meter Angle'] || 0); + + // STATES POSITION + Moghunter.ahud_states_visible = String(Moghunter.parameters['States Visible'] || true); + Moghunter.ahud_states_pos_x = Number(Moghunter.parameters['States X-Axis'] || 5); + Moghunter.ahud_states_pos_y = Number(Moghunter.parameters['States Y-Axis'] || 64); + + Moghunter.ahud_hudvisible = String(Moghunter.parameters['Initial Visible'] || "false"); + Moghunter.ahud_smartFade = String(Moghunter.parameters['Smart Fade'] || "true"); + Moghunter.ahud_autoFade = String(Moghunter.parameters['Auto Fade'] || "true"); + +//============================================================================= +// ** ImageManager +//============================================================================= + +//============================== +// * Actor Hud +//============================== +ImageManager.loadAHud = function(filename) { + return this.loadBitmap('img/actorhud/', filename, 0, true); +}; + +//============================================================================= +// ** Game_System +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_mog_ahud_sys_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() { + _alias_mog_ahud_sys_initialize.call(this); + this._ahud_position = [0,0]; + this._ahud_visible = String(Moghunter.ahud_hudvisible) === "true" ? true : false; + this._ahud_smartFade = String(Moghunter.ahud_smartFade) === "true" ? true : false; + this._ahud_autoFade = String(Moghunter.ahud_autoFade) === "true" ? true : false; + this._ahud_opacity = 0; + this._ahud_flowData = [0,0,0]; +}; + +//============================================================================= +// ** Game BattlerBase +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_mog_ahud_gbat_initMembers = Game_BattlerBase.prototype.initMembers +Game_BattlerBase.prototype.initMembers = function() { + _alias_mog_ahud_gbat_initMembers.call(this); + this._ahud_face_data = [0,0,0,0]; +}; + +//============================================================================= +// ** Game Actor +//============================================================================= + +//============================== +// * Current EXP R +//============================== +Game_Actor.prototype.current_exp_r = function() { + return this.nextLevelExp() - this.nextRequiredExp() - this.expForLevel(this._level); +}; + +//============================== +// * Next Level EXP R +//============================== +Game_Actor.prototype.nextLevelExp_r = function() { + return this.expForLevel(this._level + 1) - this.expForLevel(this._level) ; +}; + +//============================================================================= +// ** Game Character Base +//============================================================================= + +//============================== +// * Screen RealX +//============================== +Game_CharacterBase.prototype.screen_realX = function() { + return this.scrolledX() * $gameMap.tileWidth(); +}; + +//============================== +// * Screen RealY +//============================== +Game_CharacterBase.prototype.screen_realY = function() { + return this.scrolledY() * $gameMap.tileHeight(); +}; + +//============================================================================= +// ** Game_Interpreter +//============================================================================= + +//============================== +// * PluginCommand +//============================== +var _alias_mog_actorhud_pluginCommand = Game_Interpreter.prototype.pluginCommand +Game_Interpreter.prototype.pluginCommand = function(command, args) { + _alias_mog_actorhud_pluginCommand.call(this,command, args) + if (command === "show_actor_hud") { $gameSystem._ahud_visible = true}; + if (command === "hide_actor_hud") { $gameSystem._ahud_visible = false;}; + return true; +}; + +//============================================================================= +// ** Scene Base +//============================================================================= + +//============================== +// ** create Hud Field +//============================== +Scene_Base.prototype.createHudField = function() { + this._hudField = new Sprite(); + this._hudField.z = 10; + this.addChild(this._hudField); +}; + +//============================== +// ** sort MZ +//============================== +Scene_Base.prototype.sortMz = function() { + this._hudField.children.sort(function(a, b){return a.mz-b.mz}); +}; + +//============================================================================= +// ** Scene Map +//============================================================================= + +//============================== +// ** create Spriteset +//============================== +var _mog_actorHud_sMap_createSpriteset = Scene_Map.prototype.createSpriteset; +Scene_Map.prototype.createSpriteset = function() { + _mog_actorHud_sMap_createSpriteset.call(this); + if (!this._hudField) {this.createHudField()}; + this.createActorHud(); + this.sortMz(); +}; + +//============================== +// * Create Actor Hud +//============================== +Scene_Map.prototype.createActorHud = function() { + this._actorHud = new Actor_Hud(); + this._actorHud.mz = 101; + this._hudField.addChild(this._actorHud); +}; + +//============================================================================= +// * Actor_Hud +//============================================================================= +function Actor_Hud() { + this.initialize.apply(this, arguments); +}; + +Actor_Hud.prototype = Object.create(Sprite.prototype); +Actor_Hud.prototype.constructor = Actor_Hud; + +//============================== +// * Initialize +//============================== +Actor_Hud.prototype.initialize = function(hud_id) { + Sprite.prototype.initialize.call(this); + this.visible = false; + this._data_initial_ref = [0,true]; + this._hud_id = hud_id; + this._hud_size = [-1,-1,-1,-1]; + this.base_parameter_clear(); + this.load_img(); + if (!$gameSystem._ahud_visible) { + $gameSystem._ahud_opacity = 0; + this.opacity = 0 + }; + this.opacity = $gameSystem._ahud_opacity; + this.update(); +}; + +//============================== +// * Load Img +//============================== +Actor_Hud.prototype.load_img = function() { + this._layout_img = ImageManager.loadAHud("Layout"); + this._state_img = ImageManager.loadSystem("IconSet"); + if (String(Moghunter.ahud_layout2_visible) == "true") {this._layout2_img = ImageManager.loadAHud("Layout2")}; + if (String(Moghunter.ahud_hp_meter_visible) == "true") {this._hp_meter_img = ImageManager.loadAHud("HP_Meter")}; + if (String(Moghunter.ahud_mp_meter_visible) == "true") {this._mp_meter_img = ImageManager.loadAHud("MP_Meter")}; + if (String(Moghunter.ahud_tp_meter_visible) == "true") {this._tp_meter_img = ImageManager.loadAHud("TP_Meter")}; + if (String(Moghunter.ahud_hp_icon_visible) == "true") {this._hp_icon_img = ImageManager.loadAHud("HP_Icon")}; + if (String(Moghunter.ahud_mp_icon_visible) == "true") {this._mp_icon_img = ImageManager.loadAHud("MP_Icon")}; + if (String(Moghunter.ahud_tp_icon_visible) == "true") {this._tp_icon_img = ImageManager.loadAHud("TP_Icon")}; + if (String(Moghunter.ahud_exp_meter_visible) == "true") {this._exp_meter_img = ImageManager.loadAHud("EXP_Meter")}; + if (String(Moghunter.ahud_hp_number_visible) == "true") {this._hp_number_img = ImageManager.loadAHud("HP_Number")}; + if (String(Moghunter.ahud_mp_number_visible) == "true") {this._mp_number_img = ImageManager.loadAHud("MP_Number")}; + if (String(Moghunter.ahud_tp_number_visible) == "true") {this._tp_number_img = ImageManager.loadAHud("TP_Number")}; + if (String(Moghunter.ahud_level_number_visible) == "true") {this._level_number_img = ImageManager.loadAHud("LV_Number")}; + if (String(Moghunter.ahud_maxhp_number_visible) == "true") {this._maxhp_number_img = ImageManager.loadAHud("HP_Number2")}; + if (String(Moghunter.ahud_maxmp_number_visible) == "true") {this._maxmp_number_img = ImageManager.loadAHud("MP_Number2")}; + if (String(Moghunter.ahud_maxtp_number_visible) == "true") {this._maxtp_number_img = ImageManager.loadAHud("TP_Number2")}; +}; + +//============================== +// * Base Parameter Clear +//============================== +Actor_Hud.prototype.base_parameter_clear = function() { + this._hp_old = [-1,-1]; + this._maxhp_old = [-1,-1]; + this._hp_old_ani = [-1,-1]; + this._hp_flow = [false,0,0,0]; + this._mp_old = [-1,-1]; + this._maxmp_old = [-1,-1]; + this._mp_old_ani = [-1,-1]; + this._mp_flow = [false,0,0,0]; + this._tp_old = [-1,-1]; + this._maxtp_old = [-1,-1]; + this._tp_old_ani = -1; + this._tp_flow = [false,0,0,0]; + this._exp_old = [-1,-1]; + this._exp_flow = [false,0,0,0]; + this._hp_number_old = -1; + this._mp_number_old = -1; + this._hp_number_old = -1; + this._hp_icon_old = [-1,-1]; + this._mp_icon_old = [-1,-1]; + this._tp_icon_old = [-1,-1]; + this._hp_img_data = [0,0,0]; + this._mp_img_data = [0,0,0]; + this._tp_img_data = [0,0,0]; + this._states_old = []; + this._states_data = [0,0,0]; + this._active = false; + this._hp_flow_speed = Moghunter.ahud_hp_flowSpd * 0.1; + this._mp_flow_speed = Moghunter.ahud_mp_flowSpd * 0.1; + this._tp_flow_speed = Moghunter.ahud_tp_flowSpd * 0.1; + this._hud_size = [0,0]; +}; + +//============================== +// * Need Refresh Bhud +//============================== +Actor_Hud.prototype.need_refreh_bhud = function() { + if (this._data_initial_ref[1]) {return true}; + if (this._battler != $gameParty.members()[0]) {return true}; + return false; +}; + +//============================== +// * Refresh Bhud +//============================== +Actor_Hud.prototype.refresh_bhud = function() { + this._data_initial_ref[1] = false; + this._battler = $gameParty.members()[0]; + this._hud_size = [0,0]; + this.base_parameter_clear(); + this.create_base_sprites(); +}; + +//============================== +// * Refresh Position +//============================== +Actor_Hud.prototype.refresh_position = function() { + this.set_hud_position(); + this.visible = true; + this.create_sprites(); + this._layout.x = this._pos_x; + this._layout.y = this._pos_y; + if (this._face) { + this._face.x = this._pos_x + Moghunter.ahud_face_pos_x; + this._face.y = this._pos_y + Moghunter.ahud_face_pos_y; + this._battler._face_pos = [this._face.x,this._face.y]; + }; +}; + +//============================== +// * Set Hud Position +//============================== +Actor_Hud.prototype.set_hud_position = function() { + this._hud_size[0] = Moghunter.ahud_pos_x - ($gameMap.tileWidth() / 2); + this._hud_size[1] = Moghunter.ahud_pos_y - ($gameMap.tileHeight() / 2); + this._hud_size[2] = Moghunter.ahud_pos_x + this._layout.bitmap.width - $gameMap.tileWidth(); + this._hud_size[3] = Moghunter.ahud_pos_y + this._layout.bitmap.height; + this._pos_x = Moghunter.ahud_pos_x; + this._pos_y = Moghunter.ahud_pos_y; +}; + +//============================== +// * Update +//============================== +Actor_Hud.prototype.update = function() { + Sprite.prototype.update.call(this); + if (this.need_refreh_bhud()) {this.refresh_bhud()}; + if (!this._battler) {this.visible = false;return}; + if (!this._layout_img.isReady()) {return}; + if (this._hud_size[0] === 0) {this.refresh_position();return}; + this.update_sprites(); +}; + +//============================== +// * Create Base Sprites +//============================== +Actor_Hud.prototype.create_base_sprites = function() { + if (Number(Moghunter.ahud_face_priority) === 0) { + this.create_face(); + this.create_layout();} + else { + this.create_layout(); + this.create_face(); + }; +}; + +//============================== +// * Create Sprites +//============================== +Actor_Hud.prototype.create_sprites = function() { + this.create_hp_meter(); + this.create_mp_meter(); + this.create_tp_meter(); + this.create_hp_icon(); + this.create_mp_icon(); + this.create_tp_icon(); + this.create_exp_meter(); + if (this._layout2_img) {this.create_layout2()}; + this.create_hp_number(); + this.create_maxhp_number(); + this.create_mp_number(); + this.create_maxmp_number(); + this.create_tp_number(); + this.create_level_number(); + this.create_maxtp_number(); + this.create_states(); + this.create_name(); +}; + +//============================== +// * Update Sprites +//============================== +Actor_Hud.prototype.update_sprites = function() { + this.update_visible(); + this.update_face(); + this.update_hp(); + this.update_mp(); + this.update_tp(); + this.update_states(); + this.update_exp(); +}; + +//============================== +// * Need Hide +//============================== +Actor_Hud.prototype.needHide = function(start) { + if (Imported.MOG_ChronoEngine && $gameSystem.isChronoMode()) {return true}; + if (!this._battler) {return true}; + if (!$gameSystem._ahud_visible) {return true}; + if (!$gameSystem._ahud_autoFade) {return false}; + if ($gameMessage.isBusy()) {return true}; + return false +}; + +//============================== +// * Update visible +//============================== +Actor_Hud.prototype.update_visible = function() { + this.visible = true; + if (this.needHide(false)) { + this.opacity -= 15; + } else { + if (this.needFade()) { + if (this.opacity > Moghunter.ahud_fade_limit) { + this.opacity -= 10; + if (this.opacity < Moghunter.ahud_fade_limit) {this.opacity = Moghunter.ahud_fade_limit}; + }; + } else { + this.opacity += 10; + }; + }; + $gameSystem._ahud_opacity = this.opacity; +}; + +//============================== +// * Need Fade +//============================== +Actor_Hud.prototype.needFade = function() { + if (this._hud_size[0] === -1) {return false}; + if (!this._battler) {return false}; + if (!$gameSystem._ahud_smartFade) {return false}; + if ($gamePlayer.screen_realX() < this._hud_size[0]) {return false}; + if ($gamePlayer.screen_realX() > this._hud_size[2]) {return false}; + if ($gamePlayer.screen_realY() < this._hud_size[1]) {return false}; + if ($gamePlayer.screen_realY() > this._hud_size[3]) {return false}; + return true; +}; + + +//============================== +// * Update Dif +//============================== +Actor_Hud.prototype.update_dif = function(value,real_value,speed) { + if (value == real_value) {return value}; + var dnspeed = 1 + (Math.abs(value - real_value) / speed); + if (value > real_value) {value -= dnspeed; + if (value < real_value) {value = real_value};} + else if (value < real_value) {value += dnspeed; + if (value > real_value) {value = real_value}; + }; + return Math.floor(value); +}; + +//============================== +// * Refresh Meter +//============================== +Actor_Hud.prototype.refresh_meter = function(sprite,value,value_max,type,div) { + var ch = sprite.bitmap.height / div; + var meter_rate = sprite.bitmap.width * value / value_max; + sprite.setFrame(0,type * ch, meter_rate, ch); +}; + +//============================== +// * Refresh Flow +//============================== +Actor_Hud.prototype.refresh_meter_flow = function(sprite,value,value_max,type,flow) { + var cw = sprite.bitmap.width / 3; + var ch = sprite.bitmap.height / 2; + var meter_rate = cw * value / value_max; + sprite.setFrame(flow,type * ch, meter_rate, ch); +}; + +//============================== +// * Refresh Number +//============================== +Actor_Hud.prototype.refresh_number = function(sprites,value,img_data,x,center) { + numbers = Math.abs(value).toString().split(""); + for (var i = 0; i < sprites.length ; i++) {sprites[i].visible = false; + if (i > numbers.length) {return}; + var n = Number(numbers[i]); + sprites[i].setFrame(n * img_data[2], 0, img_data[2], img_data[1]); + sprites[i].visible = true; + var nx = -(img_data[2] * i) + (img_data[2] * numbers.length); + if (sprites.align === 1) { + var xi = (img_data[2] * numbers.length) / 2; + sprites[i].x = x + xi - nx; + } else if (sprites.align === 2) { + var xi = img_data[2] * numbers.length; + sprites[i].x = x + xi - nx; + } else { + sprites[i].x = x - nx; + }; + }; +}; + +//============================== +// * Need Refresh Parameter +//============================== +Actor_Hud.prototype.need_refresh_parameter = function(parameter) { + switch (parameter) { + case 0: + if (this._hp_old[0] != this._battler.hp) {return true}; + if (this._hp_old[1] != this._battler.mhp) {return true}; + break; + case 1: + if (this._mp_old[0] != this._battler.mp) {return true}; + if (this._mp_old[1] != this._battler.mmp) {return true}; + break; + case 2: + if (this._tp_old[0] != this._battler.tp) {return true}; + if (this._tp_old[1] != this._battler.maxTp()) {return true}; + break; + case 3: + if (this._exp_old != this._battler.currentExp()) {return true}; + break; + }; + return false; +}; + +//============================== +// * Create Layout +//============================== +Actor_Hud.prototype.create_layout = function() { + this.removeChild(this._layout); + if (!this._battler) {return}; + this._layout = new Sprite(this._layout_img); + this.addChild(this._layout); +}; + +//============================== +// * Create Layout 2 +//============================== +Actor_Hud.prototype.create_layout2 = function() { + this.removeChild(this._layout2); + if (!this._battler) {return}; + this._layout2 = new Sprite(this._layout2_img); + this._layout2.x = Moghunter.ahud_layout2_x; + this._layout2.y = Moghunter.ahud_layout2_y; + this.addChild(this._layout2); +}; + +//============================== +// * Create Face +//============================== +Actor_Hud.prototype.create_face = function() { + if (String(Moghunter.ahud_face_visible) != "true") {return}; + this.removeChild(this._face); + if (!this._battler) {return}; + this._face = new Sprite(ImageManager.loadAHud("Face_" + this._battler._actorId)); + this._face.anchor.x = 0.5; + this._face.anchor.y = 0.5; + this._face_data = [0,0,false,false,false,-1]; + if (String(Moghunter.ahud_face_shake) === "true") {this._face_data[2] = true} + if (String(Moghunter.ahud_face_animated) === "true") {this._face_data[4] = true} + this._battler._ahud_face_data = [0,0,0,0] + this.addChild(this._face); +}; + +//============================== +// * Update Face +//============================== +Actor_Hud.prototype.update_face = function() { + if (!this._face) {return}; + if (!this._face.bitmap.isReady()) {return}; + if (this._face_data[4] && this._face_data[5] != this._battler._ahud_face_data[2]) {this.refresh_face();}; + this.update_face_animation(); + this.update_face_shake(); + this.update_face_zoom(); +}; + +//============================== +// * Refresh Face +//============================== +Actor_Hud.prototype.refresh_face = function() { + this._face_data[5] = this._battler._ahud_face_data[2]; + var cw = this._face.bitmap.width / 5; + var ch = this._face.bitmap.height; + this._face.setFrame(cw * this._face_data[5], 0, cw, ch); +}; + +//============================== +// * Update Face Animation +//============================== +Actor_Hud.prototype.update_face_animation = function() { + if (this._battler._ahud_face_data[3] > 0) {this._battler._ahud_face_data[3] -= 1; + if (this._battler._ahud_face_data[3] === 0) { + if (this._battler.isDead()) {this._battler._ahud_face_data[2] = 4} + else if (this._battler.hp <= 30 * this._battler.mhp / 100) {this._battler._ahud_face_data[2] = 3} + else {this._battler._ahud_face_data[2] = 0}; + }; + }; +}; + +//============================== +// * Update Face Zoom +//============================== +Actor_Hud.prototype.update_face_zoom = function() { + if (this._battler._ahud_face_data[1] > 0) {this._battler._ahud_face_data[1] -= 1; + if (this._battler._ahud_face_data[1] == 0) {this._face.scale.x = 1.00} + else if (this._battler._ahud_face_data[1] < 20) {this._face.scale.x -= 0.01; + if (this._face.scale.x < 1.00) {this._face.scale.x = 1.00;}; + } + else if (this._battler._ahud_face_data[1] < 40){this._face.scale.x += 0.01; + if (this._face.scale.x > 1.25) {this._face.scale.x = 1.25;}; + }; + this._face.scale.y = this._face.scale.x; + }; +}; + +//============================== +// * Update Face Shake +//============================== +Actor_Hud.prototype.update_face_shake = function() { + this._face.x = this._pos_x + Moghunter.ahud_face_pos_x; + if (this._face_data[2] && this._battler._ahud_face_data[0] > 0) {this._battler._ahud_face_data[0] -= 1; + this._face.x = this._pos_x + Moghunter.ahud_face_pos_x + ((Math.random() * 12) - 6); + }; +}; + +//============================== +// * Create Name +//============================== +Actor_Hud.prototype.create_name = function() { + if (String(Moghunter.ahud_name_visible) != "true") {return}; + this.removeChild(this._name); + if (!this._battler) {return}; + this._name = new Sprite(new Bitmap(300,48)); + this._name.x = this._pos_x + Moghunter.ahud_name_pos_x; + this._name.y = this._pos_y + Moghunter.ahud_name_pos_y; + this._name.bitmap.fontSize = Number(Moghunter.ahud_name_font_size); + if (String(Moghunter.ahud_name_font_italic) === "true") {this._name.bitmap.fontItalic = true}; + this._name.bitmap.outlineWidth = Number(Moghunter.ahud_name_font_bold_size); + this.addChild(this._name); + this.refresh_name(); +}; + +//============================== +// * Refresh Name +//============================== +Actor_Hud.prototype.refresh_name = function() { + this._name.bitmap.clear(); + this._name.bitmap.drawText(this._battler._name, 0, 0, this._name.bitmap.width, this._name.bitmap.height,0); +}; + +//============================== +// * Create HP Meter +//============================== +Actor_Hud.prototype.create_hp_meter = function() { + if (String(Moghunter.ahud_hp_meter_visible) != "true") {return}; + this.removeChild(this._hp_meter_blue); + this.removeChild(this._hp_meter_red); + if (!this._battler) {return}; + this._hp_meter_red = new Sprite(this._hp_meter_img); + this._hp_meter_red.x = this._pos_x + Moghunter.ahud_hp_meter_pos_x; + this._hp_meter_red.y = this._pos_y + Moghunter.ahud_hp_meter_pos_y; + this._hp_meter_red.rotation = Moghunter.ahud_hp_meter_rotation * Math.PI / 180; + this._hp_meter_red.setFrame(0,0,0,0); + this.addChild(this._hp_meter_red); + this._hp_meter_blue = new Sprite(this._hp_meter_img); + this._hp_meter_blue.x = this._hp_meter_red.x; + this._hp_meter_blue.y = this._hp_meter_red.y; + this._hp_meter_blue.rotation = this._hp_meter_red.rotation * Math.PI / 180; + this._hp_meter_blue.setFrame(0,0,0,0); + this.addChild(this._hp_meter_blue); + this._hp_old_ani[0] = this._battler.hp - 1; + if (String(Moghunter.ahud_hp_meter_flow) === "true") {this._hp_flow[0] = true; + this._hp_flow[2] = this._hp_meter_img.width / 3; + this._hp_flow[3] = this._hp_flow[2] * 2; + this._hp_flow[1] = Math.floor(Math.random() * this._hp_flow[2]); + }; +}; + +//============================== +// * Create HP icon +//============================== +Actor_Hud.prototype.create_hp_icon = function() { + if (String(Moghunter.ahud_hp_icon_visible) != "true") {return}; + if (this._hp_icons) { + for (var i = 0; i < this._hp_icons.length; i++) { + this.removeChild(this._hp_icons[i]); + }; + for (var i = 0; i < this._hp_iconsB.length; i++) { + this.removeChild(this._hp_iconsB[i]); + }; + }; + if (!this._battler) {return}; + var n_icons = Moghunter.ahud_hp_icon_rows * Moghunter.ahud_hp_icon_cols; + this._hp_icons = []; + this._hp_icons.iconMode = String(Moghunter.ahud_hp_icon_halfMode) == "true" ? true : false; + this._hp_iconsB = []; + + this._hp_iconsB.iconMode = this._hp_icons.iconMode; + this._hp_IconZoomAnime = String(Moghunter.ahud_hp_icon_zoomAnime) == "true" ? true : false; + var colors = Math.max(Moghunter.ahud_hp_icon_colorMax, 2) + var cw = this._hp_icon_img.width / colors; + var ch = this._hp_icon_img.height / 2; + for (var i = 0; i < n_icons; i++) { + this._hp_iconsB[i] = new Sprite(this._hp_icon_img); + this._hp_iconsB[i].colorMax = colors; + this._hp_iconsB[i].anchor.x = 0.5; + this._hp_iconsB[i].anchor.y = 0.5; + this._hp_iconsB[i].rows = Moghunter.ahud_hp_icon_rows; + this._hp_iconsB[i].cols = Moghunter.ahud_hp_icon_cols; + this._hp_iconsB[i].org = [this._pos_x + Moghunter.ahud_hp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_hp_icon_pos_y - ch]; + this._hp_iconsB[i].spc = [Moghunter.ahud_hp_icon_space_x,Moghunter.ahud_hp_icon_space_y]; + this._hp_iconsB[i].zoomA = this._hp_IconZoomAnime; + this._hp_iconsB[i].zoomData = [0,0,0,1.00]; + this._hp_iconsB[i].visible = false; + this._hp_iconsB[i].enabled = false; + this.addChild(this._hp_iconsB[i]); + }; + for (var i = 0; i < n_icons; i++) { + this._hp_icons[i] = new Sprite(this._hp_icon_img); + this._hp_icons[i].colorMax = Math.max(Moghunter.ahud_hp_icon_colorMax, 2); + this._hp_icons[i].anchor.x = 0.5; + this._hp_icons[i].anchor.y = 0.5; + this._hp_icons[i].rows = Moghunter.ahud_hp_icon_rows; + this._hp_icons[i].cols = Moghunter.ahud_hp_icon_cols; + this._hp_icons[i].org = [this._pos_x + Moghunter.ahud_hp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_hp_icon_pos_y - ch]; + this._hp_icons[i].spc = [Moghunter.ahud_hp_icon_space_x,Moghunter.ahud_hp_icon_space_y]; + this._hp_icons[i].zoomA = this._hp_IconZoomAnime; + this._hp_icons[i].zoomData = [0,0,0,1.00]; + this._hp_icons[i].visible = false; + this._hp_icons[i].enabled = false; + this.addChild(this._hp_icons[i]); + }; +}; + +//============================== +// * Create MP icon +//============================== +Actor_Hud.prototype.create_mp_icon = function() { + if (String(Moghunter.ahud_mp_icon_visible) != "true") {return}; + if (this._mp_icons) { + for (var i = 0; i < this._mp_icons.length; i++) { + this.removeChild(this._mp_icons[i]); + }; + for (var i = 0; i < this._mp_iconsB.length; i++) { + this.removeChild(this._mp_iconsB[i]); + }; + }; + if (!this._battler) {return}; + var n_icons = Moghunter.ahud_mp_icon_rows * Moghunter.ahud_mp_icon_cols; + this._mp_icons = []; + this._mp_icons.iconMode = String(Moghunter.ahud_mp_icon_halfMode) == "true" ? true : false; + this._mp_iconsB = []; + this._mp_iconsB.iconMode = 0; + this._mp_IconZoomAnime = String(Moghunter.ahud_mp_icon_zoomAnime) == "true" ? true : false + var colors = Math.max(Moghunter.ahud_mp_icon_colorMax, 2); + var cw = this._mp_icon_img.width / colors; + var ch = this._mp_icon_img.height / 2; + for (var i = 0; i < n_icons; i++) { + this._mp_iconsB[i] = new Sprite(this._mp_icon_img); + this._mp_iconsB[i].colorMax = colors; + this._mp_iconsB[i].anchor.x = 0.5; + this._mp_iconsB[i].anchor.y = 0.5; + this._mp_iconsB[i].rows = Moghunter.ahud_mp_icon_rows; + this._mp_iconsB[i].cols = Moghunter.ahud_mp_icon_cols; + this._mp_iconsB[i].org = [this._pos_x + Moghunter.ahud_mp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_mp_icon_pos_y - ch]; + this._mp_iconsB[i].spc = [Moghunter.ahud_mp_icon_space_x,Moghunter.ahud_mp_icon_space_y]; + this._mp_iconsB[i].zoomA = this._mp_IconZoomAnime; + this._mp_iconsB[i].zoomData = [0,0,0,1.00]; + this._mp_iconsB[i].visible = false; + this._mp_iconsB[i].enabled = false; + this.addChild(this._mp_iconsB[i]); + }; + for (var i = 0; i < n_icons; i++) { + this._mp_icons[i] = new Sprite(this._mp_icon_img); + this._mp_icons[i].colorMax = Math.max(Moghunter.ahud_mp_icon_colorMax, 2); + this._mp_icons[i].anchor.x = 0.5; + this._mp_icons[i].anchor.y = 0.5; + this._mp_icons[i].rows = Moghunter.ahud_mp_icon_rows; + + this._mp_icons[i].cols = Moghunter.ahud_mp_icon_cols; + this._mp_icons[i].org = [this._pos_x + Moghunter.ahud_mp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_mp_icon_pos_y - ch]; + this._mp_icons[i].spc = [Moghunter.ahud_mp_icon_space_x,Moghunter.ahud_mp_icon_space_y]; + this._mp_icons[i].zoomA = this._mp_IconZoomAnime; + this._mp_icons[i].zoomData = [0,0,0,1.00]; + this._mp_icons[i].visible = false; + this._mp_icons[i].enabled = false; + this.addChild(this._mp_icons[i]); + }; +}; + +//============================== +// * Create TP icon +//============================== +Actor_Hud.prototype.create_tp_icon = function() { + if (String(Moghunter.ahud_tp_icon_visible) != "true") {return}; + if (this._tp_icons) { + for (var i = 0; i < this._tp_icons.length; i++) { + this.removeChild(this._tp_icons[i]); + }; + for (var i = 0; i < this._tp_iconsB.length; i++) { + this.removeChild(this._tp_iconsB[i]); + }; + }; + if (!this._battler) {return}; + var n_icons = Moghunter.ahud_tp_icon_rows * Moghunter.ahud_tp_icon_cols; + this._tp_icons = []; + this._tp_icons.iconMode = String(Moghunter.ahud_tp_icon_halfMode) == "true" ? true : false; + this._tp_iconsB = []; + this._tp_iconsB.iconMode = this._tp_icons.iconMode; + this._tp_IconZoomAnime = String(Moghunter.ahud_tp_icon_zoomAnime) == "true" ? true : false; + var colors = Math.max(Moghunter.ahud_tp_icon_colorMax, 2); + var cw = this._tp_icon_img.width / colors; + var ch = this._tp_icon_img.height / 2; + for (var i = 0; i < n_icons; i++) { + this._tp_iconsB[i] = new Sprite(this._tp_icon_img); + this._tp_iconsB[i].colorMax = colors; + this._tp_iconsB[i].anchor.x = 0.5; + this._tp_iconsB[i].anchor.y = 0.5; + this._tp_iconsB[i].rows = Moghunter.ahud_tp_icon_rows; + this._tp_iconsB[i].cols = Moghunter.ahud_tp_icon_cols; + this._tp_iconsB[i].org = [this._pos_x + Moghunter.ahud_tp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_tp_icon_pos_y - ch]; + this._tp_iconsB[i].spc = [Moghunter.ahud_tp_icon_space_x,Moghunter.ahud_tp_icon_space_y]; + this._tp_iconsB[i].zoomA = this._tp_IconZoomAnime; + this._tp_iconsB[i].zoomData = [0,0,0,1.00]; + this._tp_iconsB[i].visible = false; + this._tp_iconsB[i].enabled = false; + this.addChild(this._tp_iconsB[i]); + }; + for (var i = 0; i < n_icons; i++) { + this._tp_icons[i] = new Sprite(this._tp_icon_img); + this._tp_icons[i].colorMax = Math.max(Moghunter.ahud_tp_icon_colorMax, 2); + this._tp_icons[i].anchor.x = 0.5; + this._tp_icons[i].anchor.y = 0.5; + this._tp_icons[i].rows = Moghunter.ahud_tp_icon_rows; + this._tp_icons[i].cols = Moghunter.ahud_tp_icon_cols; + this._tp_icons[i].org = [this._pos_x + Moghunter.ahud_tp_icon_pos_x - cw,this._pos_y + Moghunter.ahud_tp_icon_pos_y - ch]; + this._tp_icons[i].spc = [Moghunter.ahud_tp_icon_space_x,Moghunter.ahud_tp_icon_space_y]; + this._tp_icons[i].zoomA = this._tp_IconZoomAnime; + this._tp_icons[i].zoomData = [0,0,0,1.00]; + this._tp_icons[i].visible = false; + this._tp_icons[i].enabled = false; + this.addChild(this._tp_icons[i]); + }; +}; + + +//============================== +// * setFrameIcon +//============================== +Actor_Hud.prototype.setFrameIcon = function(icon,image,i,hp,cw,ch) { + var sX = cw + 2 + icon.spc[0]; + var sY = ch + 2 + icon.spc[1]; + var lX = sX * icon.rows; + var lines = Math.floor(i / icon.rows); + icon.scale.y = icon.scale.x; + icon.setFrame(hp,0,cw,ch); + icon.x = icon.org[0] + (sX * i) - (lX * lines); + icon.y = icon.org[1] + (sY * lines); +}; + +//============================== +// * is Icon Visible +//============================== +Actor_Hud.prototype.isIconVisible = function(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorIndex2,realvalue2,icon,maxvalue) { + icon.opacity = 255; + icon.blendMode = 0; + if (mode === 0) { + if (i >= par_max) {return false}; + return true; + }; + if (par === 0) {return false}; + if (par > maxvalue) { + icon.opacity = 155; + icon.blendMode = 1; + return true; + }; + if (isMaxValue) {return true}; + if (colorIndex > 0 && colorIndex2 >= colorIndex) { + icon.opacity = i >= realvalue ? 0 : 255; + icon.blendMode = i >= realvalue ? 1 : 0; + if (colorIndex2 > colorIndex) {return true}; + if (i >= realvalue2) {return false}; + } else { + if (i >= realvalue) {return false}; + }; + return true; +}; + +//============================== +// * set Color Index +//============================== +Actor_Hud.prototype.setColorIndex = function(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorMax,maxvalue) { + if (par === 0) {return 0}; + if (colorIndex >= colorMax || par > maxvalue) {return colorMax - 1} + if (mode === 0) {return colorIndex}; + if (mode === 1) { + if (realvalue === 0) {return colorIndex}; + return colorIndex + 1; + }; + return 0; +}; + +//============================== +// * is Icon Enabled +//============================== +Actor_Hud.prototype.isIconEnabled = function(i,mode,par,par_max,realvalue,iconMax,colorIndex,colorMax,maxvalue) { + if (mode === 0) {return false}; + if (par === 0) {return false}; + if (colorIndex >= colorMax || par > maxvalue) {return true} + if (realvalue != 0 && i === (realvalue - 1)) {return true}; + if (realvalue === 0 && i === (iconMax - 1)) {return true}; + return false +}; + +//============================== +// * refresh Icons +//============================== +Actor_Hud.prototype.refresh_icons = function(sprites,image,par,par_max,mode) { + if (sprites.iconMode) { + this.refreshIconHalfMode(sprites,image,par,par_max,mode); + } else { + this.refreshIconNormalMode(sprites,image,par,par_max,mode); + }; +}; + +//============================== +// * refresh Icon Normal Mode +//============================== +Actor_Hud.prototype.refreshIconNormalMode = function(sprites,image,par,par_max,mode) { + for (var i = 0; i < sprites.length; i++) { + var icon = sprites[i]; + var cw = image.width / icon.colorMax; + var ch = image.height; + var iconMax = icon.rows; + var colorIndex = Math.floor(par / iconMax); + var colorMax = icon.colorMax; + var avaliableValue = Math.floor(colorIndex * iconMax) + var realvalue = par - avaliableValue; + var isMaxValue = par === avaliableValue ? true : false; + var colorIndex2 = Math.floor(par_max / iconMax); + var avaliableValue2 = Math.floor(colorIndex2 * iconMax) + var realvalue2 = par_max - avaliableValue2; + var maxvalue = iconMax * (colorMax - 1); + var hp = cw * this.setColorIndex(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorMax,maxvalue); + icon.visible = this.isIconVisible(i,mode,par,par_max,realvalue,isMaxValue,colorIndex,colorIndex2,realvalue2,icon,maxvalue); + icon.enable = this.isIconEnabled(i,mode,par,par_max,realvalue,iconMax,colorIndex,colorMax,maxvalue); + icon.scale.x = 1.00; + icon.zoomData = [0,0,0,icon.scale.x]; + this.setFrameIcon(icon,image,i,hp,cw,ch); + }; +}; + +//============================== +// * refresh Icon Half Mode +//============================== +Actor_Hud.prototype.refreshIconHalfMode = function(sprites,image,par,par_max,mode) { + var halfpar = Math.floor(par / 2); + var parOdd1 = par%2; + var parOdd2 = parOdd1 == 0 ? true : false; + var prepar = par; + par = sprites.iconMode ? (halfpar + parOdd1) : par; + var prepar2 = par; + var halfmaxpar = Math.floor(par_max / 2); + var parmaxOdd1 = par_max%2; + var parmaxOdd2 = parmaxOdd1 == 0 ? true : false; + var preparmax = par_max; + par_max = sprites.iconMode ? (halfmaxpar + parmaxOdd1) : par_max; + var preparmax2 = par_max; + if (mode === 1 && par > sprites.length) { + + var mx_g = Math.floor(par / sprites.length); + var mx_l = sprites.length * mx_g; + var par = par - mx_l; + if (par === 0) {par = sprites.length}; + }; + for (var i = 0; i < sprites.length; i++) { + var icon = sprites[i]; + icon.visible = false; + icon.opacity = 255; + icon.enable = (prepar2 > 0 && i === (prepar2 - 1) && mode === 1) ? true : false; + var cw = image.width / icon.colorMax; + var ch = image.height; + if (par > 0 && icon.colorMax > 2) { + var lines = Math.floor((prepar - 1) / sprites.length) + 1; + if (lines >= icon.colorMax - 1) { + var hp = (icon.colorMax - 1) * cw; + if (mode === 1) {icon.opacity = 0}; + } else { + if (mode === 0 && lines > 0) {lines--}; + var hp = lines * cw; + }; + } else { + if (mode === 1 && prepar2 > sprites.length) { + par = prepar; + icon.enable = false; + }; + var hp = mode === 1 ? cw : 0; + }; + var sX = cw + 2 + icon.spc[0]; + var sY = ch + 2 + icon.spc[1]; + var lX = sX * icon.rows; + var lines = Math.floor(i / icon.rows); + if (sprites.iconMode) { + if (mode === 0) { + icon.scale.x = 1.00; + if (par_max <= sprites.length && i == par_max - 1) { + icon.scale.x = !parmaxOdd2 ? 0.5 : 1.00; + }; + } else { + if (prepar2 - 1 === i) { + icon.scale.x = parOdd2 ? 1.00 : 0.50; + } else { + icon.scale.x = 1.00; + }; + }; + } else { + icon.scale.x = 1.00; + }; + icon.scale.y = icon.scale.x; + icon.zoomData = [0,0,0,icon.scale.x]; + icon.visible = true + if (par_max < sprites.length && i > (par_max - 1)) {icon.visible = false}; + if (mode === 1) { + icon.visible = i > prepar2 - 1 ? false : true + }; + icon.setFrame(hp,0,cw,ch); + icon.x = icon.org[0] + (sX * i) - (lX * lines); + icon.y = icon.org[1] + (sY * lines); + }; +}; + +//============================== +// * update Icon Zoom Anime +//============================== +Actor_Hud.prototype.updateIconZoomAnime = function(sprites) { + for (var i = 0; i < sprites.length; i++) { + var icon = sprites[i]; + if (icon.enable) { + icon.zoomData[1]++; + if (icon.zoomData[1] > 2) { + icon.zoomData[1] = 0; + icon.zoomData[2]++; + if (icon.zoomData[2] < 15) { + icon.zoomData[0] += 0.02; + } else if (icon.zoomData[2] < 30) { + icon.zoomData[0] -= 0.02; + } else { + icon.zoomData[0] = 0; + icon.zoomData[2] = 0; + }; + icon.scale.x = icon.zoomData[3] + icon.zoomData[0]; + icon.scale.y = icon.scale.x; + }; + }; + }; +}; + +//============================== +// * Create HP Number +//============================== +Actor_Hud.prototype.create_hp_number = function() { + if (String(Moghunter.ahud_hp_number_visible) != "true") {return}; + if (this._hp_number) {for (var i = 0; i < this._hp_number.length; i++) {this.removeChild(this._hp_number[i]);}}; + if (!this._battler) {return}; + this._hp_number = []; + this._hp_number.align = Number(Moghunter.ahud_hp_number_align); + this._hp_img_data = [this._hp_number_img.width,this._hp_number_img.height, + this._hp_number_img.width / 10, this._hp_number_img.height / 2, + this._pos_x + Moghunter.ahud_hp_number_pos_x, + this._pos_y + Moghunter.ahud_hp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._hp_number[i] = new Sprite(this._hp_number_img); + this._hp_number[i].visible = false; + this._hp_number[i].x = this._hp_img_data[4]; + this._hp_number[i].y = this._hp_img_data[5]; + this.addChild(this._hp_number[i]); + }; + this._hp_number_old = this._battler.hp; + this.refresh_number(this._hp_number,this._hp_number_old,this._hp_img_data,this._hp_img_data[4],0); +}; + +//============================== +// * Create maxHP Number +//============================== +Actor_Hud.prototype.create_maxhp_number = function() { + if (String(Moghunter.ahud_maxhp_number_visible) != "true") {return}; + if (this._maxhp_number) {for (var i = 0; i < this._maxhp_number.length; i++) {this.removeChild(this._maxhp_number[i]);}}; + if (!this._battler) {return}; + this._maxhp_number = []; + this._maxhp_number.align = Number(Moghunter.ahud_hp_number_align); + this._maxhp_img_data = [this._maxhp_number_img.width,this._maxhp_number_img.height, + this._maxhp_number_img.width / 10, this._maxhp_number_img.height / 2, + this._pos_x + Moghunter.ahud_maxhp_number_pos_x, + this._pos_y + Moghunter.ahud_maxhp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._maxhp_number[i] = new Sprite(this._maxhp_number_img); + this._maxhp_number[i].visible = false; + this._maxhp_number[i].x = this._maxhp_img_data[4]; + this._maxhp_number[i].y = this._maxhp_img_data[5]; + this.addChild(this._maxhp_number[i]); + }; + this._maxhp_number_old = this._battler.mhp; + this.refresh_number(this._maxhp_number,this._maxhp_number_old,this._maxhp_img_data,this._maxhp_img_data[4],0); +}; + +//============================== +// * Update HP +//============================== +Actor_Hud.prototype.update_hp = function() { + if (this._hp_meter_blue) { + if(this._hp_flow[0]) { + if (this._hp_old[1] != this._battler.mhp) { + this._hp_old = [this._battler.hp,this._battler.mhp]; + this.refresh_meter_flow(this._hp_meter_red,this._battler.hp,this._battler.mhp,1,$gameSystem._ahud_flowData[0]); + }; + this.refresh_meter_flow(this._hp_meter_blue,this._battler.hp,this._battler.mhp,0,$gameSystem._ahud_flowData[0]); + var dif_meter = this.update_dif(this._hp_old_ani[0],this._battler.hp,160) + if (this._hp_old_ani[0] != dif_meter) {this._hp_old_ani[0] = dif_meter; + this.refresh_meter_flow(this._hp_meter_red,this._hp_old_ani[0],this._battler.mhp,1,$gameSystem._ahud_flowData[0]); + }; + $gameSystem._ahud_flowData[0] += this._hp_flow_speed; + if ($gameSystem._ahud_flowData[0] > this._hp_flow[3]) {$gameSystem._ahud_flowData[0] = 0}; + } + else { + if (this.need_refresh_parameter(0)) { + this.refresh_meter(this._hp_meter_blue,this._battler.hp,this._battler.mhp,0,2,0); + this._hp_old = [this._battler.hp,this._battler.mhp]; + }; + var dif_meter = this.update_dif(this._hp_old_ani[0],this._battler.hp,160) + if (this._hp_old_ani[0] != dif_meter) {this._hp_old_ani[0] = dif_meter; + this.refresh_meter(this._hp_meter_red,this._hp_old_ani[0],this._battler.mhp,1,2,0);}; + }; + }; + if (this._hp_number) { + var dif_number = this.update_dif(this._hp_number_old,this._battler.hp,30) + if (this._hp_number_old != dif_number) {this._hp_number_old = dif_number; + this.refresh_number(this._hp_number,this._hp_number_old,this._hp_img_data,this._hp_img_data[4],0);}; + }; + if (this._maxhp_number) { + if (this._maxhp_number_old != this._battler.mhp) {this._maxhp_number_old = this._battler.mhp; + this.refresh_number(this._maxhp_number,this._maxhp_number_old,this._maxhp_img_data,this._maxhp_img_data[4],0);}; + }; + if (this._hp_icons) { + if (this._hp_icon_old[0] != this._battler.hp || this._hp_icon_old[1] != this._battler.mhp) { + this._hp_icon_old[0] = this._battler.hp; + this._hp_icon_old[1] = this._battler.mhp; + this.refresh_icons(this._hp_iconsB,this._hp_icon_img,this._battler.hp,this._battler.mhp,0); + this.refresh_icons(this._hp_icons,this._hp_icon_img,this._battler.hp,this._battler.mhp,1); + }; + if (this._hp_IconZoomAnime) {this.updateIconZoomAnime(this._hp_icons)}; + }; +}; + +//============================== +// * Create MP Meter +//============================== +Actor_Hud.prototype.create_mp_meter = function() { + if (String(Moghunter.ahud_mp_meter_visible) != "true") {return}; + this.removeChild(this._mp_meter_blue); + this.removeChild(this._mp_meter_red); + if (!this._battler) {return}; + this._mp_meter_red = new Sprite(this._mp_meter_img); + this._mp_meter_red.x = this._pos_x + Moghunter.ahud_mp_meter_pos_x; + this._mp_meter_red.y = this._pos_y + Moghunter.ahud_mp_meter_pos_y; + this._mp_meter_red.rotation = Moghunter.ahud_mp_meter_rotation * Math.PI / 180; + this._mp_meter_red.setFrame(0,0,0,0); + this.addChild(this._mp_meter_red); + this._mp_meter_blue = new Sprite(this._mp_meter_img); + this._mp_meter_blue.x = this._mp_meter_red.x; + this._mp_meter_blue.y = this._mp_meter_red.y; + this._mp_meter_blue.rotation = this._mp_meter_red.rotation * Math.PI / 180; + this._mp_meter_blue.setFrame(0,0,0,0); + this.addChild(this._mp_meter_blue); + this._mp_old_ani[0] = this._battler.mp - 1; + if (String(Moghunter.ahud_mp_meter_flow) === "true") {this._mp_flow[0] = true; + this._mp_flow[2] = this._mp_meter_img.width / 3; + this._mp_flow[3] = this._mp_flow[2] * 2; + this._mp_flow[1] = Math.floor(Math.random() * this._mp_flow[2]); + }; +}; + +//============================== +// * Create MP Number +//============================== +Actor_Hud.prototype.create_mp_number = function() { + if (String(Moghunter.ahud_mp_number_visible) != "true") {return}; + if (this._mp_number) {for (var i = 0; i < this._mp_number.length; i++) {this.removeChild(this._mp_number[i]);}}; + if (!this._battler) {return}; + this._mp_number = []; + this._mp_number.align = Number(Moghunter.ahud_mp_number_align); + this._mp_img_data = [this._mp_number_img.width,this._mp_number_img.height, + this._mp_number_img.width / 10, this._mp_number_img.height / 2, + this._pos_x + Moghunter.ahud_mp_number_pos_x, + this._pos_y + Moghunter.ahud_mp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._mp_number[i] = new Sprite(this._mp_number_img); + this._mp_number[i].visible = false; + this._mp_number[i].x = this._mp_img_data[4]; + this._mp_number[i].y = this._mp_img_data[5] ; + this.addChild(this._mp_number[i]); + }; + this._mp_number_old = this._battler.mp; + this.refresh_number(this._mp_number,this._mp_number_old,this._mp_img_data,this._mp_img_data[4],0); +}; + +//============================== +// * Create MaxMP Number +//============================== +Actor_Hud.prototype.create_maxmp_number = function() { + if (String(Moghunter.ahud_maxmp_number_visible) != "true") {return}; + if (this._maxmp_number) {for (var i = 0; i < this._maxmp_number.length; i++) {this.removeChild(this._maxmp_number[i]);}}; + if (!this._battler) {return}; + this._maxmp_number = []; + this._maxmp_number.align = Number(Moghunter.ahud_mp_number_align); + this._maxmp_img_data = [this._maxmp_number_img.width,this._maxmp_number_img.height, + this._maxmp_number_img.width / 10, this._maxmp_number_img.height / 2, + this._pos_x + Moghunter.ahud_maxmp_number_pos_x, + this._pos_y + Moghunter.ahud_maxmp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._maxmp_number[i] = new Sprite(this._maxmp_number_img); + this._maxmp_number[i].visible = false; + this._maxmp_number[i].x = this._maxmp_img_data[4]; + this._maxmp_number[i].y = this._maxmp_img_data[5] ; + this.addChild(this._maxmp_number[i]); + }; + this._maxmp_number_old = this._battler.mmp; + this.refresh_number(this._maxmp_number,this._maxmp_number_old,this._maxmp_img_data,this._maxmp_img_data[4],0); +}; + +//============================== +// * Update MP +//============================== +Actor_Hud.prototype.update_mp = function() { + if (this._mp_meter_blue) { + if(this._mp_flow[0]) { + if (this._mp_old[1] != this._battler.mmp) { + this._mp_old = [this._battler.mp,this._battler.mmp]; + this.refresh_meter_flow(this._mp_meter_red,this._battler.mp,this._battler.mmp,1,$gameSystem._ahud_flowData[1]); + }; + this.refresh_meter_flow(this._mp_meter_blue,this._battler.mp,this._battler.mmp,0,$gameSystem._ahud_flowData[1]); + var dif_meter = this.update_dif(this._mp_old_ani[0],this._battler.mp,160); + if (this._mp_old_ani[0] != dif_meter) {this._mp_old_ani[0] = dif_meter; + this.refresh_meter_flow(this._mp_meter_red,this._mp_old_ani[0],this._battler.mmp,1,$gameSystem._ahud_flowData[1]); + }; + $gameSystem._ahud_flowData[1] += this._mp_flow_speed; + if ($gameSystem._ahud_flowData[1] > this._mp_flow[3]) {$gameSystem._ahud_flowData[1] = 0}; + } + else { + if (this.need_refresh_parameter(1)) { + this.refresh_meter(this._mp_meter_blue,this._battler.mp,this._battler.mmp,0,2,0); + this._mp_old = [this._battler.mp,this._battler.mmp]; + }; + var dif_meter = this.update_dif(this._mp_old_ani[0],this._battler.mp,160) + if (this._mp_old_ani[0] != dif_meter) {this._mp_old_ani[0] = dif_meter; + this.refresh_meter(this._mp_meter_red,this._mp_old_ani[0],this._battler.mmp,1,2,0);}; + }; + }; + if (this._mp_number) { + var dif_number = this.update_dif(this._mp_number_old,this._battler.mp,30) + if (this._mp_number_old != dif_number) {this._mp_number_old = dif_number; + this.refresh_number(this._mp_number,this._mp_number_old,this._mp_img_data,this._mp_img_data[4],0);}; + }; + if (this._maxmp_number) { + if (this._maxmp_number_old != this._battler.mmp) {this._maxmp_number_old = this._battler.mmp; + this.refresh_number(this._maxmp_number,this._maxmp_number_old,this._maxmp_img_data,this._maxmp_img_data[4],0);}; + }; + if (this._mp_icons) { + if (this._mp_icon_old[0] != this._battler.mp || this._mp_icon_old[1] != this._battler.mmp) { + this._mp_icon_old[0] = this._battler.mp; + this._mp_icon_old[1] = this._battler.mmp; + this.refresh_icons(this._mp_iconsB,this._mp_icon_img,this._battler.mp,this._battler.mmp,0); + this.refresh_icons(this._mp_icons,this._mp_icon_img,this._battler.mp,this._battler.mmp,1); + }; + if (this._mp_IconZoomAnime) {this.updateIconZoomAnime(this._mp_icons)}; + }; +}; + +//============================== +// * Create TP Meter +//============================== +Actor_Hud.prototype.create_tp_meter = function() { + if (String(Moghunter.ahud_tp_meter_visible) != "true") {return}; + this.removeChild(this._tp_meter_blue); + this.removeChild(this._tp_meter_red); + if (!this._battler) {return}; + this._tp_meter_red = new Sprite(this._tp_meter_img); + this._tp_meter_red.x = this._pos_x + Moghunter.ahud_tp_meter_pos_x; + this._tp_meter_red.y = this._pos_y + Moghunter.ahud_tp_meter_pos_y; + this._tp_meter_red.rotation = Moghunter.ahud_tp_meter_rotation * Math.PI / 180; + this._tp_meter_red.setFrame(0,0,0,0); + this.addChild(this._tp_meter_red); + this._tp_meter_blue = new Sprite(this._tp_meter_img); + this._tp_meter_blue.x = this._tp_meter_red.x; + this._tp_meter_blue.y = this._tp_meter_red.y; + this._tp_meter_blue.rotation = this._tp_meter_red.rotation * Math.PI / 180; + this._tp_meter_blue.setFrame(0,0,0,0); + this.addChild(this._tp_meter_blue); + this._tp_old_ani[0] = this._battler.tp - 1; + if (String(Moghunter.ahud_tp_meter_flow) === "true") {this._tp_flow[0] = true; + this._tp_flow[2] = this._tp_meter_img.width / 3; + this._tp_flow[3] = this._tp_flow[2] * 2; + this._tp_flow[1] = Math.floor(Math.random() * this._tp_flow[2]); + }; +}; + +//============================== +// * Create TP Number +//============================== +Actor_Hud.prototype.create_tp_number = function() { + if (String(Moghunter.ahud_tp_number_visible) != "true") {return}; + if (this._tp_number) {for (var i = 0; i < this._tp_number.length; i++) {this.removeChild(this._tp_number[i]);}}; + if (!this._battler) {return}; + this._tp_number = []; + this._tp_number.align = Number(Moghunter.ahud_tp_number_align); + this._tp_img_data = [this._tp_number_img.width,this._tp_number_img.height, + this._tp_number_img.width / 10, this._tp_number_img.height / 2, + this._pos_x + Moghunter.ahud_tp_number_pos_x, + this._pos_y + Moghunter.ahud_tp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._tp_number[i] = new Sprite(this._tp_number_img); + this._tp_number[i].visible = false; + this._tp_number[i].x = this._tp_img_data[4]; + this._tp_number[i].y = this._tp_img_data[5] ; + this.addChild(this._tp_number[i]); + }; + this._tp_number_old = this._battler.tp; + this.refresh_number(this._tp_number,this._tp_number_old,this._tp_img_data,this._tp_img_data[4],0); +}; + +//============================== +// * Create MaxTP Number +//============================== +Actor_Hud.prototype.create_maxtp_number = function() { + if (String(Moghunter.ahud_maxtp_number_visible) != "true") {return}; + if (this._maxtp_number) {for (var i = 0; i < this._maxtp_number.length; i++) {this.removeChild(this._maxtp_number[i]);}}; + if (!this._battler) {return}; + this._maxtp_number = []; + this._maxtp_number.align = Number(Moghunter.ahud_tp_number_align); + this._maxtp_img_data = [this._maxtp_number_img.width,this._maxtp_number_img.height, + this._maxtp_number_img.width / 10, this._maxtp_number_img.height / 2, + this._pos_x + Moghunter.ahud_maxtp_number_pos_x, + this._pos_y + Moghunter.ahud_maxtp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._maxtp_number[i] = new Sprite(this._maxtp_number_img); + this._maxtp_number[i].visible = false; + this._maxtp_number[i].x = this._maxtp_img_data[4]; + this._maxtp_number[i].y = this._maxtp_img_data[5] ; + this.addChild(this._maxtp_number[i]); + }; + this._maxtp_number_old = 100; + this.refresh_number(this._maxtp_number,this._maxtp_number_old,this._maxtp_img_data,this._maxtp_img_data[4],0); +}; + +//============================== +// * Update TP +//============================== +Actor_Hud.prototype.update_tp = function() { + if (this._tp_meter_blue) { + if(this._tp_flow[0]) { + if (this._tp_old[1] != this._battler.maxTp()) { + this._tp_old = [this._battler.tp,this._battler.maxTp()]; + this.refresh_meter_flow(this._tp_meter_red,this._battler.tp,this._battler.maxTp(),1,$gameSystem._ahud_flowData[2]); + }; + this.refresh_meter_flow(this._tp_meter_blue,this._battler.tp,this._battler.maxTp(),0,$gameSystem._ahud_flowData[2]); + var dif_meter = this.update_dif(this._tp_old_ani[0],this._battler.tp,160) + if (this._tp_old_ani[0] != dif_meter) {this._tp_old_ani[0] = dif_meter; + this.refresh_meter_flow(this._tp_meter_red,this._tp_old_ani[0],this._battler.maxTp(),1,$gameSystem._ahud_flowData[2]); + }; + $gameSystem._ahud_flowData[2] += this._tp_flow_speed; + if ($gameSystem._ahud_flowData[2] > this._tp_flow[3]) {$gameSystem._ahud_flowData[2] = 0}; + } + else { + if (this.need_refresh_parameter(2)) { + this.refresh_meter(this._tp_meter_blue,this._battler.tp,this._battler.maxTp(),0,2,0); + this._tp_old = [this._battler.tp,this._battler.maxTp()]; + }; + var dif_meter = this.update_dif(this._tp_old_ani[0],this._battler.tp,160) + if (this._tp_old_ani[0] != dif_meter) {this._tp_old_ani[0] = dif_meter; + this.refresh_meter(this._tp_meter_red,this._tp_old_ani[0],this._battler.maxTp(),1,2,0);}; + }; + }; + if (this._tp_number) { + var dif_number = this.update_dif(this._tp_number_old,this._battler.tp,30) + if (this._tp_number_old != dif_number) {this._tp_number_old = dif_number; + this.refresh_number(this._tp_number,this._tp_number_old,this._tp_img_data,this._tp_img_data[4],0);}; + }; + if (this._tp_icons) { + if (this._tp_icon_old[0] != this._battler.tp || this._tp_icon_old[1] != this._battler.maxTp()) { + this._tp_icon_old[0] = this._battler.tp; + this._tp_icon_old[1] = this._battler.maxTp(); + this.refresh_icons(this._tp_iconsB,this._tp_icon_img,this._battler.tp,this._battler.maxTp(),0); + this.refresh_icons(this._tp_icons,this._tp_icon_img,this._battler.tp,this._battler.maxTp(),1); + }; + if (this._tp_IconZoomAnime) {this.updateIconZoomAnime(this._tp_icons)}; + }; +}; + + +//============================== +// * Create Exp Meter +//============================== +Actor_Hud.prototype.create_exp_meter = function() { +if (String(Moghunter.ahud_exp_meter_visible) != "true") {return}; + this.removeChild(this._exp_meter); + if (!this._battler) {return}; + this._exp_meter = new Sprite(this._exp_meter_img); + this._exp_meter.x = this._pos_x + Moghunter.ahud_exp_meter_pos_x; + this._exp_meter.y = this._pos_y + Moghunter.ahud_exp_meter_pos_y; + this._exp_meter.rotation = this._exp_meter.rotation * Math.PI / 180; + this.addChild(this._exp_meter); + if (String(Moghunter.ahud_exp_meter_flow) === "true") {this._exp_flow[0] = true; + this._exp_flow[2] = this._exp_meter_img.width / 3; + this._exp_flow[3] = this._exp_flow[2] * 2; + this._exp_flow[1] = Math.floor(Math.random() * this._exp_flow[2]); + }; + this._exp_meter.setFrame(0,0,0,0); +}; + +//============================== +// * Create Level Number +//============================== +Actor_Hud.prototype.create_level_number = function() { + if (String(Moghunter.ahud_level_number_visible) != "true") {return}; + if (this._level_number) {for (var i = 0; i < this._level_number.length; i++) {this.removeChild(this._level_number[i]);}}; + if (!this._battler) {return}; + this._level_number = []; + this._level_number.align = Number(Moghunter.ahud_level_number_align); + this._level_img_data = [this._level_number_img.width,this._level_number_img.height, + this._level_number_img.width / 10, this._level_number_img.height / 2, + this._pos_x + Moghunter.ahud_level_number_pos_x, + this._pos_y + Moghunter.ahud_level_number_pos_y, + ]; + for (var i = 0; i < 3; i++) { + this._level_number[i] = new Sprite(this._level_number_img); + this._level_number[i].visible = false; + this._level_number[i].x = this._level_img_data[4]; + this._level_number[i].y = this._level_img_data[5]; + this.addChild(this._level_number[i]); + }; + this._level_number_old = this._battler.level; + this.refresh_number(this._level_number,this._level_number_old,this._level_img_data,this._level_img_data[4],1); +}; + +//============================== +// * Update Exp +//============================== +Actor_Hud.prototype.update_exp = function() { + if (this._exp_meter) { + if (this.need_refresh_parameter(3)) { + if (this._battler.isMaxLevel()) { + this.refresh_meter(this._exp_meter,1,1,0,1,1); + } else { + this.refresh_meter(this._exp_meter,this._battler.current_exp_r(),this._battler.nextLevelExp_r(),0,1,1); + }; + this._exp_old = this._battler.currentExp(); + }; + }; + if (this._level_number) { + var dif_number = this.update_dif(this._level_number_old,this._battler.level,30) + if (this._level_number_old != dif_number) {this._level_number_old = dif_number; + if (this._hp_old_ani) {this._hp_old_ani[0] = 0}; + if (this._mp_old_ani) {this._mp_old_ani[0] = 0}; + if (this._tp_old_ani) {this._tp_old_ani[0] = 0}; + this.refresh_number(this._level_number,this._level_number_old,this._level_img_data,this._level_img_data[4],1);}; + }; +}; + +//============================== +// * Create States +//============================== +Actor_Hud.prototype.create_states = function() { + if (String(Moghunter.ahud_states_visible) != "true") {return}; + this.removeChild(this._state_icon); + if (!this._battler) {return}; + this._states_data = [0,0,0]; + this._state_icon = new Sprite(this._state_img); + this._state_icon.x = this._pos_x + Moghunter.ahud_states_pos_x; + this._state_icon.y = this._pos_y + Moghunter.ahud_states_pos_y; + this._state_icon.visible = false; + this.addChild(this._state_icon); + this.refresh_states(); +}; + +//============================== +// * Refresh States +//============================== +Actor_Hud.prototype.refresh_states = function() { + this._states_data[0] = 0; + this._states_data[2] = 0; + this._state_icon.visible = false; + if (this._battler.allIcons().length == 0) {this._states_data[1] = 0;return}; + if (this._battler.allIcons()[this._states_data[1]]) { + this._states_data[0] = this._battler.allIcons()[this._states_data[1]]; + this._state_icon.visible = true; + var sx = this._states_data[0] % 16 * 32; + var sy = Math.floor(this._states_data[0] / 16) * 32; + this._state_icon.setFrame(sx, sy, 32, 32); + this._battler.need_refresh_bhud_states = false; + + }; + this._states_data[1] += 1; + if (this._states_data[1] >= this._battler.allIcons().length) { + this._states_data[1] = 0 + }; +}; + +//============================== +// * Update States +//============================== +Actor_Hud.prototype.update_states = function() { + if (!this._state_icon) {return}; + this._states_data[2] += 1; + if (this.need_refresh_states()) {this.refresh_states();}; +}; + +//============================== +// * Need Refresh States +//============================== +Actor_Hud.prototype.need_refresh_states = function() { + if (this._battler.need_refresh_bhud_states) {return true}; + if (this._states_data[2] > 60) {return true}; + return false; +}; \ No newline at end of file diff --git a/js/plugins/MOG_BattleHud.js b/js/plugins/MOG_BattleHud.js new file mode 100644 index 0000000..411335d --- /dev/null +++ b/js/plugins/MOG_BattleHud.js @@ -0,0 +1,3811 @@ +//============================================================================= +// MOG_BattleHud.js - (Template 06) +//============================================================================= + +/*: + * @plugindesc (v5.04 *) Permite customizar o layout de batalha. + * @author Moghunter + * + * @param -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Hud X-Axis + * @text X-Axis + * @desc Definição da posição X-Axis da Hud. + * @default -90 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud Y-Axis + * @text Y-Axis + * @desc Definição da posição Y-Axis da Hud. + * @default 500 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud Space X + * @text Space X + * @desc Define o espaço na horizontal entre as huds. + * @default 0 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud Space Y + * @text Space Y + * @desc Define o espaço na vertical entre as huds. + * @default 0 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud Slide X + * @text Slide Animation X + * @desc Deslizar X-Axis. + * @default 0 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Hud Slide Y + * @text Slide Animation Y + * @desc Deslizar Y-Axis. + * @default 0 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Vertical Mode + * @desc Deixar a Hud na posição vertical. + * @default false + * @type boolean + * @on Vertical Mode + * @off Horizontal Mode + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Max Battle Members + * @desc Quantidade de maxima de battler na batalha. + * @type number + * @min 1 + * @default 6 + * @parent -> MAIN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> LAYOUT OVERLAY <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Layout2 Visible + * @text Visible + * @desc Ativar o segunda imagem do layout, esta imagem + * ficará acima das faces e medidores. + * @default true + * @type boolean + * @parent -> LAYOUT OVERLAY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout2 X-Axis + * @text X-Axis + * @desc Definição da posição X-Axis da Hud. + * @default 0 + * @parent -> LAYOUT OVERLAY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout2 Y-Axis + * @text Y-Axis + * @desc Definição da posição Y-Axis da Hud. + * @default 0 + * @parent -> LAYOUT OVERLAY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> TURN <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Turn Visible + * @text Visible + * @desc Apresentar a imagem do turno. + * @default true + * @type boolean + * @parent -> TURN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Turn X-Axis + * @text X-Axis + * @desc Definição da posição X-Axis do turno. + * @default -5 + * @parent -> TURN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Turn Y-Axis + * @text Y-Axis + * @desc Definição da posição Y-Axis do turno. + * @default -5 + * @parent -> TURN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Turn Rotation Speed + * @text Rotation Animation Speed + * @desc Definição da velocidade de rotação da imagem. + * @default 0 + * @parent -> TURN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Turn Zoom Animation + * @text Zoom Animation + * @desc Ativar a animação de zoom ao ativar. + * @default false + * @type boolean + * @parent -> TURN <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Face Visible + * @text Visible + * @desc Apresentar a imagem da face. + * @default true + * @type boolean + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face X-Axis + * @text X-Axis + * @desc Definição da posição X-Axis da face. + * @default 70 + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Y-Axis + * @text Y-Axis + * @desc Definição da posição Y-Axis da face. + * @default 29 + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Shake Animation + * @text Shake Animation + * @desc Ativar animação de tremer da face. + * @default true + * @type boolean + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Zoom Animation + * @text Zoom Animation + * @desc Ativar animação de zoom de ação. + * @default true + * @type boolean + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Frame Animation + * @text Animated (Frames) + * @desc Ativar animação por frames. + * É necessário dividir a imagem por 5. + * @default false + * @type boolean + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Face Priority + * @text Priority + * @desc Prioridade da Face. (0 Low - 1 High) + * @type select + * @option Low (Below of Gauge) + * @value 0 + * @option High (Above of Gauge) + * @value 1 + * @default 1 + * @parent -> FACE <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Name Visible + * @text Visible + * @desc Apresentar o nome do personagem. + * @default false + * @type boolean + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name X-Axis + * @text X-Axis + * @desc Definição da posição X-Axis do nome. + * @default 0 + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Y-Axis + * @text Y-Axis + * @desc Definição da posição Y-Axis do nome. + * @default 0 + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Align + * @text Text Alignment + * @desc Alinhamento do nome. + * 0 - Left 1 - Center 2 - Right + * @type select + * @option Left + * @value 0 + * @option Center + * @value 1 + * @option Right + * @value 2 + * @default 0 + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Font Size + * @text Font Size + * @desc Definição do tamanho da fonte do nome. + * @default 20 + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Bold Size + * @text Bold Size + * @desc Definição do tamanho do contorno. + * @default 4 + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Name Font Italic + * @text Font Italic + * @desc Ativar fonte em itálico. + * @default false + * @type boolean + * @parent -> NAME <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> HP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param HP Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de HP + * @default true + * @type boolean + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de HP. + * @default 124 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de HP. + * @default 13 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Meter Flow Anime + * @text Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default false + * @type boolean + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number Visible + * @text Number Visible + * @desc Apresentar o numero de HP + * @default true + * @type boolean + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number Align type + * @text Number Alignment + * @desc Definição do tipo de alinhamento dos números. + * (0 - right / 1 - Center / 2 - Left / 3 - Diagonal) + * @type select + * @option Right + * @value 0 + * @option Center + * @value 1 + * @option Left + * @value 2 + * @option Diagonal + * @value 3 + * @default 0 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number X-Axis + * @text Number X-Axis + * @desc Definição da posição X-Axis do numero de HP. + * @default 220 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param HP Number Y-Axis + * @text Number Y-Axis + * @desc Definição da posição Y-Axis do numero de HP. + * @default 0 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxHP Number Visible + * @text Max HP Visible + * @desc Apresentar o numero de HP maximo. + * @default false + * @type boolean + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxHP Number X-Axis + * @text Max HP X-Axis + * @desc Definição da posição X-Axis do numero de HP maximo. + * @default 0 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxHP Number Y-Axis + * @text Max HP Y-Axis + * @desc Definição da posição Y-Axis do numero de HP maximo. + * @default 0 + * @parent -> HP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> MP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param MP Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de MP + * @default true + * @type boolean + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de MP. + * @default 124 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de MP. + * @default 32 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Meter Flow Anime + * @text Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default false + * @type boolean + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number Visible + * @text Number Visible + * @desc Apresentar o numero de MP + * @default true + * @type boolean + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number Align type + * @text Number Alignment + * @desc Definição do tipo de alinhamento dos números. + * (0 - right / 1 - Center / 2 - Left / 3 - Diagonal) + * @type select + * @option Right + * @value 0 + * @option Center + * @value 1 + * @option Left + * @value 2 + * @option Diagonal + * @value 3 + * @default 0 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number X-Axis + * @text Number X-Axis + * @desc Definição da posição X-Axis do numero de MP. + * @default 220 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MP Number Y-Axis + * @text Number Y-Axis + * @desc Definição da posição Y-Axis do numero de MP. + * @default 19 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxMP Number Visible + * @text Max MP Visible + * @desc Apresentar o numero de MP maximo. + * @default false + * @type boolean + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxMP Number X-Axis + * @text Max HP X-Axis + * @desc Definição da posição X-Axis do numero de MP maximo. + * @default 0 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxMP Number Y-Axis + * @text Max HP Y-Axis + * @desc Definição da posição Y-Axis do numero de MP maximo. + * @default 0 + * @parent -> MP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> TP <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param TP Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de TP + * @default true + * @type boolean + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de TP. + * @default 124 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de TP. + * @default 51 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Meter Flow Anime + * @text Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default false + * @type boolean + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number Visible + * @text Number Visible + * @desc Apresentar o numero de TP. + * @default true + * @type boolean + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number Align type + * @text Number Alignment + * @desc Definição do tipo de alinhamento dos números. + * (0 - right / 1 - Center / 2 - Left / 3 - Diagonal) + * @type select + * @option Right + * @value 0 + * @option Center + * @value 1 + * @option Left + * @value 2 + * @option Diagonal + * @value 3 + * @default 0 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number X-Axis + * @text Number X-Axis + * @desc Definição da posição X-Axis do numero de TP. + * @default 220 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param TP Number Y-Axis + * @text Number Y-Axis + * @desc Definição da posição Y-Axis do numero de TP. + * @default 38 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxTP Number Visible + * @text Max TP Visible + * @desc Apresentar o numero de TP maximo. + * @default false + * @type boolean + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxTP Number X-Axis + * @text Max TP X-Axis + * @desc Definição da posição X-Axis do numero de TP maximo. + * @default 0 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param MaxTP Number Y-Axis + * @text Max TP Y-Axis + * @desc Definição da posição Y-Axis do numero de TP maximo. + * @default 0 + * @parent -> TP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> ATB <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param ATB Meter Visible + * @text Gauge Visible + * @desc Apresentar o medidor de TP + * @default true + * @type boolean + * @parent -> ATB <<<<<<<<<<<<<<<<<<<<<<< + * + * @param ATB Meter X-Axis + * @text Gauge X-Axis + * @desc Definição da posição X-Axis do medidor de ATB. + * @default 0 + * @parent -> ATB <<<<<<<<<<<<<<<<<<<<<<< + * + * @param ATB Meter Y-Axis + * @text Gauge Y-Axis + * @desc Definição da posição Y-Axis do medidor de ATB. + * @default 61 + * @parent -> ATB <<<<<<<<<<<<<<<<<<<<<<< + * + * @param ATB Meter Angle + * @text Gauge Angle + * @desc Ángulo do medidor. + * @default 0 + * @parent -> ATB <<<<<<<<<<<<<<<<<<<<<<< + * + * @param ATB Meter Flow Anime + * @text Gradient Animation + * @desc Ativar animação de gradiente no medidor. + * É necessário que a imagem tenha 3x a largura do medidor. + * @default false + * @type boolean + * @parent -> ATB <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param States Visible + * @text Visible + * @desc Apresentar o numero as condições. + * @default true + * @type boolean + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States X-Axis + * @text X-Axis + * @desc Definição da posição X-Axis das condições. + * @default 3 + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States Y-Axis + * @text Y-Axis + * @desc Definição da posição Y-Axis das condições. + * @default 24 + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States Mode + * @text View Mode + * @desc Definição do modo apresentado das condições. + * 0 - Timing Mode 1 - Line Mode + * @type select + * @option Timing Mode (Show one state for second) + * @value 0 + * @option Line Mode (Show all states) + * @value 1 + * @default 0 + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States Max + * @text Max number of states + * @desc Quantidade maxima de ícones apresentados. + * @type number + * @min 1 + * @default 4 + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param States Align + * @text Alignment + * @desc Alinhamento dos ícones. + * 0 - Left 1 - Right 2 - Upper 3 - Below + * @type select + * @option Left + * @value 0 + * @option Right + * @value 1 + * @option Upper + * @value 2 + * @option Below + * @value 3 + * @default 0 + * @parent -> STATES <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Command <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Command Auto Adjust + * @text Position Mode + * @desc Ativar ajuste automático baseado na posição + * da Hud. + * @type select + * @option Auto + * @value 0 + * @option Static + * @value 1 + * @default 1 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Command X-Axis + * @text X-Axis + * @desc Definição do posição X-axis do comando. + * @default 20 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Command Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do comando. + * @default 270 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Command Width + * @text Width + * @desc Definição da largura da janela. + * @default 192 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Command Height + * @text Height + * @desc Definição da altura da janela. + * @default 180 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Command Slide X + * @text Slide Animation X + * @desc Animação de slide X-Axis. + * @default 0 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Command Slide Y + * @text Slide Animation Y + * @desc Animação de slide Y-Axis. + * @default 0 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Command + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Command X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default -25 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Command Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default -35 + * @parent -> W COMMAND <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Party <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param W Party X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da janela. + * @default 325 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Party Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do janela. + * @default 170 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Party Width + * @text Width + * @desc Definição da largura da janela. + * @default 192 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Party Height + * @text Height + * @desc Definição da altura da janela. + * @default 110 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Party Slide X + * @text Slide Animation X + * @desc Animação de Slide X-Axis. + * @default 0 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Party Slide Y + * @text Slide Animation Y + * @desc Animação de Slide Y-Axis. + * @default 0 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Party + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Party X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default -325 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Party Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default -42 + * @parent -> W PARTY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Help <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param W Help X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da janela. + * @default 0 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Help Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do janela. + * @default 0 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Help Width + * @text Width + * @desc Definição da largura da janela. + * @default 816 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Help Height + * @text Height + * @desc Definição da altura da janela. + * @default 108 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Help Slide X + * @text Slide Animation X + * @desc Animação de Slide X-Axis. + * @default 0 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Help Slide Y + * @text Slide Animation Y + * @desc Animação de Slide Y-Axis. + * @default 0 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Help + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Help X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default 0 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Help Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default 0 + * @parent -> W HELP <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Skill <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param W Skill X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da janela. + * @default 0 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Skill Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do janela. + * @default 444 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Skill Width + * @text Width + * @desc Definição da largura da janela. + * @default 816 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Skill Height + * @text Height + * @desc Definição da altura da janela. + * @default 180 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Skill maxCols + * @text Max Columns + * @desc Definição da quantidade de colunas da janela. + * @type number + * @min 1 + * @default 2 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Skill Slide X + * @text Slide Animation X + * @desc Animação de Slide X-Axis. + * @default 0 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Skill Slide Y + * @text Slide Animation Y + * @desc Animação de Slide Y-Axis. + * @default 0 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Skill + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Skill X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default 0 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Skill Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default -67 + * @parent -> W SKILL <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Item <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * @default + * + * @param W Item X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da janela. + * @default 0 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Item Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do janela. + * @default 444 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Item Width + * @text Width + * @desc Definição da largura da janela. + * @default 816 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Item Height + * @text Height + * @desc Definição da altura da janela. + * @default 180 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Item maxCols + * @text Max Columns + * @desc Definição da quantidade de colunas da janela. + * @type number + * @min 1 + * @default 2 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Item Slide X + * @text Slide Animation X + * @desc Animação de Slide X-Axis. + * @default 0 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Item Slide Y + * @text Slide Animation Y + * @desc Animação de Slide Y-Axis. + * @default 0 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Item + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Item X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default 0 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Item Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default -67 + * @parent -> W ITEM <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Actor <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param W Actor X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da janela. + * @default 0 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Actor Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do janela. + * @default 444 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Actor Width + * @text Width + * @desc Definição da largura da janela. + * @default 816 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Actor Height + * @text Height + * @desc Definição da altura da janela. + * @default 180 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Actor maxCols + * @text Max Columns + * @desc Definição da quantidade de colunas da janela. + * @type number + * @min 1 + * @default 1 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Actor Slide X + * @text Slide Animation X + * @desc Animação de Slide X-Axis. + * @default 0 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Actor Slide Y + * @text Slide Animation Y + * @desc Animação de Slide Y-Axis. + * @default 0 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Actor + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Actor X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default 0 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Actor Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default -67 + * @parent -> W ACTOR <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * @text -> Window Enemy <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param W Enemy X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da janela. + * @default 0 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Enemy Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis do janela. + * @default 444 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Enemy Width + * @text Width + * @desc Definição da largura da janela. + * @default 816 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Enemy Height + * @text Height + * @desc Definição da altura da janela. + * @default 180 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Enemy maxCols + * @text Max Columns + * @desc Definição da quantidade de colunas da janela. + * @type number + * @min 1 + * @default 2 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Enemy Slide X + * @text Slide Animation X + * @desc Animação de Slide X-Axis. + * @default 0 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param W Enemy Slide Y + * @text Slide Animation Y + * @desc Animação de Slide Y-Axis. + * @default 0 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Layout Enemy + * @text Layout (Picture) + * @desc Ativar a imagem de layout. + * @default true + * @type boolean + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Enemy X-Axis + * @text Layout X-Axis + * @desc Definição do posição X-axis do layout. + * @default 0 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param L Enemy Y-Axis + * @text Layout Y-Axis + * @desc Definição do posição Y-axis do layout. + * @default -67 + * @parent -> W ENEMY <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> SCREEN LAYOUT <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Screen Layout + * @text Visible + * @desc Ativar o Layout da tela. + * @default true + * @type boolean + * @parent -> SCREEN LAYOUT <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Screen X-Axis + * @text X-Axis + * @desc Definição do posição X-axis da imagem. + * @default 0 + * @parent -> SCREEN LAYOUT <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Screen Y-Axis + * @text Y-Axis + * @desc Definição do posição Y-axis da imagem. + * @default 0 + * @parent -> SCREEN LAYOUT <<<<<<<<<<<<<<<<<<<<<<< + * + * @param + * + * @param -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * @desc + * + * @param Custom Position 1 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default 25,465 + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 2 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default 290,465 + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 3 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default 555,465 + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 4 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default 25,545 + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 5 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default 290,545 + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 6 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default 555,545 + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 7 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @param Custom Position 8 + * @desc Definição da posição da hud. + * Ex - 200,200 + * @default + * @parent -> CUSTOM POSITION <<<<<<<<<<<<<<<<<<<<<<< + * + * @help + * ============================================================================= + * +++ MOG_BattleHud (v5.04) +++ + * By Moghunter + * https://atelierrgss.wordpress.com/ + * ============================================================================= + * O plugin permite customizar o layout de batalha. + * + * ============================================================================= + * - REQUIRED FILES + * ============================================================================= + * Serão necessários os arquivos. (img/battlehud/) + * + * -> HP_Meter.png + * -> HP_Number.png + * -> MP_Meter.png + * -> MP_Number.png + * -> TP_Meter.png + * -> TP_Number.png + * -> ATB_Meter.png + * -> Layout.png + * -> Layout_Actor.png + * -> Layout_Command.png + * -> Layout_Enemy.png + * -> Layout_Help.png + * -> Layout_Item.png + * -> Layout_Party.png + * -> Layout_Screen.png + * -> Layout_Skill.png + * -> Turn.png + * + * ============================================================================= + * Para nomear as faces dos battlers basta nomear da seguinte forma. + * + * Face_ + ACTOR_ID.png + * + * Face_1.png + * Face_2.png + * Face_3.png + * ... + * + * ============================================================================= + * - NOTETAGS + * ============================================================================= + * Para ativar o efeito de respirar nas faces utilize a notetag abaixo + * + * Face Breath Effect + * + * ============================================================================= + * - PLUGIN COMMANDS + * ============================================================================= + * Para ocultar a hud use o comando abaixo. + * + * bhud_disable + * + * Para apresentar a hud use o comando abaixo + * + * bhud_enable + * + * ============================================================================= + * - SCRIPT COMMANDS + * ============================================================================= + * Para ocultar a hud use o comando abaixo. + * + * $gameSystem._bhud_visible = false + * + * Para apresentar a hud use o commando abaixo. + * + * $gameSystem._bhud_visible = true + * + * ============================================================================ + * - WHAT'S NEW + * ============================================================================ + * - (version 5.04) + * (BUG FIX) - Correção de não apresentar a face correta no inicio da batalha + * caso o personagem seja abatido na batalha anterior. + * + */ + +//============================================================================= +// ** PLUGIN PARAMETERS +//============================================================================= + +  var Imported = Imported || {}; +  Imported.MOG_BattleHud = true; +  var Moghunter = Moghunter || {}; + +  Moghunter.parameters = PluginManager.parameters('MOG_BattleHud'); + + // HUD POSITION + Moghunter.bhud_pos_x = Number(Moghunter.parameters['Hud X-Axis'] || -90); + Moghunter.bhud_pos_y = Number(Moghunter.parameters['Hud Y-Axis'] || 480); + Moghunter.bhud_space_x = Number(Moghunter.parameters['Hud Space X'] || 0); + Moghunter.bhud_space_y = Number(Moghunter.parameters['Hud Space Y'] || 0); + Moghunter.bhud_pos_mode = String(Moghunter.parameters['Vertical Mode'] || false); + Moghunter.bhud_max_battle_members = Number(Moghunter.parameters['Max Battle Members'] || 4); + Moghunter.bhud_slideX = Number(Moghunter.parameters['Hud Slide X'] || 0); + Moghunter.bhud_slideY = Number(Moghunter.parameters['Hud Slide Y'] || 0); + + // Layout Overlay + Moghunter.bhud_layoverlay_visible = String(Moghunter.parameters['Layout2 Visible'] || "true"); + Moghunter.bhud_layoverlay_x = Number(Moghunter.parameters['Layout2 X-Axis'] || 0); + Moghunter.bhud_layoverlay_y = Number(Moghunter.parameters['Layout2 Y-Axis'] || 0); + + // Screen Layout + Moghunter.bhud_screen_layout = String(Moghunter.parameters['Screen Layout'] || "true"); + Moghunter.bhud_screen_layout_x = Number(Moghunter.parameters['Screen X-Axis'] || 0); + Moghunter.bhud_screen_layout_y = Number(Moghunter.parameters['Screen Y-Axis'] || 0); + + // TURN POSITION + Moghunter.bhud_turn_visible = String(Moghunter.parameters['Turn Visible'] || true); + Moghunter.bhud_turn_pos_x = Number(Moghunter.parameters['Turn X-Axis'] || -10); + Moghunter.bhud_turn_pos_y = Number(Moghunter.parameters['Turn Y-Axis'] || -10); + Moghunter.bhud_turn_rotation = Number(Moghunter.parameters['Turn Rotation Speed'] || 0.01); + Moghunter.bhud_turn_zoom = String(Moghunter.parameters['Turn Zoom Animation'] || "true"); + + // FACE POSITION + Moghunter.bhud_face_visible = String(Moghunter.parameters['Face Visible'] || true); + Moghunter.bhud_face_shake = String(Moghunter.parameters['Face Shake Animation'] || true); + Moghunter.bhud_face_zoom = String(Moghunter.parameters['Face Zoom Animation'] || true); + Moghunter.bhud_face_animated = String(Moghunter.parameters['Face Frame Animation'] || false); + Moghunter.bhud_face_pos_x = Number(Moghunter.parameters['Face X-Axis'] || 52); + Moghunter.bhud_face_pos_y = Number(Moghunter.parameters['Face Y-Axis'] || 52); + Moghunter.bhud_face_priority = Number(Moghunter.parameters['Face Priority'] || 0); + + // NAME POSITION + Moghunter.bhud_name_visible = String(Moghunter.parameters['Name Visible'] || true); + Moghunter.bhud_name_font_size = Number(Moghunter.parameters['Name Font Size'] || 20); + Moghunter.bhud_name_font_bold_size = Number(Moghunter.parameters['Name Bold Size'] || 4); + Moghunter.bhud_name_font_italic = String(Moghunter.parameters['Name Font Italic'] || false); + Moghunter.bhud_name_align = Number(Moghunter.parameters['Name Align'] || 1); + Moghunter.bhud_name_pos_x = Number(Moghunter.parameters['Name X-Axis'] || -25); + Moghunter.bhud_name_pos_y = Number(Moghunter.parameters['Name Y-Axis'] || 65); + + // HP METER POSITION + Moghunter.bhud_hp_meter_visible = String(Moghunter.parameters['HP Meter Visible'] || true); + Moghunter.bhud_hp_meter_pos_x = Number(Moghunter.parameters['HP Meter X-Axis'] || 87); + Moghunter.bhud_hp_meter_pos_y = Number(Moghunter.parameters['HP Meter Y-Axis'] || 7); + Moghunter.bhud_hp_meter_rotation = Number(Moghunter.parameters['HP Meter Angle'] || 0); + Moghunter.bhud_hp_meter_flow = String(Moghunter.parameters['HP Meter Flow Anime'] || true); + + // HP NUMBER POSITION + Moghunter.bhud_hp_number_visible = String(Moghunter.parameters['HP Number Visible'] || true); + Moghunter.bhud_hp_number_pos_x = Number(Moghunter.parameters['HP Number X-Axis'] || 170); + Moghunter.bhud_hp_number_pos_y = Number(Moghunter.parameters['HP Number Y-Axis'] || -11); + Moghunter.bhud_maxhp_number_visible = String(Moghunter.parameters['MaxHP Number Visible'] || false); + Moghunter.bhud_maxhp_number_pos_x = Number(Moghunter.parameters['MaxHP Number X-Axis'] || 245); + Moghunter.bhud_maxhp_number_pos_y = Number(Moghunter.parameters['MaxHP Number Y-Axis'] || 20); + Moghunter.bhud_hp_align_type = Number(Moghunter.parameters['HP Number Align type'] || 0); + + // MP METER POSITION + Moghunter.bhud_mp_meter_visible = String(Moghunter.parameters['MP Meter Visible'] || true); + Moghunter.bhud_mp_meter_pos_x = Number(Moghunter.parameters['MP Meter X-Axis'] || 104); + Moghunter.bhud_mp_meter_pos_y = Number(Moghunter.parameters['MP Meter Y-Axis'] || 33); + Moghunter.bhud_mp_meter_rotation = Number(Moghunter.parameters['MP Meter Angle'] || 0); + Moghunter.bhud_mp_meter_flow = String(Moghunter.parameters['MP Meter Flow Anime'] || true); + + // MP NUMBER POSITION + Moghunter.bhud_mp_number_visible = String(Moghunter.parameters['MP Number Visible'] || true); + Moghunter.bhud_mp_number_pos_x = Number(Moghunter.parameters['MP Number X-Axis'] || 187); + Moghunter.bhud_mp_number_pos_y = Number(Moghunter.parameters['MP Number Y-Axis'] || 16); + Moghunter.bhud_maxmp_number_visible = String(Moghunter.parameters['MaxMP Number Visible'] || false); + Moghunter.bhud_maxmp_number_pos_x = Number(Moghunter.parameters['MaxMP Number X-Axis'] || 196); + Moghunter.bhud_maxmp_number_pos_y = Number(Moghunter.parameters['MaxMP Number Y-Axis'] || 78); + Moghunter.bhud_mp_align_type = Number(Moghunter.parameters['MP Number Align type'] || 0); + Moghunter.bhud_mp_diagonal_number = Number(Moghunter.parameters['MP Number Diagonal'] || true); + + // TP METER POSITION + Moghunter.bhud_tp_meter_visible = String(Moghunter.parameters['TP Meter Visible'] || true); + Moghunter.bhud_tp_meter_pos_x = Number(Moghunter.parameters['TP Meter X-Axis'] || 104); + Moghunter.bhud_tp_meter_pos_y = Number(Moghunter.parameters['TP Meter Y-Axis'] || 59); + Moghunter.bhud_tp_meter_rotation = Number(Moghunter.parameters['TP Meter Angle'] || 0); + Moghunter.bhud_tp_meter_flow = String(Moghunter.parameters['TP Meter Flow Anime'] || true); + + // TP NUMBER POSITION + Moghunter.bhud_tp_number_visible = String(Moghunter.parameters['TP Number Visible'] || true); + Moghunter.bhud_tp_number_pos_x = Number(Moghunter.parameters['TP Number X-Axis'] || 187); + Moghunter.bhud_tp_number_pos_y = Number(Moghunter.parameters['TP Number Y-Axis'] || 43); + Moghunter.bhud_maxtp_number_visible = String(Moghunter.parameters['MaxTP Number Visible'] || false); + Moghunter.bhud_maxtp_number_pos_x = Number(Moghunter.parameters['MaxTP Number X-Axis'] || 185); + Moghunter.bhud_maxtp_number_pos_y = Number(Moghunter.parameters['MaxTP Number Y-Axis'] || 116); + Moghunter.bhud_tp_align_type = Number(Moghunter.parameters['TP Number Align type'] || 0); + Moghunter.bhud_tp_diagonal_number = Number(Moghunter.parameters['TP Number Diagonal'] || false); + + // AT METER POSITION + Moghunter.bhud_at_meter_visible = String(Moghunter.parameters['ATB Meter Visible'] || true); + Moghunter.bhud_at_meter_pos_x = Number(Moghunter.parameters['ATB Meter X-Axis'] || 69); + Moghunter.bhud_at_meter_pos_y = Number(Moghunter.parameters['ATB Meter Y-Axis'] || 117); + Moghunter.bhud_at_meter_rotation = Number(Moghunter.parameters['ATB Meter Angle'] || 0); + Moghunter.bhud_at_meter_flow = String(Moghunter.parameters['ATB Meter Flow Anime'] || true); + + // STATES POSITION + Moghunter.bhud_states_visible = String(Moghunter.parameters['States Visible'] || true); + Moghunter.bhud_states_pos_x = Number(Moghunter.parameters['States X-Axis'] || 102); + Moghunter.bhud_states_pos_y = Number(Moghunter.parameters['States Y-Axis'] || 76); + Moghunter.bhud_statesType = Number(Moghunter.parameters['States Mode'] || 0); + Moghunter.bhud_statesMax = Number(Moghunter.parameters['States Max'] || 4); + Moghunter.bhud_statesAlign = Number(Moghunter.parameters['States Align'] || 0); + + // COMMAND WINDOWS + Moghunter.bhud_auto_pos = Number(Moghunter.parameters['Command Auto Adjust'] || 0); + Moghunter.bhud_com_x = Number(Moghunter.parameters['W Command X-Axis'] || 0); + Moghunter.bhud_com_y = Number(Moghunter.parameters['W Command Y-Axis'] || -15); + Moghunter.bhud_com_layout = String(Moghunter.parameters['Layout Command'] || true); + Moghunter.bhud_com_lay_x = Number(Moghunter.parameters['L Command X-Axis'] || -25); + Moghunter.bhud_com_lay_y = Number(Moghunter.parameters['L Command Y-Axis'] || -35); + Moghunter.bhud_com_width = Number(Moghunter.parameters['W Command Width'] || 192); + Moghunter.bhud_com_height = Number(Moghunter.parameters['W Command Height'] || 180); + Moghunter.bhud_com_slideX = Number(Moghunter.parameters['W Command Slide X'] || 0); + Moghunter.bhud_com_slideY = Number(Moghunter.parameters['W Command Slide Y'] || 64); + + + // PARTY WINDOWS + Moghunter.bhud_party_x = Number(Moghunter.parameters['W Party X-Axis'] || 325); + Moghunter.bhud_party_y = Number(Moghunter.parameters['W Party Y-Axis'] || 170); + Moghunter.bhud_party_layout = String(Moghunter.parameters['Layout Party'] || true); + Moghunter.bhud_party_lay_x = Number(Moghunter.parameters['L Party X-Axis'] || -325); + Moghunter.bhud_party_lay_y = Number(Moghunter.parameters['L Party Y-Axis'] || -42); + Moghunter.bhud_party_width = Number(Moghunter.parameters['W Party Width'] || 192); + Moghunter.bhud_party_height = Number(Moghunter.parameters['W Party Height'] || 110); + Moghunter.bhud_party_slide_x = Number(Moghunter.parameters['W Party Slide X'] || 0); + Moghunter.bhud_party_slide_y = Number(Moghunter.parameters['W Party Slide Y'] || -150); + + // HELP WINDOW + Moghunter.bhud_help_x = Number(Moghunter.parameters['W Help X-Axis'] || 0); + Moghunter.bhud_help_y = Number(Moghunter.parameters['W Help Y-Axis'] || 0); + Moghunter.bhud_help_layout = String(Moghunter.parameters['Layout Help'] || true); + Moghunter.bhud_help_lay_x = Number(Moghunter.parameters['L Help X-Axis'] || 0); + Moghunter.bhud_help_lay_y = Number(Moghunter.parameters['L Help Y-Axis'] || 0); + Moghunter.bhud_help_width = Number(Moghunter.parameters['W Help Width'] || 816); + Moghunter.bhud_help_height = Number(Moghunter.parameters['W Help Height'] || 108); + Moghunter.bhud_help_slide_x = Number(Moghunter.parameters['W Help Slide X'] || 0); + Moghunter.bhud_help_slide_y = Number(Moghunter.parameters['W Help Slide Y'] || -150); + + // SKILL WINDOW + Moghunter.bhud_skill_x = Number(Moghunter.parameters['W Skill X-Axis'] || 0); + Moghunter.bhud_skill_y = Number(Moghunter.parameters['W Skill Y-Axis'] || 444); + Moghunter.bhud_skill_layout = String(Moghunter.parameters['Layout Skill'] || true); + Moghunter.bhud_skill_lay_x = Number(Moghunter.parameters['L Skill X-Axis'] || 0); + Moghunter.bhud_skill_lay_y = Number(Moghunter.parameters['L Skill Y-Axis'] || -67); + Moghunter.bhud_skill_width = Number(Moghunter.parameters['W Skill Width'] || 816); + Moghunter.bhud_skill_height = Number(Moghunter.parameters['W Skill Height'] || 180); + Moghunter.bhud_skill_maxcols = Number(Moghunter.parameters['W Skill maxCols'] || 2); + Moghunter.bhud_skill_slide_x = Number(Moghunter.parameters['W Skill Slide X'] || 0); + Moghunter.bhud_skill_slide_y = Number(Moghunter.parameters['W Skill Slide Y'] || 100); + + // ITEM WINDOW + Moghunter.bhud_item_x = Number(Moghunter.parameters['W Item X-Axis'] || 0); + Moghunter.bhud_item_y = Number(Moghunter.parameters['W Item Y-Axis'] || 444); + Moghunter.bhud_item_layout = String(Moghunter.parameters['Layout Item'] || true); + Moghunter.bhud_item_lay_x = Number(Moghunter.parameters['L Item X-Axis'] || 0); + Moghunter.bhud_item_lay_y = Number(Moghunter.parameters['L Item Y-Axis'] || -67); + Moghunter.bhud_item_width = Number(Moghunter.parameters['W Item Width'] || 816); + Moghunter.bhud_item_height = Number(Moghunter.parameters['W Item Height'] || 180); + Moghunter.bhud_item_maxcols = Number(Moghunter.parameters['W Item maxCols'] || 2); + Moghunter.bhud_item_slide_x = Number(Moghunter.parameters['W Item Slide X'] || 0); + Moghunter.bhud_item_slide_y = Number(Moghunter.parameters['W Item Slide Y'] || 150); + + // ACTOR WINDOWS + Moghunter.bhud_actor_x = Number(Moghunter.parameters['W Actor X-Axis'] || 0); + Moghunter.bhud_actor_y = Number(Moghunter.parameters['W Actor Y-Axis'] || 444); + Moghunter.bhud_actor_layout = String(Moghunter.parameters['Layout Actor'] || true); + Moghunter.bhud_actor_lay_x = Number(Moghunter.parameters['L Actor X-Axis'] || 0); + Moghunter.bhud_actor_lay_y = Number(Moghunter.parameters['L Actor Y-Axis'] || -67); + Moghunter.bhud_actor_width = Number(Moghunter.parameters['W Actor Width'] || 816); + Moghunter.bhud_actor_height = Number(Moghunter.parameters['W Actor Height'] || 180); + Moghunter.bhud_actor_maxcols = Number(Moghunter.parameters['W Actor maxCols'] || 1); + Moghunter.bhud_actor_slide_x = Number(Moghunter.parameters['W Actor Slide X'] || 0); + Moghunter.bhud_actor_slide_y = Number(Moghunter.parameters['W Actor Slide Y'] || 150); + + // ENEMY WINDOWS + Moghunter.bhud_enemy_x = Number(Moghunter.parameters['W Enemy X-Axis'] || 0); + Moghunter.bhud_enemy_y = Number(Moghunter.parameters['W Enemy Y-Axis'] || 444); + Moghunter.bhud_enemy_layout = String(Moghunter.parameters['Layout Enemy'] || true); + Moghunter.bhud_enemy_lay_x = Number(Moghunter.parameters['L Enemy X-Axis'] || 0); + Moghunter.bhud_enemy_lay_y = Number(Moghunter.parameters['L Enemy Y-Axis'] || -67); + Moghunter.bhud_enemy_width = Number(Moghunter.parameters['W Enemy Width'] || 816); + Moghunter.bhud_enemy_height = Number(Moghunter.parameters['W Enemy Height'] || 180); + Moghunter.bhud_enemy_maxcols = Number(Moghunter.parameters['W Enemy maxCols'] || 2); + Moghunter.bhud_enemy_slide_x = Number(Moghunter.parameters['W Enemy Slide X'] || 0); + Moghunter.bhud_enemy_slide_y = Number(Moghunter.parameters['W Enemy Slide Y'] || 150); + + // Custom Position + Moghunter.bhud_custom_pos = []; + for (var i = 0; i < 8; i++) { + Moghunter.bhud_custom_pos[i] = (Moghunter.parameters['Custom Position ' + String(i + 1)] || null); + }; + +//============================================================================= +// ** Sprite Animation +//============================================================================= + +//============================== +// * Update Position +//============================== +var _mog_bhud_sprAnim_updatePosition = Sprite_Animation.prototype.updatePosition; +Sprite_Animation.prototype.updatePosition = function() { + _mog_bhud_sprAnim_updatePosition.call(this) + if (this._battler) { + if (this._animation.position === 3 && this.x === 0 && this.y === 0) { + this.x = Graphics.boxWidth / 2; + this.y = Graphics.boxHeight / 2; + }; + }; +}; + +//============================================================================= +// ** ImageManager +//============================================================================= + +//============================== +// * BHud +//============================== +ImageManager.loadBHud = function(filename) { + return this.loadBitmap('img/battlehud/', filename, 0, true); +}; + +//============================================================================= +// ** ImageManager +//============================================================================= + +//============================== +// * BHud +//============================== +ImageManager.loadBHud = function(filename) { + return this.loadBitmap('img/battlehud/', filename, 0, true); +}; + +//============================================================================= +// ** Game_Interpreter +//============================================================================= + +//============================== +// * PluginCommand +//============================== +var _alias_mog_bhud_pluginCommand = Game_Interpreter.prototype.pluginCommand +Game_Interpreter.prototype.pluginCommand = function(command, args) { + _alias_mog_bhud_pluginCommand.call(this,command, args) + if (command === "bhud_disable") {$gameSystem._bhud_visible = false}; + if (command === "bhud_enable") {$gameSystem._bhud_visible = true}; + return true; +}; + +//============================================================================= +// ** Game_Temp +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_mog_bhud_temp_initialize = Game_Temp.prototype.initialize; +Game_Temp.prototype.initialize = function() { + _alias_mog_bhud_temp_initialize.call(this); + this._bhud_position = []; + this._bhud_position_active = null; + this._bhudFaceAnime = false; + this._battleEnd = false; + this._bhud_dp = false; + this._refreshBhud = false; + this._forceCreateBattleHud = false; + this._forceRemoveBattleHud = false; +}; + +//============================================================================= +// ** Game_System +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_mog_bhud_sys_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() { + _alias_mog_bhud_sys_initialize.call(this); + this._bhud_position = []; + for (var i = 0; i < 8; i++) { + this._bhud_position[i] = this.set_hudcp(Moghunter.bhud_custom_pos[i]); + }; + this._bhud_auto_com = false; + this._bhud_pos_mode = 0; + this._bhud_visible = true; + this._bhudFaceBattler = String(Moghunter.bhud_face_visible) == "true" && !$dataSystem.optSideView ? true : false; + if (String(Moghunter.bhud_pos_mode) == "true") {this._bhud_pos_mode = 1}; + if (Number(Moghunter.bhud_auto_pos) == 0) {this._bhud_auto_com = true}; +}; + +//============================== +// * set Hudcp +//============================== +Game_System.prototype.set_hudcp = function(value) { + if (!value) {return null}; + var s = value.split(','); + if (!s[0] || !s[1]) {return null}; + return [Number(s[0]),Number(s[1])]; +} + +//============================================================================= +// ** Game Interpreter +//============================================================================= + +//============================== +// * Command129 +//============================== +var _alias_mog_bhud_command129 = Game_Interpreter.prototype.command129; +Game_Interpreter.prototype.command129 = function() { + _alias_mog_bhud_command129.call(this); + $gameTemp._refresh_Bhud = true; + return true; +}; + +//============================================================================= +// ** Game Party +//============================================================================= + +//============================== +// * max Battle Members +//============================== +Game_Party.prototype.maxBattleMembers = function() { + if (Imported.MOG_ChronoEngine) {Math.min(Math.max(Number(Moghunter.ras_maxBattleMembers),1),4)}; + return Math.max(Number(Moghunter.bhud_max_battle_members),1); +}; + +//============================================================================= +// ** BattleManager +//============================================================================= + +//============================== +// * processVictory +//============================== +var _alias_mog_bhud_processVictory = BattleManager.processVictory; +BattleManager.processVictory = function() { + $gameTemp._battleEnd = true; + _alias_mog_bhud_processVictory.call(this); +}; + +//============================== +// * processAbort +//============================== +var _alias_mog_bhud_processAbort = BattleManager.processAbort; +BattleManager.processAbort = function() { + $gameTemp._battleEnd = true; + _alias_mog_bhud_processAbort.call(this); +}; + +//============================== +// * processDefeat +//============================== +var _alias_mog_bhud_processDefeat = BattleManager.processDefeat; +BattleManager.processDefeat = function() { + $gameTemp._battleEnd = true; + _alias_mog_bhud_processDefeat.call(this); +}; + + +//============================================================================= +// ** Game BattlerBase +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_mog_bhud_gbat_initMembers = Game_BattlerBase.prototype.initMembers +Game_BattlerBase.prototype.initMembers = function() { + _alias_mog_bhud_gbat_initMembers.call(this); + this.need_refresh_bhud_states = false; + this._bhud_face_data = [0,0,0,0]; + this._face_pos = [0,0]; +}; + +//============================== +// * addNewState +//============================== +var _alias_mog_bhud_addNewState = Game_BattlerBase.prototype.addNewState +Game_BattlerBase.prototype.addNewState = function(stateId) { + _alias_mog_bhud_addNewState.call(this,stateId); + this.need_refresh_bhud_states = true; +}; + +//============================== +// * eraseState +//============================== +var _alias_mog_bhud_eraseState = Game_BattlerBase.prototype.eraseState +Game_BattlerBase.prototype.eraseState = function(stateId) { + _alias_mog_bhud_eraseState.call(this,stateId); + this.need_refresh_bhud_states = true; +}; + +//============================================================================= +// ** Game Battler +//============================================================================= + +//============================== +// ** iniMembers +//============================== +var _mog_bhud_gbattler_initMembers = Game_Battler.prototype.initMembers; +Game_Battler.prototype.initMembers = function() { + _mog_bhud_gbattler_initMembers.call(this); + this._bhud = {}; + this._bhud.faceBreath = false; +}; + + +//============================== +// * Notetags +//============================== +Game_Battler.prototype.notetags = function() { + if (this.isEnemy()) {return this.enemy().note.split(/[\r\n]+/)}; +;; if (this.isActor()) {return this.actor().note.split(/[\r\n]+/)}; +}; + +//============================== +// ** get Bmotion Idle +//============================== +Game_Battler.prototype.checkBhudNoteTags = function() { + this.notetags().forEach(function(note) { + var note_data = note.split(': ') + if (note_data[0].toLowerCase() == "face breath effect"){ + this._bhud.faceBreath = true; + }; + },this); +}; + +//============================== +// * +//============================== +var _mog_bhud_gactor_initMembers = Game_Actor.prototype.initMembers; +Game_Actor.prototype.initMembers = function() { + _mog_bhud_gactor_initMembers.call(this); + +}; + +//============================================================================= +// ** Game Action +//============================================================================= + +//============================== +// * Apply +//============================== +var _alias_mog_bhud_apply = Game_Action.prototype.apply; +Game_Action.prototype.apply = function(target) { + var oldhp = target.hp + _alias_mog_bhud_apply.call(this,target); + if (target.isActor()) { + if (oldhp > target.hp) {target._bhud_face_data = [60,0,3,60]} + else if (oldhp < target.hp) {target._bhud_face_data = [0,70,1,70]}; + }; +}; + +//============================== +// * Prepare +//============================== +var _alias_mog_bmhud_action_prepare = Game_Action.prototype.prepare +Game_Action.prototype.prepare = function() { + _alias_mog_bmhud_action_prepare.call(this); + if (this.subject().isActor() && String(Moghunter.bhud_face_zoom) === "true"){this.subject()._bhud_face_data = [0,70,2,70];}; +}; + +//============================================================================= +// ** Game Actor +//============================================================================= + +//============================== +// * Gain HP +//============================== +var _alias_mog_bhud_gainHp =Game_Actor.prototype.gainHp; +Game_Actor.prototype.gainHp = function(value) { + _alias_mog_bhud_gainHp.call(this,value); + this._bhud_face_data[3] += 1; +}; + +//============================== +// * Recover All +//============================== +var _alias_mog_bhud_recoverAll = Game_Actor.prototype.recoverAll; +Game_Actor.prototype.recoverAll = function() { + _alias_mog_bhud_recoverAll.call(this); + this._bhud_face_data[3] += 1; +}; + +//============================================================================= +// ** Window_BattleStatus +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_mog_bhud_initialize = Window_BattleStatus.prototype.initialize +Window_BattleStatus.prototype.initialize = function() { + _alias_mog_bhud_initialize.call(this); + this.visible = false +}; + +//============================================================================= +// ** Window_BattleSkill +//============================================================================= + +//============================== +// * windowWidth +//============================== +Window_BattleSkill.prototype.windowWidth = function() { + return Moghunter.bhud_skill_width; +}; + +//============================== +// * maxCols +//============================== +Window_BattleSkill.prototype.maxCols = function() { + return Moghunter.bhud_skill_maxcols; +}; + +//============================================================================= +// ** Window_BattleItem +//============================================================================= + +//============================== +// * windowWidth +//============================== +Window_BattleItem.prototype.windowWidth = function() { + return Moghunter.bhud_item_width; +}; + +//============================== +// * maxCols +//============================== +Window_BattleItem.prototype.maxCols = function() { + return Moghunter.bhud_item_maxcols; +}; + +//============================================================================= +// ** Window_BattleActor +//============================================================================= + +//============================== +// * Initialize +//============================== +Window_BattleActor.prototype.windowWidth = function() { + return Moghunter.bhud_actor_width; +}; + +//============================== +// * maxCols +//============================== +Window_BattleActor.prototype.maxCols = function() { + return Moghunter.bhud_actor_maxcols; +}; + +//============================================================================= +// ** Window_BattleEnemy +//============================================================================= + +//============================== +// * windowWidth +//============================== +Window_BattleEnemy.prototype.windowWidth = function() { + return Moghunter.bhud_enemy_width; +}; + +//============================== +// * maxCols +//============================== +Window_BattleEnemy.prototype.maxCols = function() { + return Moghunter.bhud_enemy_maxcols; +}; + +//============================================================================= +// ** Window Actor Command +//============================================================================= + +//============================== +// * initialize +//============================== +var _alias_mog_bhud_wActCom_initialize = Window_ActorCommand.prototype.initialize; +Window_ActorCommand.prototype.initialize = function() { + _alias_mog_bhud_wActCom_initialize.call(this); + this._com_mode = Number($gameSystem._bhud_pos_mode); + this._force_hide_duration = 0; + this.org = [Moghunter.bhud_com_x,Moghunter.bhud_com_y]; + this.org2 = [ + this.org[0] + Moghunter.bhud_com_slideX, + this.org[1] + Moghunter.bhud_com_slideY + ]; + this.slide = Moghunter.bhud_com_slideX === 0 && Moghunter.bhud_com_slideY === 0 ? false : true; + this._actorVis != this._actor; + this.xp = -1; + this.yp = -1; +}; + +//============================== +// * Activate +//============================== +var _alias_mog_bhud_wActCom_activate = Window_ActorCommand.prototype.activate; +Window_ActorCommand.prototype.activate = function() { + _alias_mog_bhud_wActCom_activate.call(this); + if (String(Moghunter.bhud_com_layout) === "true") {this._force_hide_duration = 1}; +}; + +//============================== +// * Sprite Move To +//============================== +Window_ActorCommand.prototype.sprite_move_to = function(value,real_value) { + if (value === real_value) {return value}; + var dnspeed = 1 + (Math.abs(value - real_value) / 12); + if (value > real_value) {value -= dnspeed; + if (value < real_value) {value = real_value};} + else if (value < real_value) {value += dnspeed; + if (value > real_value) {value = real_value}; + }; + return Math.floor(value); +}; + +//============================== +// ** slideWindow +//============================== +Window_ActorCommand.prototype.slideWindow = function(win,vmode) { + var vm = vmode ? win.active : win.visible; + if (vm) { + var np = [win.org[0],win.org[1]]; + win.contentsOpacity += 15; + } else { + var np = [win.org2[0],win.org2[1]]; + win.contentsOpacity = 0; + }; + win.x = this.sprite_move_to(win.x,np[0]); + win.y = this.sprite_move_to(win.y,np[1]); +}; + +//============================== +// ** update Position +//============================== +Window_ActorCommand.prototype.updatePosition = function() { + if (Imported.MOG_BattleCommands) { + this.updateBattleCommands(); + } else { + if (!this.slide) { + this.updatePosN(); + } else { + this.updatePosS(); + }; + }; +}; + +//============================== +// ** update Battle Commands +//============================== +Window_ActorCommand.prototype.updateBattleCommands = function() { + if ($gameTemp._bhud_position_active) { + this.visible = this.active; + if ($gameSystem._bhud_auto_com) { + this.x = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x; + if (this._com_mode === 0) { + this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y - this.height;} + else {this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y}; } + else { + this.x = Moghunter.bhud_com_x; + this.y = Moghunter.bhud_com_y; + }; + }; +}; + +//============================== +// ** update Position S +//============================== +Window_ActorCommand.prototype.updatePosS = function() { + if ($gameTemp._bhud_position_active) { + this.visible = this.active; + if ($gameSystem._bhud_auto_com) { + if (this.xp != $gameTemp._bhud_position_active[0] || this.yp != $gameTemp._bhud_position_active[1]) { + this.xp = $gameTemp._bhud_position_active[0]; + this.yp = $gameTemp._bhud_position_active[1]; + this.org[0] = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x; + if (this._com_mode === 0) { + this.org[1] = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y - this.height; + } else { + this.org[1] = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y; + }; + this.org2 = [ + this.org[0] + Moghunter.bhud_com_slideX, + this.org[1] + Moghunter.bhud_com_slideY + ]; + if (this._actorVis != this._actor) { + this.x = this.org2[0]; + this.y = this.org2[1]; + this._actorVis = this._actor; + }; + }; + this.slideWindow(this,false); + } else { + this.slideWindow(this,false); + }; + }; +}; + +//============================== +// ** update Position N +//============================== +Window_ActorCommand.prototype.updatePosN = function() { + if ($gameTemp._bhud_position_active) { + this.visible = this.active; + if ($gameSystem._bhud_auto_com) { + this.x = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x; + if (this._com_mode === 0) { + this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y - this.height;} + else {this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y}; } + else { + this.x = Moghunter.bhud_com_x; + this.y = Moghunter.bhud_com_y; + }; + }; +}; + +//============================== +// * Update +//============================== +var _alias_mog_bhud_wcom_update = Window_ActorCommand.prototype.update; +Window_ActorCommand.prototype.update = function() { + _alias_mog_bhud_wcom_update.call(this); + this.updatePosition(); + if (this._force_hide_duration > 0) {this._force_hide_duration -= 1;this.visible = false}; +}; + + +//============================================================================= +// ** Sprite Actor +//============================================================================= + +//============================== +// * Initialize +//============================== +var _alias_bhud_sprt_actor_initialize = Sprite_Actor.prototype.initialize +Sprite_Actor.prototype.initialize = function(battler) { + _alias_bhud_sprt_actor_initialize.call(this,battler); + this._sprite_face = false; + if (String(Moghunter.bhud_face_visible) == "true") {this._sprite_face = true}; +}; + +//============================== +// * Damage Offset X +//============================== +Sprite_Actor.prototype.damageOffsetX = function() { + if (!$gameSystem.isSideView() && this._sprite_face) {return 0}; + return -32; +}; + +//============================== +// * update Position +//============================== +var _alias_mog_bhud_sprt_actor_updatePosition = Sprite_Battler.prototype.updatePosition; +Sprite_Battler.prototype.updatePosition = function() { + if (!$gameSystem.isSideView() && this._sprite_face) { + if (this._battler && $gameTemp._bhud_position[this._battler.index()]) { + this.x = $gameTemp._bhud_position[this._battler.index()][0] + Moghunter.bhud_face_pos_x; + this.y = $gameTemp._bhud_position[this._battler.index()][1] + Moghunter.bhud_face_pos_y; + return; + }; + }; + _alias_mog_bhud_sprt_actor_updatePosition.call(this); +}; + +//============================== +// * Setup Animation +//============================== +var _alias_mog_bhud_sprt_actor_setupAnimation = Sprite_Battler.prototype.setupAnimation; +Sprite_Actor.prototype.setupAnimation = function() { + if (!$gameSystem.isSideView() && this._sprite_face) { + while (this._battler.isAnimationRequested()) { + var data = this._battler.shiftAnimation(); + var animation = $dataAnimations[data.animationId]; + var mirror = data.mirror; + var delay = animation.position === 3 ? 0 : data.delay; + this.startAnimation(animation, mirror, delay); + for (var i = 0; i < this._animationSprites.length; i++) { + var sprite = this._animationSprites[i]; + sprite.visible = true; + } + } + return; + }; + _alias_mog_bhud_sprt_actor_setupAnimation.call(this); +}; + +//============================== +// * Setup Damage Popup +//============================== +var _alias_mog_bhud_sprt_actor_setupDamagePopup = Sprite_Battler.prototype.setupDamagePopup +Sprite_Actor.prototype.setupDamagePopup = function() { + if (!$gameSystem.isSideView() && this._sprite_face) { + if (this._battler.isDamagePopupRequested()) { + var sprite = new Sprite_Damage(); + sprite.x = this.x + this.damageOffsetX(); + sprite.y = this.y + this.damageOffsetY(); + sprite.setup(this._battler); + this._damages.push(sprite); + this.parent.addChild(sprite); + this._battler.clearDamagePopup(); + this._battler.clearResult(); + }; + return; + }; + _alias_mog_bhud_sprt_actor_setupDamagePopup.call(this); +}; + +//============================== +// ** update Main +//============================== +var _mog_bhud_sprActor_updateMain = Sprite_Actor.prototype.updateMain; +Sprite_Actor.prototype.updateMain = function() { + _mog_bhud_sprActor_updateMain.call(this); + if (this.isAnimationPlaying()) { + $gameTemp._bhudFaceAnime = 3; + }; +}; + +//============================================================================= +// ** Spriteset Battle +//============================================================================= + +//============================== +// ** update Actors +//============================== +var _mog_bhud_sprbat_updateActors = Spriteset_Battle.prototype.updateActors; +Spriteset_Battle.prototype.updateActors = function() { + if (!$gameSystem.isSideView()) {return}; + _mog_bhud_sprbat_updateActors.call(this); +}; + +//============================== +// * Is Busy +//============================== +Spriteset_Battle.prototype.isBusy = function() { + if ($gameSystem._bhudFaceBattler) { + return this.isAnimationPlaying() || this.isAnyoneMoving() || $gameTemp._bhudFaceAnime > 0; + }; + if (Imported.YEP_BattleEngineCore) {return false}; + return this.isAnimationPlaying() || this.isAnyoneMoving(); +}; + +//============================================================================= +// ** Scene Base +//============================================================================= + +//============================== +// ** create Hud Field +//============================== +Scene_Base.prototype.createHudField = function() { + this._hudField = new Sprite(); + this._hudField.z = 10; + this.addChild(this._hudField); +}; + +//============================== +// ** sort MZ +//============================== +Scene_Base.prototype.sortMz = function() { + this._hudField.children.sort(function(a, b){return a.mz-b.mz}); +}; + +//============================== +// ** create Battle Hud +//============================== +Scene_Base.prototype.createBattleHud = function() { + if (String(Moghunter.bhud_screen_layout) === "true") {this.createBattleHudScreenLayout();}; + $gameTemp.refresh_Bhud = false; + $gameTemp._battleEnd = false; + this._com_mode = Number($gameSystem._bhud_pos_mode) + this._battle_hud = []; + for (var i = 0; i < $gameParty.maxBattleMembers(); i++) { + this._battle_hud[i] = new Battle_Hud(i); + this._battle_hud[i].mz = 110; + this._hudField.addChild(this._battle_hud[i]); + }; +}; + +//============================== +// ** remove Battle Hud +//============================== +Scene_Base.prototype.removeBattleHud = function() { + if (!this._battle_hud) {return}; + if (this._screen_layout) { + this._hudField.removeChild(this._screen_layout); + }; + for (var i = 0; i < this._battle_hud.length; i++) { + this._hudField.removeChild(this._battle_hud[i]); + }; + this._battle_hud = null; +}; + +//============================== +// * Create Battle Hud Screen +//============================== +Scene_Base.prototype.createBattleHudScreenLayout = function() { + this._screen_layout = new Sprite(ImageManager.loadBHud("Layout_Screen")); + this._screen_layout.opacity = 0; + this._screen_layout.x = Moghunter.bhud_screen_layout_x; + this._screen_layout.y = Moghunter.bhud_screen_layout_y; + this._screen_layout.mz = 100; + this._hudField.addChild(this._screen_layout); +}; + +//============================== +// * Update Battle Hud visible +//============================== +Scene_Base.prototype.updateBattleHudVisible = function() { + if (this.isBattleHudVisible()) {this._screen_layout.opacity += 10} + else {this._screen_layout.opacity -= 10}; +}; + +//============================== +// * Is Battle Hud Visible +//============================== +Scene_Base.prototype.isBattleHudVisible = function() { + if ($gameMessage.isBusy()) {return false}; + if ($gameTemp._battleEnd) {return false}; + if (!$gameSystem._bhud_visible) {return false}; + return true +}; + +//============================== +// ** Refresh Battle Hud +//============================== +Scene_Base.prototype.refreshBattleHud = function() { + if (!this._battle_hud) {return}; + $gameTemp._refresh_Bhud = false; + for (var i = 0; i < $gameParty.maxBattleMembers(); i++) { + this._battle_hud[i].refresh_bhud(); + }; +}; + +//============================== +// ** force Create Battle Hud +//============================== +Scene_Base.prototype.forceCreateBattleHud = function() { + $gameTemp._forceCreateBattleHud = false; + this.forceRemoveBattleHud(); + this.createBattleHud(); + this.sortMz(); +}; + +//============================== +// ** force Remove Battle Hud +//============================== +Scene_Base.prototype.forceRemoveBattleHud = function() { + $gameTemp._forceRemoveBattleHud = false; + this.removeBattleHud(); +}; + +//============================== +// ** Update Battle Hud +//============================== +Scene_Base.prototype.updateBatteHud = function() { + if (this._screen_layout) {this.updateBattleHudVisible()}; + if ($gameTemp._refresh_Bhud) {this.refreshBattleHud()}; +}; + +//============================== +// ** createActorsF +//============================== +Scene_Base.prototype.createActorsF = function() { + if (this._actorSprites) { + for (var i = 0; i < this._actorSprites.length; i++) { + this._hudField.removeChild(this._actorSprites[i]); + }; + }; + this._actorSprites = []; + for (var i = 0; i < $gameParty.maxBattleMembers(); i++) { + this._actorSprites[i] = new Sprite_Actor(); + this._actorSprites[i].mz = 110; + this._hudField.addChild(this._actorSprites[i]); + }; +}; + +//============================== +// ** Update +//============================== +var _mog_bhud_Smap_update = Scene_Map.prototype.update; +Scene_Map.prototype.update = function() { + _mog_bhud_Smap_update.call(this); + if ($gameTemp._forceCreateBattleHud) {this.forceCreateBattleHud()}; + if ($gameTemp._forceRemoveBattleHud) {this.forceRemoveBattleHud()}; + if (this._battle_hud) {this.updateBatteHud()}; +}; + +//============================================================================= +// ** Scene Battle +//============================================================================= + +//============================== +// ** create Spriteset +//============================== +var _mog_bhud_sbattle_createSpriteset = Scene_Battle.prototype.createSpriteset; +Scene_Battle.prototype.createSpriteset = function() { + _mog_bhud_sbattle_createSpriteset.call(this); + if (!this._hudField) {this.createHudField()}; + this.createBattleHudSB(); +}; + +//============================== +// ** create Battle Hud SB +//============================== +Scene_Battle.prototype.createBattleHudSB = function() { + this.createBattleHud(); + if (!$gameSystem.isSideView()) {this.createActorsF()}; +}; + +//============================== +// ** update Actors +//============================== +Scene_Battle.prototype.updateActors = function() { + var members = $gameParty.battleMembers(); + for (var i = 0; i < this._actorSprites.length; i++) { + this._actorSprites[i].setBattler(members[i]); + } +}; + +//============================== +// ** create Spriteset +//============================== +var _mog_bhud_sMap_createSpriteset = Scene_Map.prototype.createSpriteset; +Scene_Map.prototype.createSpriteset = function() { + _mog_bhud_sMap_createSpriteset.call(this); + if (!this._hudField) {this.createHudField()}; +}; + +//============================== +// ** createWindowLayer +//============================== +var _alias_mog_bhud_createWindowLayer = Scene_Battle.prototype.createWindowLayer +Scene_Battle.prototype.createWindowLayer = function() { + this.create_layout_window(); + _alias_mog_bhud_createWindowLayer.call(this); +}; + +//============================== +// ** createAllWindows +//============================== +var _alias_mog_bhud_createAllWindows = Scene_Battle.prototype.createAllWindows; +Scene_Battle.prototype.createAllWindows = function() { + _alias_mog_bhud_createAllWindows.call(this); + // ACTOR COMMAND --------------------------------------------------------------------- + this._actorCommandWindow.x = Moghunter.bhud_com_x; + this._actorCommandWindow.y = Moghunter.bhud_com_y; + this._actorCommandWindow.vis = this._actorCommandWindow.visible; + this._actorCommandWindow.width = Moghunter.bhud_com_width; + this._actorCommandWindow.height = Moghunter.bhud_com_height; + if (String(Moghunter.bhud_com_layout) === "true") {this._actorCommandWindow.opacity = 0}; + // PARTY COMMAND --------------------------------------------------------------------- + this._partyCommandWindow.x = Moghunter.bhud_party_x; + this._partyCommandWindow.y = Moghunter.bhud_party_y; + this._partyCommandWindow.org = [Moghunter.bhud_party_x,Moghunter.bhud_party_y]; + this._partyCommandWindow.org2 = [ + this._partyCommandWindow.org[0] + Moghunter.bhud_party_slide_x, + this._partyCommandWindow.org[1] + Moghunter.bhud_party_slide_y + ]; + this._partyCommandWindow.slide = Moghunter.bhud_party_slide_x === 0 && Moghunter.bhud_party_slide_y === 0 ? false : true; + this._partyCommandWindow.vis = this._partyCommandWindow.visible; + this._partyCommandWindow.width = Moghunter.bhud_party_width; + this._partyCommandWindow.height = Moghunter.bhud_party_height; + if (String(Moghunter.bhud_party_layout) === "true") {this._partyCommandWindow.opacity = 0}; + // HELP WINDOW --------------------------------------------------------------------- + this._helpWindow.x = Moghunter.bhud_help_x; + this._helpWindow.y = Moghunter.bhud_help_y; + this._helpWindow.org = [this._helpWindow.x,this._helpWindow.y]; + this._helpWindow.org2 = [ + this._helpWindow.org[0] + Moghunter.bhud_help_slide_x, + this._helpWindow.org[1] + Moghunter.bhud_help_slide_y + ]; + this._helpWindow.slide = Moghunter.bhud_help_slide_x === 0 && Moghunter.bhud_help_slide_y === 0 ? false : true; + this._helpWindow.vis = this._helpWindow.visible; + this._helpWindow.width = Moghunter.bhud_help_width; + this._helpWindow.height = Moghunter.bhud_help_height; + if (String(Moghunter.bhud_help_layout) === "true") {this._helpWindow.opacity = 0}; + // SKILL WINDOW --------------------------------------------------------------------- + this._skillWindow.x = Moghunter.bhud_skill_x; + this._skillWindow.y = Moghunter.bhud_skill_y; + this._skillWindow.org = [Moghunter.bhud_skill_x,Moghunter.bhud_skill_y]; + this._skillWindow.org2 = [ + this._skillWindow.org[0] + Moghunter.bhud_skill_slide_x, + this._skillWindow.org[1] + Moghunter.bhud_skill_slide_y + ]; + this._skillWindow.slide = Moghunter.bhud_skill_slide_x === 0 && Moghunter.bhud_skill_slide_y === 0 ? false : true; + this._skillWindow.vis = this._skillWindow.visible; + this._skillWindow.width = Moghunter.bhud_skill_width; + this._skillWindow.height = Moghunter.bhud_skill_height; + if (String(Moghunter.bhud_skill_layout) === "true") {this._skillWindow.opacity = 0}; + // ITEM COMMAND --------------------------------------------------------------------- + this._itemWindow.x = Moghunter.bhud_item_x; + this._itemWindow.y = Moghunter.bhud_item_y; + this._itemWindow.org = [this._itemWindow.x,this._itemWindow.y]; + this._itemWindow.org2 = [ + this._itemWindow.org[0] + Moghunter.bhud_item_slide_x, + this._itemWindow.org[1] + Moghunter.bhud_item_slide_y + ]; + this._itemWindow.slide = Moghunter.bhud_item_slide_x === 0 && Moghunter.bhud_item_slide_y === 0 ? false : true; + this._itemWindow.vis = this._itemWindow.visible; + this._itemWindow.width = Moghunter.bhud_item_width; + this._itemWindow.height = Moghunter.bhud_item_height; + if (String(Moghunter.bhud_item_layout) === "true") {this._itemWindow.opacity = 0}; + // ACTOR WINDOW --------------------------------------------------------------------- + this._actorWindow.x = Moghunter.bhud_actor_x; + this._actorWindow.y = Moghunter.bhud_actor_y; + this._actorWindow.org = [this._actorWindow.x,this._actorWindow.y]; + this._actorWindow.org2 = [ + this._actorWindow.org[0] + Moghunter.bhud_actor_slide_x, + this._actorWindow.org[1] + Moghunter.bhud_actor_slide_y + ]; + this._actorWindow.slide = Moghunter.bhud_actor_slide_x === 0 && Moghunter.bhud_actor_slide_y === 0 ? false : true; + this._actorWindow.vis = this._actorWindow.visible; + this._actorWindow.width = Moghunter.bhud_actor_width; + this._actorWindow.height = Moghunter.bhud_actor_height; + if (String(Moghunter.bhud_actor_layout) === "true") {this._actorWindow.opacity = 0}; + // ENEMY WINDOW --------------------------------------------------------------------- + this._enemyWindow.x = Moghunter.bhud_enemy_x; + this._enemyWindow.y = Moghunter.bhud_enemy_y; + this._enemyWindow.org = [Moghunter.bhud_enemy_x,Moghunter.bhud_enemy_y]; + this._enemyWindow.org2 = [ + this._enemyWindow.org[0] + Moghunter.bhud_enemy_slide_x, + this._enemyWindow.org[1] + Moghunter.bhud_enemy_slide_y + ]; + this._enemyWindow.slide = Moghunter.bhud_enemy_slide_x === 0 && Moghunter.bhud_enemy_slide_y === 0 ? false : true; + this._enemyWindow.vis = this._enemyWindow.visible; + this._enemyWindow.width = Moghunter.bhud_enemy_width; + this._enemyWindow.height = Moghunter.bhud_enemy_height; + if (String(Moghunter.bhud_enemy_layout) === "true") {this._enemyWindow.opacity = 0}; +}; + +//============================== +// ** create Layout Window +//============================== +Scene_Battle.prototype.create_layout_window = function() { + this._layoutField = new Sprite(); + this.addChild(this._layoutField); + if (String(Moghunter.bhud_com_layout) === "true") { + this._com_layout = new Sprite(ImageManager.loadBHud("Layout_Command")) + this._com_layout.x = Moghunter.bhud_com_lay_x; + this._com_layout.y = Moghunter.bhud_com_lay_y; + this._com_layout.visible = false; + this._layoutField.addChild(this._com_layout); + }; + if (String(Moghunter.bhud_party_layout) === "true") { + this._party_layout = new Sprite(ImageManager.loadBHud("Layout_Party")) + this._party_layout.x = Moghunter.bhud_party_lay_x; + this._party_layout.y = Moghunter.bhud_party_lay_y; + this._party_layout.visible = false; + this._layoutField.addChild(this._party_layout); + }; + if (String(Moghunter.bhud_help_layout) === "true") { + this._help_layout = new Sprite(ImageManager.loadBHud("Layout_Help")) + this._help_layout.x = Moghunter.bhud_help_lay_x; + this._help_layout.y = Moghunter.bhud_help_lay_y; + this._help_layout.visible = false; + this._layoutField.addChild(this._help_layout); + }; + if (String(Moghunter.bhud_skill_layout) === "true") { + + this._skill_layout = new Sprite(ImageManager.loadBHud("Layout_Skill")) + this._skill_layout.x = Moghunter.bhud_skill_lay_x; + this._skill_layout.y = Moghunter.bhud_skill_lay_y; + this._skill_layout.visible = false; + this._layoutField.addChild(this._skill_layout); + }; + if (String(Moghunter.bhud_item_layout) === "true") { + this._item_layout = new Sprite(ImageManager.loadBHud("Layout_Item")) + this._item_layout.x = Moghunter.bhud_item_lay_x; + this._item_layout.y = Moghunter.bhud_item_lay_y; + this._item_layout.visible = false; + this._layoutField.addChild(this._item_layout); + }; + if (String(Moghunter.bhud_actor_layout) === "true") { + this._actor_layout = new Sprite(ImageManager.loadBHud("Layout_Actor")) + this._actor_layout.x = Moghunter.bhud_actor_lay_x; + this._actor_layout.y = Moghunter.bhud_actor_lay_y; + this._actor_layout.visible = false; + this._layoutField.addChild(this._actor_layout); + }; + if (String(Moghunter.bhud_enemy_layout) === "true") { + this._enemy_layout = new Sprite(ImageManager.loadBHud("Layout_Enemy")) + this._enemy_layout.x = Moghunter.bhud_enemy_lay_x; + this._enemy_layout.y = Moghunter.bhud_enemy_lay_y; + this._enemy_layout.visible = false; + this._layoutField.addChild(this._enemy_layout); + }; +}; + +//============================== +// ** update +//============================== +var _alias_mog_bhud_scnbattle_update = Scene_Battle.prototype.update +Scene_Battle.prototype.update = function() { + if ($gameTemp._bhudFaceAnime > 0) {$gameTemp._bhudFaceAnime--}; + _alias_mog_bhud_scnbattle_update.call(this); + this.updateBattleHud(); +}; + +//============================== +// ** update Battle Hud +//============================== +Scene_Battle.prototype.updateBattleHud = function() { + if ($gameTemp._forceCreateBattleHud) {this.forceCreateBattleHud()}; + if ($gameTemp._forceRemoveBattleHud) {this.forceRemoveBattleHud()}; + if (this._screen_layout) {this.updateBattleHudVisible()}; + this.updateWindowSlideEffect() + this.updateLayoutWindow(); + if (this._actorSprites) {this.updateActors()}; +}; + +//============================== +// ** slideWindow +//============================== +Scene_Battle.prototype.slideWindow = function(win,vmode) { + var vm = vmode ? win.active : win.visible; + if (vm) { + var np = [win.org[0],win.org[1]]; + win.contentsOpacity += 15; + } else { + var np = [win.org2[0],win.org2[1]]; + win.contentsOpacity = 0; + }; + win.x = this.sprite_move_to(win.x,np[0]); + win.y = this.sprite_move_to(win.y,np[1]); +}; + +//============================== +// ** updateWindowSlideEffect +//============================== +Scene_Battle.prototype.updateWindowSlideEffect = function() { + if (this._partyCommandWindow.slide) {this.slideWindow(this._partyCommandWindow,true)}; + if (this._helpWindow.slide) {this.slideWindow(this._helpWindow,false)}; + if (this._skillWindow.slide){this.slideWindow(this._skillWindow,false)}; + if (this._itemWindow.slide) {this.slideWindow(this._itemWindow,false)}; + if (this._actorWindow.slide){this.slideWindow(this._actorWindow,false)}; + if (this._enemyWindow.slide) {this.slideWindow(this._enemyWindow,false)}; +}; + +//============================== +// ** updateLayoutWindows +//============================== +Scene_Battle.prototype.updateLayoutWindow = function() { + if (this._com_layout) { + this._com_layout.x = Moghunter.bhud_com_lay_x + this._actorCommandWindow.x; + this._com_layout.y = Moghunter.bhud_com_lay_y + this._actorCommandWindow.y; + this._com_layout.visible = this._actorCommandWindow.isOpenAndActive(); + this._com_layout.opacity = this._actorCommandWindow.contentsOpacity; + if (!this._actorCommandWindow.visible) {this._com_layout.visible = false}; + }; + if (this._party_layout) { + this._party_layout.x = Moghunter.bhud_party_lay_x + this._partyCommandWindow.x; + this._party_layout.y = Moghunter.bhud_party_lay_y + this._partyCommandWindow.y; + this._party_layout.visible = this._partyCommandWindow.isOpenAndActive(); + this._party_layout.opacity = this._partyCommandWindow.contentsOpacity; + if (!this._partyCommandWindow.visible) {this._party_layout.visible = false}; + }; + if (this._help_layout) { + this._help_layout.x = Moghunter.bhud_help_lay_x + this._helpWindow.x; + this._help_layout.y = Moghunter.bhud_help_lay_y + this._helpWindow.y; + this._help_layout.visible = this._helpWindow.visible; + this._help_layout.opacity = this._helpWindow.contentsOpacity; + }; + if (this._skill_layout) { + this._skill_layout.x = Moghunter.bhud_skill_lay_x + this._skillWindow.x; + this._skill_layout.y = Moghunter.bhud_skill_lay_y + this._skillWindow.y; + this._skill_layout.visible = this._skillWindow.isOpenAndActive(); + + this._skill_layout.opacity = this._skillWindow.contentsOpacity; + if (!this._skillWindow.visible) {this._skill_layout.visible = false}; + }; + if (this._item_layout) { + this._item_layout.x = Moghunter.bhud_item_lay_x + this._itemWindow.x; + this._item_layout.y = Moghunter.bhud_item_lay_y + this._itemWindow.y; + this._item_layout.visible = this._itemWindow.isOpenAndActive(); + this._item_layout.opacity = this._itemWindow.contentsOpacity; + if (!this._itemWindow.visible) {this._item_layout.visible = false}; + }; + if (this._actor_layout) { + this._actor_layout.x = Moghunter.bhud_actor_lay_x + this._actorWindow.x; + this._actor_layout.y = Moghunter.bhud_actor_lay_y + this._actorWindow.y; + this._actor_layout.visible = this._actorWindow.isOpenAndActive(); + this._actor_layout.opacity = this._actorWindow.contentsOpacity; + if (!this._actorWindow.visible) {this._actor_layout.visible = false}; + }; + if (this._enemy_layout) { + this._enemy_layout.x = Moghunter.bhud_enemy_lay_x + this._enemyWindow.x; + this._enemy_layout.y = Moghunter.bhud_enemy_lay_y + this._enemyWindow.y; + this._enemy_layout.visible = this._enemyWindow.isOpenAndActive(); + this._enemy_layout.opacity = this._enemyWindow.contentsOpacity; + if (!this._enemyWindow.visible) {this._enemy_layout.visible = false}; + }; +}; + +//============================== +// * Sprite Move To +//============================== +Scene_Battle.prototype.sprite_move_to = function(value,real_value) { + if (value === real_value) {return value}; + var dnspeed = 1 + (Math.abs(value - real_value) / 12); + if (value > real_value) {value -= dnspeed; + if (value < real_value) {value = real_value};} + else if (value < real_value) {value += dnspeed; + if (value > real_value) {value = real_value}; + }; + return Math.floor(value); +}; + +//============================================================================= +// * Battle_Hud +//============================================================================= +function Battle_Hud() { + this.initialize.apply(this, arguments); +}; + +Battle_Hud.prototype = Object.create(Sprite.prototype); +Battle_Hud.prototype.constructor = Battle_Hud; + +//============================== +// * Initialize +//============================== +Battle_Hud.prototype.initialize = function(hud_id) { + Sprite.prototype.initialize.call(this); + this._data_initial_ref = [0,true]; + this._hud_id = hud_id; + this._slideA = [0,Moghunter.bhud_slideX,Moghunter.bhud_slideY]; + if (this._slideA[1] != 0 || this._slideA[2] != 0) {this._slideA[0] = this._hud_id * 10}; + this.x = this._slideA[1]; + this.y = this._slideA[2]; + this._hud_size = [0,0]; + this.base_parameter_clear(); + this.load_img(); + this.opacity = 0; + $gameTemp._bhud_position_active = null; + $gameTemp._battleEnd = false; +}; + +//============================== +// * Load Img +//============================== +Battle_Hud.prototype.load_img = function() { + this._layout_img = ImageManager.loadBHud("Layout"); + if (String(Moghunter.bhud_layoverlay_visible) == "true") {this._layout2_img = ImageManager.loadBHud("Layout2");;}; + this._turn_img = ImageManager.loadBHud("Turn"); + this._state_img = ImageManager.loadSystem("IconSet"); + if (String(Moghunter.bhud_hp_meter_visible) == "true") {this._hp_meter_img = ImageManager.loadBHud("HP_Meter");}; + if (String(Moghunter.bhud_mp_meter_visible) == "true") {this._mp_meter_img = ImageManager.loadBHud("MP_Meter");}; + if (String(Moghunter.bhud_tp_meter_visible) == "true") {this._tp_meter_img = ImageManager.loadBHud("TP_Meter");}; + if (String(Moghunter.bhud_at_meter_visible) == "true") {this._at_meter_img = ImageManager.loadBHud("ATB_Meter");}; + if (String(Moghunter.bhud_hp_number_visible) == "true") {this._hp_number_img = ImageManager.loadBHud("HP_Number");}; + if (String(Moghunter.bhud_mp_number_visible) == "true") {this._mp_number_img = ImageManager.loadBHud("MP_Number");}; + if (String(Moghunter.bhud_tp_number_visible) == "true") {this._tp_number_img = ImageManager.loadBHud("TP_Number");}; + if (String(Moghunter.bhud_maxhp_number_visible) == "true") {this._maxhp_number_img = ImageManager.loadBHud("HP_Number2");}; + if (String(Moghunter.bhud_maxmp_number_visible) == "true") {this._maxmp_number_img = ImageManager.loadBHud("MP_Number2");}; + if (String(Moghunter.bhud_maxtp_number_visible) == "true") {this._maxtp_number_img = ImageManager.loadBHud("TP_Number2");}; +}; + +//============================== +// * Base Parameter Clear +//============================== +Battle_Hud.prototype.base_parameter_clear = function() { + this._hp_old = [-1,-1]; + this._maxhp_old = [-1,-1]; + this._hp_old_ani = [-1,-1]; + this._hp_flow = [false,0,0,0]; + this._mp_old = [-1,-1]; + this._maxmp_old = [-1,-1]; + this._mp_old_ani = [-1,-1]; + this._mp_flow = [false,0,0,0]; + this._tp_old = [-1,-1]; + this._maxtp_old = [-1,-1]; + this._tp_old_ani = -1; + this._tp_flow = [false,0,0,0]; + this._at_flow = [false,0,0,0]; + this._hp_number_old = -1; + this._mp_number_old = -1; + this._hp_number_old = -1; + this._number_align = []; + this._number_align[0] = Moghunter.bhud_hp_align_type; + this._number_align[1] = Moghunter.bhud_mp_align_type; + this._number_align[2] = Moghunter.bhud_tp_align_type; + this._diagonal_number = []; + this._diagonal_number[0] = Moghunter.bhud_hp_diagonal_number; + this._diagonal_number[1] = Moghunter.bhud_mp_diagonal_number; + this._diagonal_number[2] = Moghunter.bhud_tp_diagonal_number; + this._hp_img_data = [0,0,0]; + this._mp_img_data = [0,0,0]; + this._tp_img_data = [0,0,0]; + this._states_old = []; + this._states_data = [0,0,0]; + this._active = false; + this._hud_size = [0,0]; +}; + +//============================== +// * Need Refresh Bhud +//============================== +Battle_Hud.prototype.need_refreh_bhud = function() { + if (this._data_initial_ref[1]) {return true}; + if (this._battler != $gameParty.battleMembers()[this._hud_id]) {return true}; + return false; +}; + +//============================== +// * Refresh Bhud +//============================== +Battle_Hud.prototype.refresh_bhud = function() { + this._data_initial_ref[1] = false; + this._battler = $gameParty.battleMembers()[this._hud_id]; + if (this._battler) {this._battler.checkBhudNoteTags()} + this.opacity = 0; + this._hud_size = [0,0]; + this.base_parameter_clear(); + this.create_base_sprites(); +}; + +//============================== +// * Refresh Position +//============================== +Battle_Hud.prototype.refresh_position = function() { + this.set_hud_position(); + this.create_sprites(); + this._layout.x = this._pos_x; + this._layout.y = this._pos_y; + if (this._face) { + this._face.x = this._pos_x + Moghunter.bhud_face_pos_x; + this._face.y = this._pos_y + Moghunter.bhud_face_pos_y + this._face.ph; + }; + if (this._turn) { + this._turn.x = this._pos_x + (this._turn.width / 2) + Moghunter.bhud_turn_pos_x; + this._turn.y = this._pos_y + (this._turn.height / 2) + Moghunter.bhud_turn_pos_y; + }; + if (this._layout2) { + this._layout2.x = this._pos_x + Moghunter.bhud_layoverlay_x; + this._layout2.y = this._pos_y + Moghunter.bhud_layoverlay_y; + }; + if (this._face) {this._battler._face_pos = [this._face.x,this._face.y]}; +}; + +//============================== +// * Set Hud Position +//============================== +Battle_Hud.prototype.set_hud_position = function() { + this._hud_size = [this._layout.bitmap.width,this._layout.bitmap.height]; + this._members_max = $gameParty.battleMembers().length; + var ps = [Number(Moghunter.bhud_space_x) * this._hud_id, + Number(Moghunter.bhud_space_y) * this._hud_id]; + if ($gameSystem._bhud_position[this._hud_id]) { + this._pos_x = $gameSystem._bhud_position[this._hud_id][0]; + this._pos_y = $gameSystem._bhud_position[this._hud_id][1]; + } + else { + if (Number($gameSystem._bhud_pos_mode) === 0) { + var spc = ((Graphics.boxWidth - 14) / this._members_max); + var px = (spc / 2) + (spc * this._hud_id); + this._pos_x = Moghunter.bhud_pos_x + px + ps[0]; + this._pos_y = Moghunter.bhud_pos_y + ps[1]; + } + else { + var py = (this._hud_size[1] + 5) * this._hud_id; + this._pos_x = Moghunter.bhud_pos_x + ps[0]; + this._pos_y = Moghunter.bhud_pos_y + py + ps[1]; + }; + }; + $gameTemp._bhud_position[this._hud_id] = [this._pos_x,this._pos_y]; +}; + +//============================== +// * Update +//============================== +Battle_Hud.prototype.update = function() { + Sprite.prototype.update.call(this); + if (this._data_initial_ref[0] < 2) {this._data_initial_ref[0] += 1; return}; + if (this.need_refreh_bhud()) {this.refresh_bhud()}; + if (!this._battler) {return}; + if (!this._layout.bitmap.isReady()) {return}; + if (this._hud_size[0] === 0) {this.refresh_position();return}; + this.update_sprites(); + this.updateSlide(); +}; + +//============================== +// * Update Slide +//============================== +Battle_Hud.prototype.updateSlide = function() { + if (!this.is_hud_visible()) {return}; + if (this._slideA[0] > 0) { + this.visible = false; + this.opacity = 0; + this._slideA[0]--; + return; + }; + this.visible = true; + this.x = this.update_dif(this.x,0,20); + this.y = this.update_dif(this.y,0,20); +}; + +//============================== +// * Create Base Sprites +//============================== +Battle_Hud.prototype.create_base_sprites = function() { + this.create_turn(); + if (Number(Moghunter.bhud_face_priority) === 0) { + this.create_face(); + this.create_layout();} + else { + this.create_layout(); + this.create_face(); + }; +}; + +//============================== +// * Create Sprites +//============================== +Battle_Hud.prototype.create_sprites = function() { + this.create_hp_meter(); + this.create_mp_meter(); + this.create_tp_meter(); + this.create_at_meter(); + if (String(Moghunter.bhud_layoverlay_visible) == "true") {this.create_layoutOverlay()}; + this.create_hp_number(); + this.create_maxhp_number(); + this.create_mp_number(); + this.create_maxmp_number(); + this.create_tp_number(); + this.create_maxtp_number(); + this._stateType = Number(Moghunter.bhud_statesType); + if (this._stateType === 0) { + this.create_states(); + } else { + this.create_states2(); + }; + this.create_name(); +}; + +//============================== +// * Update Sprites +//============================== +Battle_Hud.prototype.update_sprites = function() { + this.update_active(); + this.update_visible(); + this.update_turn(); + this.update_face(); + this.update_hp(); + this.update_mp(); + this.update_tp(); + this.update_at(); + if (this._state_icon) { + if (this._stateType === 0) { + this.update_states(); + } else { + this.update_states2(); + }; + }; +}; + +//============================== +// * Update Active +//============================== +Battle_Hud.prototype.update_active = function() { + this._active = false + if (this.isChronoBattle()) { + if (this._battler == $gameTemp._chronoCom.user[1]) { + this._active = true; + $gameTemp._bhud_position_active = $gameTemp._bhud_position[this._hud_id] + }; + + } else { + if (this._battler == BattleManager.actor()) { + this._active = true; + $gameTemp._bhud_position_active = $gameTemp._bhud_position[this._hud_id] + }; + }; +}; + +//============================== +// * is Chrono Battle +//============================== +Battle_Hud.prototype.isChronoBattle = function() { + if (!Imported.MOG_ChronoEngine) {return false}; + if (!$gameSystem.isChronoMode()) {return false}; + if (!$gameTemp._chronoCom.user) {return false}; + return true; +}; + + +//============================== +// * Update visible +//============================== +Battle_Hud.prototype.update_visible = function(sprite) { + if (this.is_hud_visible()) {this.opacity += 10} + else {this.opacity -= 10}; +}; + +//============================== +// * Is Hud Visible +//============================== +Battle_Hud.prototype.is_hud_visible = function(sprite) { + if ($gameMessage.isBusy()) {return false}; + if ($gameTemp._battleEnd) {return false}; + if (!$gameSystem._bhud_visible) {return false}; + if (Imported.MOG_ChronoEngine) { + if ($gameSystem._chronoMode.phase > 3 && $gameSystem._chronoMode.phaseEndPhaseDuration === 0) {return false} + }; + return true +}; + +//============================== +// * Update Dif +//============================== +Battle_Hud.prototype.update_dif = function(value,real_value,speed) { + if (value == real_value) {return value}; + var dnspeed = 1 + (Math.abs(value - real_value) / speed); + if (value > real_value) {value -= dnspeed; + if (value < real_value) {value = real_value};} + else if (value < real_value) {value += dnspeed; + if (value > real_value) {value = real_value}; + }; + return Math.floor(value); +}; + +//============================== +// * Refresh Meter +//============================== +Battle_Hud.prototype.refresh_meter = function(sprite,value,value_max,type) { + var ch = sprite.bitmap.height / 2; + var meter_rate = sprite.bitmap.width * value / value_max; + sprite.setFrame(0,type * ch, meter_rate, ch); +}; + +//============================== +// * Refresh Flow +//============================== +Battle_Hud.prototype.refresh_meter_flow = function(sprite,value,value_max,type,flow) { + var cw = sprite.bitmap.width / 3; + var ch = sprite.bitmap.height / 2; + var meter_rate = cw * value / value_max; + sprite.setFrame(flow,type * ch, meter_rate, ch); +}; + +//============================== +// * Refresh Number +//============================== +Battle_Hud.prototype.refresh_number = function(sprites,value,img_data,x,y,type) { + numbers = Math.abs(value).toString().split(""); + var nx = 0; + var ny = 0; + var dir = 1; + for (var i = 0; i < sprites.length ; i++) {sprites[i].visible = false; + if (i > numbers.length) {return}; + var n = Number(numbers[i]); + sprites[i].setFrame(n * img_data[2], 0, img_data[2], img_data[1]); + sprites[i].visible = true; + if (this._number_align[type] === 0) { + var nx = -(img_data[2] * i) + (img_data[2] * numbers.length); + } else if (this._number_align[type] === 1) { + var nx = -(img_data[2] * i) + ((img_data[2] / 2) * numbers.length); + } else if (this._number_align[type] === 2) { + var nx = -(img_data[2] * i); + } else if (this._number_align[type] === 3) { + var nx = -(img_data[2] * i); + var ny = (img_data[3] * i); + } else { + var nx = -(img_data[2] * i) + (img_data[2] * numbers.length); + var ny = (img_data[3] / 2) * dir; + }; + sprites[i].x = x - nx; + sprites[i].y = y - ny; + dir = dir === 0 ? 1 : 0; + }; +}; + +//============================== +// * Need Refresh Parameter +//============================== +Battle_Hud.prototype.need_refresh_parameter = function(parameter) { + switch (parameter) { + case 0: + if (this._hp_old[0] != this._battler.hp) {return true}; + if (this._hp_old[1] != this._battler.mhp) {return true}; + break; + case 1: + if (this._mp_old[0] != this._battler.mp) {return true}; + if (this._mp_old[1] != this._battler.mmp) {return true}; + break; + case 2: + if (this._tp_old[0] != this._battler.tp) {return true}; + if (this._tp_old[1] != this._battler.maxTp()) {return true}; + break; + }; + return false; +}; + +//============================== +// * Create Layout +//============================== +Battle_Hud.prototype.create_layout = function() { + this.removeChild(this._layout); + if (!this._battler) {return}; + this._layout = new Sprite(this._layout_img); + this.addChild(this._layout); +}; + +//============================== +// * Create Layout Overlay +//============================== +Battle_Hud.prototype.create_layoutOverlay = function() { + this.removeChild(this._layout2); + if (!this._battler) {return}; + this._layout2 = new Sprite(this._layout2_img); + this.addChild(this._layout2); +}; + +//============================== +// * Create Turn +//============================== +Battle_Hud.prototype.create_turn = function() { + if (String(Moghunter.bhud_turn_visible) != "true") {return}; + this.removeChild(this._turn); + if (!this._battler) {return}; + this._turn = new Sprite(this._turn_img); + this._turn.anchor.x = 0.5; + this._turn.anchor.y = 0.5; + this._turn.rt = Number(Moghunter.bhud_turn_rotation); + this._turn.zt = String(Moghunter.bhud_turn_zoom) === "true" ? true : false; + this._turn.vis = this._turn.visible; + this._turn_blink = [0,0]; + this.addChild(this._turn); +}; + +//============================== +// * Update Turn +//============================== +Battle_Hud.prototype.update_turn = function() { + if (!this._turn) {return}; + if (!this._active) {this._turn.visible = false;return;}; + if (this._turn.rt != 0) {this._turn.rotation += this._turn.rt}; + if (this._turn.zt) {this.updateTurnZoom()}; + this._turn.visible = true; + this._turn_blink[0] += 1 + if (this._turn_blink[0] < 60) {this._turn_blink[1] += 2} + else if (this._turn_blink[0] < 120) {this._turn_blink[1] -= 2} + else {this._turn_blink = [0,0]}; + this._turn.opacity = 135 + this._turn_blink[1] +}; + +//============================== +// * Update Turn Zoom +//============================== +Battle_Hud.prototype.updateTurnZoom = function() { + if (this._turn.vis != this._turn.visible) { + this._turn.vis = this._turn.visible; + this._turn.scale.x = 1.50; + this._turn.scale.y = this._turn.scale.x; + }; + if (this._turn.scale.x > 0) { + this._turn.scale.x -= 0.04; + if (this._turn.scale.x <= 1.00) {this._turn.scale.x = 1.00}; + }; + this._turn.scale.y = this._turn.scale.x; +}; + +//============================== +// * Create Face +//============================== +Battle_Hud.prototype.create_face = function() { + if (String(Moghunter.bhud_face_visible) != "true") {return}; + this.removeChild(this._face); + if (!this._battler) {return}; + this._face = new Sprite(ImageManager.loadBHud("Face_" + this._battler._actorId)); + this._face.anchor.x = 0.5; + this._face.anchor.y = 0.5; + this._face_data = [0,0,false,false,false,-1]; + this._face.ph = 0; + this._face.animation = [-1,0,0,0,0,0,0,0,0]; + this._face.breathEffect = this._battler._bhud.faceBreath; + this._face.scaleY = 0; + if (String(Moghunter.bhud_face_shake) === "true") {this._face_data[2] = true} + if (String(Moghunter.bhud_face_animated) === "true") {this._face_data[4] = true} + this._battler._bhud_face_data = [0,0,0,1] + this.addChild(this._face); +}; + +//============================== +// * Update Face +//============================== +Battle_Hud.prototype.update_face = function() { + if (!this._face) {return}; + if (!this._face.bitmap.isReady()) {return}; + if (this._face_data[4] && this._face_data[5] != this._battler._bhud_face_data[2]) {this.refresh_face();}; + this.update_face_animation(); + this.update_face_shake(); + this.update_face_zoom(); + if (this._face.breathEffect) {this.updateFaceEffects()}; +}; + +//============================== +// * update Face Effects +//============================== +Battle_Hud.prototype.updateFaceEffects = function() { + if (this._face_data[5] == 0 || this._face_data[5] == 3) { + this._face.anchor.y = 1; + this._face.y = this._pos_y + Moghunter.bhud_face_pos_y + this._face.height / 2; + this.updateBreathEffect() + } else { + this._face.anchor.y = 0.5; + this._face.y = this._pos_y + Moghunter.bhud_face_pos_y; + + }; +}; + +//============================== +// * set Breath Effect +//============================== +Battle_Hud.prototype.setBreathEffect = function() { + this._face.animation[0] = 0; + var rds = Math.randomInt(100); + var rds2 = rds * 0.0000001; + this._face.animation[2] = 0.000005; + this._face.animation[3] = 0.0002; + var int = this._face.animation[3]; + var int2 = (Math.randomInt(int) * 0.0001).toFixed(4); + this._face.animation[1] = int2; + this._face.animation[8] = Math.randomInt(80) +}; + +//============================== +// * update Breath Effect +//============================== +Battle_Hud.prototype.updateBreathEffect = function() { + this._face.scale.y = 1.00 + this._face.scaleY; + if (this._face.animation[0] == -1) { + if (this._face.bitmap.isReady()) {this.setBreathEffect()} + return + } + if (this._face.animation[8] > 0) { + this._face.animation[8]-- + return + } + if (this._face.animation[0] == 0) { + this._face.animation[1] -= this._face.animation[2] + this._face.scaleY += this._face.animation[1]; + if (this._face.animation[1] <= -this._face.animation[3]) { + this._face.animation[1] = -this._face.animation[3] + this._face.animation[0] = 1; + }; + } else { + this._face.animation[1] += this._face.animation[2] + this._face.scaleY += this._face.animation[1]; + if (this._face.animation[1] >= this._face.animation[3]) { + this._face.animation[1] = this._face.animation[3] + this._face.animation[0] = 0; + }; + }; +}; + +//============================== +// * Refresh Face +//============================== +Battle_Hud.prototype.refresh_face = function() { + this._face_data[5] = this._battler._bhud_face_data[2]; + var cw = this._face.bitmap.width / 5; + var ch = this._face.bitmap.height; + this._face.setFrame(cw * this._face_data[5], 0, cw, ch); +}; + +//============================== +// * Update Face Animation +//============================== +Battle_Hud.prototype.update_face_animation = function() { + if (this._battler._bhud_face_data[3] > 0) {this._battler._bhud_face_data[3] -= 1; + if (this._battler._bhud_face_data[3] === 0) { + if (this._battler.isDead()) {this._battler._bhud_face_data[2] = 4} + else if (this._battler.hp <= 30 * this._battler.mhp / 100) {this._battler._bhud_face_data[2] = 3} + else {this._battler._bhud_face_data[2] = 0}; + }; + }; +}; + +//============================== +// * Update Face Zoom +//============================== +Battle_Hud.prototype.update_face_zoom = function() { + if (this._battler._bhud_face_data[1] > 0) {this._battler._bhud_face_data[1] -= 1; + if (this._battler._bhud_face_data[1] == 0) {this._face.scale.x = 1.00} + else if (this._battler._bhud_face_data[1] < 35) {this._face.scale.x -= 0.005; + if (this._face.scale.x < 1.00) {this._face.scale.x = 1.00;}; + } + else if (this._battler._bhud_face_data[1] < 70){this._face.scale.x += 0.005; + if (this._face.scale.x > 1.25) {this._face.scale.x = 1.25;}; + }; + this._face.scale.y = this._face.scale.x; + }; +}; + +//============================== +// * Update Face Shake +//============================== +Battle_Hud.prototype.update_face_shake = function() { + this._face.x = this._pos_x + Moghunter.bhud_face_pos_x; + if (this._face_data[2] && this._battler._bhud_face_data[0] > 0) {this._battler._bhud_face_data[0] -= 1; + this._face.x = this._pos_x + Moghunter.bhud_face_pos_x + ((Math.random() * 12) - 6); + }; +}; + +//============================== +// * Create Name +//============================== +Battle_Hud.prototype.create_name = function() { + if (String(Moghunter.bhud_name_visible) != "true") {return}; + this.removeChild(this._name); + if (!this._battler) {return}; + this._name = new Sprite(new Bitmap(200,48)); + this._name.x = this._pos_x + Moghunter.bhud_name_pos_x; + this._name.y = this._pos_y + Moghunter.bhud_name_pos_y; + this._name.bitmap.fontSize = Number(Moghunter.bhud_name_font_size); + if (String(Moghunter.bhud_name_font_italic) === "true") {this._name.bitmap.fontItalic = true}; + + this._name.bitmap.outlineWidth = Number(Moghunter.bhud_name_font_bold_size); + this.addChild(this._name); + this.refresh_name(); +}; + +//============================== +// * Refresh Name +//============================== +Battle_Hud.prototype.refresh_name = function() { + this._name.bitmap.clear(); + var align = "left" + if (Moghunter.bhud_name_align === 1) { + var align = "center" + } else if (Moghunter.bhud_name_align === 2) { + var align = "right" + }; + this._name.bitmap.drawText(this._battler._name, 0, 0, this._name.bitmap.width, this._name.bitmap.height,align); +}; + +//============================== +// * Create HP Meter +//============================== +Battle_Hud.prototype.create_hp_meter = function() { + if (String(Moghunter.bhud_hp_meter_visible) != "true") {return}; + this.removeChild(this._hp_meter_blue); + this.removeChild(this._hp_meter_red); + if (!this._battler) {return}; + this._hp_meter_red = new Sprite(this._hp_meter_img); + this._hp_meter_red.x = this._pos_x + Moghunter.bhud_hp_meter_pos_x; + this._hp_meter_red.y = this._pos_y + Moghunter.bhud_hp_meter_pos_y; + this._hp_meter_red.rotation = Moghunter.bhud_hp_meter_rotation * Math.PI / 180; + this.addChild(this._hp_meter_red); + this._hp_meter_blue = new Sprite(this._hp_meter_img); + this._hp_meter_blue.x = this._hp_meter_red.x; + this._hp_meter_blue.y = this._hp_meter_red.y; + this._hp_meter_blue.rotation = this._hp_meter_red.rotation; + this.addChild(this._hp_meter_blue); + if (String(Moghunter.bhud_hp_meter_flow) === "true") {this._hp_flow[0] = true; + this._hp_flow[2] = this._hp_meter_img.width / 3; + this._hp_flow[3] = this._hp_flow[2] * 2; + this._hp_flow[1] = Math.floor(Math.random() * this._hp_flow[2]); + }; +}; + +//============================== +// * Create HP Number +//============================== +Battle_Hud.prototype.create_hp_number = function() { + if (String(Moghunter.bhud_hp_number_visible) != "true") {return}; + if (this._hp_number) {for (var i = 0; i < this._hp_number.length; i++) {this.removeChild(this._hp_number[i]);}}; + if (!this._battler) {return}; + this._hp_number = []; + this._hp_img_data = [this._hp_number_img.width,this._hp_number_img.height, + this._hp_number_img.width / 10, this._hp_number_img.height / 2, + this._pos_x + Moghunter.bhud_hp_number_pos_x, + this._pos_y + Moghunter.bhud_hp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._hp_number[i] = new Sprite(this._hp_number_img); + this._hp_number[i].visible = false; + this._hp_number[i].x = this._hp_img_data[4]; + this._hp_number[i].y = this._hp_img_data[5]; + this.addChild(this._hp_number[i]); + }; + this._hp_number_old = this._battler.hp; + this.refresh_number(this._hp_number,this._hp_number_old,this._hp_img_data,this._hp_img_data[4],this._hp_img_data[5],0); +}; + +//============================== +// * Create maxHP Number +//============================== +Battle_Hud.prototype.create_maxhp_number = function() { + if (String(Moghunter.bhud_maxhp_number_visible) != "true") {return}; + if (this._maxhp_number) {for (var i = 0; i < this._maxhp_number.length; i++) {this.removeChild(this._maxhp_number[i]);}}; + if (!this._battler) {return}; + this._maxhp_number = []; + this._maxhp_img_data = [this._maxhp_number_img.width,this._maxhp_number_img.height, + this._maxhp_number_img.width / 10, this._maxhp_number_img.height / 2, + this._pos_x + Moghunter.bhud_maxhp_number_pos_x, + this._pos_y + Moghunter.bhud_maxhp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._maxhp_number[i] = new Sprite(this._maxhp_number_img); + this._maxhp_number[i].visible = false; + this._maxhp_number[i].x = this._maxhp_img_data[4]; + this._maxhp_number[i].y = this._maxhp_img_data[5]; + this.addChild(this._maxhp_number[i]); + }; + this._maxhp_number_old = this._battler.mhp; + this.refresh_number(this._maxhp_number,this._maxhp_number_old,this._maxhp_img_data,this._maxhp_img_data[4],this._maxhp_img_data[5],0); +}; + +//============================== +// * Update HP +//============================== +Battle_Hud.prototype.update_hp = function() { + if (this._hp_meter_blue) { + if(this._hp_flow[0]) { + this.refresh_meter_flow(this._hp_meter_blue,this._battler.hp,this._battler.mhp,0,this._hp_flow[1]); + var dif_meter = this.update_dif(this._hp_old_ani[0],this._battler.hp,160) + if (this._hp_old_ani[0] != dif_meter) {this._hp_old_ani[0] = dif_meter; + this.refresh_meter_flow(this._hp_meter_red,this._hp_old_ani[0],this._battler.mhp,1,this._hp_flow[1]); + }; + this._hp_flow[1] += 1.5; + if (this._hp_flow[1] > this._hp_flow[3]) {this._hp_flow[1] = 0}; + } + else { + if (this.need_refresh_parameter(0)) { + this.refresh_meter(this._hp_meter_blue,this._battler.hp,this._battler.mhp,0); + this._hp_old = [this._battler.hp,this._battler.mhp]; + }; + var dif_meter = this.update_dif(this._hp_old_ani[0],this._battler.hp,160) + if (this._hp_old_ani[0] != dif_meter) {this._hp_old_ani[0] = dif_meter; + this.refresh_meter(this._hp_meter_red,this._hp_old_ani[0],this._battler.mhp,1);}; + }; + }; + if (this._hp_number) { + var dif_number = this.update_dif(this._hp_number_old,this._battler.hp,30) + if (this._hp_number_old != dif_number) {this._hp_number_old = dif_number; + this.refresh_number(this._hp_number,this._hp_number_old,this._hp_img_data,this._hp_img_data[4],this._hp_img_data[5],0);}; + }; + if (this._maxhp_number) { + if (this._maxhp_number_old != this._battler.mhp) {this._maxhp_number_old = this._battler.mhp; + this.refresh_number(this._maxhp_number,this._maxhp_number_old,this._maxhp_img_data,this._maxhp_img_data[4],this._maxhp_img_data[5],0);}; + }; +}; + +//============================== +// * Create MP Meter +//============================== +Battle_Hud.prototype.create_mp_meter = function() { + if (String(Moghunter.bhud_mp_meter_visible) != "true") {return}; + this.removeChild(this._mp_meter_blue); + this.removeChild(this._mp_meter_red); + if (!this._battler) {return}; + this._mp_meter_red = new Sprite(this._mp_meter_img); + this._mp_meter_red.x = this._pos_x + Moghunter.bhud_mp_meter_pos_x; + this._mp_meter_red.y = this._pos_y + Moghunter.bhud_mp_meter_pos_y; + this._mp_meter_red.rotation = Moghunter.bhud_mp_meter_rotation * Math.PI / 180; + this.addChild(this._mp_meter_red); + this._mp_meter_blue = new Sprite(this._mp_meter_img); + this._mp_meter_blue.x = this._mp_meter_red.x; + this._mp_meter_blue.y = this._mp_meter_red.y; + this._mp_meter_blue.rotation = this._mp_meter_red.rotation; + this.addChild(this._mp_meter_blue); + if (String(Moghunter.bhud_mp_meter_flow) === "true") {this._mp_flow[0] = true; + this._mp_flow[2] = this._mp_meter_img.width / 3; + this._mp_flow[3] = this._mp_flow[2] * 2; + this._mp_flow[1] = Math.floor(Math.random() * this._mp_flow[2]); + }; +}; + +//============================== +// * Create MP Number +//============================== +Battle_Hud.prototype.create_mp_number = function() { + if (String(Moghunter.bhud_mp_number_visible) != "true") {return}; + if (this._mp_number) {for (var i = 0; i < this._mp_number.length; i++) {this.removeChild(this._mp_number[i]);}}; + if (!this._battler) {return}; + this._mp_number = []; + this._mp_img_data = [this._mp_number_img.width,this._mp_number_img.height, + this._mp_number_img.width / 10, this._mp_number_img.height / 2, + this._pos_x + Moghunter.bhud_mp_number_pos_x, + this._pos_y + Moghunter.bhud_mp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._mp_number[i] = new Sprite(this._mp_number_img); + this._mp_number[i].visible = false; + this._mp_number[i].x = this._mp_img_data[4]; + this._mp_number[i].y = this._mp_img_data[5] ; + this.addChild(this._mp_number[i]); + }; + this._mp_number_old = this._battler.mp; + this.refresh_number(this._mp_number,this._mp_number_old,this._mp_img_data,this._mp_img_data[4],this._mp_img_data[5],1); +}; + +//============================== +// * Create MaxMP Number +//============================== +Battle_Hud.prototype.create_maxmp_number = function() { + if (String(Moghunter.bhud_maxmp_number_visible) != "true") {return}; + if (this._maxmp_number) {for (var i = 0; i < this._maxmp_number.length; i++) {this.removeChild(this._maxmp_number[i]);}}; + if (!this._battler) {return}; + this._maxmp_number = []; + this._maxmp_img_data = [this._maxmp_number_img.width,this._maxmp_number_img.height, + this._maxmp_number_img.width / 10, this._maxmp_number_img.height / 2, + this._pos_x + Moghunter.bhud_maxmp_number_pos_x, + this._pos_y + Moghunter.bhud_maxmp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._maxmp_number[i] = new Sprite(this._maxmp_number_img); + this._maxmp_number[i].visible = false; + this._maxmp_number[i].x = this._maxmp_img_data[4]; + this._maxmp_number[i].y = this._maxmp_img_data[5] ; + this.addChild(this._maxmp_number[i]); + }; + this._maxmp_number_old = this._battler.mmp; + this.refresh_number(this._maxmp_number,this._maxmp_number_old,this._maxmp_img_data,this._maxmp_img_data[4],this._maxmp_img_data[5],1); +}; + +//============================== +// * Update MP +//============================== +Battle_Hud.prototype.update_mp = function() { + if (this._mp_meter_blue) { + if(this._mp_flow[0]) { + this.refresh_meter_flow(this._mp_meter_blue,this._battler.mp,this._battler.mmp,0,this._mp_flow[1]); + var dif_meter = this.update_dif(this._mp_old_ani[0],this._battler.mp,160) + if (this._mp_old_ani[0] != dif_meter) {this._mp_old_ani[0] = dif_meter; + this.refresh_meter_flow(this._mp_meter_red,this._mp_old_ani[0],this._battler.mmp,1,this._mp_flow[1]); + }; + this._mp_flow[1] += 1.5; + if (this._mp_flow[1] > this._mp_flow[3]) {this._mp_flow[1] = 0}; + } + else { + if (this.need_refresh_parameter(1)) { + this.refresh_meter(this._mp_meter_blue,this._battler.mp,this._battler.mmp,0); + this._mp_old = [this._battler.mp,this._battler.mmp]; + }; + var dif_meter = this.update_dif(this._mp_old_ani[0],this._battler.mp,160) + if (this._mp_old_ani[0] != dif_meter) {this._mp_old_ani[0] = dif_meter; + this.refresh_meter(this._mp_meter_red,this._mp_old_ani[0],this._battler.mmp,1);}; + }; + }; + if (this._mp_number) { + var dif_number = this.update_dif(this._mp_number_old,this._battler.mp,30) + if (this._mp_number_old != dif_number) {this._mp_number_old = dif_number; + this.refresh_number(this._mp_number,this._mp_number_old,this._mp_img_data,this._mp_img_data[4],this._mp_img_data[5],1);}; + }; + if (this._maxmp_number) { + if (this._maxmp_number_old != this._battler.mmp) {this._maxmp_number_old = this._battler.mmp; + this.refresh_number(this._maxmp_number,this._maxmp_number_old,this._maxmp_img_data,this._maxmp_img_data[4],this._maxmp_img_data[5],1);}; + }; + +}; + +//============================== +// * Create TP Meter +//============================== +Battle_Hud.prototype.create_tp_meter = function() { + if (String(Moghunter.bhud_tp_meter_visible) != "true") {return}; + this.removeChild(this._tp_meter_blue); + this.removeChild(this._tp_meter_red); + if (!this._battler) {return}; + this._tp_meter_red = new Sprite(this._tp_meter_img); + this._tp_meter_red.x = this._pos_x + Moghunter.bhud_tp_meter_pos_x; + this._tp_meter_red.y = this._pos_y + Moghunter.bhud_tp_meter_pos_y; + this._tp_meter_red.rotation = Moghunter.bhud_tp_meter_rotation * Math.PI / 180; + this.addChild(this._tp_meter_red); + this._tp_meter_blue = new Sprite(this._tp_meter_img); + this._tp_meter_blue.x = this._tp_meter_red.x; + this._tp_meter_blue.y = this._tp_meter_red.y; + this._tp_meter_blue.rotation = this._tp_meter_red.rotation; + this.addChild(this._tp_meter_blue); + if (String(Moghunter.bhud_tp_meter_flow) === "true") {this._tp_flow[0] = true; + this._tp_flow[2] = this._tp_meter_img.width / 3; + this._tp_flow[3] = this._tp_flow[2] * 2; + this._tp_flow[1] = Math.floor(Math.random() * this._tp_flow[2]); + }; +}; + +//============================== +// * Create TP Number +//============================== +Battle_Hud.prototype.create_tp_number = function() { + if (String(Moghunter.bhud_tp_number_visible) != "true") {return}; + if (this._tp_number) {for (var i = 0; i < this._tp_number.length; i++) {this.removeChild(this._tp_number[i]);}}; + if (!this._battler) {return}; + this._tp_number = []; + this._tp_img_data = [this._tp_number_img.width,this._tp_number_img.height, + this._tp_number_img.width / 10, this._tp_number_img.height / 2, + this._pos_x + Moghunter.bhud_tp_number_pos_x, + this._pos_y + Moghunter.bhud_tp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._tp_number[i] = new Sprite(this._tp_number_img); + this._tp_number[i].visible = false; + this._tp_number[i].x = this._tp_img_data[4]; + + this._tp_number[i].y = this._tp_img_data[5] ; + this.addChild(this._tp_number[i]); + }; + this._tp_number_old = this._battler.tp; + this.refresh_number(this._tp_number,this._tp_number_old,this._tp_img_data,this._tp_img_data[4],this._tp_img_data[5],2); +}; + +//============================== +// * Create MaxTP Number +//============================== +Battle_Hud.prototype.create_maxtp_number = function() { + if (String(Moghunter.bhud_maxtp_number_visible) != "true") {return}; + if (this._maxtp_number) {for (var i = 0; i < this._maxtp_number.length; i++) {this.removeChild(this._maxtp_number[i]);}}; + if (!this._battler) {return}; + this._maxtp_number = []; + this._maxtp_img_data = [this._maxtp_number_img.width,this._maxtp_number_img.height, + this._maxtp_number_img.width / 10, this._maxtp_number_img.height / 2, + this._pos_x + Moghunter.bhud_maxtp_number_pos_x, + this._pos_y + Moghunter.bhud_maxtp_number_pos_y, + ]; + for (var i = 0; i < 5; i++) { + this._maxtp_number[i] = new Sprite(this._maxtp_number_img); + this._maxtp_number[i].visible = false; + this._maxtp_number[i].x = this._maxtp_img_data[4]; + this._maxtp_number[i].y = this._maxtp_img_data[5] ; + this.addChild(this._maxtp_number[i]); + }; + this._maxtp_number_old = this._battler.maxTp(); + this.refresh_number(this._maxtp_number,this._maxtp_number_old,this._maxtp_img_data,this._maxtp_img_data[4],this._maxtp_img_data[5],2); +}; + +//============================== +// * Update TP +//============================== +Battle_Hud.prototype.update_tp = function() { + if (this._tp_meter_blue) { + if(this._tp_flow[0]) { + this.refresh_meter_flow(this._tp_meter_blue,this._battler.tp,this._battler.maxTp(),0,this._tp_flow[1]); + var dif_meter = this.update_dif(this._tp_old_ani[0],this._battler.tp,160) + if (this._tp_old_ani[0] != dif_meter) {this._tp_old_ani[0] = dif_meter; + this.refresh_meter_flow(this._tp_meter_red,this._tp_old_ani[0],this._battler.maxTp(),1,this._tp_flow[1]); + }; + this._tp_flow[1] += 1.5; + if (this._tp_flow[1] > this._tp_flow[3]) {this._tp_flow[1] = 0}; + } + else { + if (this.need_refresh_parameter(2)) { + this.refresh_meter(this._tp_meter_blue,this._battler.tp,this._battler.maxTp(),0); + this._tp_old = [this._battler.tp,this._battler.maxTp()]; + }; + var dif_meter = this.update_dif(this._tp_old_ani[0],this._battler.tp,160) + if (this._tp_old_ani[0] != dif_meter) {this._tp_old_ani[0] = dif_meter; + this.refresh_meter(this._tp_meter_red,this._tp_old_ani[0],this._battler.maxTp(),1);}; + }; + }; + if (this._tp_number) { + var dif_number = this.update_dif(this._tp_number_old,this._battler.tp,30) + if (this._tp_number_old != dif_number) {this._tp_number_old = dif_number; + this.refresh_number(this._tp_number,this._tp_number_old,this._tp_img_data,this._tp_img_data[4],this._tp_img_data[5],2);}; + }; +}; + +//============================== +// * Create AT Meter +//============================== +Battle_Hud.prototype.create_at_meter = function() { + if (String(Moghunter.bhud_at_meter_visible) != "true") {return}; + this.removeChild(this._at_meter); + if (!this._battler) {return}; + this._at_meter = new Sprite(this._at_meter_img); + this._at_meter.x = this._pos_x + Moghunter.bhud_at_meter_pos_x; + this._at_meter.y = this._pos_y + Moghunter.bhud_at_meter_pos_y; + this._at_meter.rotation = Moghunter.bhud_at_meter_rotation * Math.PI / 180; + this.addChild(this._at_meter); + if (String(Moghunter.bhud_at_meter_flow) === "true") {this._at_flow[0] = true; + this._at_flow[2] = this._at_meter_img.width / 3; + this._at_flow[3] = this._at_flow[2] * 2; + this._at_flow[1] = Math.floor(Math.random() * this._at_flow[2]); + }; + this.check_compatibility_atb(); +}; + +//============================== +// * Check Compatibility ATB +//============================== +Battle_Hud.prototype.check_compatibility_atb = function() { + if (Imported.Ellye_ATB) { + var parameters = $plugins.filter(function(p) { + return p.description.contains(''); + })[0].parameters; + this._ellye_max_atb = Number(parameters['Full ATB Gauge'] || 50000); + }; +}; + +//============================== +// * Update AT +//============================== +Battle_Hud.prototype.update_at = function() { + if (this._at_meter) { + if (!this.at === -1) {this._at_meter.visible = false; return} + else {this._at_meter.visible = true}; + if(this._at_flow[0]) { + if (this.is_casting()){ + if (this.is_max_cast()){ + this.refresh_at_meter_flow(this._at_meter,this.cast_at(),this.cast_max_at(),3,this._at_flow[1]);} + else { + this.refresh_at_meter_flow(this._at_meter,this.cast_at(),this.cast_max_at(),2,this._at_flow[1]); + }; + } + else if (this.is_max_at()){ + this.refresh_at_meter_flow(this._at_meter,this.at(),this.max_at(),1,this._at_flow[1]);} + else { + this.refresh_at_meter_flow(this._at_meter,this.at(),this.max_at(),0,this._at_flow[1]);}; + + this._at_flow[1] += 1.5; + if (this._at_flow[1] > this._at_flow[3]) {this._at_flow[1] = 0}; + } + else { + if (this.is_casting()){ + if (this.is_max_cast()){ + this.refresh_at_meter(this._at_meter,this.cast_at(),this.cast_max_at(),3);} + else { + this.refresh_at_meter(this._at_meter,this.cast_at(),this.cast_max_at(),2); + }; + } + else if (this.is_max_at()){ + this.refresh_at_meter(this._at_meter,this.at(),this.max_at(),1);} + else { + this.refresh_at_meter(this._at_meter,this.at(),this.max_at(),0);}; + }; + }; +}; + +//============================== +// * Refresh AT Meter +//============================== +Battle_Hud.prototype.refresh_at_meter = function(sprite,value,value_max,type) { + var ch = sprite.bitmap.height / 4; + var meter_rate = sprite.bitmap.width * value / value_max; + sprite.setFrame(0,type * ch, meter_rate, ch); +}; + +//============================== +// * Refresh AT Meter Flow +//============================== +Battle_Hud.prototype.refresh_at_meter_flow = function(sprite,value,value_max,type,flow) { + var cw = sprite.bitmap.width / 3; + var ch = sprite.bitmap.height / 4; + var meter_rate = cw * value / value_max; + sprite.setFrame(flow,type * ch, meter_rate, ch); +}; + +//============================== +// * At +//============================== +Battle_Hud.prototype.at = function() { + if (Imported.MOG_ATB) {return this._battler._atb}; + if (Imported.Ellye_ATB) {return this._battler.atb}; + if (Imported.YEP_X_BattleSysATB) {return Math.abs(this._battler._atbSpeed)}; + if (Imported['VE - Active Time Battle']) { + return this._battler.maxAtb - this._battler.atb; + }; + if (this._battler._ras && $gameSystem.isChronoMode()) { + return this._battler._chrono.atb; + }; + return -1; +} + +//============================== +// * Max At +//============================== +Battle_Hud.prototype.max_at = function() { + if (Imported.MOG_ATB) {return this._battler._max_atb}; + if (Imported.Ellye_ATB) {return this._ellye_max_atb}; + if (Imported.YEP_X_BattleSysATB) {return Math.abs(BattleManager._atbTarget)}; + if (Imported['VE - Active Time Battle']) {return this._battler.maxAtb}; + if (this._battler._ras && $gameSystem.isChronoMode()) { + return this._battler._chrono.maxAtb; + }; + return 1; +}; + +//============================== +// * Cast AT +//============================== +Battle_Hud.prototype.cast_at = function() { + if (Imported.MOG_ATB) {return this._battler._cast_atb[1]}; + if (Imported.Ellye_ATB) {return this._battler.current_cast_atb}; + if (Imported.YEP_X_BattleSysATB) {return Math.abs(this._battler._atbCharge)}; + if (Imported['VE - Active Time Battle']) { + return this._battler.maxAtb - this._battler.atb; + }; + if (this._battler._ras && $gameSystem.isChronoMode()) { + return this._battler._ras.cast.duration; + }; + return 0; +}; + +//============================== +// * Cast Max AT +//============================== +Battle_Hud.prototype.cast_max_at = function() { + if (Imported.MOG_ATB) {return this._battler._cast_atb[2]}; + if (Imported.Ellye_ATB) {return this._battler.target_cast_atb}; + if (Imported.YEP_X_BattleSysATB) {return Math.abs(BattleManager._atbCharge)}; + if (Imported['VE - Active Time Battle']) {return this._battler.maxAtb}; + if (this._battler._ras && $gameSystem.isChronoMode()) { + return this._battler._ras.cast.maxDuration; + }; + return 1; +}; + +//============================== +// * Is Casting +//============================== +Battle_Hud.prototype.is_casting = function() { + if (Imported.MOG_ATB) {if (this._battler._cast_atb[0]) {return true;}}; + if (Imported.Ellye_ATB) {if (this._battler.casting_action) {return true;}}; + if (Imported.YEP_X_BattleSysATB) {if (this._battler._atbCharging) {return true;}} ; + if (Imported['VE - Active Time Battle']) {return this._battler.isAtbCast()}; + if (this._battler._chrono && $gameSystem.isChronoMode()) { + return this._battler.isCastingC(); + }; + return false; +}; + +//============================== +// * Is Max Atb +//============================== +Battle_Hud.prototype.is_max_at = function() { + return this.at() >= this.max_at(); +}; + +//============================== +// * Is Max Cast +//============================== +Battle_Hud.prototype.is_max_cast = function() { + return this.cast_at() >= this.cast_max_at(); +}; + +//============================== +// * Create States +//============================== +Battle_Hud.prototype.create_states = function() { + if (String(Moghunter.bhud_states_visible) != "true") {return}; + this.removeChild(this._state_icon); + if (!this._battler) {return}; + this._states_data = [0,0,0]; + this._state_icon = new Sprite(this._state_img); + this._state_icon.x = this._pos_x + Moghunter.bhud_states_pos_x; + this._state_icon.y = this._pos_y + Moghunter.bhud_states_pos_y; + this._state_icon.visible = false; + this.addChild(this._state_icon); + this.refresh_states(); +}; + +//============================== +// * Create States +//============================== +Battle_Hud.prototype.refresh_states = function() { + this._states_data[0] = 0; + this._states_data[2] = 0; + this._state_icon.visible = false; + if (this._battler.allIcons().length == 0) {this._states_data[1] = 0;return}; + if (this._battler.allIcons()[this._states_data[1]]) { + this._states_data[0] = this._battler.allIcons()[this._states_data[1]]; + this._state_icon.visible = true; + var sx = this._states_data[0] % 16 * 32; + var sy = Math.floor(this._states_data[0] / 16) * 32; + this._state_icon.setFrame(sx, sy, 32, 32); + this._battler.need_refresh_bhud_states = false; + + }; + this._states_data[1] += 1; + if (this._states_data[1] >= this._battler.allIcons().length) { + this._states_data[1] = 0 + }; +}; + +//============================== +// * Update States +//============================== +Battle_Hud.prototype.update_states = function() { + this._states_data[2] += 1; + if (this.need_refresh_states()) {this.refresh_states();}; +}; + +//============================== +// * Need Refresh States +//============================== +Battle_Hud.prototype.need_refresh_states = function() { + if (this._battler.need_refresh_bhud_states) {return true}; + if (this._states_data[2] > 60) {return true}; + return false; +}; + +//============================== +// * Create States 2 +//============================== +Battle_Hud.prototype.create_states2 = function() { + if (String(Moghunter.bhud_states_visible) != "true") {return}; + this.removeChild(this._state_icon); + if (!this._battler) {return}; + this._states_data = [0,0,0]; + this._stateIcons = []; + this._state_icon = new Sprite(); + this._state_icon.x = this._pos_x + Moghunter.bhud_states_pos_x; + this._state_icon.y = this._pos_y + Moghunter.bhud_states_pos_y; + this._state_icon.visible = false; + this.addChild(this._state_icon); + this.refresh_states2(); +}; + +//============================== +// * Create States +//============================== +Battle_Hud.prototype.refresh_states2 = function() { + this._state_icon.visible = false; + this._battler.need_refresh_bhud_states = false; + for (i = 0; i < this._stateIcons.length; i++){ + this._state_icon.removeChild(this._stateIcons[i]); + }; + if (this._battler.allIcons().length == 0) {return}; + this._state_icon.visible = true; + this._stateIcons = []; + var w = Window_Base._iconWidth; + var icons = this._battler.allIcons().slice(0,w); + var m = Math.min(Math.max(this._battler.allIcons().length,0),Moghunter.bhud_statesMax); + var align = Moghunter.bhud_statesAlign; + for (i = 0; i < m; i++){ + this._stateIcons[i] = new Sprite(this._state_img); + var sx = icons[i] % 16 * w; + var sy = Math.floor(icons[i] / 16) * w; + this._stateIcons[i].setFrame(sx, sy, w, w); + if (align === 1) { + this._stateIcons[i].x = -((w + 4) * i); + } else if (align === 2) { + this._stateIcons[i].y = (w + 4) * i; + } else if (align === 3) { + this._stateIcons[i].y = -((w + 4) * i); + } else { + this._stateIcons[i].x = (w + 4) * i; + }; + this._state_icon.addChild(this._stateIcons[i]); + }; +}; + +//============================== +// * Update States 2 +//============================== +Battle_Hud.prototype.update_states2 = function() { + if (this.need_refresh_states2()) {this.refresh_states2();}; +}; + +//============================== +// * Need Refresh States 2 +//============================== +Battle_Hud.prototype.need_refresh_states2 = function() { + if (this._battler.need_refresh_bhud_states) {return true}; + return false; +}; \ No newline at end of file diff --git a/js/plugins/MadeWithMv.js b/js/plugins/MadeWithMv.js new file mode 100644 index 0000000..fce27ea --- /dev/null +++ b/js/plugins/MadeWithMv.js @@ -0,0 +1,304 @@ +/*: + * NOTE: Images are stored in the img/system folder. + * + * @plugindesc Show a Splash Screen "Made with MV" and/or a Custom Splash Screen before going to main screen. + * @author Dan "Liquidize" Deptula + * + * @help This plugin does not provide plugin commands. + * + * @param Show Made With MV + * @desc Enabled/Disables showing the "Made with MV" splash screen. + * OFF - false ON - true + * Default: ON + * @default true + * + * @param Made with MV Image + * @desc The image to use when showing "Made with MV" + * Default: MadeWithMv + * @default MadeWithMv + * @require 1 + * @dir img/system/ + * @type file + * + * @param Show Custom Splash + * @desc Enabled/Disables showing the "Made with MV" splash screen. + * OFF - false ON - true + * Default: OFF + * @default false + * + * @param Custom Image + * @desc The image to use when showing "Made with MV" + * Default: + * @default + * @require 1 + * @dir img/system/ + * @type file + * + * @param Fade Out Time + * @desc The time it takes to fade out, in frames. + * Default: 120 + * @default 120 + * + * @param Fade In Time + * @desc The time it takes to fade in, in frames. + * Default: 120 + * @default 120 + * + * @param Wait Time + * @desc The time between fading in and out, in frames. + * Default: 160 + * @default 160 + * + */ +/*:ja + * メモ: イメージはimg/systemフォルダ内に保存されます。 + * + * @plugindesc メイン画面へ進む前に、"Made with MV"のスプラッシュ画面もしくはカスタマイズされたスプラッシュ画面を表示します。 + * @author Dan "Liquidize" Deptula + * + * @help このプラグインにはプラグインコマンドはありません。 + * + * @param Show Made With MV + * @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。 + * OFF - false ON - true + * デフォルト: ON + * @default true + * + * @param Made with MV Image + * @desc "Made with MV"を表示する際に使用する画像 + * デフォルト: MadeWithMv + * @default MadeWithMv + * @require 1 + * @dir img/system/ + * @type file + * + * @param Show Custom Splash + * @desc "Made with MV"のスプラッシュ画面を表示できる/できないようにします。 + * OFF - false ON - true + * デフォルト: OFF + * @default false + * + * @param Custom Image + * @desc "Made with MV"を表示する際に使用する画像 + * デフォルト: + * @default + * @require 1 + * @dir img/system/ + * @type file + * + * @param Fade Out Time + * @desc フェードアウトに要する時間(フレーム数) + * デフォルト: 120 + * @default 120 + * + * @param Fade In Time + * @desc フェードインに要する時間(フレーム数) + * デフォルト: 120 + * @default 120 + * + * @param Wait Time + * @desc フェードインからフェードアウトまでに要する時間(フレーム数) + * デフォルト: 160 + * @default 160 + * + */ +var Liquidize = Liquidize || {}; +Liquidize.MadeWithMV = {}; +Liquidize.MadeWithMV.Parameters = PluginManager.parameters('MadeWithMv'); + +Liquidize.MadeWithMV.ShowMV = JSON.parse(Liquidize.MadeWithMV.Parameters["Show Made With MV"]); +Liquidize.MadeWithMV.MVImage = String(Liquidize.MadeWithMV.Parameters["Made with MV Image"]); +Liquidize.MadeWithMV.ShowCustom = JSON.parse(Liquidize.MadeWithMV.Parameters["Show Custom Splash"]); +Liquidize.MadeWithMV.CustomImage = String(Liquidize.MadeWithMV.Parameters["Custom Image"]); +Liquidize.MadeWithMV.FadeOutTime = Number(Liquidize.MadeWithMV.Parameters["Fade Out Time"]) || 120; +Liquidize.MadeWithMV.FadeInTime = Number(Liquidize.MadeWithMV.Parameters["Fade In Time"]) || 120; +Liquidize.MadeWithMV.WaitTime = Number(Liquidize.MadeWithMV.Parameters["Wait Time"]) || 160; + + +//----------------------------------------------------------------------------- +// Scene_Splash +// +// This is a constructor, implementation is done in the inner scope. + +function Scene_Splash() { + this.initialize.apply(this, arguments); +} + +(function() { + + //----------------------------------------------------------------------------- + // Scene_Boot + // + // The scene class for dealing with the game boot. + + var _Scene_Boot_loadSystemImages = Scene_Boot.prototype.loadSystemImages; + Scene_Boot.prototype.loadSystemImages = function() { + _Scene_Boot_loadSystemImages.call(this); + if (Liquidize.MadeWithMV.ShowMV) { + ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage); + } + if (Liquidize.MadeWithMV.ShowCustom) { + ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage); + } + }; + + var _Scene_Boot_start = Scene_Boot.prototype.start; + Scene_Boot.prototype.start = function() { + if ((Liquidize.MadeWithMV.ShowMV || Liquidize.MadeWithMV.ShowCustom) && !DataManager.isBattleTest() && !DataManager.isEventTest()) { + SceneManager.goto(Scene_Splash); + } else { + _Scene_Boot_start.call(this); + } + }; + + //----------------------------------------------------------------------------- + // Scene_Splash + // + // The scene class for dealing with the splash screens. + + Scene_Splash.prototype = Object.create(Scene_Base.prototype); + Scene_Splash.prototype.constructor = Scene_Splash; + + Scene_Splash.prototype.initialize = function() { + Scene_Base.prototype.initialize.call(this); + this._mvSplash = null; + this._customSplash = null; + this._mvWaitTime = Liquidize.MadeWithMV.WaitTime; + this._customWaitTime = Liquidize.MadeWithMV.WaitTime; + this._mvFadeOut = false; + this._mvFadeIn = false; + this._customFadeOut = false; + this._customFadeIn = false; + }; + + Scene_Splash.prototype.create = function() { + Scene_Base.prototype.create.call(this); + this.createSplashes(); + }; + + Scene_Splash.prototype.start = function() { + Scene_Base.prototype.start.call(this); + SceneManager.clearStack(); + if (this._mvSplash != null) { + this.centerSprite(this._mvSplash); + } + if (this._customSplash != null) { + this.centerSprite(this._customSplash); + } + }; + + Scene_Splash.prototype.update = function() { + if (Liquidize.MadeWithMV.ShowMV) { + if (!this._mvFadeIn) { + this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false); + this._mvFadeIn = true; + } else { + if (this._mvWaitTime > 0 && this._mvFadeOut == false) { + this._mvWaitTime--; + } else { + if (this._mvFadeOut == false) { + this._mvFadeOut = true; + this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false); + } + } + } + } + + if (Liquidize.MadeWithMV.ShowCustom) { + if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true) { + if (!this._customFadeIn && this._fadeDuration == 0) { + this._customSplash.opacity = 255; + this._customWaitTime = Liquidize.MadeWithMV.WaitTime; + this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false); + this._customFadeIn = true; + } else { + if (this._customWaitTime > 0 && this._customFadeOut == false) { + this._customWaitTime--; + } else { + if (this._customFadeOut == false) { + this._customFadeOut = true; + this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false); + } + } + } + } else if (!Liquidize.MadeWithMV.ShowMV) { + if (!this._customFadeIn) { + this._customSplash.opacity = 255; + this.startFadeIn(Liquidize.MadeWithMV.FadeInTime, false); + this._customFadeIn = true; + } else { + if (this._customWaitTime > 0 && this._customFadeOut == false) { + this._customWaitTime--; + } else { + if (this._customFadeOut == false) { + this._customFadeOut = true; + this.startFadeOut(Liquidize.MadeWithMV.FadeOutTime, false); + } + } + } + } + } + + if (Liquidize.MadeWithMV.ShowCustom) { + if (Liquidize.MadeWithMV.ShowMV && this._mvFadeOut == true && this._customFadeOut == true) { + this.gotoTitleOrTest(); + } else if (!Liquidize.MadeWithMV.ShowMV && this._customFadeOut == true) { + this.gotoTitleOrTest(); + } + } else { + if (this._mvFadeOut == true) { + this.gotoTitleOrTest(); + } + } + + Scene_Base.prototype.update.call(this); + }; + + Scene_Splash.prototype.createSplashes = function() { + if (Liquidize.MadeWithMV.ShowMV) { + this._mvSplash = new Sprite(ImageManager.loadSystem(Liquidize.MadeWithMV.MVImage)); + this.addChild(this._mvSplash); + } + if (Liquidize.MadeWithMV.ShowCustom) { + this._customSplash = new Sprite(ImageManager.loadSystem(Liquidize.MadeWithMV.CustomImage)); + this._customSplash.opacity = 0; + this.addChild(this._customSplash); + } + }; + + Scene_Splash.prototype.centerSprite = function(sprite) { + sprite.x = Graphics.width / 2; + sprite.y = Graphics.height / 2; + sprite.anchor.x = 0.5; + sprite.anchor.y = 0.5; + }; + + Scene_Splash.prototype.gotoTitleOrTest = function() { + Scene_Base.prototype.start.call(this); + SoundManager.preloadImportantSounds(); + if (DataManager.isBattleTest()) { + DataManager.setupBattleTest(); + SceneManager.goto(Scene_Battle); + } else if (DataManager.isEventTest()) { + DataManager.setupEventTest(); + SceneManager.goto(Scene_Map); + } else { + this.checkPlayerLocation(); + DataManager.setupNewGame(); + SceneManager.goto(Scene_Title); + Window_TitleCommand.initCommandPosition(); + } + this.updateDocumentTitle(); + }; + + Scene_Splash.prototype.updateDocumentTitle = function() { + document.title = $dataSystem.gameTitle; + }; + + Scene_Splash.prototype.checkPlayerLocation = function() { + if ($dataSystem.startMapId === 0) { + throw new Error('Player\'s starting position is not set'); + } + }; + +})(); \ No newline at end of file diff --git a/js/plugins/SF_AutoRevive.js b/js/plugins/SF_AutoRevive.js new file mode 100644 index 0000000..02e45a7 --- /dev/null +++ b/js/plugins/SF_AutoRevive.js @@ -0,0 +1,198 @@ +//============================================================================= +// Salted Fish Plugins - Auto Revive +// SF_AutoRevive.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_AutoRevive = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc v1.0.0 - Automatically revive dead party members. + * @author Salted Fish + * + * @help + * + * =========================================================================== + * Introduction + * =========================================================================== + * + * This plugin automatically revives dead party members before Game Over. + * + * =========================================================================== + * Map Notetags + * =========================================================================== + * + * You can use the following notetags to specify the position of the revive + * + * + * - x and y are the coordinates of the revive position. + * - x and y are relative to the map. + * - d is the direction the revive will face. + * - 0 is same as before. + * - 1 is down. + * - 2 is left. + * - 3 is right. + * - 4 is up. + * + * =========================================================================== + * Plugin Commands + * =========================================================================== + * + * You can use the following plugin commands to change the settings. + * + * SF_AutoRevive_Enable + * - Enables the revive system. + * + * SF_AutoRevive_Disable + * - Disables the revive system. + * + */ +//============================================================================= + +(function () { + var SF_AutoRevive = {}; + SF_Plugins.SF_AutoRevive = SF_AutoRevive; + + SF_AutoRevive.version = 1.0; + + //============================================================================= + // Game_System + //============================================================================= + + SF_AutoRevive.Game_System_initialize = Game_System.prototype.initialize; + Game_System.prototype.initialize = function () { + SF_AutoRevive.Game_System_initialize.call(this); + this._autoRevive = true; + }; + + Game_System.prototype.isAutoReviveEnabled = function () { + return this._autoRevive; + } + + Game_System.prototype.setAutoReviveEnabled = function (value) { + this._autoRevive = value; + } + + Game_System.prototype.isSupportAutoRevive = function () { + return this.isAutoReviveEnabled && $gameMap.getRevivePosition(); + } + + //============================================================================= + // Game_Map + //============================================================================= + + SF_AutoRevive.Game_Map_setup = Game_Map.prototype.setup; + Game_Map.prototype.setup = function (mapId) { + SF_AutoRevive.Game_Map_setup.call(this, mapId); + this._revivePosition = null; + }; + + Game_Map.prototype.getRevivePosition = function () { + if (this._revivePosition) { + return this._revivePosition; + } + var meta = $dataMap.meta; + if (meta["Revive Position"]) { + var position = meta["Revive Position"].split(","); + this._revivePosition = { + x: Number(position[0]), + y: Number(position[1]), + d: Number(position[2]) + }; + } + return this._revivePosition; + } + + //============================================================================= + // Game_Interpreter + //============================================================================= + + SF_AutoRevive.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function (command, args) { + SF_AutoRevive.Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'SF_AutoRevive_Enable') { + $gameSystem.setAutoReviveEnabled(true); + } else if (command === 'SF_AutoRevive_Disable') { + $gameSystem.setAutoReviveEnabled(false); + } + }; + + //============================================================================= + // Game_BattlerBase + //============================================================================= + + Game_BattlerBase.prototype.reviveFull = function () { + this.recoverAll(); + } + + //============================================================================= + // Game_Party + //============================================================================= + + Game_Party.prototype.autoReviveAllMembers = function () { + var loss_gold = this.gold() * 0.1; + this.loseGold(loss_gold); + this.members().forEach(function (member) { + if (member.isDead()) { + member.reviveFull(); + } + }); + } + + //============================================================================= + // Game_Player + //============================================================================= + + Game_Player.prototype.reviveTransfer = function () { + var revive_position = $gameMap.getRevivePosition(); + if (revive_position) { + this.reserveTransfer($gameMap.mapId(), revive_position.x, revive_position.y, revive_position.d); + } + } + + //============================================================================= + // BattleManager + //============================================================================= + + SF_AutoRevive.BattleManager_updateBattleEnd = BattleManager.updateBattleEnd; + BattleManager.updateBattleEnd = function () { + if (this.isBattleTest()) { + AudioManager.stopBgm(); + SceneManager.exit(); + } else if (!this._escaped && $gameParty.isAllDead()) { + if (this._canLose) { + $gameParty.reviveBattleMembers(); + SceneManager.pop(); + } else if ($gameSystem.isSupportAutoRevive()) { + $gameParty.autoReviveAllMembers(); + $gamePlayer.reviveTransfer(); + SceneManager.pop(); + } else { + SceneManager.goto(Scene_Gameover); + } + } else { + SceneManager.pop(); + } + this._phase = null; + } + + //============================================================================= + // Scene_Base + //============================================================================= + + SF_AutoRevive.Scene_Base_checkGameover = Scene_Base.prototype.checkGameover; + Scene_Base.prototype.checkGameover = function () { + if ($gameParty.isAllDead()) { + if ($gameSystem.isSupportAutoRevive()) { + $gameParty.autoReviveAllMembers(); + $gamePlayer.reviveTransfer(); + } else { + SceneManager.goto(Scene_Gameover); + } + } + } +})(); \ No newline at end of file diff --git a/js/plugins/SF_ClickEvent.js b/js/plugins/SF_ClickEvent.js new file mode 100644 index 0000000..50f92e2 --- /dev/null +++ b/js/plugins/SF_ClickEvent.js @@ -0,0 +1,145 @@ +//============================================================================= +// Salted Fish Plugins - Click Event +// SF_ClickEvent.js +//============================================================================= + +var Imported = Imported || {}; +Imported.SF_ClickEvent = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc Allows you to add a click event to object. + * @author Salted Fish + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin allows you to add a click event to object. + * + * Use as a dependency. + */ + +//============================================================================= +(function () { + var SF_ClickEvent = {}; + SF_Plugins.SF_ClickEvent = SF_ClickEvent; + + SF_ClickEvent.version = 1.0; + + + + //============================================================================= + // Scene_Base + //============================================================================= + + SF_ClickEvent.Scene_Base_initialize = Scene_Base.prototype.initialize; + Scene_Base.prototype.initialize = function () { + SF_ClickEvent.Scene_Base_initialize.call(this); + this._clickEvent = {}; + this._clicking = false; + this._clickingName = null; + } + + SF_ClickEvent.Scene_Base_update = Scene_Base.prototype.update; + Scene_Base.prototype.update = function () { + SF_ClickEvent.Scene_Base_update.call(this); + this.updateClickEvent(); + } + + // register click event + // @param {String} name + // @param {Rectangle} rect - the hitArea of the object + // @param {function} mousedown - the callback function + // @param {function} mouseup - the callback function + // @param {function} mouseclick - the callback function + Scene_Base.prototype.registerClickEvent = function (name, hitArea, mousedown, mouseup, mouseclick) { + this._clickEvent[name] = { + name: name, + hitArea: hitArea, + mousedown: mousedown, + mouseup: mouseup, + mouseclick: mouseclick, + enabled: true + }; + } + + // unregister click event + // @param {String} name + Scene_Base.prototype.unregisterClickEvent = function (name) { + delete this._clickEvent[name]; + } + + // enable click event + // @param {String} name + Scene_Base.prototype.enableClickEvent = function (name) { + this._clickEvent[name].enabled = true; + } + + // disable click event + // @param {String} name + Scene_Base.prototype.disableClickEvent = function (name) { + this._clickEvent[name].enabled = false; + } + + // update click event + Scene_Base.prototype.updateClickEvent = function () { + var touch_x = TouchInput.x; + var touch_y = TouchInput.y; + if (this._clicking) { + if ( + this._clickingName && + this._clickEvent[this._clickingName] + ) { + var clickEvent = this._clickEvent[this._clickingName]; + var isContain = clickEvent.hitArea.contains(touch_x, touch_y); + if (!isContain || !clickEvent.enabled) { + this._clicking = false; + this._clickingName = null; + if (clickEvent.mouseup) { + clickEvent.mouseup(); + } + } else if (TouchInput.isReleased()) { + this._clicking = false; + this._clickingName = null; + if (clickEvent.mouseup) { + clickEvent.mouseup(); + } + if (clickEvent.mouseclick) { + clickEvent.mouseclick(); + } + } + } else { + this._clicking = false; + this._clickingName = null; + } + } else { + var isTriggered = TouchInput.isTriggered(); + if (!isTriggered) { + return; + } + for (var name in this._clickEvent) { + var event = this._clickEvent[name]; + if (!event.enabled) { + continue; + } + var isContain = event.hitArea.contains(touch_x, touch_y); + if (isContain) { + this._clicking = true; + this._clickingName = name; + if (event.mousedown) { + event.mousedown(); + } + break; + } + } + } + } + + + +})(); + diff --git a/js/plugins/SF_Core.js b/js/plugins/SF_Core.js new file mode 100644 index 0000000..3ba53be --- /dev/null +++ b/js/plugins/SF_Core.js @@ -0,0 +1,382 @@ +//============================================================================= +// Salted Fish Plugins - Core +// SF_Core.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_Core = true; + +var SF_Plugins = SF_Plugins || {}; +//============================================================================= +/*: + * @plugindesc core lib for salted fish plugins + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_Core = {}; + SF_Plugins.Core = SF_Core; + + SF_Core.version = 1.0; + + //============================================================================= + // Sprite + //============================================================================= + + Sprite.prototype.canvasToLocalX = function (x) { + var node = this; + while (node) { + x -= node.x; + node = node.parent; + } + return x; + }; + + Sprite.prototype.canvasToLocalY = function (y) { + var node = this; + while (node) { + y -= node.y; + node = node.parent; + } + return y; + }; + + //============================================================================= + // Pointer + //============================================================================= + + // event[array]: pointer-down, pointer-up, pointer-move, pointer-cancel + function Pointer() { + this.initialize.apply(this, arguments); + } + SF_Core.Pointer = Pointer; + + Pointer.prototype = Object.create(Object.prototype); + Pointer.prototype.constructor = Pointer; + + Pointer.prototype.initialize = function (x, y) { + this.x = x; + this.y = y; + this.event = []; + this.ext = null; + this.user = null; + } + + Pointer.prototype.set = function (x, y) { + this.x = x; + this.y = y; + } + + Pointer.prototype.setEvents = function (events) { + this.event = events; + } + + Pointer.prototype.addEvent = function (event) { + this.event.push(event); + } + + Pointer.prototype.clearEvent = function () { + this.event = []; + } + + Pointer.prototype.getEvents = function () { + return this.event; + } + + Pointer.prototype.setExt = function (ext) { + this.ext = ext; + } + + Pointer.prototype.getExt = function () { + return this.ext; + } + + Pointer.prototype.setUser = function (user) { + this.user = user; + } + + Pointer.prototype.getUser = function () { + return this.user; + } + + Pointer.prototype.removeUser = function () { + this.user = null; + } + + Pointer.prototype.isEmpty = function () { + return this.event.length === 0; + } + + Pointer.prototype.clear = function () { + this.event = []; + this.ext = null; + } + + Pointer.prototype.isDown = function () { + return this.event.indexOf('pointer-down') >= 0; + } + + Pointer.prototype.isUp = function () { + return this.event.indexOf('pointer-up') >= 0; + } + + Pointer.prototype.isMove = function () { + return this.event.indexOf('pointer-move') >= 0; + } + + Pointer.prototype.isCancel = function () { + return this.event.indexOf('pointer-cancel') >= 0; + } + + Pointer.prototype.isCanUsed = function (user) { + return this.user === user || this.user === null; + } + + //============================================================================= + // TouchInput + //============================================================================= + SF_Core.TouchInput_clear = TouchInput.clear; + TouchInput.clear = function () { + SF_Core.TouchInput_clear.call(this); + + this._pointer = {}; + this._losedPointer = []; + + this._mouseValid = false; + this._mouse = new Pointer(0, 0); + this._events._mouse = new Pointer(0, 0); + this._events._mouseValid = false; + + this._events.event = null; + this._events._pointer = {}; + this._events._losedPointer = []; + } + + SF_Core.TouchInput_update = TouchInput.update; + TouchInput.update = function () { + SF_Core.TouchInput_update.call(this); + + // update mouse + if (this._events._mouseValid) { + this._mouse.set(this._events._mouse.x, this._events._mouse.y); + this._mouse.setEvents(this._events._mouse.getEvents()); + this._mouse.setExt(this._events._mouse.getExt()); + this._mouseValid = true; + + this._events._mouseValid = false; + this._events._mouse.clear(); + } else { + this._mouse.clear(); + } + + // update pointer + this._losedPointer = this._events._losedPointer; + this._events._losedPointer = []; + + // delete losed pointer + var tmp_pointer = {}; + for (var i in this._pointer) { + var pointer = this._pointer[i]; + if (pointer.isCancel() || pointer.isUp()) { + continue; + } + tmp_pointer[i] = pointer; + } + this._pointer = tmp_pointer; + + for (var i in this._events._pointer) { + var pointer = this._events._pointer[i]; + if (pointer.isCancel() || pointer.isUp()) { + SF_Core.Utils.error('pointer cancel or up'); + } + var p = this._pointer[i]; + if (p) { + p.set(pointer.x, pointer.y); + p.setEvents(pointer.getEvents()); + p.setExt(pointer.getExt()); + + } else { + this._pointer[i] = pointer; + } + } + } + + SF_Core.TouchInput_onMouseDown = TouchInput._onMouseDown; + TouchInput._onMouseDown = function (event) { + SF_Core.TouchInput_onMouseDown.call(this, event); + + this._events.event = event; + this._events._mouseValid = true; + var x = Graphics.pageToCanvasX(event.pageX); + var y = Graphics.pageToCanvasY(event.pageY); + this._events._mouse.set(x, y); + this._events._mouse.addEvent('pointer-down'); + } + + SF_Core.TouchInput__onMouseMove = TouchInput._onMouseMove; + TouchInput._onMouseMove = function (event) { + SF_Core.TouchInput__onMouseMove.call(this, event); + + this._events.event = event; + this._events._mouseValid = true; + var x = Graphics.pageToCanvasX(event.pageX); + var y = Graphics.pageToCanvasY(event.pageY); + this._events._mouse.set(x, y); + this._events._mouse.addEvent('pointer-move'); + } + + SF_Core.TouchInput__onMouseUp = TouchInput._onMouseUp; + TouchInput._onMouseUp = function (event) { + SF_Core.TouchInput__onMouseUp.call(this, event); + + this._events.event = event; + this._events._mouseValid = true; + var x = Graphics.pageToCanvasX(event.pageX); + var y = Graphics.pageToCanvasY(event.pageY); + this._events._mouse.set(x, y); + this._events._mouse.addEvent('pointer-up'); + } + + SF_Core.TouchInput__onMouseWheel = TouchInput._onMouseWheel; + TouchInput._onMouseWheel = function (event) { + SF_Core.TouchInput__onMouseWheel.call(this, event); + + this._events.event = event; + } + + SF_Core.TouchInput__onTouchStart = TouchInput._onTouchStart; + TouchInput._onTouchStart = function (event) { + SF_Core.TouchInput__onTouchStart.call(this, event); + this._events.event = event; + this._pointerFromTouch(event, "pointer-down"); + } + + SF_Core.TouchInput__onTouchMove = TouchInput._onTouchMove; + TouchInput._onTouchMove = function (event) { + SF_Core.TouchInput__onTouchMove.call(this, event); + this._events.event = event; + this._pointerFromTouch(event, "pointer-move"); + } + + SF_Core.TouchInput__onTouchEnd = TouchInput._onTouchEnd; + TouchInput._onTouchEnd = function (event) { + SF_Core.TouchInput__onTouchEnd.call(this, event); + //console.log(event.changedTouches); + this._events.event = event; + this._pointerFromTouch(event, "pointer-up"); + } + + SF_Core.TouchInput__onTouchCancel = TouchInput._onTouchCancel; + TouchInput._onTouchCancel = function (event) { + SF_Core.TouchInput__onTouchCancel.call(this, event); + this._events.event = event; + this._pointerFromTouch(event, "pointer-cancel"); + } + + TouchInput._pointerFromTouch = function (event, type) { + for (var i = 0; i < event.changedTouches.length; i++) { + var touch = event.changedTouches[i]; + var x = Graphics.pageToCanvasX(touch.pageX); + var y = Graphics.pageToCanvasY(touch.pageY); + var id = touch.identifier; + var pointer = this._events._pointer[id]; + if (!pointer) { + pointer = new Pointer(x, y); + this._events._pointer[id] = pointer; + } + pointer.set(x, y); + pointer.addEvent(type); + + switch (type) { + case "pointer-down": + break; + case "pointer-up": + case "pointer-cancel": + delete this._events._pointer[id]; + this._events._losedPointer.push(pointer); + break; + } + + } + } + + TouchInput.getPointers = function (user) { + var result = []; + if (this._mouseValid && this._mouse.isCanUsed(user)) { + result.push(this._mouse); + } + for (var i = 0; i < this._losedPointer.length; i++) { + var pointer = this._losedPointer[i]; + if (pointer.isCanUsed(user)) { + result.push(pointer); + } + } + for (var i in this._pointer) { + var pointer = this._pointer[i]; + if (pointer.isCanUsed(user)) { + result.push(pointer); + } + } + return result; + } + + TouchInput.removeUsers = function () { + for (var i in this._pointer) { + var pointer = this._pointer[i]; + pointer.removeUser(); + } + for (var i = 0; i < this._losedPointer.length; i++) { + var pointer = this._losedPointer[i]; + pointer.removeUser(); + } + this._mouse.removeUser(); + } + + //============================================================================= + // PIXI.Container + //============================================================================= + + PIXI.Container.prototype.getPointer = function () { + var pointers = TouchInput.getPointers(this); + var lastUsePointer = null; + var inFramePointer = null; + for (var i = 0; i < pointers.length; i++) { + if (pointers[i].getUser() === this) { + lastUsePointer = pointers[i]; + break; + } + if (this.containsPoint(new Point(pointers[i].x, pointers[i].y))) { + inFramePointer = pointers[i]; + } + } + + return lastUsePointer || inFramePointer || pointers[0] || null; + } + + PIXI.Container.prototype.releasePointer = function () { + var pointer = this.getPointer(); + if (pointer) { + pointer.removeUser(); + } + } + + //============================================================================= + // SF_Utils + //============================================================================= + + SF_Core.Utils = {}; + + SF_Core.Utils.assert = function (condition, message) { + if (!condition) { + SF_Core.Utils.error(message); + } + }; + + SF_Core.Utils.error = function (message) { + if (typeof console === "object") { + console.error(message); + } + throw new Error(message); + }; +})(); \ No newline at end of file diff --git a/js/plugins/SF_ExtraEvent.js b/js/plugins/SF_ExtraEvent.js new file mode 100644 index 0000000..417d247 --- /dev/null +++ b/js/plugins/SF_ExtraEvent.js @@ -0,0 +1,519 @@ +//============================================================================= +// Salted Fish Plugins - Extra Event +// SF_ExtraEvent.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_ExtraEvent = true; + +var SF_Plugins = SF_Plugins || {}; +var $dataMapExt = null; +var $gameMapsExt = null; + +//============================================================================= +/*: + * @plugindesc This plugin provide extra event. + * @author Salted Fish + * + * @param ExportMapExtraEvent + * @desc Export map extra event to json file. + * only available in nwjs. + * @default false + * @type boolean + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin provide extra event. + * + * put in event note: + * + * + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * SF_Extra_Event Insert_Event + * Add an event to the map. + * + * SF_Extra_Event Remove_Event + * Remove an event from the map. + * + * ============================================================================ + * Script Calls + * ============================================================================ + * + * $gameMapsExt.insert_event_to_need(mapId, eventExtId) + * Add an event to the map. + * + * $gameMapsExt.remove_event_from_need(mapId, eventExtId) + * Remove an event from the map. + * + * ============================================================================ + * Compatibility + * ============================================================================ + * + * This plugin is compatible with xdRs_MiniMap.js + * + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.0: + * - Release + */ +//============================================================================= + +(function () { + var SF_ExtraEvent = SF_ExtraEvent || {}; + SF_Plugins.SF_ExtraEvent = SF_ExtraEvent; + + SF_ExtraEvent.version = 1.0; + SF_ExtraEvent.EventExtIdStart = 100000 + + //============================================================================= + // Parameter + //============================================================================= + + SF_ExtraEvent.Parameters = PluginManager.parameters('SF_ExtraEvent'); + SF_ExtraEvent.ExportMapExtraEvent = String(SF_ExtraEvent.Parameters['ExportMapExtraEvent'] || 'false') === 'true'; + + //============================================================================= + // DataManager + //============================================================================= + + SF_ExtraEvent.DataManager_loadMapData = DataManager.loadMapData; + DataManager.loadMapData = function (mapId) { + SF_ExtraEvent.DataManager_loadMapData.call(this, mapId); + if (mapId > 0) { + var filename = 'Map%1Ext.json'.format(mapId.padZero(3)); + this.loadDataFile('$dataMapExt', filename); + } else { + this.makeEmptyMapExt(); + } + }; + + DataManager.makeEmptyMapExt = function () { + $dataMapExt = {}; + $dataMapExt.events = {}; + }; + + SF_ExtraEvent.DataManager_isMapLoaded = DataManager.isMapLoaded; + DataManager.isMapLoaded = function () { + if (!SF_ExtraEvent.DataManager_isMapLoaded.call(this)) return false; + return !!$dataMapExt; + } + + SF_ExtraEvent.DataManager_onLoad = DataManager.onLoad; + DataManager.onLoad = function (object) { + SF_ExtraEvent.DataManager_onLoad.call(this, object); + if (object === $dataMapExt) { + var events = $dataMapExt.events; + for (var key in events) { + var event = events[key]; + if (event && event.note !== undefined) { + this.extractMetadata(event); + } + } + } + }; + + SF_ExtraEvent.DataManager_makeSaveContents = DataManager.makeSaveContents; + DataManager.makeSaveContents = function () { + var contents = SF_ExtraEvent.DataManager_makeSaveContents.call(this); + contents.mapsExt = $gameMapsExt; + return contents; + }; + + SF_ExtraEvent.DataManager_extractSaveContents = DataManager.extractSaveContents; + DataManager.extractSaveContents = function (contents) { + SF_ExtraEvent.DataManager_extractSaveContents.call(this, contents); + $gameMapsExt = contents.mapsExt; + }; + + SF_ExtraEvent.DataManager_createGameObjects = DataManager.createGameObjects; + DataManager.createGameObjects = function () { + SF_ExtraEvent.DataManager_createGameObjects.call(this); + $gameMapsExt = new Game_MapsExt(); + }; + + //============================================================================= + // Game_MapsExt + //============================================================================= + + function Game_MapsExt() { + this.initialize.apply(this, arguments); + } + + window.Game_MapsExt = Game_MapsExt; + + Game_MapsExt.prototype.initialize = function () { + this._need_insert_events_id = {};// key: mapId, value: [eventId] + }; + + // Get Extra event Ids + Game_MapsExt.prototype.need_insert_events_id = function (mapId) { + if (this._need_insert_events_id[mapId] === undefined) { + this._need_insert_events_id[mapId] = []; + } + return this._need_insert_events_id[mapId]; + } + + // Insert an event to the need List + Game_MapsExt.prototype.insert_event_to_need = function (mapId, eventId) { + var events = this.need_insert_events_id(mapId); + eventId += SF_ExtraEvent.EventExtIdStart; + if (events.indexOf(eventId) === -1) { + events.push(eventId); + + if (mapId == $gameMap.mapId()) { + $gameMap.addEvent(eventId); + } + } + }; + + // Remove an event from the need List + Game_MapsExt.prototype.remove_event_from_need = function (mapId, eventId) { + var events = this.need_insert_events_id(mapId); + eventId += SF_ExtraEvent.EventExtIdStart; + var index = events.indexOf(eventId); + if (index !== -1) { + events.splice(index, 1); + } + if (mapId == $gameMap.mapId()) { + $gameMap.removeEvent(eventId); + } + }; + + // Get Extra events in the map + // return {eventId: event} + Game_MapsExt.prototype.need_insert_events = function (mapId) { + var events_id = this.need_insert_events_id(mapId); + var events = {}; + for (var i = 0; i < events_id.length; i++) { + var eventId = events_id[i]; + events[eventId] = $dataMapExt.events[eventId]; + } + return events; + }; + + //============================================================================= + // Game_Map + //============================================================================= + + SF_ExtraEvent.Game_Map_initialize = Game_Map.prototype.initialize; + Game_Map.prototype.initialize = function () { + SF_ExtraEvent.Game_Map_initialize.call(this); + this._events = {}; + } + + SF_ExtraEvent.Game_Map_setupEvents = Game_Map.prototype.setupEvents; + Game_Map.prototype.setupEvents = function () { + this._events = {}; + for (var i = 0; i < $dataMap.events.length; i++) { + if ($dataMap.events[i]) { + this._events[i] = new Game_Event(this.mapId(), i); + } + } + + var event_ids = $gameMapsExt.need_insert_events_id(this.mapId()); + for (var i = 0; i < event_ids.length; i++) { + var eventId = event_ids[i]; + this._events[eventId] = new Game_Event(this.mapId(), eventId); + } + + this._commonEvents = this.parallelCommonEvents().map(function (commonEvent) { + return new Game_CommonEvent(commonEvent.id); + }); + + this.refreshTileEvents(); + } + + SF_ExtraEvent.Game_Map_events = Game_Map.prototype.events; + Game_Map.prototype.events = function () { + var events = []; + for (var key in this._events) { + var event = this._events[key]; + events.push(event); + } + return events; + } + + Game_Map.prototype.addEvent = function (eventId) { + this._events[eventId] = new Game_Event(this.mapId(), eventId); + if (SceneManager._scene instanceof Scene_Map && SceneManager._scene._spriteset) { + SceneManager._scene._spriteset.addEvent(this._events[eventId]); + } + this._events[eventId].refresh(); + this.requestRefresh(); + } + + Game_Map.prototype.removeEvent = function (eventId) { + this._events[eventId].erase(); + if (SceneManager._scene instanceof Scene_Map && SceneManager._scene._spriteset) { + SceneManager._scene._spriteset.removeEvent(this._events[eventId]); + } + delete this._events[eventId]; + this.requestRefresh(); + } + + //============================================================================= + // Game_Event + //============================================================================= + + SF_ExtraEvent.Game_Event_event = Game_Event.prototype.event; + Game_Event.prototype.event = function () { + if (this._eventId >= SF_ExtraEvent.EventExtIdStart) { + return $dataMapExt.events[this._eventId]; + } else { + return SF_ExtraEvent.Game_Event_event.call(this); + } + }; + + //============================================================================= + // Spriteset_Map + //============================================================================= + + Spriteset_Map.prototype.addEvent = function (event) { + var sprite = new Sprite_Character(event); + this._characterSprites.push(sprite); + this._tilemap.addChild(sprite); + } + + Spriteset_Map.prototype.removeEvent = function (event) { + var sprite = this._characterSprites.filter(function (sprite) { + return sprite._character === event; + })[0]; + + this._characterSprites = this._characterSprites.filter(function (sprite) { + return sprite !== sprite; + }); + + this._tilemap.removeChild(sprite); + } + + //============================================================================= + // Game_Interpreter + //============================================================================= + + SF_ExtraEvent.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function (command, args) { + SF_ExtraEvent.Game_Interpreter_pluginCommand.call(this, command, args); + if (command.toLowerCase() === 'sf_extra_event') { + switch (args[0].toLowerCase()) { + case 'insert_event': + var mapId = Number(args[1]); + var eventId = Number(args[2]); + $gameMapsExt.insert_event_to_need(mapId, eventId); + break; + case 'remove_event': + var mapId = Number(args[1]); + var eventId = Number(args[2]); + $gameMapsExt.remove_event_from_need(mapId, eventId); + break; + } + } + } + + //============================================================================= + // Try To Export Extra Event to MapExt json + //============================================================================= + + if (Utils.isNwjs() && SF_ExtraEvent.ExportMapExtraEvent) { + var fs = require('fs'); + var path = require('path'); + var note_reg = new RegExp(//i); + + function processCommand213(command, map_events) { + if (command.parameters[0] > 0) { + var tmp_event = map_events[command.parameters[0]]; + if (tmp_event) { + var match = note_reg.exec(tmp_event.note); + if (match) { + command.parameters[0] = Number(match[1]) + SF_ExtraEvent.EventExtIdStart; + } + } + } + } + + function processCommand203(command, map_events) { + if (command.parameters[0] > 0) { + var tmp_event = map_events[command.parameters[0]]; + if (tmp_event) { + var match = note_reg.exec(tmp_event.note); + if (match) { + command.parameters[0] = Number(match[1]) + SF_ExtraEvent.EventExtIdStart; + } + } + } + if (command.parameters[1] !== 0 && command.parameters[1] !== 1) { + var tmp_event = map_events[command.parameters[2]]; + if (tmp_event) { + var match = note_reg.exec(tmp_event.note); + if (match) { + command.parameters[2] = Number(match[1]) + SF_ExtraEvent.EventExtIdStart; + } + } + } + } + + function processCommand205(command, map_events) { + if (command.parameters[0] > 0) { + var tmp_event = map_events[command.parameters[0]]; + if (tmp_event) { + var match = note_reg.exec(tmp_event.note); + if (match) { + command.parameters[0] = Number(match[1]) + SF_ExtraEvent.EventExtIdStart; + } + } + } + } + + + function exportExtraEvent(mapId) { + var map_data_path = path.join(process.cwd(), 'data/Map%1.json'.format(mapId.padZero(3))); + var map_ext_data_path = path.join(process.cwd(), 'data/Map%1Ext.json'.format(mapId.padZero(3))); + var map_data = JSON.parse(fs.readFileSync(map_data_path, 'utf8')); + + var map_events = map_data.events; + var map_ext_event_list = []; + var map_event_list = []; + + for (var i = 0; i < map_events.length; i++) { + var event = map_events[i]; + if (event) { + var pages = event.pages; + for (var j = 0; j < pages.length; j++) { + var list = pages[j].list; + for (var k = 0; k < list.length; k++) { + var command = list[k]; + if (command.code === 213) { + processCommand213(command, map_events); + } else if (command.code === 203) { + processCommand203(command, map_events); + } else if (command.code === 205) { + processCommand205(command, map_events); + } + } + } + } + } + + for (var i = 0; i < map_events.length; i++) { + var event = map_events[i]; + + if (map_events[i]) { + var match = note_reg.exec(map_events[i].note); + if (match) { + var event_id = Number(match[1]) + SF_ExtraEvent.EventExtIdStart; + event.ext_id = event_id; + map_ext_event_list.push(event); + } else { + map_event_list.push(event); + } + } else { + map_event_list.push(null) + } + } + + map_data.events = map_event_list; + fs.writeFileSync(map_data_path, JSON.stringify(map_data), 'utf8'); + + var map_ext_data = null; + var old_ext_data = null; + if (fs.existsSync(map_ext_data_path)) { + map_ext_data = JSON.parse(fs.readFileSync(map_ext_data_path, 'utf8')); + old_ext_data = map_ext_data.events; + } else { + old_ext_data = {}; + map_ext_data = { events: old_ext_data }; + } + map_ext_event_list.forEach(function (event) { + event.id = event.ext_id; + old_ext_data[event.ext_id] = event; + }); + map_ext_data.events = old_ext_data; + fs.writeFileSync(map_ext_data_path, JSON.stringify(map_ext_data), 'utf8'); + + } + + var mapInfoPath = path.join(process.cwd(), 'data/MapInfos.json'); + var mapInfos = JSON.parse(fs.readFileSync(mapInfoPath, 'utf8')); + mapInfos.forEach(function (mapInfo) { + if (mapInfo) { + exportExtraEvent(mapInfo.id); + } + }); + } + + + + //============================================================================= + // Compatible with xdRs_MiniMap + //============================================================================= + + if (Imported.xdRs_MiniMap) { + SF_ExtraEvent.xdRs_MiniMap = {}; + + //============================================================================= + // Game_Map + //============================================================================= + + SF_ExtraEvent.xdRs_MiniMap.Game_Map_addEvent = Game_Map.prototype.addEvent; + Game_Map.prototype.addEvent = function (eventId) { + SF_ExtraEvent.xdRs_MiniMap.Game_Map_addEvent.call(this, eventId); + if (SceneManager._scene instanceof Scene_Map && SceneManager._scene._miniMap) { + SceneManager._scene._miniMap.addEvent(this._events[eventId]); + } + }; + + SF_ExtraEvent.xdRs_MiniMap.Game_Map_removeEvent = Game_Map.prototype.removeEvent; + Game_Map.prototype.removeEvent = function (eventId) { + SF_ExtraEvent.xdRs_MiniMap.Game_Map_removeEvent.call(this, eventId); + if (SceneManager._scene instanceof Scene_Map && SceneManager._scene._miniMap) { + SceneManager._scene._miniMap.removeEvent(this._events[eventId]); + } + } + + //============================================================================= + // Window_MiniMap + //============================================================================= + + Window_MiniMap.prototype.addEvent = function (event) { + this._sprite.addEvent(event); + }; + + Window_MiniMap.prototype.removeEvent = function (event) { + this._sprite.removeEvent(event); + } + + //============================================================================= + // Sprite_MiniMap + //============================================================================= + + Sprite_MiniMap.prototype.addEvent = function (event) { + var sprite = new Sprite_MiniPart(event); + this._parts.push(sprite); + this.addChild(sprite); + } + + Sprite_MiniMap.prototype.removeEvent = function (event) { + var sprite = this._parts.filter(function (sprite) { + return sprite._obj === event; + })[0]; + + this._parts = this._parts.filter(function (sprite) { + return sprite !== sprite; + }); + + this.removeChild(sprite); + } + + } + +})(); \ No newline at end of file diff --git a/js/plugins/SF_InputBindControl.js b/js/plugins/SF_InputBindControl.js new file mode 100644 index 0000000..30d8d35 --- /dev/null +++ b/js/plugins/SF_InputBindControl.js @@ -0,0 +1,184 @@ +//============================================================================= +// SaltedFish Plugins - Input Bind Control +// SF_InputBindControl.js +//============================================================================= + +"use strict"; + +var Imported = Imported || {}; +Imported.SF_InputBindControl = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc v1.0 support add anf remove input event listener + * @author SaltedFish + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin support add and remove input event listener. + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * SF_InputBind Remove TouchInput + * SF_InputBind Remove Input + * + * to remove input / touchinput event listener + * + * ----------------------------------------------------------------------------- + * + * SF_InputBind Setup TouchInput + * SF_InputBind Setup Input + * + * to rebind input / touchinput event listener + * + * ============================================================================ + * Script Calls + * ============================================================================ + * + * TouchInput.removeEventHandlers() + * Input.removeEventHandlers() + * + * to remove input / touchinput event listener + * + * ----------------------------------------------------------------------------- + * + * TouchInput._setupEventHandlers() + * Input._setupEventHandlers() + * + * to rebind input / touchinput event listener + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.0: + * - Finished plugin + */ +//============================================================================= + +(function () { + var SF_InputBindControl = {}; + SF_Plugins.SF_InputBindControl = SF_InputBindControl; + SF_InputBindControl.version = 1.0; + + //============================================================================= + // TouchInput + //============================================================================= + + //remove touch input event listener + TouchInput.removeEventHandlers = function () { + document.removeEventListener('mousedown', this._onMouseDownBind); + document.removeEventListener('mousemove', this._onMouseMoveBind); + document.removeEventListener('mouseup', this._onMouseUpBind); + document.removeEventListener('wheel', this._onWheelBind); + document.removeEventListener('touchstart', this._onTouchStartBind); + document.removeEventListener('touchmove', this._onTouchMoveBind); + document.removeEventListener('touchend', this._onTouchEndBind); + document.removeEventListener('touchcancel', this._onTouchCancelBind); + document.removeEventListener('pointerdown', this._onPointerDownBind); + } + + //setup touch input event listener + TouchInput._setupEventHandlers = function () { + var isSupportPassive = Utils.isSupportPassiveEvent(); + this._onMouseDownBind = this._onMouseDown.bind(this); + this._onMouseMoveBind = this._onMouseMove.bind(this); + this._onMouseUpBind = this._onMouseUp.bind(this); + this._onWheelBind = this._onWheel.bind(this); + this._onTouchStartBind = this._onTouchStart.bind(this); + this._onTouchMoveBind = this._onTouchMove.bind(this); + this._onTouchEndBind = this._onTouchEnd.bind(this); + this._onTouchCancelBind = this._onTouchCancel.bind(this); + this._onPointerDownBind = this._onPointerDown.bind(this); + document.addEventListener('mousedown', this._onMouseDownBind); + document.addEventListener('mousemove', this._onMouseMoveBind); + document.addEventListener('mouseup', this._onMouseUpBind); + document.addEventListener('wheel', this._onWheelBind, isSupportPassive ? { passive: false } : false); + document.addEventListener('touchstart', this._onTouchStartBind, isSupportPassive ? { passive: false } : false); + document.addEventListener('touchmove', this._onTouchMoveBind, isSupportPassive ? { passive: false } : false); + document.addEventListener('touchend', this._onTouchEndBind); + document.addEventListener('touchcancel', this._onTouchCancelBind); + document.addEventListener('pointerdown', this._onPointerDownBind); + } + + //============================================================================= + // Input + //============================================================================= + + //remove input event listener + Input.removeEventHandlers = function () { + document.removeEventListener('keydown', this._onKeyDownBind); + document.removeEventListener('keyup', this._onKeyUpBind); + window.removeEventListener('blur', this._onLostFocusBind); + } + + + //setup input event listener + Input._setupEventHandlers = function () { + this._onKeyDownBind = this._onKeyDown.bind(this); + this._onKeyUpBind = this._onKeyUp.bind(this); + this._onLostFocusBind = this._onLostFocus.bind(this); + document.addEventListener('keydown', this._onKeyDownBind); + document.addEventListener('keyup', this._onKeyUpBind); + window.addEventListener('blur', this._onLostFocusBind); + } + + //============================================================================= + // Plugin Command + //============================================================================= + + SF_InputBindControl.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function (command, args) { + SF_InputBindControl.Game_Interpreter_pluginCommand.call(this, command, args); + if (command.toLowerCase() === 'sf_inputbind') { + switch (args[0].toLowerCase()) { + case 'remove': + switch (args[1].toLowerCase()) { + case 'touchinput': + TouchInput.removeEventHandlers(); + break; + case 'input': + Input.removeEventHandlers(); + break; + } + break; + case 'setup': + switch (args[1].toLowerCase()) { + case 'touchinput': + TouchInput._setupEventHandlers(); + break; + case 'input': + Input._setupEventHandlers(); + break; + } + break; + } + } + } + + //============================================================================= + // TouchInput + //============================================================================= + + SF_InputBindControl.TouchInput__onMouseMove = TouchInput._onMouseMove; + TouchInput._onMouseMove = function (event) { + SF_InputBindControl.TouchInput__onMouseMove.call(this, event); + this._mouseOverX = Graphics.pageToCanvasX(event.pageX); + this._mouseOverY = Graphics.pageToCanvasY(event.pageY); + } + + SF_InputBindControl.TouchInput_clear = TouchInput.clear; + TouchInput.clear = function () { + SF_InputBindControl.TouchInput_clear.call(this); + this._mouseOverX = -1; + this._mouseOverY = -1; + } + +})() \ No newline at end of file diff --git a/js/plugins/SF_LoadingGif.js b/js/plugins/SF_LoadingGif.js new file mode 100644 index 0000000..7638c21 --- /dev/null +++ b/js/plugins/SF_LoadingGif.js @@ -0,0 +1,175 @@ +//============================================================================= +// Salted Fish Plugins - Loaidng Gif +// SF_LoadingGif.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_LoadingGif = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*~struct~tip: + * @param tips + * @desc The text to display in the tip. + * @type text[] + * @default [] + * + * @param initialize + * @text initialize function + * @desc The function to call when the tip is initialized. + * This function is called with the tip as the only argument. + * This function is called only once when game started + * @type note + * @default "" + * + * @param create + * @text create function + * @desc The function to call when the tip is created. + * This function is called when start loading + * @type note + * @default "" + * + * @param update + * @text update function + * @desc The function to call each frame. + * @type note + * @default "" + * + * @param terminate + * @text terminate function + * @desc The function to call when the tip is terminated. + * @type note + * @default "" + * + * @param canExit + * @text can exit function + * @desc The function to call to check if loading can be exited. + * @type note + * @default "" + * + */ +/*~struct~gif: + * @param gifs + * @desc The gif to display. + * @default + * @type file[] + * + * @param initialize + * @text initialize function + * @desc The function to call when the tip is initialized. + * This function is called with the tip as the only argument. + * This function is called only once when game started + * @type note + * @default "" + * + * @param create + * @text create function + * @desc The function to call when the tip is created. + * This function is called when start loading + * @type note + * @default "" + * + * @param update + * @text update function + * @desc The function to call each frame. + * @type note + * @default "" + * + * @param terminate + * @text terminate function + * @desc The function to call when the tip is terminated. + * @type note + * @default "" + * + * @param canExit + * @text can exit function + * @desc The function to call to check if loading can be exited. + * @type note + * @default "return true;" + * + */ +/*: + * @plugindesc v1.0.0 - Adds a loading gif to the game. + * @author Salted Fish + * + * @param Loading Gif + * @text Loading Gif + * @desc The gif to display. + * @default [] + * @type struct + * + * @param Tips + * @text Tips + * @desc The tips to display. + * @default [] + * @type struct + * + * + */ + +(function () { + var SF_LoadingGif = {}; + SF_Plugins.SF_LoadingGif = SF_LoadingGif; + SF_LoadingGif.version = 1.0; + + //============================================================================= + // Parameters + //============================================================================= + + SF_LoadingGif.Parameters = PluginManager.parameters('SF_LoadingGif'); + SF_LoadingGif.Param = SF_LoadingGif.Param || {}; + SF_LoadingGif.Param.LoadingGif = JSON.parse(SF_LoadingGif.Parameters['Loading Gif'] || '[]'); + SF_LoadingGif.Param.Tips = JSON.parse(SF_LoadingGif.Parameters['Tips'] || '[]'); + + //============================================================================= + // Loading_Tip + //============================================================================= + + function Loading_Tip() { + this.initialize.apply(this, arguments); + } + + Loading_Tip.prototype = Object.create(PIXI.Text.prototype); + Loading_Tip.prototype.constructor = Loading_Tip; + + Loading_Tip.prototype.initialize = function (tip) { + PIXI.Text.call(this); + + this.tip = tip.tips; + this.customFunc = {}; + this.customFunc.initialize = (new Function("tip", JsonEx.parse(tip.initialize))).bind(this, this); + this.customFunc.create = (new Function("tip", JsonEx.parse(tip.create))).bind(this, this); + this.customFunc.update = (new Function("tip", JsonEx.parse(tip.update))).bind(this, this); + this.customFunc.terminate = (new Function("tip", JsonEx.parse(tip.terminate))).bind(this, this); + this.customFunc.canExit = (new Function("tip", JsonEx.parse(tip.canExit))).bind(this, this); + this.customFunc.initialize(); + } + + Loading_Tip.prototype.create = function () { + this.customFunc.create(); + } + + Loading_Tip.prototype.update = function () { + this.customFunc.update(); + } + + Loading_Tip.prototype.terminate = function () { + this.customFunc.terminate(); + } + + Loading_Tip.prototype.canExit = function () { + return this.customFunc.canExit(); + } + + //============================================================================= + // Loading_Gif + //============================================================================= + + function Loading_Gif() { + this.initialize.apply(this, arguments); + } + + +})() diff --git a/js/plugins/SF_LoadingScene.js b/js/plugins/SF_LoadingScene.js new file mode 100644 index 0000000..56b3a54 --- /dev/null +++ b/js/plugins/SF_LoadingScene.js @@ -0,0 +1,507 @@ +//============================================================================= +// SaltedFish Plugins - Loading Scene +// SF_LoadingScene.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_LoadingScene = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*~struct~tip: + * @param tips + * @desc random show when loading + * @type text[] + * @default [] + * + * @param initialize + * @text initialize function + * @desc run this only once time when game started + * @type note + * @default "" + * + * @param create + * @text create function + * @desc run this once when start loading + * @type note + * @default "" + * + * @param update + * @text update function + * @desc run this each frame when in loading. + * so you can use this to make animation + * @type note + * @default "" + * + * @param terminate + * @text terminate function + * @desc run this when removed + * @type note + * @default "" + * + * @param canExit + * @text can Exit function + * @desc call this each update after new scene loaded + * @type note + * @default "return true;" + * + */ + +/*~struct~picture: + * + * @param pictures + * @desc loop as gif files + * @type file[] + * @default [] + * + * @param initialize + * @text initilize function + * @desc run this only once time when game started + * @type note + * @default "" + * + * + * @param create + * @text create function + * @desc run this once when start loading + * @type note + * @default "" + * + * @param update + * @text update function + * @desc run this each frame when in loading. + * so you can use this to make animation + * @type note + * @default "" + * + * @param terminate + * @text terminate function + * @desc run this when removed + * @type note + * @default "" + * + * @param canExit + * @text can Exit function + * @desc call this in each update after new scene loaded + * @type note + * @default "return true;" + * + */ + +/*: + * @plugindesc Show Loading when loading + * @author SaltedFish + * + * @help + * + * ============================================================================ + * Introduction + * ============================================================================ + * + * require SF_InputBindControl.js and SF_SkipLoadError.js + * loop these pictures as gif on loading game resource + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * v1.0 - initial release + * + * ============================================================================ + * End of Helpfile + * ============================================================================ + * + * + * @param loading picture + * @desc SHow when loading + * @type struct[] + * @default [] + * + * @param fade speed + * @desc the nunmber of speed that alpha(0~1) change per frame + * @type number + * @min 0 + * @max 1 + * @decimals 4 + * @default 0.1000 + * + * @param fading in + * @desc loading scene fading in or not + * @on enable + * @off disable + * @default true + * @type boolean + * + * @param fading out + * @desc loading scene fading out or not + * @on enable + * @off disable + * @default true + * @type boolean + * + * @param alpha min + * @desc Scene fade alpha minimum + * @type number + * @decimals 4 + * @min 0 + * @max 1 + * @default 0.5000 + * + * @param all tips + * @desc show tips when animation loops + * @type struct[] + * + * @param disabled fade scene + * @desc these scene may be not faded + * @type text[] + * @default ["Scene_Boot"] + * + */ +//============================================================================= + +if (!Imported.SF_InputBindControl || !Imported.SF_SkipLoadError) { + console.error("SF_LoadingScene.js requires SF_InputBindControl.js and SF_SkipLoadError.js"); + alert("SF_LoadingScene.js requires SF_InputBindControl.js and SF_SkipLoadError.js"); +} + +(function () { + + var SF_LoadingScene = {}; + SF_Plugins.SF_LoadingScene = SF_LoadingScene; + SF_LoadingScene.version = 1.0; + + //============================================================================= + // Parameter + //============================================================================= + + SF_LoadingScene.parameters = PluginManager.parameters('SF_LoadingScene'); + SF_LoadingScene.fadeSpeed = Number(SF_LoadingScene.parameters['fade speed']) || 0.1; + SF_LoadingScene.needLoopSceneFadeIn = String(SF_LoadingScene.parameters['fade in']).toLowerCase() === "true"; + SF_LoadingScene.needLoopSceneFadeOut = String(SF_LoadingScene.parameters['fade out']).toLowerCase() === "true"; + SF_LoadingScene.alphaMin = Number(SF_LoadingScene.parameters['alpha min']); + SF_LoadingScene.loadingTips = JsonEx.parse(SF_LoadingScene.parameters['all tips']) + .map(function (tip) { return JsonEx.parse(tip); }); + SF_LoadingScene.loadingPictures = JsonEx.parse(SF_LoadingScene.parameters['loading picture']) + .map(function (picture) { return JsonEx.parse(picture); }); + + + SF_LoadingScene.disabledFadeScene = JsonEx.parse(SF_LoadingScene.parameters['disabled fade scene']); + + + // fading_out_old_scene + // fading_in_loading_scene + // loop_loading_scene + // fading_out_loading_scene + // fading_in_new_scene + SF_LoadingScene.upperCanvasStatues = null; + + //============================================================================= + // LodadingScene_Text + //============================================================================= + + function LoadingScene_Text() { + this.initialize.apply(this, arguments); + } + + SF_LoadingScene.LoadingScene_Text = LoadingScene_Text; + LoadingScene_Text.prototype = Object.create(PIXI.Text.prototype); + LoadingScene_Text.prototype.constructor = LoadingScene_Text; + + LoadingScene_Text.prototype.initialize = function (tip) { + PIXI.Text.call(this); + this.allTips = JsonEx.parse(tip.tips); + this.customFunc = {}; + this.customFunc.initialize = (new Function("tip", JsonEx.parse(tip.initialize))).bind(this, this); + this.customFunc.create = (new Function("tip", JsonEx.parse(tip.create))).bind(this, this); + this.customFunc.update = (new Function("tip", JsonEx.parse(tip.update))).bind(this, this); + this.customFunc.terminate = (new Function("tip", JsonEx.parse(tip.terminate))).bind(this, this); + this.customFunc.canExit = (new Function("tip", JsonEx.parse(tip.canExit))).bind(this, this); + this.customFunc.initialize(); + }; + + LoadingScene_Text.prototype.create = function () { + this.customFunc.create(); + }; + + LoadingScene_Text.prototype.update = function () { + this.customFunc.update(); + }; + + LoadingScene_Text.prototype.canExit = function () { + return this.customFunc.canExit(); + }; + + LoadingScene_Text.prototype.terminate = function () { + this.customFunc.terminate(); + }; + + //============================================================================= + // LoadingScene_Picture + //============================================================================= + + function LoadingScene_Picture() { + this.initialize.apply(this, arguments); + } + + LoadingScene_Picture.prototype = Object.create(Sprite.prototype); + LoadingScene_Picture.prototype.constructor = LoadingScene_Picture; + SF_LoadingScene.LoadingScene_Picture = LoadingScene_Picture; + + LoadingScene_Picture.prototype.initialize = function (picture) { + Sprite.prototype.initialize.apply(this, null); + this.loopBitmaps = []; + JsonEx.parse(picture.pictures).forEach(function (fileName) { + this.loopBitmaps.push(Bitmap.load(fileName + '.png')); + }, this); + this.customFunc = {}; + this.customFunc.initialize = (new Function("picture", JsonEx.parse(picture.initialize))).bind(this, this); + this.customFunc.create = (new Function("picture", JsonEx.parse(picture.create))).bind(this, this); + this.customFunc.update = (new Function("picture", JsonEx.parse(picture.update))).bind(this, this); + this.customFunc.terminate = (new Function("picture", JsonEx.parse(picture.terminate))).bind(this, this); + this.customFunc.canExit = (new Function("picture", JsonEx.parse(picture.canExit))).bind(this, this); + this.customFunc.initialize(); + }; + + LoadingScene_Picture.prototype.create = function () { + this.customFunc.create(); + }; + + LoadingScene_Picture.prototype.update = function () { + this.customFunc.update(); + }; + + LoadingScene_Picture.prototype.fadingInEnded = function () { + + }; + + LoadingScene_Picture.prototype.canExit = function () { + return this.customFunc.canExit(); + }; + + LoadingScene_Picture.prototype.terminate = function () { + this.customFunc.terminate(); + }; + + //============================================================================= + // Graphics + //============================================================================= + + SF_LoadingScene.Graphics_setLoadingImage = Graphics.setLoadingImage; + Graphics.setLoadingImage = function (src) { + + SF_LoadingScene.previousSceneSprite = new Sprite(); + SF_LoadingScene.nextSceneSprite = new Sprite(); + SF_LoadingScene.loadingScene = new PIXI.Container(); + + SF_LoadingScene.allLoadingPictures = new PIXI.Container(); + SF_LoadingScene.loadingPictures.forEach(function (picture) { + this.allLoadingPictures.addChild(new LoadingScene_Picture(picture)); + }, SF_LoadingScene); + + SF_LoadingScene.allLoadingTips = new PIXI.Container(); + SF_LoadingScene.loadingTips.forEach(function (tip) { + this.allLoadingTips.addChild(new LoadingScene_Text(tip)); + }, SF_LoadingScene); + + SF_LoadingScene.loadingScene.addChild(SF_LoadingScene.allLoadingPictures); + SF_LoadingScene.loadingScene.addChild(SF_LoadingScene.allLoadingTips); + SF_LoadingScene.pixiRender = new PIXI.autoDetectRenderer({ + width: Graphics._width, + height: Graphics._height, + view: Graphics._upperCanvas, + transparent: true, + preserveDrawingBuffer: true, + clearBeforeRender: true + }); + + SF_LoadingScene.upperCanvasStatues = ""; + SF_LoadingScene.animationFrameId = undefined; + SF_LoadingScene.globalAlpha = undefined; + SF_LoadingScene.totalCount = undefined; + return; + }; + + SF_LoadingScene.Graphics_startLoading = Graphics.startLoading; + Graphics.startLoading = function () { + if (!isNaN(SF_LoadingScene.animationFrameId) || SF_Plugins.SF_SkipLoadError.FileLoadingList.length == 0) return; + Graphics._canvas.style.opacity = 0; + Graphics._upperCanvas.style.opacity = 1; + + if (SF_LoadingScene.disabledFadeScene.contains(SceneManager._scene.constructor.name)) { + if (SF_LoadingScene.needLoopSceneFadeIn) { + SF_LoadingScene.fadingIn = true; + SF_LoadingScene.fadingOut = false; + SF_LoadingScene.upperCanvasStatues = "fading_in_loading_scene"; + SF_LoadingScene.globalAlpha = SF_LoadingScene.alphaMin; + } else { + SF_LoadingScene.fadingIn = false; + SF_LoadingScene.fadingOut = false; + SF_LoadingScene.upperCanvasStatues = "loop_loading_scene"; + SF_LoadingScene.globalAlpha = 1; + } + } else { + SF_LoadingScene.fadingIn = false; + SF_LoadingScene.fadingOut = true; + SF_LoadingScene.upperCanvasStatues = "fading_out_old_scene"; + SF_LoadingScene.globalAlpha = 1; + SF_LoadingScene.previousSceneSprite.bitmap = SceneManager.snap(); + } + + SF_LoadingScene.allLoadingPictures.children.forEach(function (picture) { + picture.create(); + }); + + SF_LoadingScene.allLoadingTips.children.forEach(function (tip) { + tip.create(); + }); + SF_LoadingScene.totalCount = 0; + SF_LoadingScene.needContinue = true; + SF_LoadingScene.newSceneLoaded = false; + SF_LoadingScene.animationFrameId = window.requestAnimationFrame(SF_LoadingScene.animationOnUpperCanvas); + return; + + }; + + SF_LoadingScene.animationOnUpperCanvas = function () { + SF_LoadingScene.totalCount++; + + Graphics._clearUpperCanvas(); + if (SF_LoadingScene.upperCanvasStatues == "fading_out_old_scene") { + SF_LoadingScene.previousSceneSprite.alpha = SF_LoadingScene.globalAlpha; + SF_LoadingScene.pixiRender.render(SF_LoadingScene.previousSceneSprite); + if (SF_LoadingScene.globalAlpha <= SF_LoadingScene.alphaMin) { + if (SF_LoadingScene.needLoopSceneFadeIn) { + SF_LoadingScene.upperCanvasStatues = 'fading_in_loading_scene'; + SF_LoadingScene.fadingIn = true; + SF_LoadingScene.fadingOut = false; + } else { + SF_LoadingScene.upperCanvasStatues = 'loop_loading_scene'; + SF_LoadingScene.fadingIn = false; + SF_LoadingScene.fadingOut = false; + SF_LoadingScene.globalAlpha = 1; + } + } + } else if (SF_LoadingScene.upperCanvasStatues == "fading_in_loading_scene") { + SF_LoadingScene.loadingScene.alpha = SF_LoadingScene.globalAlpha; + SF_LoadingScene.updateLoadingScene(); + SF_LoadingScene.pixiRender.render(SF_LoadingScene.loadingScene); + if (SF_LoadingScene.globalAlpha >= 1) { + SF_LoadingScene.fadingIn = false; + SF_LoadingScene.fadingOut = false; + SF_LoadingScene.upperCanvasStatues = "loop_loading_scene"; + } + } else if (SF_LoadingScene.upperCanvasStatues == "loop_loading_scene") { + SF_LoadingScene.loadingScene.alpha = SF_LoadingScene.globalAlpha; + SF_LoadingScene.updateLoadingScene(); + SF_LoadingScene.pixiRender.render(SF_LoadingScene.loadingScene); + if (SF_LoadingScene.canExitLoadingScene()) { + if (SF_LoadingScene.needLoopSceneFadeOut) { + SF_LoadingScene.fadingOut = true; + SF_LoadingScene.fadingIn = false; + SF_LoadingScene.upperCanvasStatues = "fading_out_loading_scene"; + } else if (!SF_LoadingScene.disabledFadeScene.contains(SceneManager._scene.constructor.name)) { + SF_LoadingScene.fadingOut = false; + SF_LoadingScene.fadingIn = true; + SF_LoadingScene.globalAlpha = SF_LoadingScene.alphaMin; + SF_LoadingScene.upperCanvasStatues = "fading_in_new_scene"; + } else { + SF_LoadingScene.needContinue = false; + } + } + } else if (SF_LoadingScene.upperCanvasStatues == "fading_out_loading_scene") { + SF_LoadingScene.loadingScene.alpha = SF_LoadingScene.globalAlpha; + SF_LoadingScene.updateLoadingScene(); + SF_LoadingScene.pixiRender.render(SF_LoadingScene.loadingScene); + if (SF_LoadingScene.globalAlpha <= SF_LoadingScene.alphaMin) { + if (!SF_LoadingScene.disabledFadeScene.contains(SceneManager._scene.constructor.name)) { + SF_LoadingScene.fadingOut = false; + SF_LoadingScene.fadingIn = true; + SF_LoadingScene.globalAlpha = SF_LoadingScene.alphaMin; + SF_LoadingScene.upperCanvasStatues = "fading_in_new_scene"; + } else { + SF_LoadingScene.needContinue = false; + } + } + } else if (SF_LoadingScene.upperCanvasStatues == "fading_in_new_scene") { + SF_LoadingScene.nextSceneSprite.alpha = SF_LoadingScene.globalAlpha; + SF_LoadingScene.pixiRender.render(SF_LoadingScene.nextSceneSprite); + if (SF_LoadingScene.globalAlpha >= 1) { + SF_LoadingScene.needContinue = false; + } + } else { + throw new SyntaxError('some error happen in SF_LoadingScene plugins'); + } + + SF_LoadingScene.updateUpperCanvasAlpha(); + if (SF_LoadingScene.needContinue) { + SF_LoadingScene.animationFrameId = requestAnimationFrame(SF_LoadingScene.animationOnUpperCanvas); + } else { + SF_LoadingScene.endLoading(); + } + }; + + SF_LoadingScene.endLoading = function () { + Graphics._clearUpperCanvas(); + SF_LoadingScene.terminateLoadingScene(); + Graphics._upperCanvas.style.opacity = 0; + Graphics._canvas.style.opacity = 1; + SF_LoadingScene.animationFrameId = undefined; + SceneManager.resume(); + }; + + SF_LoadingScene.updateLoadingScene = function () { + SF_LoadingScene.loadingScene.children.forEach(function (child) { + child.children.forEach(function (child) { + child.update(); + }); + }); + }; + + SF_LoadingScene.canExitLoadingScene = function () { + return SF_LoadingScene.newSceneLoaded && SF_LoadingScene.loadingScene.children.every(function (child) { + return child.children.every(function (child) { + return child.canExit(); + }); + }); + }; + + SF_LoadingScene.terminateLoadingScene = function () { + SF_LoadingScene.loadingScene.children.forEach(function (child) { + child.children.forEach(function (child) { + child.terminate(); + }); + }); + }; + + SF_LoadingScene.updateUpperCanvasAlpha = function () { + if (SF_LoadingScene.fadingIn) { + SF_LoadingScene.globalAlpha = (SF_LoadingScene.globalAlpha + SF_LoadingScene.fadeSpeed).clamp(0, 1); + } else if (SF_LoadingScene.fadingOut) { + SF_LoadingScene.globalAlpha = (SF_LoadingScene.globalAlpha - SF_LoadingScene.fadeSpeed).clamp(0, 1); + } + }; + + + SF_LoadingScene.Graphics_endLoading = Graphics.endLoading; + Graphics.endLoading = function () { + if (SceneManager._nextScene || isNaN(SF_LoadingScene.animationFrameId)) return; + if (!SF_LoadingScene.disabledFadeScene.contains(SceneManager._scene.constructor.name)) + SF_LoadingScene.nextSceneSprite.bitmap = SceneManager.snap(); + SF_LoadingScene.newSceneLoaded = true; + SceneManager.stop(); + }; + + SF_LoadingScene.Graphics_updateLoading = Graphics.updateLoading; + Graphics.updateLoading = function () { }; + + SF_LoadingScene.Graphics_clearUpperCanvas = Graphics._clearUpperCanvas; + Graphics._clearUpperCanvas = function () { + if (SF_LoadingScene.pixiRender) { + SF_LoadingScene.pixiRender.clear(); + } else { + SF_LoadingScene.Graphics_clearUpperCanvas.apply(this, arguments); + } + }; + +})(); diff --git a/js/plugins/SF_Managers.js b/js/plugins/SF_Managers.js new file mode 100644 index 0000000..fec4dc9 --- /dev/null +++ b/js/plugins/SF_Managers.js @@ -0,0 +1,43 @@ +//============================================================================= +// Salted Fish Plugins - Managers +// SF_Managers.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_Managers = true; + +var SF_Plugins = SF_Plugins || {}; +//============================================================================= +/*: + * @plugindesc Managers lib for salted fish plugins + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_Managers = {}; + SF_Plugins.Managers = SF_Managers; + + SF_Managers.version = 1.0; + + //============================================================================= + // ImageManager + //============================================================================= + + ImageManager.loadSceneActor = function (filename) { + return this.loadBitmap('img/scene_ui/scene_actor/', filename, 0, true); + }; + + ImageManager.loadSceneActorSelect = function (filename) { + return this.loadBitmap('img/scene_ui/scene_actor_select/', filename, 0, true); + } + + ImageManager.loadSceneTitle = function (filename) { + return this.loadBitmap("img/scene_ui/scene_title/", filename, 0, true); + } + + ImageManager.loadSceneMenu = function (filename) { + return this.loadBitmap('img/scene_ui/scene_menu/', filename, 0, true); + }; + +})(); \ No newline at end of file diff --git a/js/plugins/SF_MapNameWindow.js b/js/plugins/SF_MapNameWindow.js new file mode 100644 index 0000000..25f6ccb --- /dev/null +++ b/js/plugins/SF_MapNameWindow.js @@ -0,0 +1,226 @@ +//============================================================================= +// SaltedFish Plugins - Map Name Window +// SF_MapNameWindow.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_MapNameWindow = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc v1.0 Adds a window to the map screen that displays the name of the map. + * @author SaltedFish + * + * @param Map Name Window + * + * @param Map Name Window X + * @desc The X position of the map name window. + * @default 0 + * @type text + * @parent Map Name Window + * + * @param Map Name Window Y + * @desc The Y position of the map name window. + * @default 0 + * @type text + * @parent Map Name Window + * + * @param Map Name Window Width + * @desc The width of the map name window. + * @default Graphics.boxWidth + * @type text + * @parent Map Name Window + * + * @param Map Name Window Height + * @desc The height of the map name window. + * @default Graphics.boxHeight + * @type text + * @parent Map Name Window + * + * @param Map Name Window Font Size + * @desc The font size of the map name window. + * @default 28 + * @type text + * @parent Map Name Window + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin adds a window to the map screen that displays the name of the map. + * + */ +//============================================================================= + +(function () { + var SF_MapNameWindow = SF_MapNameWindow || {}; + SF_Plugins.SF_MapNameWindow = SF_MapNameWindow; + SF_MapNameWindow.version = 1.0; + + //============================================================================= + // Parameters + //============================================================================= + + SF_MapNameWindow.Parameters = PluginManager.parameters('SF_MapNameWindow'); + + SF_MapNameWindow.MapNameWindow_X = SF_MapNameWindow.Parameters['Map Name Window X'] || 0; + SF_MapNameWindow.MapNameWindow_Y = SF_MapNameWindow.Parameters['Map Name Window Y'] || 0; + SF_MapNameWindow.MapNameWindow_Width = SF_MapNameWindow.Parameters['Map Name Window Width'] || Graphics.boxWidth; + SF_MapNameWindow.MapNameWindow_Height = SF_MapNameWindow.Parameters['Map Name Window Height'] || Graphics.boxHeight; + SF_MapNameWindow.MapNameWindow_FontSize = SF_MapNameWindow.Parameters['Map Name Window Font Size'] || 28; + + SF_MapNameWindow.MapNameWindow_ShowOpacity = 180; + SF_MapNameWindow.MapNameWindow_HideOpacity = 50; + //============================================================================= + // Winddow_SFMapName + //============================================================================= + + + /** + * The window that displays the name of the map. + * + * this._mapNameBitmap: + * The bitmap that displays the name of the map. + * ----------------------------------------------------------------------------- + * Empty Area(this.contentsWidth()) | Name of the map | Empty Area(this.contentsWidth()) + * ----------------------------------------------------------------------------- + */ + function Window_SFMapName() { + this.initialize.apply(this, arguments); + } + + Window_SFMapName.prototype = Object.create(Window_Base.prototype); + Window_SFMapName.prototype.constructor = Window_SFMapName; + + Window_SFMapName.prototype.initialize = function () { + this._x = eval(SF_MapNameWindow.MapNameWindow_X); + this._y = eval(SF_MapNameWindow.MapNameWindow_Y); + this._width = eval(SF_MapNameWindow.MapNameWindow_Width); + this._height = eval(SF_MapNameWindow.MapNameWindow_Height); + this._fontSize = eval(SF_MapNameWindow.MapNameWindow_FontSize); + this._mapName = ""; + this._mapNameBitmap = null; + this._mapNameScroll = false; + this._mapNameOffset = 0; + + Window_Base.prototype.initialize.call(this, this._x, this._y, this._width, this._height); + + this.opacity = SF_MapNameWindow.MapNameWindow_ShowOpacity; + + } + + Window_SFMapName.prototype.windowWidth = function () { + return this._width; + } + + Window_SFMapName.prototype.windowHeight = function () { + return this._height; + } + + Window_SFMapName.prototype.standardFontSize = function () { + return this._fontSize; + } + + Window_SFMapName.prototype.lineHeight = function () { + return this.standardFontSize() + 8; + } + + Window_SFMapName.prototype.standardPadding = function () { + return 8; + } + + Window_SFMapName.prototype.refresh = function () { + this.contents.clear(); + if (this._mapNameScroll) { + //this._windowContentsSprite.setFrame(this._mapNameOffset, 0, this.contentsWidth(), this.contentsHeight()); + this.contents.blt( + this._mapNameBitmap, + this._mapNameOffset, 0, + this.contentsWidth(), + this.contentsHeight(), + 0, 0 + ); + } else { + //this.contents.setFrame(-this._mapNameOffset, 0, this.contentsWidth(), this.contentsHeight()); + this.contents.blt( + this._mapNameBitmap, + this.contentsWidth(), 0, + this._mapNameBitmap.width - this.contentsWidth() * 2, + this._mapNameBitmap.height, + this._mapNameOffset, 0 + ); + } + } + + Window_SFMapName.prototype.update = function () { + Window_Base.prototype.update.call(this); + if (this._mapNameScroll) { + this._mapNameOffset += 1; + if (this._mapNameOffset > this._mapNameBitmap.width - this.contentsWidth()) { + this._mapNameOffset = 0; + } + this.refresh(); + } + this.updatePlayerTouched(); + } + + Window_SFMapName.prototype.setMapName = function (mapName) { + this._mapName = mapName; + + var w = this.drawTextEx(this._mapName, 0, 0); + if (w > this.contentsWidth()) { + this._mapNameScroll = true; + this._mapNameOffset = 0; + //w = w + this.contentsWidth(); + } else { + this._mapNameScroll = false; + this._mapNameOffset = (this.contentsWidth() - w) / 2; + } + + this._mapNameBitmap = new Bitmap(w + this.contentsWidth() * 2, this.contentsHeight()); + var tmp_bitmap = this.contents; + this.contents = this._mapNameBitmap; + this.drawTextEx(this._mapName, this.contentsWidth(), 0); + this.contents = tmp_bitmap; + + this.refresh(); + } + + Window_SFMapName.prototype.isPlayerTouched = function () { + var lx = $gamePlayer.screenX() - 40; + var rx = $gamePlayer.screenX() + 40; + var ty = $gamePlayer.screenY() - 80; + var by = $gamePlayer.screenY() + 20; + if (rx < this._x || by < this._y) return false; + if (lx > (this._x + this._width)) return false; + if (ty > (this._y + this._height)) return false; + return true; + }; + + Window_SFMapName.prototype.updatePlayerTouched = function () { + if (this.isPlayerTouched()) { + this.opacity = SF_MapNameWindow.MapNameWindow_HideOpacity; + } else { + this.opacity = SF_MapNameWindow.MapNameWindow_ShowOpacity; + } + } + //============================================================================= + // Scene_Map + //============================================================================= + + SF_MapNameWindow.Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows; + Scene_Map.prototype.createAllWindows = function () { + SF_MapNameWindow.Scene_Map_createAllWindows.call(this); + if ($gameMap.displayName()) { + this._sfmapNameWindow = new Window_SFMapName(); + this._sfmapNameWindow.setMapName($gameMap.displayName()); + this.addWindow(this._sfmapNameWindow); + this._sfmapNameWindow.open(); + this._sfmapNameWindow.deactivate(); + } + } +})(); \ No newline at end of file diff --git a/js/plugins/SF_Objects.js b/js/plugins/SF_Objects.js new file mode 100644 index 0000000..8c8d997 --- /dev/null +++ b/js/plugins/SF_Objects.js @@ -0,0 +1,31 @@ +//============================================================================= +// Salted Fish Plugins - Objects +// SF_Objects.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_Objects = true; + +var SF_Plugins = SF_Plugins || {}; +//============================================================================= +/*: + * @plugindesc objects lib for salted fish plugins + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_Objects = {}; + SF_Plugins.Objects = SF_Objects; + + SF_Objects.version = 1.0; + + //============================================================================= + // Game_Action + //============================================================================= + + SF_Objects.Game_Action_applyCritical = Game_Action.prototype.applyCritical; + Game_Action.prototype.applyCritical = function (damage) { + return damage * 2.4; + }; +})(); \ No newline at end of file diff --git a/js/plugins/SF_QuestSystem.js b/js/plugins/SF_QuestSystem.js new file mode 100644 index 0000000..aa903e0 --- /dev/null +++ b/js/plugins/SF_QuestSystem.js @@ -0,0 +1,810 @@ +//============================================================================= +// SaltedFish Plugins - Quest System +// SF_QuestSystem.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_QuestSystem = true; + +var SF_Plugins = SF_Plugins || {}; +var $gameQuests = null; +var $dataQuests = null; + +//============================================================================= +/*~struct~Quest: + * @param name + * @text Quest Name + * @desc The name of the quest. + * @type text + * @default + * + * @param desc + * @text Quest Description + * @desc The description of the quest. + * @type note + * @default + * + */ +/*: + * @plugindesc v1.0 Allows you to show quests. + * @author SaltedFish + * + * @param Quest List Window + * + * @param Quest List Window X + * @desc The X position of the quest list window. + * @default 0 + * @type number + * @parent Quest List Window + * + * @param Quest List Window Y + * @desc The Y position of the quest list window. + * @default 0 + * @type number + * @parent Quest List Window + * + * @param Quest List Window Width + * @desc The width of the quest list window. + * @default 240 + * @type number + * @parent Quest List Window + * + * @param Quest List Window Height + * @desc The height of the quest list window. + * @default 480 + * @type number + * @parent Quest List Window + * + * @param Quest List Window Font Size + * @desc The font size of the quest list window. + * @default 28 + * @type number + * @parent Quest List Window + * @min 1 + * + * @param Quest Detail Window + * + * @param Quest Detail Window X + * @desc The X position of the quest detail window. + * @default 0 + * @type number + * @parent Quest Detail Window + * + * @param Quest Detail Window Y + * @desc The Y position of the quest detail window. + * @default 0 + * @type number + * @parent Quest Detail Window + * + * @param Quest Detail Window Width + * @desc The width of the quest detail window. + * @default 240 + * @type number + * @parent Quest Detail Window + * + * @param Quest Detail Window Height + * @desc The height of the quest detail window. + * @default 480 + * @type number + * @parent Quest Detail Window + * + * @param Quest Detail Window Font Size + * @desc The font size of the quest detail window. + * @default 28 + * @type number + * @parent Quest Detail Window + * @min 1 + * + * @param Quest Editor + * + * @param Quest Editor Enable + * @desc Enable the quest editor. + * @default false + * @type boolean + * @parent Quest Editor + * + * @param Quest List Info X + * @desc The X position of the quest list info. + * @default 0 + * @type number + * @parent Quest Editor + * + * @param Quest List Info Y + * @desc The Y position of the quest list info. + * @default 0 + * @type number + * @parent Quest Editor + * + * @param Quest List Info Width + * @desc The width of the quest list info. + * @default 240 + * @type number + * @parent Quest Editor + * + * @param Quest List Info Height + * @desc The height of the quest list info. + * @default 480 + * @type number + * @parent Quest Editor + * + * @param Quest List Info Font Size + * @desc The font size of the quest list info. + * @default 28 + * @type number + * @parent Quest Editor + * @min 1 + * + * + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * plugin requirement: + * - SF_WindowScrollCommand + * + * Modified from Gameus's Quest System plugin. + * This plugin allows you to show quests. + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * SF_Quest Add QuestID + * Adds a quest to the player's quest list. + * + * SF_Quest Complete QuestID + * Marks a quest as completed. + * + * SF_Quest Open + * Opens the quest scene. + * + * ============================================================================ + * Script Calls + * ============================================================================ + * + * $gameParty.addQuest(questId) + * Adds a quest to the player's quest list. + * + * $gameParty.removeQuest(questId) + * Removes a quest from the player's quest list. + */ +//============================================================================= + +//============================================================================= +// Requires +//============================================================================= + +if (!Imported.SF_WindowScrollCommand) { + console.error("SF_QuestSystem requires SF_WindowScrollCommand."); + alert("SF_QuestSystem requires SF_WindowScrollCommand."); +} +(function () { + + var SF_QuestSystem = {}; + SF_Plugins.SF_QuestSystem = SF_QuestSystem; + SF_QuestSystem.version = 1.0; + + //============================================================================= + // Parameters + //============================================================================= + + SF_QuestSystem.Parameters = PluginManager.parameters('SF_QuestSystem'); + + SF_QuestSystem.QuestListWindow_X = Number(SF_QuestSystem.Parameters["Quest List Window X"]); + SF_QuestSystem.QuestListWindow_Y = Number(SF_QuestSystem.Parameters["Quest List Window Y"]); + SF_QuestSystem.QuestListWindowWidth = Number(SF_QuestSystem.Parameters["Quest List Window Width"]); + SF_QuestSystem.QuestListWindowHeight = Number(SF_QuestSystem.Parameters["Quest List Window Height"]); + SF_QuestSystem.QuestListWindow_FontSize = Number(SF_QuestSystem.Parameters["Quest List Window Font Size"]); + + SF_QuestSystem.QuestDetailWindowX = Number(SF_QuestSystem.Parameters["Quest Detail Window X"]); + SF_QuestSystem.QuestDetailWindowY = Number(SF_QuestSystem.Parameters["Quest Detail Window Y"]); + SF_QuestSystem.QuestDetailWindowWidth = Number(SF_QuestSystem.Parameters["Quest Detail Window Width"]); + SF_QuestSystem.QuestDetailWindowHeight = Number(SF_QuestSystem.Parameters["Quest Detail Window Height"]); + SF_QuestSystem.QuestDetailWindowFontSize = Number(SF_QuestSystem.Parameters["Quest Detail Window Font Size"]); + + SF_QuestSystem.QuestEditorEnable = String(SF_QuestSystem.Parameters["Quest Editor Enable"]) === "true"; + SF_QuestSystem.QuestListInfoX = Number(SF_QuestSystem.Parameters["Quest List Info X"]); + SF_QuestSystem.QuestListInfoY = Number(SF_QuestSystem.Parameters["Quest List Info Y"]); + SF_QuestSystem.QuestListInfoWidth = Number(SF_QuestSystem.Parameters["Quest List Info Width"]); + SF_QuestSystem.QuestListInfoHeight = Number(SF_QuestSystem.Parameters["Quest List Info Height"]); + SF_QuestSystem.QuestListInfoFontSize = Number(SF_QuestSystem.Parameters["Quest List Info Font Size"]); + + SF_QuestSystem.default_quest = function () { + var quest = {}; + quest.name = ""; + quest.desc = ""; + return quest; + } + + //============================================================================= + // DataManager + //============================================================================= + + SF_QuestSystem.DataManager_makeSaveContents = DataManager.makeSaveContents; + DataManager.makeSaveContents = function () { + var contents = SF_QuestSystem.DataManager_makeSaveContents.call(this); + contents.quests = $gameQuests; + return contents; + } + + SF_QuestSystem.DataManager_extractSaveContents = DataManager.extractSaveContents; + DataManager.extractSaveContents = function (contents) { + SF_QuestSystem.DataManager_extractSaveContents.call(this, contents); + $gameQuests = contents.quests; + } + + SF_QuestSystem.DataManager_createGameObjects = DataManager.createGameObjects; + DataManager.createGameObjects = function () { + SF_QuestSystem.DataManager_createGameObjects.call(this); + $gameQuests = new Game_Quests(); + } + + //============================================================================= + // Game_Quest + //============================================================================= + + function Game_Quest() { + this.initialize.apply(this, arguments); + } + + Game_Quest.prototype.initialize = function (questId) { + var questData = $dataQuests[questId] || SF_QuestSystem.default_quest; + this._questId = questId; + this.rawData = questData; + this.name = questData.name; + this.desc = questData.desc; + this.status = "progress"; + } + + Game_Quest.prototype.completed = function () { + return this.status == "completed"; + } + + Game_Quest.prototype.inProgress = function () { + return this.status == "progress"; + } + + Game_Quest.prototype.complete = function () { + this.status = "completed"; + }; + + Game_Quest.prototype.reset = function () { + this.status = "progress"; + }; + + + //--------------------------------------------------------------------------------------------- + // Game_Quests + //--------------------------------------------------------------------------------------------- + function Game_Quests() { + this.initialize.apply(this, arguments); + }; + + Game_Quests.prototype.initialize = function () { + this.data = []; + }; + + Game_Quests.prototype.get = function (quest_id) { + if ($dataQuests[quest_id]) { + if (!this.data[quest_id]) { + this.data[quest_id] = new Game_Quest(quest_id); + } + return this.data[quest_id]; + } + return null; + }; + + Game_Quests.prototype.complete = function (quest_id) { + if (this.get(quest_id)) { + this.get(quest_id).complete(); + } + } + + //============================================================================= + // Game_Party + //============================================================================= + + SF_QuestSystem.Game_Party_initialize = Game_Party.prototype.initialize; + Game_Party.prototype.initialize = function () { + SF_QuestSystem.Game_Party_initialize.call(this); + this.quests = []; + }; + + Game_Party.prototype.addQuest = function (quest_id) { + if (this.quests.indexOf(quest_id) < 0) { + this.quests.push(quest_id); + } + }; + + // Removes the quest from the party. NOTE: This does NOT reset the quest + Game_Party.prototype.removeQuest = function (quest_id) { + var index = this.quests.indexOf(quest_id); + if (index > -1) { + this.quests.splice(index, 1); + } + }; + + // Returns true if the quest is in the party + Game_Party.prototype.hasQuest = function (quest_id) { + return this.quests.indexOf(quest_id) > -1; + }; + + // Returns true if the quest is completed + Game_Party.prototype.isQuestCompleted = function (quest_id) { + return this.getQuest(quest_id).completed(); + }; + + // Returns true if the quest is in progress + Game_Party.prototype.isQuestInProgress = function (quest_id) { + return this.getQuest(quest_id).inProgress(); + }; + + // Returns the quest object + Game_Party.prototype.getQuest = function (quest_id) { + return $gameQuests.get(quest_id); + }; + + + + //============================================================================= + // Window_QuestList + //============================================================================= + + function Window_QuestList() { + this.initialize.apply(this, arguments); + } + + Window_QuestList.prototype = Object.create(Window_ScrollCommand.prototype); + Window_QuestList.prototype.constructor = Window_QuestList; + + Window_QuestList.prototype.initialize = function () { + this._filter = "progress"; + Window_ScrollCommand.prototype.initialize.call(this, arguments); + this.x = SF_QuestSystem.QuestListWindow_X; + this.y = SF_QuestSystem.QuestListWindow_Y; + } + + Window_QuestList.prototype.standardFontSize = function () { + return SF_QuestSystem.QuestListWindow_FontSize; + } + + Window_QuestList.prototype.lineHeight = function () { + return this.standardFontSize() + 8; + } + + // Sets the filter for the quest list + // "completed" - Completed quests + // "progress" - In progress quests + Window_QuestList.prototype.setFilter = function (filter) { + this._filter = filter; + } + + Window_QuestList.prototype.windowWidth = function () { + return SF_QuestSystem.QuestListWindowWidth; + } + + Window_QuestList.prototype.windowHeight = function () { + return SF_QuestSystem.QuestListWindowHeight; + } + + Window_QuestList.prototype.makeCommandList = function () { + for (var i = 0; i < $gameParty.quests.length; i += 1) { + var quest = $gameQuests.get($gameParty.quests[i]); + if (quest.status === this._filter.toLowerCase()) { + this.addCommand(quest.name, "quest", true, $gameParty.quests[i]); + } + } + } + + Window_QuestList.prototype.updateHelp = function () { + Window_ScrollCommand.prototype.updateHelp.call(this); + if (this._helpWindow) { + this._helpWindow.setQuest(this.currentExt()); + } + } + + //============================================================================= + // Window_QuestDetail + //============================================================================= + + function Window_QuestDetail() { + this.initialize.apply(this, arguments); + } + + Window_QuestDetail.prototype = Object.create(Window_ScrollHelp.prototype); + Window_QuestDetail.prototype.constructor = Window_QuestDetail; + + Window_QuestDetail.prototype.initialize = function () { + Window_ScrollHelp.prototype.initialize.call(this, + SF_QuestSystem.QuestDetailWindowX, + SF_QuestSystem.QuestDetailWindowY, + SF_QuestSystem.QuestDetailWindowWidth, + SF_QuestSystem.QuestDetailWindowHeight); + this._questId = null; + } + + Window_QuestDetail.prototype.windowWidth = function () { + return SF_QuestSystem.QuestDetailWindowWidth; + } + + Window_QuestDetail.prototype.lineHeight = function () { + return this.standardFontSize() + 8; + } + + Window_QuestDetail.prototype.standardFontSize = function () { + return SF_QuestSystem.QuestDetailWindowFontSize; + } + + Window_QuestDetail.prototype.windowHeight = function () { + return SF_QuestSystem.QuestDetailWindowHeight; + } + + Window_QuestDetail.prototype.setQuest = function (questId) { + this._questId = questId; + if (this._questId >= 0) { + var quest = $gameQuests.get(this._questId); + this.setText(quest.desc); + } + } + + //============================================================================= + // Scene_Quest + //============================================================================= + + function Scene_Quest() { + this.initialize.apply(this, arguments); + } + + SF_QuestSystem.Scene_Quest = Scene_Quest; + + Scene_Quest.prototype = Object.create(Scene_MenuBase.prototype); + Scene_Quest.prototype.constructor = Scene_Quest; + + Scene_Quest.prototype.initialize = function () { + Scene_MenuBase.prototype.initialize.call(this); + } + + Scene_Quest.prototype.create = function () { + Scene_MenuBase.prototype.create.call(this); + this.createQuestDetailWindow(); + this.createQuestListWindow(); + this._questListWindow.setHelpWindow(this._questDetailWindow); + } + + Scene_Quest.prototype.createQuestListWindow = function () { + this._questListWindow = new Window_QuestList(); + this._questListWindow.setHandler("quest", this.onQuestListOk.bind(this)); + this._questListWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._questListWindow); + } + + Scene_Quest.prototype.createQuestDetailWindow = function () { + this._questDetailWindow = new Window_QuestDetail(); + //this._questDetailWindow.setHandler("cancel", this.popScene.bind(this)); + this.addWindow(this._questDetailWindow); + } + + Scene_Quest.prototype.onQuestListOk = function () { + //var questId = this._questListWindow.currentExt(); + //this._questDetailWindow.setQuest(questId); + this._questListWindow.activate(); + } + + //============================================================================= + // Game_Interpreter + //============================================================================= + + SF_QuestSystem.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; + Game_Interpreter.prototype.pluginCommand = function (command, args) { + SF_QuestSystem.Game_Interpreter_pluginCommand.call(this, command, args); + if (command.toLowerCase() === "sf_quest") { + switch (args[0].toLowerCase()) { + case "add": + $gameParty.addQuest(Number(args[1])); + break; + case "complete": + $gameParty.removeQuest(Number(args[1])); + $gameQuests.complete(Number(args[1])); + break; + case "open": + SceneManager.push(Scene_Quest); + break; + } + } + } + + if (Utils.isNwjs() && SF_QuestSystem.QuestEditorEnable) { + + var fs = require('fs'); + var path = require('path'); + var process = require('process'); + var quest_path = path.join(process.cwd(), 'data/Quests.json'); + var quest_data = null; + if (fs.existsSync(quest_path)) { + quest_data = JsonEx.parse(fs.readFileSync(quest_path, 'utf8')); + } else { + quest_data = [SF_QuestSystem.default_quest()]; + } + var quest_one_page = 10; + //============================================================================= + // Window_QuestListInfo + //============================================================================= + + function Window_QuestListInfo() { + this.initialize.apply(this, arguments); + } + + Window_QuestListInfo.prototype = Object.create(Window_ScrollCommand.prototype); + Window_QuestListInfo.prototype.constructor = Window_QuestListInfo; + + Window_QuestListInfo.prototype.initialize = function () { + Window_ScrollCommand.prototype.initialize.call(this); + this.x = SF_QuestSystem.QuestListInfoX; + this.y = SF_QuestSystem.QuestListInfoY; + } + + Window_QuestListInfo.prototype.windowWidth = function () { + return SF_QuestSystem.QuestListInfoWidth; + } + + Window_QuestListInfo.prototype.windowHeight = function () { + return SF_QuestSystem.QuestListInfoHeight; + } + + Window_QuestListInfo.prototype.standardFontSize = function () { + return SF_QuestSystem.QuestListInfoFontSize; + } + + Window_QuestListInfo.prototype.lineHeight = function () { + return this.standardFontSize() + 8; + } + + Window_QuestListInfo.prototype.makeCommandList = function () { + var i; + for (i = 0; i * quest_one_page + 1 < quest_data.length; i++) { + this.addCommand(`${i * quest_one_page + 1}-${i * quest_one_page + quest_one_page}`, 'quest_page', true, i); + } + if (i * quest_one_page + 1 == quest_data.length) { + this.addCommand('newpage', 'newpage'); + } + } + + Window_QuestListInfo.prototype.select = function (index) { + Window_ScrollCommand.prototype.select.call(this, index); + if (index >= 0 && this.currentSymbol() == 'quest_page' && this._questListWindow) { + this._questListWindow.setPage(this.currentExt()); + } + } + + Window_QuestListInfo.prototype.newPage = function () { + quest_data.push(SF_QuestSystem.default_quest()); + this.refresh(); + } + //============================================================================= + // Window_QuestList + //============================================================================= + + Window_QuestList.prototype.initialize = function () { + Window_ScrollCommand.prototype.initialize.call(this, arguments); + this.x = SF_QuestSystem.QuestListWindow_X; + this.y = SF_QuestSystem.QuestListWindow_Y; + this._page = null; + } + + Window_QuestList.prototype.setPage = function (page) { + this._page = page; + this.refresh(); + } + + Window_QuestList.prototype.makeCommandList = function () { + if (this._page >= 0) { + for (var i = this._page * quest_one_page + 1; i <= (this._page + 1) * quest_one_page; i++) { + if (i >= quest_data.length) { + this.addCommand('newquest', 'newquest'); + break; + } + this.addCommand(quest_data[i].name, 'quest', true, i); + } + } + } + + Window_QuestList.prototype.newQuest = function () { + quest_data.splice(quest_data.length, 0, SF_QuestSystem.default_quest()); + this.refresh(); + var i; + for (i = 0; i * quest_one_page + 1 < quest_data.length; i++) { + } + if (i * quest_one_page + 1 == quest_data.length) { + this._questListInfoWindow.addCommand('newpage', 'newpage'); + this._questListInfoWindow.refresh(); + } + } + + Window_QuestList.prototype.updateHelp = function () { + Window_ScrollCommand.prototype.updateHelp.call(this); + if (this._helpWindow) { + this._helpWindow.setQuest(this.currentExt()); + } + } + + //============================================================================= + // Window_QuestDetail + //============================================================================= + + Window_QuestDetail.prototype.clear = function () { + this.contents.clear(); + } + + Window_QuestDetail.prototype.setQuest = function (questId) { + this._questId = questId; + + var quest = quest_data[this._questId]; + + if (!quest) { + quest = SF_QuestSystem.default_quest(); + } + + this._allTextHeight = this.measureTextHeight(quest.name); + this._detail_bitmap = new Bitmap(this.contentsWidth(), this._allTextHeight); + + var tmp_content = this.contents; + this.contents = this._detail_bitmap; + this.drawTextEx(textState.text, 0, 0); + this._detail_bitmap = this.contents; + this.contents = tmp_content; + + this._offset_Y = 0; + if (this._detail_bitmap.height > this.contentsHeight()) { + this._need_scroll = true; + } else { + this._need_scroll = false; + } + + this.refresh(); + } + + //============================================================================= + // Scene_Quest_Editor + //============================================================================= + + function Scene_QuestEditor() { + this.initialize.apply(this, arguments); + } + + SF_QuestSystem.Scene_QuestEditor = Scene_QuestEditor; + Scene_QuestEditor.prototype = Object.create(Scene_MenuBase.prototype); + Scene_QuestEditor.prototype.constructor = Scene_QuestEditor; + + Scene_QuestEditor.prototype.initialize = function () { + Scene_MenuBase.prototype.initialize.call(this); + this.createEditorDiv(); + } + + Scene_QuestEditor.prototype.create = function () { + Scene_MenuBase.prototype.create.call(this); + this.createQuestListWindow(); + this.createQuestDetailWindow(); + this.createQuestListInfoWindow(); + this._questListWindow.setHelpWindow(this._questDetailWindow); + // this._questListInfoWindow.setHelpWindow(this._questListWindow); + this._questListInfoWindow._questListWindow = this._questListWindow; + this._questListWindow._questListInfoWindow = this._questListInfoWindow; + this._questListInfoWindow.select(0); + this._questListWindow.select(0); + } + + Scene_QuestEditor.prototype.createQuestListWindow = function () { + this._questListWindow = new Window_QuestList(); + this._questListWindow.setHandler("quest", this.onQuestListOk.bind(this)); + this._questListWindow.setHandler("newquest", this.onQuestListNewQuest.bind(this)); + //this._questListWindow.setHandler("cancel", this.onQuestListCancel.bind(this)); + this.addWindow(this._questListWindow); + } + + Scene_QuestEditor.prototype.createQuestListInfoWindow = function () { + this._questListInfoWindow = new Window_QuestListInfo(); + // this._questListInfoWindow.setHandler("cancel", this.popScene.bind(this)); + this._questListInfoWindow.setHandler('quest_page', this.onQuestListInfoPage.bind(this)); + this._questListInfoWindow.setHandler('newpage', this.onQuestListInfoNewPage.bind(this)); + this.addWindow(this._questListInfoWindow); + } + + Scene_QuestEditor.prototype.createQuestDetailWindow = function () { + this._questDetailWindow = new Window_QuestDetail(); + this.addWindow(this._questDetailWindow); + } + + Scene_QuestEditor.prototype.onQuestListOk = function () { + this._questListWindow.deactivate(); + this._questListInfoWindow.deactivate(); + Input.removeEventHandlers(); + TouchInput.removeEventHandlers(); + + this._questListWindow._questId = this._questListWindow.currentExt(); + document.body.appendChild(this._editor_div); + this._editor_name = document.getElementById("quest_editor_name"); + this._editor_desc = document.getElementById("quest_editor_desc"); + this._editor_save = document.getElementById("quest_editor_save"); + this._editor_cancel = document.getElementById("quest_editor_cancel"); + this._editor_save.addEventListener('click', this._editor_save_bind); + this._editor_cancel.addEventListener('click', this._editor_cancel_bind); + this._editor_name.value = quest_data[this._questListWindow._questId].name; + this._editor_desc.value = quest_data[this._questListWindow._questId].desc; + + } + + Scene_QuestEditor.prototype.onQuestListNewQuest = function () { + this._questListWindow.newQuest(); + this._questListWindow.activate(); + } + + Scene_QuestEditor.prototype.onQuestListInfoPage = function () { + this._questListInfoWindow.activate(); + } + + Scene_QuestEditor.prototype.onQuestListInfoNewPage = function () { + this._questListInfoWindow.newPage(); + this._questListInfoWindow.activate(); + } + + Scene_QuestEditor.prototype.createEditorDiv = function () { + var canvas = document.getElementById("UpperCanvas"); + this._editor_div = this._editor_div || document.createElement("div"); + this._editor_div.setAttribute("style", "position: absolute;margin: auto; top: 0px; left: 0px; right: 0px; bottom: 0px;z-index: 1000; height:" + + canvas.offsetHeight + "px; width:" + canvas.offsetWidth + "px; background-color: rgba(0, 0, 0, 0.3); color: #FFFFFF; user-select:text;"); + this._editor_div.setAttribute("id", "quest_editor"); + + this._editor_div.innerHTML = ` + +
+
+
+ + + `; + this._editor_save_bind = this.onEditorSave.bind(this); + this._editor_cancel_bind = this.onEditorCancel.bind(this); + } + + Scene_QuestEditor.prototype.onEditorSave = function () { + var quest = quest_data[this._questListWindow._questId]; + quest.name = this._editor_name.value; + quest.desc = this._editor_desc.value; + fs.writeFileSync(quest_path, JsonEx.stringify(quest_data)); + this.onEditorCancel(); + } + + Scene_QuestEditor.prototype.onEditorCancel = function () { + this._editor_div.remove(); + this._editor_save.removeEventListener("click", this._editor_save_bind); + this._editor_cancel.removeEventListener("click", this._editor_cancel_bind); + Input._setupEventHandlers(); + TouchInput._setupEventHandlers(); + Input.clear(); + TouchInput.clear(); + this._questListWindow.activate(); + this._questListInfoWindow.activate(); + this._questListWindow.refresh(); + this._questListWindow.selectExt(this._questListWindow._questId); + } + + //============================================================================= + // Scene_Title + //============================================================================= + + Scene_Title.prototype.start = function () { + SceneManager.goto(Scene_QuestEditor); + } + } else { + //============================================================================= + // DataManager + //============================================================================= + + DataManager._databaseFiles.push({ name: '$dataQuests', src: 'Quests.json' }); + } + +})(); \ No newline at end of file diff --git a/js/plugins/SF_SceneActor.js b/js/plugins/SF_SceneActor.js new file mode 100644 index 0000000..1e58892 --- /dev/null +++ b/js/plugins/SF_SceneActor.js @@ -0,0 +1,950 @@ +//============================================================================= +// Salted Fish Plugins - Scene Actor +// SF_SceneActor.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_SceneActor = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc Scene Actor + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_SceneActor = {}; + SF_Plugins.SF_SceneActor = SF_SceneActor; + + SF_SceneActor.version = 1.0; + + // Bitmap.prototype.drawTextEx = function (text, x, y) { + // if (text) { + // var textState = { + // index: 0, x: x, y: y, left: x + // }; + // textState.text = this.convertEscapeCharacters(text); + // } else { + // return 0; + // } + // }; + + // Bitmap.prototype.convertEscapeCharacters = function (text) { + // text = text.replace(/\\/g, '\x1b'); + // text = text.replace(/\x1b\x1b/g, '\\'); + // text = text.replace(/\x1bV\[(\d+)\]/gi, function () { + // return $gameVariables.value(parseInt(arguments[1])); + // }.bind(this)); + // text = text.replace(/\x1bV\[(\d+)\]/gi, function () { + // return $gameVariables.value(parseInt(arguments[1])); + // }.bind(this)); + // text = text.replace(/\x1bN\[(\d+)\]/gi, function () { + // return this.actorName(parseInt(arguments[1])); + // }.bind(this)); + // text = text.replace(/\x1bP\[(\d+)\]/gi, function () { + // return this.partyMemberName(parseInt(arguments[1])); + // }.bind(this)); + // text = text.replace(/\x1bG/gi, TextManager.currencyUnit); + // return text; + // }; + + Game_Actor.prototype.equipSlots = function () { + var slots = [1, 2, 3, 4, 5, 6, 7, 7]; + slots = slots.map(function (id) { return id; }); + if (slots.length >= 2 && this.isDualWield()) { + slots[1] = 1; + } + return slots; + }; + + + + //============================================================================= + // Window_ActorSelect + //============================================================================= + + function Window_ActorSelect() { + this.initialize.apply(this, arguments); + } + + Window_ActorSelect.prototype = Object.create(Window_Base.prototype); + Window_ActorSelect.prototype.constructor = Window_ActorSelect; + + Window_ActorSelect.prototype._refreshBack = function () { + // nothing to do + } + + Window_ActorSelect.prototype._refreshFrame = function () { + // nothing to do + } + + Window_ActorSelect.prototype.standardPadding = function () { + return 0; + } + + Window_ActorSelect.prototype.initialize = function () { + Window_Base.prototype.initialize.call(this, 0, 0, Graphics.boxWidth, Graphics.boxHeight); + this._actorList = []; + this._actorBitmap = {}; + for (var i = 0; i < $dataActors.length; i++) { + if ($dataActors[i]) { + var actor = $gameActors.actor($dataActors[i].id); + this._actorList.push(actor); + this._actorBitmap[actor.faceName()] = ImageManager.loadFace(actor.faceName()); + } + } + this._pageNumber = 0; + this._pageSize = 12; + this._maxPage = Math.ceil(this._actorList.length / this._pageSize); + this._faceBackBitmap = ImageManager.loadSceneActorSelect('face_back'); + + this._handler = null; + }; + + Window_ActorSelect.prototype.refresh = function () { + this.contents.clear(); + this.drawAllItems(); + }; + + Window_ActorSelect.prototype.drawAllItems = function () { + var index = this._pageNumber * this._pageSize; + for (var i = 0; i < this._pageSize; i++) { + if (index < this._actorList.length) { + this.drawItem(index); + } + index++; + } + } + + Window_ActorSelect.prototype.drawItem = function (index) { + var actor = this._actorList[index]; + var rect = this.itemRect(index); + this.contents.blt(this._faceBackBitmap, + 0, 0, this._faceBackBitmap.width, this._faceBackBitmap.height, + rect.x, rect.y) + this.drawActorFace(actor, rect.x, rect.y, rect.width, rect.width); + this.drawActorName(actor, rect.x, rect.y + rect.width, rect.width, rect.height - rect.width); + } + + Window_ActorSelect.prototype.drawActorFace = function (actor, x, y, width, height) { + var faceIndex = actor.faceIndex(); + var bitmap = this._actorBitmap[actor.faceName()]; + var pw = Window_Base._faceWidth; + var ph = Window_Base._faceHeight; + var sx = faceIndex % 4 * pw; + var sy = Math.floor(faceIndex / 4) * ph; + this.contents.blt(bitmap, sx, sy, pw, ph, x, y, width, height); + } + + Window_ActorSelect.prototype.drawActorName = function (actor, x, y, width, height) { + this.changeTextColor(this.normalColor()); + this.contents.fontSize = 20; + this.contents.drawText(actor.name(), x, y, width, height, 'center'); + } + + Window_ActorSelect.prototype.itemRect = function (index) { + var rect = new Rectangle(); + var i = index - this._pageNumber * this._pageSize; + rect.width = 124; + rect.height = 160; + rect.x = (i % 6) * (rect.width + 33) + 58; + rect.y = Math.floor(i / 6) * (rect.height + 40) + 93; + return rect; + } + + Window_ActorSelect.prototype.maxPage = function () { + return this._maxPage; + } + + Window_ActorSelect.prototype.pageNumber = function () { + return this._pageNumber; + } + + Window_ActorSelect.prototype.setPageNumber = function (pageNumber) { + this._pageNumber = pageNumber; + this.refresh(); + } + + Window_ActorSelect.prototype.update = function () { + Window_Base.prototype.update.call(this); + if (this.isOpenAndActive()) { + this.updateInput(); + } + } + + Window_ActorSelect.prototype.updateInput = function () { + if (TouchInput.isTriggered()) { + var x = this.canvasToLocalX(TouchInput.x); + var y = this.canvasToLocalY(TouchInput.y); + var index = this.hitTest(x, y); + if (index >= 0 && index < this._pageSize) { + this.callHandler(index + this._pageNumber * this._pageSize); + } + } + } + + Window_ActorSelect.prototype.hitTest = function (x, y) { + x = x - 58; + y = y - 93; + if (x < 0 || y < 0) { + return -1; + } + var col = Math.floor(x / (124 + 33)); + var row = Math.floor(y / (160 + 40)); + var dx = x - col * (124 + 33); + var dy = y - row * (160 + 40); + if (dx < 0 || dy < 0 || dx > 124 || dy > 160 || col >= 6 || row >= 2) { + return -1; + } + return row * 6 + col; + } + + Window_ActorSelect.prototype.callHandler = function (index) { + if (index >= 0 && index < this._actorList.length) { + if (this._handler) { + this._handler(this._actorList[index]); + } + } + } + + Window_ActorSelect.prototype.setHandler = function (handler) { + this._handler = handler; + } + + + //============================================================================= + // Scene_ActorSelect + //============================================================================= + + function Scene_ActorSelect() { + this.initialize.apply(this, arguments); + } + + window.Scene_ActorSelect = Scene_ActorSelect; + + Scene_ActorSelect.prototype = Object.create(Scene_MenuBase.prototype); + Scene_ActorSelect.prototype.constructor = Scene_ActorSelect; + + Scene_ActorSelect.prototype.createBackground = function () { + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = ImageManager.loadSceneActorSelect('background'); + this.addChild(this._backgroundSprite); + } + + Scene_ActorSelect.prototype.initialize = function () { + Scene_MenuBase.prototype.initialize.call(this); + } + + Scene_ActorSelect.prototype.create = function () { + Scene_MenuBase.prototype.create.call(this); + this.createActorSelectWindow(); + this.createCancelButton(); + this.createPageButtons(); + } + + Scene_ActorSelect.prototype.start = function () { + Scene_MenuBase.prototype.start.call(this); + this._actorSelectWindow.setPageNumber(0); + this.updatePageButtons(); + this.updatePageNumber(); + } + + Scene_ActorSelect.prototype.createActorSelectWindow = function () { + this._actorSelectWindow = new Window_ActorSelect(); + this._actorSelectWindow.setHandler(this.onActorSelect.bind(this)); + this.addChild(this._actorSelectWindow); + } + + Scene_ActorSelect.prototype.onActorSelect = function (actor) { + SF_SceneActor._actorSelected = actor; + SceneManager.push(Scene_Actor); + } + + Scene_ActorSelect.prototype.createCancelButton = function () { + this._cancelButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActorSelect('cancel'); + this._cancelButton.setColdBitmap(bitmap); + this._cancelButton.setHotBitmap(bitmap); + this._cancelButton.setClickHandler(this.onCancelButtonClick.bind(this)); + this._cancelButton.refresh(); + this._cancelButton.move(21, 7); + this.addChild(this._cancelButton); + } + + Scene_ActorSelect.prototype.onCancelButtonClick = function () { + this.popScene(); + } + + Scene_ActorSelect.prototype.updatePageButtons = function () { + var num = this._actorSelectWindow.pageNumber(); + var max = this._actorSelectWindow.maxPage(); + if (num == 0) { + this._pageUpButton.deactivate(); + this._pageUpButton.visible = false; + } else { + this._pageUpButton.activate(); + this._pageUpButton.visible = true; + } + + if (num == max - 1) { + this._pageDownButton.deactivate(); + this._pageDownButton.visible = false; + } else { + this._pageDownButton.activate(); + this._pageDownButton.visible = true; + } + + } + + Scene_ActorSelect.prototype.updatePageNumber = function () { + var num = this._actorSelectWindow.pageNumber(); + var bitmap = this._pageNumberText.bitmap; + bitmap.clear(); + bitmap.fontSize = 16; + bitmap.drawText(num + 1, 0, 0, bitmap.width, bitmap.height, 'center'); + } + + Scene_ActorSelect.prototype.createPageButtons = function () { + this._pageUpButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActorSelect('page_up'); + this._pageUpButton.setColdBitmap(bitmap); + this._pageUpButton.setHotBitmap(bitmap); + this._pageUpButton.setClickHandler(this.onPageUpButtonClick.bind(this)); + this._pageUpButton.refresh(); + this._pageUpButton.move(442, 493); + this.addChild(this._pageUpButton); + + this._pageDownButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActorSelect('page_down'); + this._pageDownButton.setColdBitmap(bitmap); + this._pageDownButton.setHotBitmap(bitmap); + this._pageDownButton.setClickHandler(this.onPageDownButtonClick.bind(this)); + this._pageDownButton.refresh(); + this._pageDownButton.move(544, 493); + this.addChild(this._pageDownButton); + + this._pageNumberContainer = new PIXI.Container(); + this._pageNumberContainer.position.set(493, 493); + this._pageNumberBackSprite = new Sprite(ImageManager.loadSceneActorSelect('num_back')); + this.addChild(this._pageNumberContainer); + this._pageNumberContainer.addChild(this._pageNumberBackSprite); + + this._pageNumberText = new Sprite(new Bitmap(40, 40)); + this._pageNumberText.move(0, 0); + this._pageNumberContainer.addChild(this._pageNumberText); + } + + Scene_ActorSelect.prototype.onPageUpButtonClick = function () { + this._actorSelectWindow.setPageNumber(this._actorSelectWindow.pageNumber() - 1); + this.updatePageButtons(); + this.updatePageNumber(); + } + + Scene_ActorSelect.prototype.onPageDownButtonClick = function () { + this._actorSelectWindow.setPageNumber(this._actorSelectWindow.pageNumber() + 1); + this.updatePageButtons(); + this.updatePageNumber(); + } + + + //============================================================================= + // Window_ActorProps + //============================================================================= + + function Window_ActorProps() { + this.initialize.apply(this, arguments); + } + + Window_ActorProps.prototype = Object.create(Window_Base.prototype); + Window_ActorProps.prototype.constructor = Window_ActorProps; + + Window_ActorProps.prototype._refreshBack = function () { + // nothing to do here + } + + Window_ActorProps.prototype._refreshFrame = function () { + this._windowFrameSprite.bitmap = ImageManager.loadSceneActor('actor_prop'); + } + + Window_ActorProps.prototype.initialize = function () { + Window_Base.prototype.initialize.apply(this, arguments); + this._key_position = { + "mhp": [70, 96], + "mmp": [300, 96], + "atk": [70, 120], + "mat": [300, 120], + "def": [70, 144], + "mdf": [300, 144], + "agi": [70, 168], + "cri": [300, 168], + "hit": [70, 192], + "eva": [300, 192], + } + this._actor = null; + this._states = []; + this._statePage = 0; + this._stateMaxPage = 0; + this._stateMaxInPage = 6; + this._iconBitmap = ImageManager.loadSystem('IconSet'); + + this._stateWidth = 133; + this._stateHeight = 44; + this._statePaddingX = 35; + this._statePaddingY = 18; + + } + + Window_ActorProps.prototype.standardPadding = function () { + return 0; + } + + Window_ActorProps.prototype.setActor = function (actor) { + this._actor = actor; + this.refresh(); + } + + Window_ActorProps.prototype.refresh = function () { + if (!this._actor) { return; } + this.contents.clear(); + this.contents.fontSize = 18; + for (var key in this._key_position) { + this.drawActorParam(this._actor, key); + } + + this._states = this._actor.states(); + this._statePage = 0; + this._stateMaxPage = Math.floor(this._states.length / this._stateMaxInPage); + this.drawActorStatePage(); + } + + Window_ActorProps.prototype.drawActorParam = function (actor, key) { + var x = this._key_position[key][0]; + var y = this._key_position[key][1]; + var value = actor[key]; + var text = ""; + if (value < 1) { + text = value.toFixed(2); + } else { + text = value.toString(); + } + this.contents.drawText(text, x, y, 180, 24, 'right'); + } + + + + Window_ActorProps.prototype.getStateRect = function (index) { + var i = index - this._statePage * this._stateMaxInPage; + var sw = this._stateWidth; + var sh = this._stateHeight; + var x = 23 + (i % 3) * (sw + this._statePaddingX); + var y = 278 + Math.floor(i / 3) * (sh + this._statePaddingY); + return new Rectangle(x, y, sw, sh); + } + + Window_ActorProps.prototype.drawActorStatePage = function () { + var pw = Window_Base._iconWidth; + var ph = Window_Base._iconHeight; + this.contents.fontSize = 32; + for (var i = 0; i < this._stateMaxInPage; i++) { + var index = this._statePage * this._stateMaxInPage + i; + var rect = this.getStateRect(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + if (index < this._states.length) { + var state = this._states[index]; + var iconIndex = state.iconIndex; + var sx = iconIndex % 116 * pw; + var sy = Math.floor(iconIndex / 16) * ph; + this.contents.blt(this._iconBitmap, sx, sy, pw, ph, rect.x, rect.y, this._stateHeight, this._stateHeight); + + var text = state.name; + this.contents.drawText(text, rect.x + this._stateHeight, rect.y, rect.width - this._stateHeight, this._stateHeight, 'left'); + } + } + } + + //============================================================================= + // Window_ActorSkill + //============================================================================= + + function Window_ActorSkill() { + this.initialize.apply(this, arguments); + } + + Window_ActorSkill.prototype = Object.create(Window_Base.prototype); + Window_ActorSkill.prototype.constructor = Window_ActorSkill; + + Window_ActorSkill.prototype._refreshBack = function () { + // nothing to do here + } + + Window_ActorSkill.prototype._refreshFrame = function () { + this._windowFrameSprite.bitmap = ImageManager.loadSceneActor('actor_skill'); + } + + Window_ActorSkill.prototype.initialize = function () { + Window_Base.prototype.initialize.apply(this, arguments); + this._actor = null; + + this._skillPage = 0; + this._skillMaxPage = 0; + this._skillMaxInPage = 18; + + this._skillWidth = 142; + this._skillHeight = 35; + this._skillPaddingX = 9; + this._skillPaddingY = 17; + + this._iconBitmap = ImageManager.loadSystem('IconSet'); + this._skillBackBitmap = ImageManager.loadSceneActor('skill_back'); + this._skillHandler = null; + + this.createPageButtons(); + } + + Window_ActorSkill.prototype.standardPadding = function () { + return 0; + } + + Window_ActorSkill.prototype.createPageButtons = function () { + var bitmap = null; + bitmap = ImageManager.loadSceneActor('skill_page_up'); + this._pageUpButton = new Sprite_SFButton(); + this._pageUpButton.setColdBitmap(bitmap); + this._pageUpButton.setHotBitmap(bitmap); + this._pageUpButton.setClickHandler(this.onPageUpButtonClick.bind(this)); + this._pageUpButton.refresh(); + this._pageUpButton.move(214, 372); + this.addChild(this._pageUpButton); + + bitmap = ImageManager.loadSceneActor('skill_page_down'); + this._pageDownButton = new Sprite_SFButton(); + this._pageDownButton.setColdBitmap(bitmap); + this._pageDownButton.setHotBitmap(bitmap); + this._pageDownButton.setClickHandler(this.onPageDownButtonClick.bind(this)); + this._pageDownButton.refresh(); + this._pageDownButton.move(258, 372); + this.addChild(this._pageDownButton); + + this._pageUpButton.visible = false; + this._pageDownButton.visible = false; + + this._pageNumberContainer = new PIXI.Container(); + this._pageNumberContainer.position.set(236, 372); + this._pageNumberBackSprite = new Sprite(ImageManager.loadSceneActor('skill_page_number_back')); + this.addChild(this._pageNumberContainer); + this._pageNumberContainer.addChild(this._pageNumberBackSprite); + + this._pageNumberText = new Sprite(new Bitmap(22, 22)); + this._pageNumberText.move(0, 0); + this._pageNumberText.bitmap.fontSize = 14; + this._pageNumberContainer.addChild(this._pageNumberText); + } + + Window_ActorSkill.prototype.onPageUpButtonClick = function () { + this._skillPage--; + this.refresh(); + } + + Window_ActorSkill.prototype.onPageDownButtonClick = function () { + this._skillPage++; + this.refresh(); + } + + Window_ActorSkill.prototype.setActor = function (actor) { + this._actor = actor; + this._skillList = this._actor.skills().filter(function (skill) { + return !!skill && this._actor.noHiddenSkillConditionsMet(skill); + }, this); + this._skillPage = 0; + this._skillMaxPage = Math.ceil(this._skillList.length / this._skillMaxInPage); + this.refresh(); + } + + Window_ActorSkill.prototype.refresh = function () { + if (!this._actor) { return; } + + this.contents.clear(); + this.drawActorSkillPage(); + this.updatePageButtons(); + this.updatePageNumber(); + } + + Window_ActorSkill.prototype.updatePageButtons = function () { + this._pageUpButton.visible = this._skillPage > 0; + this._pageDownButton.visible = this._skillPage < this._skillMaxPage - 1; + + if (this._pageUpButton.visible) { + this._pageUpButton.activate(); + } else { + this._pageUpButton.deactivate(); + } + + if (this._pageDownButton.visible) { + this._pageDownButton.activate(); + } else { + this._pageDownButton.deactivate(); + } + } + + Window_ActorSkill.prototype.updatePageNumber = function () { + this._pageNumberText.bitmap.clear(); + this._pageNumberText.bitmap.drawText(this._skillPage + 1, 0, 0, 22, 22, 'center'); + } + + Window_ActorSkill.prototype.getSkillRect = function (index) { + var i = index - this._skillPage * this._skillMaxInPage; + var sw = this._skillWidth; + var sh = this._skillHeight; + var x = 23 + (i % 3) * (sw + this._skillPaddingX); + var y = 62 + Math.floor(i / 3) * (sh + this._skillPaddingY); + return new Rectangle(x, y, sw, sh); + } + + Window_ActorSkill.prototype.drawActorSkillPage = function () { + var pw = Window_Base._iconWidth; + var ph = Window_Base._iconHeight; + this.contents.fontSize = 24; + var index = this._skillPage * this._skillMaxInPage; + for (var i = 0; i < this._skillMaxInPage && index < this._skillList.length; i++, index++) { + var rect = this.getSkillRect(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + this.contents.blt( + this._skillBackBitmap, + 0, 0, this._skillBackBitmap.width, this._skillBackBitmap.height, + rect.x, rect.y, rect.width, rect.height + ); + var skill = this._skillList[index]; + var iconIndex = skill.iconIndex; + var sx = iconIndex % 16 * pw; + var sy = Math.floor(iconIndex / 16) * ph; + this.contents.blt(this._iconBitmap, sx, sy, pw, ph, rect.x, rect.y, this._skillHeight, this._skillHeight); + + var text = skill.name; + this.contents.drawText(text, rect.x + this._skillHeight, rect.y, rect.width - this._skillHeight, this._skillHeight, 'left'); + } + } + + Window_ActorSkill.prototype.update = function () { + Window_Base.prototype.update.apply(this, arguments); + if (this.isOpenAndActive()) { + this.updateInput(); + } + } + + Window_ActorSkill.prototype.updateInput = function () { + if (TouchInput.isTriggered()) { + var x = this.canvasToLocalX(TouchInput.x); + var y = this.canvasToLocalY(TouchInput.y); + var index = this.hitTest(x, y); + if (index >= 0) { + index = index + this._skillPage * this._skillMaxInPage; + if (index < this._skillList.length) { + var skill = this._skillList[index]; + this.callSkillHandler(skill); + } + } + } + } + + Window_ActorSkill.prototype.callSkillHandler = function (skill) { + if (skill && this._skillHandler) { + this._skillHandler(skill); + } + } + + Window_ActorSkill.prototype.setSkillHandler = function (handler) { + this._skillHandler = handler; + } + + Window_ActorSkill.prototype.hitTest = function (x, y) { + x = x - 23; + y = y - 62; + if (x < 0 || y < 0) { return -1; } + var row = Math.floor(y / (this._skillHeight + this._skillPaddingY)); + var col = Math.floor(x / (this._skillWidth + this._skillPaddingX)); + var dx = x - col * (this._skillWidth + this._skillPaddingX); + var dy = y - row * (this._skillHeight + this._skillPaddingY); + if ( + dx < 0 || dy < 0 || + dx > this._skillWidth || dy > this._skillHeight || + row >= 6 || col >= 3 + ) { return -1; } + + var index = row * 3 + col; + return index; + } + + //============================================================================= + // Window_SkillPopup + //============================================================================= + + function Window_SkillPopup() { + this.initialize.apply(this, arguments); + } + + Window_SkillPopup.prototype = Object.create(Window_Base.prototype); + Window_SkillPopup.prototype.constructor = Window_SkillPopup; + + Window_SkillPopup.prototype._refreshBack = function () { + // nothing to do + } + + Window_SkillPopup.prototype._refreshFrame = function () { + this._windowFrameSprite.bitmap = ImageManager.loadSceneActor('skill_pop_window_back'); + } + + Window_SkillPopup.prototype.initialize = function () { + Window_Base.prototype.initialize.apply(this, arguments); + + this._actor = null; + this._skill = null; + this._action = null; + + this._cancelHandler = null; + this._useHandler = null; + this._faceBackBitmap = ImageManager.loadSceneActor('skill_pop_face_back'); + this.createCancelButton(); + this.createUseButton(); + } + + Window_SkillPopup.prototype.standardPadding = function () { + return 0; + } + + Window_SkillPopup.prototype.setActor = function (actor) { + this._actor = actor; + this._action = new Game_Action(actor); + } + + Window_SkillPopup.prototype.setSkill = function (skill) { + this._skill = skill; + this._action.setItemObject(skill); + this.refresh(); + } + + Window_SkillPopup.prototype.setCancelHandler = function (handler) { + this._cancelHandler = handler; + this._cancelButton.setClickHandler(this._cancelHandler); + } + + Window_SkillPopup.prototype.setUseHandler = function (handler) { + this._useHandler = handler; + this._useButton.setClickHandler(this.callUseHandler.bind(this)); + } + + Window_SkillPopup.prototype.callUseHandler = function () { + if (this._useHandler) { + this._useHandler(); + } + } + + Window_SkillPopup.prototype.createCancelButton = function () { + this._cancelButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActor('skill_pop_cancel'); + this._cancelButton.setColdBitmap(bitmap); + this._cancelButton.setHotBitmap(bitmap); + this._cancelButton.setClickHandler(this._cancelHandler); + this._cancelButton.move(670, 0); + this._cancelButton.refresh(); + this.addChild(this._cancelButton); + } + + Window_SkillPopup.prototype.createUseButton = function () { + this._useButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActor('skill_pop_use'); + this._useButton.setColdBitmap(bitmap); + this._useButton.setHotBitmap(bitmap); + this._useButton.setClickHandler(this._useHandler); + this._useButton.move(592, 313); + this._useButton.refresh(); + this.addChild(this._useButton); + } + + Window_SkillPopup.prototype.refresh = function () { + this._cancelButton.refresh(); + this._useButton.refresh(); + this.contents.clear(); + if (!this._actor || !this._skill) { return; } + this.refreshSkill(); + + if (this._actor.canUse(this._skill)) { + this._useButton.visible = true; + this._useButton.activate(); + } else { + this._useButton.visible = false; + this._useButton.deactivate(); + } + } + + Window_SkillPopup.prototype.refreshSkill = function () { + var text = this._skill.name; + this.contents.fontSize = 20; + this.contents.drawText(text, 18, 17, this.contentsWidth(), 20, 'left'); + + + this.contents.fontSize = 16; + text = this._skill.description; + var lines = text.split('\n'); + var y = 60; + for (var i = 0; i < lines.length; i++) { + this.contents.drawText(lines[i], 36, y, this.contentsWidth(), 20, 'left'); + y += 20; + } + } + + //============================================================================= + // Scene_Actor + //============================================================================= + + function Scene_Actor() { + this.initialize.apply(this, arguments); + } + + window.Scene_Actor = Scene_Actor; + + Scene_Actor.prototype = Object.create(Scene_MenuBase.prototype); + Scene_Actor.prototype.constructor = Scene_Actor; + + Scene_Actor.prototype.initialize = function () { + Scene_MenuBase.prototype.initialize.call(this); + this._iconBitmap = ImageManager.loadSystem('IconSet'); + this._childStatus = 'prop'; // prop skill equip skill_popup + } + + Scene_Actor.prototype.create = function () { + Scene_MenuBase.prototype.create.call(this); + this._actor = SF_SceneActor._actorSelected || $gameParty.menuActor(); + this.createNameSprite(); + this.createActorContainer(); + this.createStatusWindow(); + this.createCancelButton(); + this.createSkillWindow(); + //this.createEquipWindow(); + //this.createTabButton(); + } + + Scene_Actor.prototype.start = function () { + Scene_MenuBase.prototype.start.call(this); + this._statusWindow.setActor(this._actor); + this._skillWindow.setActor(this._actor); + this._skillPopup.setActor(this._actor); + + this._childStatus = 'skill'; + this.updateChildrenList(); + } + + Scene_Actor.prototype.createBackground = function () { + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = ImageManager.loadSceneActor('background'); + } + + Scene_Actor.prototype.createNameSprite = function () { + this._nameSprite = new Sprite(); + this._nameSprite.bitmap = new Bitmap(230, 47); + this._nameSprite.bitmap.fontSize = 32; + this._nameSprite.bitmap.textColor = '#ffffff'; + this._nameSprite.move(45, 73); + this._nameSprite.bitmap.drawText(this._actor.name(), 0, 0, 230, 47, 'center'); + } + + Scene_Actor.prototype.createActorContainer = function () { + this._actorContainer = new PIXI.Container(); + this._actorContainer.x = 52; + this._actorContainer.y = 139; + var slots = this._actor.equipSlots(); + for (var i = 0; i < slots; i++) { + // not completely sure what this does + } + } + + Scene_Actor.prototype.createStatusWindow = function () { + this._statusWindow = new Window_ActorProps(487, 86, 495, 417); + + } + + Scene_Actor.prototype.createSkillWindow = function () { + this._skillWindow = new Window_ActorSkill(487, 86, 495, 417); + this._skillWindow.setSkillHandler(this.onSkillOk.bind(this)); + + this._skillPopup = new Window_SkillPopup(166, 83, 707, 363); + this._skillPopup.setCancelHandler(this.onSkillCancel.bind(this)); + this._skillPopup.setUseHandler(this.onSkillUse.bind(this)); + + this._skillPopBack = new Sprite(); + this._skillPopBackBitmap = ImageManager.loadSceneActor('skill_pop_back'); + } + + Scene_Actor.prototype.createCancelButton = function () { + this._cancelButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActor('cancel'); + this._cancelButton.setColdBitmap(bitmap); + this._cancelButton.setHotBitmap(bitmap); + this._cancelButton.setClickHandler(this.onCancelButtonClick.bind(this)); + this._cancelButton.move(21, 7); + this._cancelButton.refresh(); + } + + Scene_Actor.prototype.onCancelButtonClick = function () { + this.popScene(); + } + + Scene_Actor.prototype.onSkillOk = function (skill) { + this._skillPopBack.bitmap = Bitmap.snap(this); + this._skillPopBack.bitmap.blt(this._skillPopBackBitmap, 0, 0, this._skillPopBackBitmap.width, this._skillPopBackBitmap.height, 0, 0); + this._skillPopup.setSkill(skill); + + this._childStatus = 'skill_popup'; + this.updateChildrenList(); + } + + Scene_Actor.prototype.onSkillCancel = function () { + this._childStatus = 'skill'; + this.updateChildrenList(); + } + + Scene_Actor.prototype.onSkillUse = function (skill) { + var action = new Game_Action(this._actor); + + this._childStatus = 'skill'; + this.updateChildrenList(); + } + + Scene_Actor.prototype.useSkill = function (action) { + this._actor.useItem(action.item()); + this.a + } + + Scene_Actor.prototype.updateChildrenList = function () { + this.removeChildren(); + switch (this._childStatus) { + case 'prop': + this.addBackChildren(); + this.addChild(this._statusWindow); + break; + case 'skill': + this.addBackChildren(); + this.addChild(this._skillWindow); + break; + case 'equip': + this.addBackChildren(); + this.addChild(this._equipWindow); + break; + case 'skill_popup': + this.addChild(this._skillPopBack); + this.addChild(this._skillPopup); + break; + default: + this.popScene(); + } + } + + Scene_Actor.prototype.addBackChildren = function () { + this.addChild(this._backgroundSprite); + this.addChild(this._cancelButton); + this.addChild(this._nameSprite); + this.addChild(this._actorContainer); + } +})(); \ No newline at end of file diff --git a/js/plugins/SF_SceneActorSelect.js b/js/plugins/SF_SceneActorSelect.js new file mode 100644 index 0000000..460542f --- /dev/null +++ b/js/plugins/SF_SceneActorSelect.js @@ -0,0 +1,296 @@ +//============================================================================= +// Salted Fish Plugins - Scene Actor Select +// SF_SceneActorSelect.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_SceneActorSelect = true; + +var SF_Plugins = SF_Plugins || {}; +//============================================================================= +/*: + * @plugindesc v1.0.0 Allows you to select an actor from the scene. + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_SceneActorSelect = {}; + SF_Plugins.SceneActorSelect = SF_SceneActorSelect; + + SF_SceneActorSelect.version = 1.0; + + //============================================================================= + // Window_ActorSelect + //============================================================================= + + function Window_ActorSelect() { + this.initialize.apply(this, arguments); + } + + SF_SceneActorSelect.Window_ActorSelect = Window_ActorSelect; + window.Window_ActorSelect = Window_ActorSelect; + + Window_ActorSelect.prototype = Object.create(Window_PagingBase.prototype); + Window_ActorSelect.prototype.constructor = Window_ActorSelect; + + Window_ActorSelect.prototype.initialize = function () { + Window_PagingBase.prototype.initialize.apply(this, arguments); + + this._actorBackBitmap = ImageManager.loadSceneActorSelect("actor_back"); + this._faceBackBitmap = ImageManager.loadSceneActorSelect("face_back"); + this._levelBackBitmap = ImageManager.loadSceneActorSelect("level_back"); + this._actorFaceSprites = []; + var pageItems = this.maxPageItems(); + for (var i = 0; i < pageItems; i++) { + this._actorFaceSprites.push(new Sprite()); + var rect = this.itemRect(i); + this._actorFaceSprites[i].x = rect.x + 3 + 4; + this._actorFaceSprites[i].y = rect.y + 42 + 4; + this.addChild(this._actorFaceSprites[i]); + } + } + + Window_ActorSelect.prototype._refreshFrame = function () { + // nothing to do + } + + Window_ActorSelect.prototype._refreshBack = function () { + // nothing to do + } + + Window_ActorSelect.prototype.windowWidth = function () { + return Graphics.boxWidth; + } + + Window_ActorSelect.prototype.windowHeight = function () { + return Graphics.boxHeight; + } + + Window_ActorSelect.prototype.windowX = function () { + return 0; + } + + Window_ActorSelect.prototype.windowY = function () { + return 0; + } + + Window_ActorSelect.prototype.itemWidth = function () { + return 142; + } + + Window_ActorSelect.prototype.itemHeight = function () { + return 209; + } + + Window_ActorSelect.prototype.maxCols = function () { + return 5; + } + + Window_ActorSelect.prototype.maxRows = function () { + return 2; + } + + Window_ActorSelect.prototype.itemPadding = function () { + return new Point(20, 14); + } + + Window_ActorSelect.prototype.itemStartPosition = function () { + return new Point(109, 76); + } + + Window_ActorSelect.prototype.pageUpPosition = function () { + return new Point(46, 288); + } + + Window_ActorSelect.prototype.pageDownPosition = function () { + return new Point(943, 288); + } + + Window_ActorSelect.prototype.pageUpBitmap = function () { + var bitmap = ImageManager.loadSceneActorSelect("page_up"); + return { cold: bitmap, hot: bitmap }; + } + + Window_ActorSelect.prototype.pageDownBitmap = function () { + var bitmap = ImageManager.loadSceneActorSelect("page_down"); + return { cold: bitmap, hot: bitmap }; + } + + Window_PagingBase.prototype.isShowPageNumber = function () { + return false; + } + + Window_ActorSelect.prototype.makeItemList = function () { + var list = []; + for (var i = 0; i < $dataActors.length; i++) { + if ($dataActors[i]) { + var actor = $gameActors.actor($dataActors[i].id); + list.push(actor); + } + } + return list; + } + + Window_ActorSelect.prototype.drawItem = function (index) { + if (index >= this.maxItems()) { + this._actorFaceSprites[index % this.maxPageItems()].visible = false; + return; + } + + this._actorFaceSprites[index % this.maxPageItems()].visible = true; + var rect = this.itemRect(index); + this.contents.blt(this._actorBackBitmap, 0, 0, this._actorBackBitmap.width, this._actorBackBitmap.height, rect.x, rect.y); + this.contents.blt(this._faceBackBitmap, 0, 0, this._faceBackBitmap.width, this._faceBackBitmap.height, rect.x + 3, rect.y + 42); + this.contents.blt(this._levelBackBitmap, 0, 0, this._levelBackBitmap.width, this._levelBackBitmap.height, rect.x, rect.y + 172); + + this.drawActorFace(index); + this.drawActorName(index); + this.drawActorLevel(index); + } + + Window_ActorSelect.prototype.getFaceRect = function (faceIndex) { + var pw = Window_Base._faceWidth; + var ph = Window_Base._faceHeight; + var sw = this._faceBackBitmap.width - 8; + var sh = this._faceBackBitmap.height - 8; + var sx = faceIndex % 4 * pw + (pw - sw) / 2; + var sy = Math.floor(faceIndex / 4) * ph + (ph - sh) / 2; + return new Rectangle(sx, sy, sw, sh); + } + + Window_ActorSelect.prototype.drawActorLevel = function (index) { + var actor = this.getItem(index); + var rect = this.itemRect(index); + var levelText = 'LV. ' + actor.level.toString(); + this.contents.fontSize = 18; + this.contents.textColor = 'white'; + this.contents.drawText(levelText, rect.x, rect.y + 172, rect.width, 37, 'center'); + } + + Window_ActorSelect.prototype.drawActorFace = function (index) { + var actor = this.getItem(index); + var faceIndex = actor.faceIndex(); + var faceRect = this.getFaceRect(faceIndex); + index = index % this._actorFaceSprites.length; + this._actorFaceSprites[index].bitmap = ImageManager.loadFace(actor.faceName()); + this._actorFaceSprites[index].setFrame(faceRect.x, faceRect.y, faceRect.width, faceRect.height); + } + + Window_ActorSelect.prototype.drawActorName = function (index) { + var actor = this.getItem(index); + var rect = this.itemRect(index); + var nameText = actor.name(); + this.contents.fontSize = 24; + this.contents.textColor = 'white'; + this.contents.drawText(nameText, rect.x, rect.y + 10, rect.width, 32, 'center'); + } + + + Window_ActorSelect.prototype.onItemPointerDown = function (index) { + console.log(`onItemPointerDown: ${index}`); + } + + Window_ActorSelect.prototype.onItemPointerUp = function (index) { + console.log(`onItemPointerUp: ${index}`); + } + + Window_ActorSelect.prototype.onItemPointerMove = function (index) { + console.log(`onItemPointerMove: ${index}`); + } + + Window_ActorSelect.prototype.onItemPointerCancel = function (index) { + console.log(`onItemPointerCancel: ${index}`); + } + + Window_ActorSelect.prototype.onItemPointerLeave = function (index) { + console.log(`onItemPointerLeave: ${index}`); + } + + Window_ActorSelect.prototype.onItemPointerEnter = function (index) { + console.log(`onItemPointerEnter: ${index}`); + } + + Window_ActorSelect.prototype.onItemPointerOver = function (index) { + // console.log(`onItemPointerOver: ${index}`); + } + + Window_ActorSelect.prototype.onItemClick = function (index) { + console.log(`onItemClick: ${index}`); + } + //============================================================================= + // Scene_ActorSelect + //============================================================================= + + function Scene_ActorSelect() { + this.initialize.apply(this, arguments); + } + + SF_SceneActorSelect.Scene_ActorSelect = Scene_ActorSelect; + window.Scene_ActorSelect = Scene_ActorSelect; + + Scene_ActorSelect.prototype = Object.create(Scene_MenuBase.prototype); + Scene_ActorSelect.prototype.constructor = Scene_ActorSelect; + + Scene_ActorSelect.prototype.initialize = function () { + Scene_MenuBase.prototype.initialize.call(this); + } + + Scene_ActorSelect.prototype.create = function () { + Scene_MenuBase.prototype.create.call(this); + this.createWindowActorSelect(); + this.createButtons(); + } + + Scene_ActorSelect.prototype.start = function () { + Scene_MenuBase.prototype.start.call(this); + this._windowActorSelect.refresh(); + this._cancelButton.refresh(); + this._homeButton.refresh(); + this._cancelButton.activate(); + this._homeButton.activate(); + } + + Scene_ActorSelect.prototype.createBackground = function () { + this._backgroundSprite = new Sprite(); + this._backgroundSprite.bitmap = ImageManager.loadSceneActorSelect('background'); + this.addChild(this._backgroundSprite); + } + + Scene_ActorSelect.prototype.createWindowActorSelect = function () { + this._windowActorSelect = new Window_ActorSelect(); + this.addWindow(this._windowActorSelect); + } + + Scene_ActorSelect.prototype.createButtons = function () { + this._cancelButton = new Sprite_SFButton(); + var bitmap = ImageManager.loadSceneActorSelect('cancel'); + this._cancelButton.setColdBitmap(bitmap); + this._cancelButton.setHotBitmap(bitmap); + this._cancelButton.setClickHandler(this.onCancelButtonClick.bind(this)); + this.addChild(this._cancelButton); + this._cancelButton.deactivate(); + this._cancelButton.move(30, 12); + + this._homeButton = new Sprite_SFButton(); + bitmap = ImageManager.loadSceneActorSelect('home'); + this._homeButton.setColdBitmap(bitmap); + this._homeButton.setHotBitmap(bitmap); + this._homeButton.setClickHandler(this.onHomeButtonClick.bind(this)); + this.addChild(this._homeButton); + this._homeButton.deactivate(); + this._homeButton.move(108, 12); + } + + Scene_ActorSelect.prototype.onCancelButtonClick = function () { + this.popScene(); + } + + Scene_ActorSelect.prototype.onHomeButtonClick = function () { + SceneManager.goto(Scene_Map); + } + + Scene_ActorSelect.prototype.update = function () { + Scene_MenuBase.prototype.update.call(this); + } +})(); \ No newline at end of file diff --git a/js/plugins/SF_SceneEquip.js b/js/plugins/SF_SceneEquip.js new file mode 100644 index 0000000..9a79e7e --- /dev/null +++ b/js/plugins/SF_SceneEquip.js @@ -0,0 +1,211 @@ +//============================================================================= +// SaltedFish Plugins - Scene Equip +// SF_SceneEquip.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_SceneEquip = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc Scene Equip + * @author SaltedFish + * + * @help + * + * This plugin does not provide plugin commands. + */ +//============================================================================= + +(function () { + var SF_SceneEquip = {}; + SF_Plugins.SF_SceneEquip = SF_SceneEquip; + SF_SceneEquip.version = 1.0; + + //============================================================================= + // Window_BackGround + //============================================================================= + + function Window_BackGround() { + this.initialize.apply(this, arguments); + } + + Window_BackGround.prototype = Object.create(Window_Base.prototype); + Window_BackGround.prototype.constructor = Window_BackGround; + + Window_BackGround.prototype.initialize = function () { + Window_Base.prototype.initialize.call(this, 380, 90, 440, 370); + }; + + //============================================================================= + // Window_EquipStatus + //============================================================================= + + SF_SceneEquip.ActorStatus = { + "hp": "血量", + "mp": "魔力", + "tp": "怒气", + "mhp": "血量上限", + "mmp": "魔法上限", + "atk": "攻击力", + "def": "防御力", + "mat": "魔法攻击力", + "mdf": "魔法防御力", + "agi": "敏捷", + "luk": "幸运", + "hit": "命中率", + "eva": "回避率", + "cri": "会心率", + "cev": "会心回避率", + "mev": "魔法回避率", + "mrf": "魔法反射率", + "cnt": "反击率", + "hrg": "生命自动回复率", + "mrg": "魔法自动回复率", + "trg": "TP自动回复率", + "tgr": "受到攻击机率", + "grd": "防御有效率", + "rec": "回复效果", + "pha": "药品有效率", + "mcr": "魔法消耗率", + "tcr": "TP消耗率", + "pdr": "物理伤害率", + "mdr": "魔法伤害率", + "fdr": "地形伤害率", + "exr": "经验值率", + }; + + function Window_EquipStatus() { + this.initialize.apply(this, arguments); + } + + Window_EquipStatus.prototype = Object.create(Window_ScrollHelp.prototype); + Window_EquipStatus.prototype.constructor = Window_EquipStatus; + + Window_EquipStatus.prototype.initialize = function () { + Window_ScrollHelp.prototype.initialize.call(this, 220, 170, 130, 250); + this._actor = null; + this._tempActor = null; + this.refresh(); + }; + + Window_EquipStatus.prototype.setActor = function (actor) { + if (this._actor !== actor) { + this._actor = actor; + this.refresh(); + } + }; + + Window_EquipStatus.prototype.standardFontSize = function () { + return 18; + } + + Window_EquipStatus.prototype.lineHeight = function () { + return this.standardFontSize() + 8; + } + + Window_EquipStatus.prototype.measureContentHeight = function () { + return this.fittingHeight(this.numVisibleRows()); + } + + Window_EquipStatus.prototype.measureContentWidth = function () { + var max_w = 0; + var h = this.measureContentHeight(); + for (var key in SF_SceneEquip.ActorStatus) { + var w = this.drawItem(key, h + 10); + if (w > max_w) { + max_w = w; + } + } + return max_w + } + + Window_EquipStatus.prototype.numVisibleRows = function () { + return 28; + }; + + Window_EquipStatus.prototype.drawContent = function () { + var y = 0; + for (var key in SF_SceneEquip.ActorStatus) { + this.drawItem(key, y); + y += this.lineHeight(); + } + } + + Window_EquipStatus.prototype.drawRightArrow = function (x, y) { + this.changeTextColor(this.systemColor()); + return this.drawTextEx('\u2192', x, y); + }; + + Window_EquipStatus.prototype.drawItem = function (key, y) { + var text = SF_SceneEquip.ActorStatus[key]; + var x = 0; + this.changeTextColor(this.systemColor()); + x += this.drawTextEx(text + ': ', x, y); + if (this._actor) { + this.resetTextColor(); + x += this.drawTextEx(this._actor[key], x, y) + 10; + x += this.drawRightArrow(x, y) + 10; + } + if (this._tempActor) { + var newValue = this._tempActor[key]; + var diffvalue = newValue - this._actor[key]; + this.changeTextColor(this.paramchangeTextColor(diffvalue)); + x += this.drawTextEx(newValue, x, y); + } + return x; + } + + Window_EquipStatus.prototype.isHaveContent = function () { + return true; + } + + Window_EquipStatus.prototype.windowWidth = function () { + return 440; + }; + + Window_EquipStatus.prototype.windowHeight = function () { + return 370; + }; + + //============================================================================= + // Scene_Equip + //============================================================================= + + SF_SceneEquip.Scene_Equip_create = Scene_Equip.prototype.create; + Scene_Equip.prototype.create = function () { + Scene_MenuBase.prototype.create.call(this); + // this.createHelpWindow(); + this.createCommandInBackground(); + this.createBackgroundWindow(); + //this.createCommandWindow(); + this.createStatusWindow(); + //this.createSlotWindow(); + //this.createItemWindow(); + //this.createActorWindow(); + //this.createEquipWindow(); + + } + + Scene_Equip.prototype.createCommandInBackground = function () { + this._commandBackground = new Sprite(SF_Plugins.SF_SceneMenu.commandBitmap); + this._commandBackground.x = 0; + this._commandBackground.y = 0; + this.addChild(this._commandBackground); + } + + // 380,90 440,370 + Scene_Equip.prototype.createBackgroundWindow = function () { + this._backgroundWindow = new Window_BackGround(); + this.addChild(this._backgroundWindow); + } + + Scene_Equip.prototype.createStatusWindow = function () { + this._statusWindow = new Window_EquipStatus(); + this._backgroundWindow.addChild(this._statusWindow); + }; + + +})(); \ No newline at end of file diff --git a/js/plugins/SF_SceneMenu.js b/js/plugins/SF_SceneMenu.js new file mode 100644 index 0000000..80fda4e --- /dev/null +++ b/js/plugins/SF_SceneMenu.js @@ -0,0 +1,199 @@ +//============================================================================= +// Salted Fish Plugins - Scene Menu +// SF_SceneMenu.js +//============================================================================= + +var Imported = Imported || {}; +Imported.SF_SceneMenu = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc Scene Menu + * @author SaltedFish + * + * @help + * + * This plugin does not provide plugin commands. + */ +//============================================================================= + +(function () { + var SF_SceneMenu = {}; + SF_Plugins.SF_SceneMenu = SF_SceneMenu; + SF_SceneMenu.version = 1.0; + + + SF_SceneMenu.dialogContents = ['文本文本文本文本文本']; + + //============================================================================= + // Sprite Dialog + //============================================================================= + + function Sprite_Dialog() { + this.initialize.apply(this, arguments); + } + + Sprite_Dialog.prototype = Object.create(Sprite.prototype); + Sprite_Dialog.prototype.constructor = Sprite_Dialog; + + Sprite_Dialog.prototype.initialize = function () { + Sprite.prototype.initialize.call(this); + this._backgroundSprite = new Sprite(ImageManager.loadSceneMenu('dialog_background')); + this._textSprite = new Sprite(); + this._textSprite.bitmap = new Bitmap(300, 180); + this._textSprite.move(10, 10); + this._textSprite.bitmap.fontSize = 24; + this._textSprite.bitmap.textColor = '#ffffff'; + this.addChild(this._backgroundSprite); + this.addChild(this._textSprite); + + this._tmpWindow = new Window_Base(0, 0, this._textSprite.width, this._textSprite.height); + this._tmpWindow.rotation = 0; + this._tmpWindow.contents = this._textSprite.bitmap; + this._tmpWindow.opacity = 0; + this._needFadeIn = false; + this._needMoveIn = false; + } + + Sprite_Dialog.prototype.setText = function (text) { + this._tmpWindow.contents.clear(); + this._tmpWindow.drawTextEx(text, 0, 0); + this._textSprite.bitmap.blt(this._tmpWindow.contents, 0, 0, this._textSprite.width, this._textSprite.height, 0, 0); + } + + Sprite_Dialog.prototype.update = function () { + Sprite.prototype.update.call(this); + } + + //============================================================================= + // Scene Menu + //============================================================================= + + Scene_Menu.prototype.initialize = function () { + Scene_Base.prototype.initialize.call(this); + this.button_name = {// button name: [x, y] + 'title': [897, 278], + 'actor': [438, 175], + 'formation': [645, 94], + 'save': [868, 94], + "quest": [756, 278], + 'options': [746, 33], + 'achivement': [645, 278], + 'help': [814, 33], + 'cancel': [678, 463], + 'database': [438, 348], + }; + } + + Scene_Menu.prototype.create = function () { + Scene_Base.prototype.create.call(this); + this.createWindowLayer(); + + this.createBackSprite(); + this.createRotateContainer(); + + this.createDialog(); + this.createCommandButton(); + + } + + Scene_Menu.prototype.createRotateContainer = function () { + this._rotateContainer = new Sprite(); + this.addChild(this._rotateContainer); + } + + Scene_Menu.prototype.createBackSprite = function () { + this._backSprite = new Sprite(ImageManager.loadSceneMenu('background')); + this.addChild(this._backSprite); + } + + Scene_Menu.prototype.createDialog = function () { + this._dialogSprite = new Sprite_Dialog(); + this._rotateContainer.addChild(this._dialogSprite); + this._dialogSprite.move(37, 167); + this._dialogSprite.setText( + SF_SceneMenu.dialogContents[ + Math.floor(Math.random() * SF_SceneMenu.dialogContents.length) + ] + ); + } + + Scene_Menu.prototype.createCommandButton = function () { + for (var key in this.button_name) { + var button = new Sprite_SFButton(); + this._rotateContainer.addChild(button); + + button.move(this.button_name[key][0], this.button_name[key][1]); + button.setHotBitmap(ImageManager.loadSceneMenu(key + '_hot')); + button.setColdBitmap(ImageManager.loadSceneMenu(key + '_cold')); + button.setClickHandler(this['on_' + key + "_button"].bind(this)); + button.deactivate(); + button.refresh(); + this['_' + key + '_buttonSprite'] = button; + } + } + + Scene_Menu.prototype.start = function () { + Scene_MenuBase.prototype.start.call(this); + for (var key in this.button_name) { + this['_' + key + '_buttonSprite'].activate(); + } + this._backSprite.move(Graphics.boxWidth - this._backSprite.bitmap.width, (Graphics.boxHeight - this._backSprite.bitmap.height) / 2); + + this.pivot.x = Graphics.boxWidth / 2; + this.pivot.y = Graphics.boxHeight / 2; + this.x = Graphics.boxWidth / 2; + this.y = Graphics.boxHeight / 2; + this.rotation = -0.03; + } + + Scene_Menu.prototype.update = function () { + Scene_MenuBase.prototype.update.call(this); + } + + Scene_Menu.prototype.on_title_button = function () { + this.fadeOutAll(); + SceneManager.goto(Scene_Title); + } + + Scene_Menu.prototype.on_actor_button = function () { + SceneManager.push(Scene_Actor); + } + + Scene_Menu.prototype.on_formation_button = function () { + SceneManager.push(Scene_Formation); + } + + Scene_Menu.prototype.on_save_button = function () { + SceneManager.push(Scene_Save); + } + + Scene_Menu.prototype.on_quest_button = function () { + SceneManager.push(Scene_Quest); + } + + Scene_Menu.prototype.on_options_button = function () { + SceneManager.push(Scene_Options); + } + + Scene_Menu.prototype.on_achivement_button = function () { + SceneManager.push(Scene_Achievement); + + } + + Scene_Menu.prototype.on_help_button = function () { + SceneManager.push(Scene_Help); + } + + Scene_Menu.prototype.on_cancel_button = function () { + this.popScene(); + } + + Scene_Menu.prototype.on_database_button = function () { + SceneManager.push(Scene_Database); + } + + +})(); \ No newline at end of file diff --git a/js/plugins/SF_SceneTitle.js b/js/plugins/SF_SceneTitle.js new file mode 100644 index 0000000..bd80384 --- /dev/null +++ b/js/plugins/SF_SceneTitle.js @@ -0,0 +1,148 @@ +//============================================================================= +// SaltedFish Plugins - Scene Title +// SF_SceneTitle.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_SceneTitle = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc Scene Title + * @author SaltedFish + * + * @help + * + * This plugin does not provide plugin commands. + * + * overwrite: + * Scene_Title + */ +//============================================================================= + + +(function () { + var SF_SceneTitle = {}; + SF_Plugins.SF_SceneTitle = SF_SceneTitle; + + SF_SceneTitle.version = 1.0; + + + + //============================================================================= + // Scene_Title + //============================================================================= + + Scene_Title.prototype.initialize = function () { + Scene_Base.prototype.initialize.call(this); + this.button_name = { + "start": [195, 400], + "load": [405, 400], + "exit": [605, 400], + "cg": [285, 452], + "music": [495, 452], + "qq_group": [756, 490], + }; + } + + SF_SceneTitle.Scene_Title_create = Scene_Title.prototype.create; + Scene_Title.prototype.create = function () { + Scene_Base.prototype.create.call(this); + this.createBackground(); + this.createWindowLayer(); + this.createGameTitle(); + this.createTitleButton(); + } + + Scene_Title.prototype.createBackground = function () { + this._backgroundSprite = new Sprite(ImageManager.loadSceneTitle("back_ground")); + this.addChild(this._backgroundSprite); + this._backgroundSprite.move(0, 0); + } + + Scene_Title.prototype.createGameTitle = function () { + this._titleSprite = new Sprite(ImageManager.loadSceneTitle("game_title")); + this.addChild(this._titleSprite); + this._titleSprite.move(280, 122); + } + + Scene_Title.prototype.createTitleButton = function () { + + for (var key in this.button_name) { + var x = this.button_name[key][0]; + var y = this.button_name[key][1]; + var button = new Sprite_SFButton(); + button.setColdBitmap(ImageManager.loadSceneTitle(key + "_cold")); + button.setHotBitmap(ImageManager.loadSceneTitle(key + "_hot")); + button.setClickHandler(this["on_" + key + "_button"].bind(this)); + button.deactivate(); + button.move(x, y); + this["_" + key + "_buttonSprite"] = button; + this.addChild(button); + } + } + + + Scene_Title.prototype.on_start_button = function () { + this._start_buttonSprite.releasePointer(); + DataManager.setupNewGame(); + this.fadeOutAll(); + SceneManager.goto(Scene_Map); + } + + Scene_Title.prototype.on_load_button = function () { + this._load_buttonSprite.releasePointer(); + SceneManager.push(Scene_Load); + } + + Scene_Title.prototype.on_exit_button = function () { + this._exit_buttonSprite.releasePointer(); + SceneManager.exit(); + window.close(); + } + + Scene_Title.prototype.on_cg_button = function () { + this._cg_buttonSprite.releasePointer(); + SceneManager.push(Scene_CG); + } + + Scene_Title.prototype.on_music_button = function () { + this._music_buttonSprite.releasePointer(); + SceneManager.push(Scene_Music); + } + + Scene_Title.prototype.on_qq_group_button = function () { + this._qq_group_buttonSprite.releasePointer(); + window.open("https://qm.qq.com/cgi-bin/qm/qr?k=4eiJfzkMBKVqv3ufNyOUjL_gbAC_7rcn&jump_from=webapi", "_blank"); + } + + Scene_Title.prototype.start = function () { + Scene_Base.prototype.start.call(this); + SceneManager.clearStack(); + this.playTitleMusic(); + this.startFadeIn(this.fadeSpeed(), false); + for (var key in this.button_name) { + this["_" + key + "_buttonSprite"].activate(); + this["_" + key + "_buttonSprite"].refresh(); + } + if (!DataManager.isAnySavefileExists()) { + this._load_buttonSprite.deactivate(); + } + this._cg_buttonSprite.deactivate(); + this._music_buttonSprite.deactivate(); + + } + + Scene_Title.prototype.update = function () { + Scene_Base.prototype.update.call(this); + + }; + + Scene_Title.prototype.isBusy = function () { + return Scene_Base.prototype.isBusy.call(this); + }; + +})(); \ No newline at end of file diff --git a/js/plugins/SF_Scenes.js b/js/plugins/SF_Scenes.js new file mode 100644 index 0000000..bd3add8 --- /dev/null +++ b/js/plugins/SF_Scenes.js @@ -0,0 +1,33 @@ +//============================================================================= +// Salted Fish Plugins - Scenes +// SF_Scenes.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_Scenes = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc scenes lib for salted fish plugins + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_Scenes = {}; + SF_Plugins.SF_Scenes = SF_Scenes; + + SF_Scenes.version = 1.0; + + //============================================================================= + // Scene_Base + //============================================================================= + + SF_Scenes.Scene_Base_terminate = Scene_Base.prototype.terminate; + Scene_Base.prototype.terminate = function () { + SF_Scenes.Scene_Base_terminate.call(this); + TouchInput.removeUsers(); + } +})(); \ No newline at end of file diff --git a/js/plugins/SF_SkillUpdate.js b/js/plugins/SF_SkillUpdate.js new file mode 100644 index 0000000..80592aa --- /dev/null +++ b/js/plugins/SF_SkillUpdate.js @@ -0,0 +1,87 @@ +//============================================================================= +// SaltedFish Plugins - Skill Update +// SF_SkillUpdate.js +// License: MIT +//============================================================================= + +var Imported = Imported || {}; +Imported.SF_SkillUpdate = true; + +var SF_Plugins = SF_Plugins || {}; +SF_Plugins.SF_SkillUpdate = SF_Plugins.SF_SkillUpdate || {}; +SF_Plugins.SF_SkillUpdate.version = 1.0; + +//============================================================================= +/*: +* @plugindesc v1.0 Allows you to auto update skills. +* @author SaltedFish +* +* @help +* ============================================================================ +* Introduction +* ============================================================================ +* +* When learning a high-priority skill with the same ID, the skill will be +* automatically forgotten +* +* ============================================================================ +* Skill Notes +* ============================================================================ +* +* You can set the skill to auto update by adding the following to the skill's +* notebox: +* +* +* ID: The skill ID +* priority: The skill priority. High-priority skills override low-priority +* skills +* +*/ +//============================================================================= + +//============================================================================= +// DataManager +//============================================================================= + +SF_Plugins.SF_SkillUpdate.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function () { + if (!SF_Plugins.SF_SkillUpdate.DataManager_isDatabaseLoaded.call(this)) return false; + if (!this.SF_SkillUpdate_isDatabaseLoaded($dataSkills)) return false; + return true; +} + +DataManager.SF_SkillUpdate_isDatabaseLoaded = function (group) { + var note = //i; + for (var i = 1; i < group.length; i++) { + var obj = group[i]; + var notedata = obj.note.split(/[\r\n]+/); + obj.SF_Skill_ID = 0; + obj.SF_Skill_priority = 0; + for (var j = 0; j < notedata.length; j++) { + var line = notedata[j]; + if (line.match(note)) { + obj.SF_Skill_ID = parseInt(RegExp.$1); + obj.SF_Skill_priority = parseInt(RegExp.$2); + } + } + } + return true; +} + +//============================================================================= +// Game_Actor +//============================================================================= + +SF_Plugins.SF_SkillUpdate.Game_Actor_learnSkill = Game_Actor.prototype.learnSkill; +Game_Actor.prototype.learnSkill = function (skillId) { + SF_Plugins.SF_SkillUpdate.Game_Actor_learnSkill.call(this, skillId); + var skill = $dataSkills[skillId]; + if (skill.SF_Skill_ID > 0 && skill.SF_Skill_priority > 0) { + var needForgetSkills = this.skills().filter(function (obj) { + return obj.SF_Skill_ID === skill.SF_Skill_ID && obj.SF_Skill_priority < skill.SF_Skill_priority; + }); + for (var i = 0; i < needForgetSkills.length; i++) { + this.forgetSkill(needForgetSkills[i].id); + } + } +} diff --git a/js/plugins/SF_SkipLoadError.js b/js/plugins/SF_SkipLoadError.js new file mode 100644 index 0000000..9da16c0 --- /dev/null +++ b/js/plugins/SF_SkipLoadError.js @@ -0,0 +1,238 @@ +//============================================================================= +// SaltedFish Plugins - Skip Load Error +// SF_SkipLoadError.js +//============================================================================= + +"use strict"; +var Imported = Imported || {}; +Imported.SF_SkipLoadError = true; + +var SF_Plugins = SF_Plugins || {}; + +//============================================================================= +/*: + * @plugindesc try to skip load errors + * @author SaltedFish + * + * @help + * just put it on the top of plugins list. + * + */ +//============================================================================= + + +(function () { + var SF_SkipLoadError = {}; + SF_Plugins.SF_SkipLoadError = SF_SkipLoadError; + + SF_SkipLoadError.version = 1.0; + + SF_SkipLoadError.PluginManager_checkErrors = PluginManager.checkErrors; + PluginManager.checkErrors = function () { + var url = this._errorUrls.shift(); + if (url) { + alert('Failed to load: ' + url); + } + } + + SF_SkipLoadError.ImageManager_isReady = ImageManager.isReady; + ImageManager.isReady = function () { + for (var key in this.cache._inner) { + var bitmap = this.cache._inner[key].item; + if (bitmap.isError()) { + alert('Failed to load: ' + bitmap.url); + bitmap = ImageManager.loadEmptyBitmap(); + this.cache.setItem(key, bitmap); + } + if (!bitmap.isReady()) { + return false; + } + } + return true; + }; + + SF_SkipLoadError.AudioManager_checkWebAudioError = AudioManager.checkWebAudioError; + AudioManager.checkWebAudioError = function (webAudio) { + if (webAudio && webAudio.isError()) { + alert('Failed to load: ' + webAudio.url); + webAudio.initialize(""); + } + }; + + SF_SkipLoadError.FileLoadErrorList = []; + SF_SkipLoadError.FileLoadingList = []; + + SF_SkipLoadError.ResourceHandler_createLoader = ResourceHandler.createLoader; + ResourceHandler.createLoader = function (url, retryMethod, resignMethod, retryInterval) { + retryInterval = retryInterval || this._defaultRetryInterval; + var reloaders = this._reloaders; + var retryCount = 0; + if (!(url in SF_SkipLoadError.FileLoadingList)) SF_SkipLoadError.FileLoadingList.push(url); + return function () { + if (retryCount < retryInterval.length) { + setTimeout(retryMethod, retryInterval[retryCount]); + retryCount++; + } else { + if (resignMethod) { + resignMethod(); + } + if (url) { + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + Graphics.printLoadingError(url); + } + } + }; + }; + + SF_SkipLoadError.Graphics_printLoadingError = Graphics.printLoadingError; + Graphics.printLoadingError = function (url) { + url = decodeURIComponent(url); + console.warn(url); + if (this._errorPrinter && !this._errorShowed && SF_SkipLoadError.FileLoadErrorList.indexOf(url) === -1) { + SceneManager.stop(); + if (this._errorPrinter.innerHTML !== "") { + tempht = this._errorPrinter.innerHTML.match(/(.*)<\/font>/i)[1] + "
"; + this._errorPrinter.innerHTML = '' + '文件加载失败,请上报问题附带截图:' + '
' + + '' + tempht + 'Failed to load: ' + url + '
'; + } else { + this._errorPrinter.innerHTML = this._makeErrorHtml('文件加载失败,请上报问题附带截图:', 'Failed to load: ' + url); + } + var button = document.createElement('button'); + SF_SkipLoadError.FileLoadErrorList.push(url); + button.innerHTML = '继续'; + button.style.fontSize = '24px'; + button.style.color = '#ffffff'; + button.style.backgroundColor = '#000000'; + button.onmousedown = button.ontouchstart = function (event) { + Graphics.eraseLoadingError(); + SceneManager.resume(); + event.stopPropagation(); + }; + this._errorPrinter.appendChild(button); + this._loadingCount = -Infinity; + return; + } + + }; + + SF_SkipLoadError.ResourceHandler_retry = ResourceHandler.retry; + ResourceHandler.retry = function () { + if (this._reloaders.length > 0) { + Graphics.eraseLoadingError(); + SceneManager.resume(); + this._reloaders.length = 0; + } + }; + + SF_SkipLoadError.Bitmap_onError = Bitmap.prototype._onError; + Bitmap.prototype._onError = function () { + this._image.removeEventListener('load', this._loadListener); + this._image.removeEventListener('error', this._errorListener); + this._loadListener(); + }; + + SF_SkipLoadError.Graphics_paintUpperCanvas = Graphics._paintUpperCanvas; + Graphics._paintUpperCanvas = function () { + this._clearUpperCanvas(); + if (this._loadingImage) { + var context = this._upperCanvas.getContext('2d'); + var dx = (this._width - this._loadingImage.width) / 2; + var dy = (this._height - this._loadingImage.height) / 2; + var alpha = ((this._loadingCount - 20) / 30).clamp(0, 1); + context.save(); + context.globalAlpha = alpha; + context.drawImage(this._loadingImage, dx, dy); + context.restore(); + } + }; + + SF_SkipLoadError.WebAudio_onXhrLoad = WebAudio.prototype._onXhrLoad; + WebAudio.prototype._onXhrLoad = function (xhr) { + var url = this._url || xhr.responseURL; + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + return SF_SkipLoadError.WebAudio_onXhrLoad.call(this, xhr); + }; + + SF_SkipLoadError.Graphics_playVideo = Graphics.playVideo; + Graphics.playVideo = function (src) { + this._videoLoader = ResourceHandler.createLoader(src, this._playVideo.bind(this, src), this._onVideoError.bind(this)); + this._playVideo(src); + }; + + SF_SkipLoadError.Graphics_onVideoLoad = Graphics._onVideoLoad; + Graphics._onVideoLoad = function () { + var url = this._video.src; + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + return SF_SkipLoadError.Graphics_onVideoLoad.call(this); + }; + + SF_SkipLoadError.Graphics_onVideoError = Graphics._onVideoError; + Graphics._onVideoError = function () { + var url = this._video.src; + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + return SF_SkipLoadError.Graphics_onVideoError.call(this); + }; + + SF_SkipLoadError.Bitmap_onLoad = Bitmap.prototype._onLoad; + Bitmap.prototype._onLoad = function () { + var url = this._url; + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + return SF_SkipLoadError.Bitmap_onLoad.call(this); + }; + + SF_SkipLoadError.DataManager_loadDataFile = DataManager.loadDataFile; + DataManager.loadDataFile = function (name, src) { + var xhr = new XMLHttpRequest(); + var url = 'data/' + src; + xhr.open('GET', url); + xhr.overrideMimeType('application/json'); + xhr.onload = function () { + + if (xhr.status < 400) { + window[name] = JSON.parse(xhr.responseText); + DataManager.onLoad(window[name]); + } + + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + if (xhr.status == 404) Graphics.printLoadingError(url); + }; + xhr.onerror = this._mapLoader || function () { + DataManager._errorUrl = DataManager._errorUrl || url; + }; + window[name] = null; + xhr.send(); + }; + + SF_SkipLoadError.WebAudio_load = WebAudio.prototype._load; + WebAudio.prototype._load = function (url) { + if (WebAudio._context) { + var xhr = new XMLHttpRequest(); + if (Decrypter.hasEncryptedAudio) url = Decrypter.extToEncryptExt(url); + xhr.open('GET', url); + xhr.responseType = 'arraybuffer'; + xhr.onload = function () { + if (xhr.status < 400) { + this._onXhrLoad(xhr); + } + var index = SF_SkipLoadError.FileLoadingList.indexOf(url); + if (index >= 0) SF_SkipLoadError.FileLoadingList.splice(index, 1); + if (xhr.status == 404) Graphics.printLoadingError(url); + }.bind(this); + xhr.onerror = this._loader || function () { this._hasError = true; }.bind(this); + xhr.send(); + } + }; + + + SF_SkipLoadError.Scene_Base_isReady = Scene_Base.prototype.isReady; + Scene_Base.prototype.isReady = function () { + return SF_SkipLoadError.FileLoadingList.length === 0 && SF_SkipLoadError.Scene_Base_isReady.call(this); + }; + +})() \ No newline at end of file diff --git a/js/plugins/SF_Sprites.js b/js/plugins/SF_Sprites.js new file mode 100644 index 0000000..584136e --- /dev/null +++ b/js/plugins/SF_Sprites.js @@ -0,0 +1,246 @@ +//============================================================================= +// Saletd Fish Plugins - Sprites +// SF_Sprites.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_Sprites = true; + +var SF_Plugins = SF_Plugins || {}; +//============================================================================= +/*: + * @plugindesc sprite base for salted fish plugins + * @author Salted Fish + * + * @help + * ============================================================================ + * Requirements + * ============================================================================ + * + * This plugin requires the following plugins: + * SF_Core + */ +//============================================================================= + +(function () { + var SF_Sprites = {}; + SF_Plugins.Sprites = SF_Sprites; + + SF_Sprites.version = 1.0; + + + //============================================================================= + // Sprite_SFBase + //============================================================================= + + function Sprite_SFBase() { + this.initialize.apply(this, arguments); + } + + SF_Sprites.Sprite_SFBase = Sprite_SFBase; + window.Sprite_SFBase = Sprite_SFBase; + + Sprite_SFBase.prototype = Object.create(Sprite.prototype); + Sprite_SFBase.prototype.constructor = Sprite_SFBase; + + Sprite_SFBase.prototype.initialize = function () { + Sprite.prototype.initialize.apply(this, arguments); + this._active = true; + } + + Sprite_SFBase.prototype.activate = function () { + this._active = true; + } + + Sprite_SFBase.prototype.deactivate = function () { + this._active = false; + } + + Sprite_SFBase.prototype.isActive = function () { + return this._active; + } + + Sprite_SFBase.prototype.canUpdate = function () { + return this.isActive() && this.visible && this.worldVisible; + } + + //============================================================================= + // Sprite_ButtonBase + //============================================================================= + + function Sprite_ButtonBase() { + this.initialize.apply(this, arguments); + } + + SF_Sprites.Sprite_ButtonBase = Sprite_ButtonBase; + window.Sprite_ButtonBase = Sprite_ButtonBase; + + Sprite_ButtonBase.prototype = Object.create(Sprite_SFBase.prototype); + Sprite_ButtonBase.prototype.constructor = Sprite_ButtonBase; + + Sprite_ButtonBase.prototype.initialize = function () { + Sprite_SFBase.prototype.initialize.apply(this, arguments); + this._state = 'pointer-out';// pointer-over pointer-out pointer-down + } + + Sprite_ButtonBase.prototype.onPointerOver = function () { + // override + } + + Sprite_ButtonBase.prototype.onPointerMove = function () { + // override + } + + Sprite_ButtonBase.prototype.onPointerEnter = function () { + // override + } + + Sprite_ButtonBase.prototype.onPointerLeave = function () { + // override + } + + Sprite_ButtonBase.prototype.onPointerDown = function () { + // override + } + + Sprite_ButtonBase.prototype.onPointerUp = function () { + // override + } + + Sprite_ButtonBase.prototype.onClick = function () { + // override + } + + Sprite_ButtonBase.prototype.releasePointer = function () { + Sprite_SFBase.prototype.releasePointer.call(this); + this.setState('pointer-out'); + } + + Sprite_ButtonBase.prototype.update = function () { + if (this.canUpdate()) { + Sprite_SFBase.prototype.update.call(this); + if (this._state !== 'pointer-out') { + this.onPointerOver(); + } + this.updatePointerEvent(); + } + } + + Sprite_ButtonBase.prototype.updatePointerEvent = function () { + var pointer = this.getPointer(); + if (pointer) { + var events = pointer.getEvents(); + var inFrame = this.containsPoint(new Point(pointer.x, pointer.y)); + if (inFrame) { + pointer.setUser(this); + if (this._state === 'pointer-out') { + this.setState('pointer-over'); + } + for (var i = 0; i < events.length; i++) { + var event = events[i]; + if (event === 'pointer-down') { + this.setState('pointer-down'); + } else if (event === 'pointer-up') { + this.setState('pointer-over'); + } else if (event === 'pointer-move') { + this.onPointerMove(); + } else if (event === 'pointer-cancel') { + this.setState('pointer-out'); + } + } + } else { + pointer.removeUser(this); + this.setState('pointer-out'); + } + } else if (this._state !== 'pointer-out') { + this.setState('pointer-out'); + } + } + + Sprite_ButtonBase.prototype.setState = function (state) { + if (this._state !== state) { + if (state === 'pointer-out') { + if (this._state === 'pointer-down') { + this._state = 'pointer-over'; + this.onPointerUp(); + } + if (this._state === 'pointer-over') { + this._state = 'pointer-out'; + this.onPointerLeave(); + } + } else if (state === 'pointer-down') { + if (this._state === 'pointer-out') { + this._state = 'pointer-over'; + this.onPointerEnter(); + } + if (this._state === 'pointer-over') { + this._state = 'pointer-down'; + this.onPointerDown(); + } + } else if (state === 'pointer-over') { + if (this._state === 'pointer-out') { + this._state = 'pointer-over'; + this.onPointerEnter(); + } + if (this._state === 'pointer-down') { + this._state = 'pointer-over'; + this.onPointerUp(); + this.onClick(); + } + } else { + SF_Plugins.SF_Core.Utils.error('Sprite_ButtonBase.setState: unknown state: ' + state); + } + } + } + + //============================================================================= + // Sprite_SFButton + //============================================================================= + + function Sprite_SFButton() { + this.initialize.apply(this, arguments); + } + + SF_Sprites.Sprite_SFButton = Sprite_SFButton; + window.Sprite_SFButton = Sprite_SFButton; + + Sprite_SFButton.prototype = Object.create(Sprite_ButtonBase.prototype); + Sprite_SFButton.prototype.constructor = Sprite_SFButton; + + Sprite_SFButton.prototype.initialize = function () { + Sprite_ButtonBase.prototype.initialize.apply(this, arguments); + this._coldBitmap = null; + this._hotBitmap = null; + this._clickHandler = null; + } + + Sprite_SFButton.prototype.setColdBitmap = function (bitmap) { + this._coldBitmap = bitmap; + } + + Sprite_SFButton.prototype.setHotBitmap = function (bitmap) { + this._hotBitmap = bitmap; + } + + Sprite_SFButton.prototype.setClickHandler = function (handler) { + this._clickHandler = handler; + } + + Sprite_SFButton.prototype.onClick = function () { + if (this._clickHandler) { + this._clickHandler(); + } + } + + Sprite_SFButton.prototype.refresh = function () { + this.bitmap = this._coldBitmap; + } + + Sprite_SFButton.prototype.onPointerEnter = function () { + this.bitmap = this._hotBitmap; + } + + Sprite_SFButton.prototype.onPointerLeave = function () { + this.bitmap = this._coldBitmap; + } +})(); \ No newline at end of file diff --git a/js/plugins/SF_TestPlugins.js b/js/plugins/SF_TestPlugins.js new file mode 100644 index 0000000..12153c1 --- /dev/null +++ b/js/plugins/SF_TestPlugins.js @@ -0,0 +1,20 @@ +//============================================================================= +/*: + * @plugindesc Test Plugins + * @author SaltedFish + * + * @param test1 + * @type actor + */ +var Imported = Imported || {}; +Imported.SF_TestPlugins = true; + +var SF_Plugins = SF_Plugins || {}; +SF_Plugins.SF_TestPlugins = SF_Plugins.SF_TestPlugins || {}; +SF_Plugins.SF_TestPlugins.version = 1.0; + +sc = Scene_Title.prototype.create; +Scene_Title.prototype.create = function () { + sc.call(this); + +} diff --git a/js/plugins/SF_WindowScrollCommand.js b/js/plugins/SF_WindowScrollCommand.js new file mode 100644 index 0000000..69aa0f5 --- /dev/null +++ b/js/plugins/SF_WindowScrollCommand.js @@ -0,0 +1,817 @@ +//============================================================================= +// SaltedFish Plugins - Window Scroll Command +// SF_WindowScrollCommand.js +// License: MIT +//============================================================================= + +var Imported = Imported || {}; +Imported.SF_WindowScrollCommand = true; + +var SF_Plugins = SF_Plugins || {}; +SF_Plugins.SF_WindowScrollCommand = SF_Plugins.SF_WindowScrollCommand || {}; +SF_Plugins.SF_WindowScrollCommand.version = 1.0; + +//============================================================================= +/*: + * @plugindesc v1.0 Allows you to scroll text in selected commands. + * @author SaltedFish + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * This plugin allows you to scroll text in selected commands. + * As a dependent library. + */ +//============================================================================= + +//============================================================================= +// Window for Arrow +//============================================================================= +SF_Plugins.SF_WindowScrollCommand.Window_initialize = Window.prototype.initialize; +Window.prototype.initialize = function () { + SF_Plugins.SF_WindowScrollCommand.Window_initialize.call(this); + + this.leftArrowVisible = false; + this.rightArrowVisible = false; +} + +SF_Plugins.SF_WindowScrollCommand.Window__createAllParts = Window.prototype._createAllParts; +Window.prototype._createAllParts = function () { + SF_Plugins.SF_WindowScrollCommand.Window__createAllParts.call(this); + + var index = this.getChildIndex(this._downArrowSprite); + this._leftArrowSprite = new Sprite(); + this._rightArrowSprite = new Sprite(); + this.addChildAt(this._leftArrowSprite, index); + this.addChildAt(this._rightArrowSprite, index); +} + +SF_Plugins.SF_WindowScrollCommand.Window__refreshArrows = Window.prototype._refreshArrows; +Window.prototype._refreshArrows = function () { + SF_Plugins.SF_WindowScrollCommand.Window__refreshArrows.call(this); + var w = this._width; + var h = this._height; + var p = 24; + var q = p / 2; + var sx = 96 + p; + var sy = 0 + p; + + this._leftArrowSprite.bitmap = this._windowskin; + this._leftArrowSprite.anchor.x = 0.5; + this._leftArrowSprite.anchor.y = 0.5; + this._leftArrowSprite.setFrame(sx, sy + q, q, p); + this._leftArrowSprite.move(q, h / 2); + + this._rightArrowSprite.bitmap = this._windowskin; + this._rightArrowSprite.anchor.x = 0.5; + this._rightArrowSprite.anchor.y = 0.5; + this._rightArrowSprite.setFrame(sx + p + q, sy + q, q, p); + this._rightArrowSprite.move(w - q, h / 2); +} + +SF_Plugins.SF_WindowScrollCommand.Window__updateArrows = Window.prototype._updateArrows; +Window.prototype._updateArrows = function () { + SF_Plugins.SF_WindowScrollCommand.Window__updateArrows.call(this); + this._leftArrowSprite.visible = this.isOpen() && this.leftArrowVisible; + this._rightArrowSprite.visible = this.isOpen() && this.rightArrowVisible; +} + +//============================================================================= + +Window_Command.prototype.commandExt = function (index) { + return this._list[index].ext; +} + +Window_Base.prototype.isMouseInsideFrame = function () { + var x = this.canvasToLocalX(TouchInput._mouseOverX); + var y = this.canvasToLocalY(TouchInput._mouseOverY); + return x >= 0 && y >= 0 && x < this.width && y < this.height; +} + +SF_Plugins.SF_WindowScrollCommand.Window_Selectable_processWheel = Window_Selectable.prototype.processWheel; +Window_Selectable.prototype.processWheel = function () { + if (this.isOpenAndActive() && this.isMouseInsideFrame()) { + SF_Plugins.SF_WindowScrollCommand.Window_Selectable_processWheel.call(this); + } +}; + +Window_Base.prototype.measureTextHeight = function (text) { + var textState = { index: 0 }; + textState.text = this.convertEscapeCharacters(text); + this.resetFontSettings(); + return this.calcTextHeight(textState, true); +} + +Window_Base.prototype.isOpenAndActive = function () { + return this.isOpen() && this.active; +}; + +Window_Base.prototype.isTouchedInsideFrame = function () { + var x = this.canvasToLocalX(TouchInput.x); + var y = this.canvasToLocalY(TouchInput.y); + return x >= 0 && y >= 0 && x < this.width && y < this.height; +}; + +/** + * + * Each Command Bitmap need Scroll + * ------------------------------------------------------------------------------------- + * Empty Bitmap(this.contentsWidth()) | Text Bitmap | Empty Bitmap(this.contentsWidth()) + * ------------------------------------------------------------------------------------- + */ +function Window_ScrollCommand() { + this.initialize.apply(this, arguments); +} + +Window_ScrollCommand.prototype = Object.create(Window_Command.prototype); +Window_ScrollCommand.prototype.constructor = Window_ScrollCommand; + +Window_ScrollCommand.prototype.initialize = function () { + this._need_scroll = false; + this._commands_bitmap = []; + this._commands_bitmap_offset = []; + this._commands_need_scroll = []; + this._offset_threshold = []; + Window_Command.prototype.initialize.call(this, 0, 0); +} + +// return width of text +Window_ScrollCommand.prototype.drawItemContent = function (index) { + this.resetTextColor(); + this.changePaintOpacity(this.isCommandEnabled(index)); + return this.drawTextEx(this.commandName(index), this.contentsWidth(), 0); +} + +Window_ScrollCommand.prototype.drawItem = function (index) { + if (this._commands_bitmap[index] == undefined) { + this._commands_bitmap[index] = new Bitmap(this.itemTextRectWidth(index), this.lineHeight()); + var bitmap = this._commands_bitmap[index]; + this._commands_bitmap_offset[index] = 0; + + var tmp_content = this.contents; + this.contents = bitmap; + var text_width = this.drawItemContent(index); + if (text_width > bitmap.width) { + this._commands_need_scroll[index] = true; + this._commands_bitmap_offset[index] = this.contentsWidth(); + } else { + this._commands_need_scroll[index] = false; + this._commands_bitmap_offset[index] = this.contentsWidth(); + } + this.contents.clear(); + this.contents.resize(text_width + this.contentsWidth() * 2, this.lineHeight()); + this._offset_threshold[index] = text_width + this.contentsWidth(); + this.drawItemContent(index); + this.contents = tmp_content; + } + + var rect = this.itemRectForText(index); + var offset_x = this._commands_bitmap_offset[index]; + this.contents.blt( + this._commands_bitmap[index], + offset_x, 0, this.itemTextRectWidth(index), rect.height, + rect.x, rect.y); +}; + +Window_ScrollCommand.prototype.itemTextRectWidth = function (index) { + return this.itemRectForText(index).width; +} + +Window_ScrollCommand.prototype.select = function (index) { + //var old_index = this.index(); + Window_Command.prototype.select.call(this, index); + if (index >= 0 && index < this.maxItems()) { + this._need_scroll = this._commands_need_scroll[index]; + //this._commands_bitmap_offset[old_index] = this.contentsWidth(); + //this.redrawItem(old_index); + } +} + +Window_ScrollCommand.prototype.updateSelected = function () { + var index = this.index(); + if (index >= 0 && index < this.maxItems()) { + this._commands_bitmap_offset[index] += 1; + if (this._commands_bitmap_offset[index] > this._offset_threshold[index]) { + this._commands_bitmap_offset[index] = 0; + } + this.redrawItem(index); + } +}; + +Window_ScrollCommand.prototype.update = function () { + Window_Command.prototype.update.call(this); + if (this.isOpenAndActive() && this._need_scroll) { + this.updateSelected(); + } +} + +Window_ScrollCommand.prototype.refresh = function () { + this._commands_bitmap = []; + this._commands_bitmap_offset = []; + this._commands_need_scroll = []; + this._offset_threshold = []; + this._need_scroll = false; + Window_Command.prototype.refresh.call(this); +}; + +(function () { + //============================================================================= + // Window_ScrollHelp + //============================================================================= + function Window_ScrollHelp() { + this.initialize.apply(this, arguments); + } + window.Window_ScrollHelp = Window_ScrollHelp; + + Window_ScrollHelp.prototype = Object.create(Window_Base.prototype); + Window_ScrollHelp.prototype.constructor = Window_ScrollHelp; + Window_ScrollHelp.prototype.initialize = function (x, y, width, height) { + Window_Base.prototype.initialize.call(this, x, y, width, height); + this._text = ''; + this._offset_Y = 0; + this._wheel_multiplier = 1; + this._need_scroll = false; + this.refresh(); + } + Window_ScrollHelp.prototype.clear = function () { + this._text = ''; + this._wheel_multiplier = 1; + this._touching = false; + this._need_scroll_X = false; + this._need_scroll_Y = false; + this.refresh(); + } + Window_ScrollHelp.prototype.setText = function (text) { + this._text = text; + this.refresh(); + } + Window_ScrollHelp.prototype.measureContentHeight = function () { + return this.measureTextHeight(this._text); + } + Window_ScrollHelp.prototype.measureContentWidth = function () { + return this.contentsWidth(); + } + Window_ScrollHelp.prototype.drawContent = function () { + this.drawTextEx(this._text, 1, 0); + } + Window_ScrollHelp.prototype.isHaveContent = function () { + return !!this._text; + } + Window_ScrollHelp.prototype.refresh = function () { + this.contents.clear(); + this._offset_Y = 0; + this._offset_X = 0; + this._need_scroll_X = false; + this._need_scroll_Y = false; + if (this.isHaveContent()) { + this._bitmap_height = this.measureContentHeight(); + this._bitmap_width = this.measureContentWidth(); + this.contents.resize(this._bitmap_width, this._bitmap_height); + this._need_scroll_Y = this._bitmap_height > this.contentsHeight(); + this._need_scroll_X = this._bitmap_width > this.contentsWidth(); + this.drawContent(); + this._windowContentsSprite.setFrame(0, 0, this.contentsWidth(), this.contentsHeight()); + this._windowContentsSprite._refresh(); + } + } + Window_ScrollHelp.prototype.update = function () { + Window_Base.prototype.update.call(this); + if (this.isOpenAndActive() && (this._need_scroll_X || this._need_scroll_Y)) { + this.updateScroll(); + } + } + Window_ScrollHelp.prototype.updateScroll = function () { + this.updateWheel(); + this.updateTouch(); + } + Window_ScrollHelp.prototype.setWheelMultiplier = function (multiplier) { + this._wheel_multiplier = multiplier; + } + Window_ScrollHelp.prototype.setOriginY = function (y) { + this.origin.y = y; + if (this.origin.y < 0) { + this.origin.y = 0; + } else if (this.origin.y > this._bitmap_height - this.contentsHeight()) { + this.origin.y = this._bitmap_height - this.contentsHeight(); + } + } + Window_ScrollHelp.prototype.setOriginX = function (x) { + this.origin.x = x; + if (this.origin.x < 0) { + this.origin.x = 0; + } else if (this.origin.x > this._bitmap_width - this.contentsWidth()) { + this.origin.x = this._bitmap_width - this.contentsWidth(); + } + } + Window_ScrollHelp.prototype.updateWheel = function () { + if (Input.isPressed('shift')) { // wheel Y as scroll X + if (this._need_scroll_X && Math.abs(TouchInput.wheelY) > 0) { + if (this.isMouseInsideFrame()) { + var offset = this._wheel_multiplier * TouchInput.wheelY; + this.setOriginX(this.origin.x + offset); + + } + } + } else { + if (this._need_scroll_Y && Math.abs(TouchInput.wheelY) > 0) { + if (this.isMouseInsideFrame()) { + var offset = this._wheel_multiplier * TouchInput.wheelY; + this.setOriginY(this.origin.y + offset); + + } + } + } + + if (this._need_scroll_X && Math.abs(TouchInput.wheelX) > 0) { + if (this.isMouseInsideFrame()) { + var offset = this._wheel_multiplier * TouchInput.wheelX; + this.setOriginX(this.origin.x + offset); + } + } + } + + Window_ScrollHelp.prototype.updateTouch = function () { + var inFrame = this.isTouchedInsideFrame(); + if (TouchInput.isTriggered() && inFrame) { + this._touching = true; + this._last_touch_y = TouchInput.y; + this._last_touch_x = TouchInput.x; + } else if (TouchInput.isReleased()) { + this._touching = false; + } + if (this._touching) { + if (this._need_scroll_Y) { + var offset = this._last_touch_y - TouchInput.y; + this._last_touch_y = TouchInput.y; + this.setOriginY(this.origin.y + offset); + } + if (this._need_scroll_X) { + var offset = this._last_touch_x - TouchInput.x; + this._last_touch_x = TouchInput.x; + this.setOriginX(this.origin.x + offset); + } + } + } +})(); + + +//============================================================================= +// Window_SFSelectable +//============================================================================= + +function Window_SFSelectable() { + this.initialize.apply(this, arguments); +} + +Window_SFSelectable.prototype = Object.create(Window_Base.prototype); +Window_SFSelectable.prototype.constructor = Window_SFSelectable; + +Window_SFSelectable.prototype.initialize = function (x, y, width, height) { + Window_Base.prototype.initialize.call(this, x, y, width, height); + this._index = -1; + this._handlers = {}; + + this._helpWindow = null; + + this._cursorFixed = false; + this._cursorAll = false; + + this._touching = false; + this._last_touch_x = 0; + this._last_touch_y = 0; + + this._need_scroll_X = false; + this._need_scroll_Y = false; + this._wheel_multiplier = 1; + + this._scrollX = 0; + this._scrollY = 0; + this._scrolled = false; + + this._origin_x = 0; + this._origin_y = 0; + this._origin_width = 0; + this._origin_height = 0; + + this.deactivate(); +} + +Window_SFSelectable.prototype.index = function () { + return this._index; +} + +Window_SFSelectable.prototype.cursorFixed = function () { + return this._cursorFixed; +}; + +Window_SFSelectable.prototype.setCursorFixed = function (cursorFixed) { + this._cursorFixed = cursorFixed; +}; + +Window_SFSelectable.prototype.cursorAll = function () { + return this._cursorAll; +}; + +Window_SFSelectable.prototype.setCursorAll = function (cursorAll) { + this._cursorAll = cursorAll; +}; + +Window_SFSelectable.prototype.maxCols = function () { + return 1; +} + +Window_SFSelectable.prototype.maxItems = function () { + return 0; +} + +Window_SFSelectable.prototype.maxRows = function () { + return Math.max(Math.ceil(this.maxItems() / this.maxCols()), 1); +} + +Window_SFSelectable.prototype.spacing = function () { + return 12; +} + +Window_SFSelectable.prototype.itemWidth = function () { + throw new Error('This method needs to be overwritten.'); +} + +Window_SFSelectable.prototype.itemHeight = function () { + throw new Error('This method needs to be overwritten.'); +} + +Window_SFSelectable.prototype.activate = function () { + Window_Base.prototype.activate.call(this); + this.reselect(); +} + +Window_SFSelectable.prototype.deactivate = function () { + Window_Base.prototype.deactivate.call(this); + this.reselect(); +} + +Window_SFSelectable.prototype.select = function (index) { + this._index = index; + this.ensureCursorVisible(); + this.updateCursor(); + this.callUpdateHelp(); +} + +Window_SFSelectable.prototype.deselect = function () { + this.select(-1); +} + +Window_SFSelectable.prototype.reselect = function () { + this.select(this._index); +} + +Window_SFSelectable.prototype.row = function () { + return Math.floor(this.index() / this.maxCols()); +} + +Window_SFSelectable.prototype.topRow = function () { + return Math.max(0, this._scrollY); +} + +Window_SFSelectable.prototype.setTopRow = function (row) { + var scrollY = row.clamp(0, this.maxTopRow()); + if (this._scrollY !== scrollY) { + this._scrollY = scrollY; + this.refresh(); + this.updateCursor(); + } +} + +Window_SFSelectable.prototype.bottomRow = function () { + return Math.max(0, this.topRow() + this.maxPageRows() - 1); +} + +Window_SFSelectable.prototype.setBottomRow = function (row) { + this.setTopRow(row - (this.maxPageRows() - 1)); +} + +Window_SFSelectable.prototype.maxPageRows = function () { + var pageHeight = this.height - this.padding * 2; + return Math.min(Math.floor(pageHeight / this.itemHeight()) || 1, this.maxRows()); +} + +Window_SFSelectable.prototype.maxTopRow = function () { + return Math.max(0, this.maxRows() - this.maxPageRows()); +} + +Window_SFSelectable.prototype.col = function () { + return this.index() % this.maxCols(); +} + +Window_SFSelectable.prototype.leftCol = function () { + return Math.max(0, this._scrollX); +} + +Window_SFSelectable.prototype.setLeftCol = function (col) { + var scrollX = col.clamp(0, this.maxLeftCol()); + if (this._scrollX !== scrollX) { + this._scrollX = scrollX; + this.refresh(); + this.updateCursor(); + } +} + +Window_SFSelectable.prototype.rightCol = function () { + return Math.max(0, this.leftCol() + this.maxPageCols() - 1); +} + +Window_SFSelectable.prototype.setRightCol = function (col) { + this.setLeftCol(col - (this.maxPageCols() - 1)); +} + +Window_SFSelectable.prototype.maxPageCols = function () { + var pageWidth = this.width - this.padding * 2; + return Math.min(Math.floor(pageWidth / this.itemWidth()) || 1, this.maxCols()); +} + +Window_SFSelectable.prototype.maxLeftCol = function () { + return Math.max(0, this.maxCols() - this.maxPageCols()); +} + +Window_SFSelectable.prototype.resetScroll = function () { + this.setTopRow(0); + this.setLeftCol(0); +} + +Window_SFSelectable.prototype.maxPageItems = function () { + return this.maxPageRows() * this.maxPageCols(); +} + +Window_SFSelectable.prototype.topIndex = function () { + return this.topRow() * this.maxCols() + this.leftCol(); +} + +Window_SFSelectable.prototype.itemRect = function (index) { + var rect = new Rectangle(); + var maxCols = this.maxCols(); + rect.width = this.itemWidth(); + rect.height = this.itemHeight(); + rect.x = (index % maxCols - this.leftCol()) * (rect.width + this.spacing()); + rect.y = Math.floor(index / maxCols - this.topRow()) * rect.height; + return rect; +} + +Window_SFSelectable.prototype.itemRectForText = function (index) { + var rect = this.itemRect(index); + rect.x += this.textPadding(); + rect.width -= this.textPadding() * 2; + return rect; +} + +Window_SFSelectable.prototype.setHelpWindow = function (helpWindow) { + this._helpWindow = helpWindow; + this.callUpdateHelp(); +}; + +Window_SFSelectable.prototype.showHelpWindow = function () { + if (this._helpWindow) { + this._helpWindow.show(); + } +}; + +Window_SFSelectable.prototype.hideHelpWindow = function () { + if (this._helpWindow) { + this._helpWindow.hide(); + } +}; + +Window_SFSelectable.prototype.setHandler = function (symbol, method) { + this._handlers[symbol] = method; +}; + +Window_SFSelectable.prototype.isHandled = function (symbol) { + return !!this._handlers[symbol]; +}; + +Window_SFSelectable.prototype.callHandler = function (symbol) { + if (this.isHandled(symbol)) { + this._handlers[symbol](); + } +}; + +Window_SFSelectable.prototype.isOpenAndActive = function () { + return this.isOpen() && this.active; +}; + +Window_SFSelectable.prototype.isCursorMovable = function () { + return (this.isOpenAndActive() && !this._cursorFixed && + !this._cursorAll && this.maxItems() > 0); +}; + +Window_SFSelectable.prototype.cursorUp = function (wrap) { + var index = this.index(); + var maxItems = this.maxItems(); + var maxCols = this.maxCols(); + if (index >= maxCols || (wrap && maxCols === 1)) { + this.select((index - maxCols + maxItems) % maxItems); + } +}; + +Window_SFSelectable.prototype.cursorDown = function (wrap) { + var index = this.index(); + var maxItems = this.maxItems(); + var maxCols = this.maxCols(); + if (index < maxItems - maxCols || (wrap && maxCols === 1)) { + this.select((index + maxCols) % maxItems); + } +}; + +Window_Selectable.prototype.isHorizontal = function () { + return this.maxPageRows() === 1; +}; + +Window_SFSelectable.prototype.cursorRight = function (wrap) { + var index = this.index(); + var maxItems = this.maxItems(); + var maxCols = this.maxCols(); + if (maxCols >= 2 && (index < maxItems - 1 || (wrap && this.isHorizontal()))) { + this.select((index + 1) % maxItems); + } +}; + +Window_SFSelectable.prototype.cursorLeft = function (wrap) { + var index = this.index(); + var maxItems = this.maxItems(); + var maxCols = this.maxCols(); + if (maxCols >= 2 && (index > 0 || (wrap && this.isHorizontal()))) { + this.select((index - 1 + maxItems) % maxItems); + } +}; + +Window_Selectable.prototype.scrollUp = function () { + if (this.topRow() > 0) { + this.setTopRow(this.topRow() - 1); + } +}; + +Window_Selectable.prototype.scrollDown = function () { + if (this.topRow() + 1 < this.maxRows()) { + this.setTopRow(this.topRow() + 1); + } +}; + +Window_Selectable.prototype.scrollLeft = function () { + if (this.leftCol() > 0) { + this.setLeftCol(this.leftCol() - 1); + } +} + +Window_SFSelectable.prototype.scrollRight = function () { + if (this.rightCol() < this.maxCols()) { + this.setRightCol(this.rightCol() + 1); + } +} + +Window_SFSelectable.prototype.update = function () { + Window_Base.prototype.update.call(this); + this.updateArrows(); + this.processCursorMove(); + this.processHandling(); + this.processWheel(); + this.processTouch(); +} + +Window_SFSelectable.prototype.updateArrows = function () { + var topRow = this.topRow(); + var maxTopRow = this.maxTopRow(); + this.downArrowVisible = maxTopRow > 0 && topRow < maxTopRow; + this.upArrowVisible = topRow > 0; + + var leftCol = this.leftCol(); + var maxLeftCol = this.maxLeftCol(); + this.rightArrowVisible = maxLeftCol > 0 && leftCol < maxLeftCol; + this.leftArrowVisible = leftCol > 0; +} + +Window_SFSelectable.prototype.processCursorMove = function () { + if (this.isCursorMovable()) { + var lastIndex = this.index(); + if (Input.isRepeated('down')) { + this.cursorDown(Input.isTriggered('down')); + } + if (Input.isRepeated('up')) { + this.cursorUp(Input.isTriggered('up')); + } + if (Input.isRepeated('right')) { + this.cursorRight(Input.isTriggered('right')); + } + if (Input.isRepeated('left')) { + this.cursorLeft(Input.isTriggered('left')); + } + if (this.index() !== lastIndex) { + SoundManager.playCursor(); + } + } +} + +Window_SFSelectable.prototype.processHandling = function () { + if (this.isOpenAndActive()) { + if (this.isOkEnabled() && this.isOkTriggered()) { + this.processOk(); + } else if (this.isCancelEnabled() && this.isCancelTriggered()) { + this.processCancel(); + } + } +}; + +Window_SFSelectable.prototype.processWheel = function () { + var inFrame = this.isMouseInsideFrame(); + if (inFrame && this.isOpen()) { + var threshold = 20; + var hasShift = Input.isPressed('shift'); + if (TouchInput.wheelY >= threshold) { + if (!hasShift) { + this.scrollDown(); + } else { + this.scrollRight(); + } + } + if (TouchInput.wheelY <= threshold) { + if (!hasShift) { + this.scrollUp(); + } else { + this.scrollLeft(); + } + } + } +} + +Window_SFSelectable.prototype.processTouch = function () { + var inFrame = this.isTouchedInsideFrame(); + if (this.isOpenAndActive()) { + if (TouchInput.isTriggered() && inFrame) { + this._touching = true; + this._last_touch_x = TouchInput.x; + this._last_touch_y = TouchInput.y; + this._scrolled = false; + this.onTouch(true); + } else if (TouchInput.isReleased() || !inFrame) { + this._touching = false; + this.onTouch(false); + } else if (TouchInput.isCancelled()) { + if (this.isCancelEnabled()) { + this.processCancel(); + } + } + if (this._touching) { + var x = TouchInput.x; + var y = TouchInput.y; + var offset_x = x - this._last_touch_x; + var offset_y = y - this._last_touch_y; + var iw = this.itemWidth(); + var ih = this.itemHeight(); + if (offset_x >= iw) { + this._last_touch_x = this._last_touch_x + iw; + this._scrolled = true; + this.scrollRight(); + } + if (offset_x <= -iw) { + this._last_touch_x = this._last_touch_x - iw; + this._scrolled = true; + this.scrollLeft(); + } + if (offset_y >= ih) { + this._last_touch_y = this._last_touch_y + ih; + this._scrolled = true; + this.scrollDown(); + } + if (offset_y <= -ih) { + this._last_touch_y = this._last_touch_y - ih; + this._scrolled = true; + this.scrollUp(); + } + } + } +} + + +Window_SFSelectable.prototype.hitTest = function (x, y) { + var x2 = this.canvasToLocalX(x); + var y2 = this.canvasToLocalY(y); + if (this.isContentArea(x2, y2)) { + var cx = x2 - this.padding; + var cy = y2 - this.padding; + var topIndex = this.topIndex(); + var maxPageItems = this.maxPageItems(); + var maxItems = this.maxItems(); + for (var i = 0; i < maxPageItems; i++) { + var index = topIndex + i; + if (index < maxItems) { + var rect = this.itemRect(index); + var right = rect.x + rect.width; + var bottom = rect.y + rect.height; + if (cx >= rect.x && cy >= rect.y && cx < right && cy < bottom) { + return index; + } + } + } + } + return -1; +} diff --git a/js/plugins/SF_Windows.js b/js/plugins/SF_Windows.js new file mode 100644 index 0000000..62f08e3 --- /dev/null +++ b/js/plugins/SF_Windows.js @@ -0,0 +1,469 @@ +//============================================================================= +// Salted Fish Plugins - Windows +// SF_Windows.js +//============================================================================= +"use strict"; +var Imported = Imported || {}; +Imported.SF_Windows = true; + +var SF_Plugins = SF_Plugins || {}; +//============================================================================= +/*: + * @plugindesc window base for salted fish plugins + * @author Salted Fish + */ +//============================================================================= + +(function () { + var SF_Windows = {}; + SF_Plugins.Windows = SF_Windows; + + SF_Windows.version = 1.0; + + //============================================================================= + // Window_SFBase + //============================================================================= + + function Window_SFBase() { + this.initialize.apply(this, arguments); + } + + SF_Windows.Window_SFBase = Window_SFBase; + window.Window_SFBase = Window_SFBase; + + Window_SFBase.prototype = Object.create(Window_Base.prototype); + Window_SFBase.prototype.constructor = Window_SFBase; + + Window_SFBase.prototype.initialize = function () { + var x = this.windowX(); + var y = this.windowY(); + var width = this.windowWidth(); + var height = this.windowHeight(); + Window_Base.prototype.initialize.call(this, x, y, width, height); + } + + Window_SFBase.prototype.windowWidth = function () { + return Graphics.boxWidth;// overwrite this + } + + Window_SFBase.prototype.windowHeight = function () { + return Graphics.boxHeight;// overwrite this + } + + Window_SFBase.prototype.windowX = function () { + return 0;// overwrite this + } + + Window_SFBase.prototype.windowY = function () { + return 0;// overwrite this + } + + Window_SFBase.prototype.canUpdate = function () { + return this.active && this.visible && this.worldVisible; + } + + Window_SFBase.prototype.containsPoint = function (point) { + var x = this.canvasToLocalX(point.x); + var y = this.canvasToLocalY(point.y); + return x >= 0 && y >= 0 && x < this.width && y < this.height; + + } + + //============================================================================= + // Window_PagingBase + //============================================================================= + + function Window_PagingBase() { + this.initialize.apply(this, arguments); + } + + SF_Windows.Window_PagingBase = Window_PagingBase; + window.Window_PagingBase = Window_PagingBase; + + Window_PagingBase.prototype = Object.create(Window_SFBase.prototype); + Window_PagingBase.prototype.constructor = Window_PagingBase; + + Window_PagingBase.prototype.initialize = function () { + Window_SFBase.prototype.initialize.call(this); + this._pageIndex = 0; + this._pageMax = 0; + + this._pageUpButton = null; + this._pageDownButton = null; + this._pageIndexText = null; + + this.createPageButtons(); + this.createPageNumber(); + this.setItemList(this.makeItemList()); + + this._state = 'pointer-out';// pointer-out, pointer-over, pointer-down + this._pointerIndex = -1; + } + + Window_PagingBase.prototype.standardPadding = function () { + return 0; + } + + Window_PagingBase.prototype.itemWidth = function () { + // overwrite this + return 0; + } + + Window_PagingBase.prototype.itemHeight = function () { + // overwrite this + return 0; + } + + Window_PagingBase.prototype.maxCols = function () { + // overwrite this + return 1; + } + + Window_PagingBase.prototype.maxRows = function () { + // overwrite this + return 1; + } + + Window_PagingBase.prototype.maxPageItems = function () { + return this.maxCols() * this.maxRows(); + } + + Window_PagingBase.prototype.maxItems = function () { + return this._itemList.length; + } + + Window_PagingBase.prototype.itemPadding = function () { + // overwrite this + return new Point(0, 0); + } + + Window_PagingBase.prototype.itemStartPosition = function () { + // overwrite this + return new Point(0, 0); + } + + Window_PagingBase.prototype.itemPaddingWidth = function () { + return this.itemPadding().x; + } + + Window_PagingBase.prototype.itemPaddingHeight = function () { + return this.itemPadding().y; + } + + Window_PagingBase.prototype.itemRect = function (index) { + var maxPageItems = this.maxPageItems(); + index = index % maxPageItems; + var rect = new Rectangle(); + var maxCols = this.maxCols(); + var itemWidth = this.itemWidth(); + var itemHeight = this.itemHeight(); + var itemPaddingWidth = this.itemPaddingWidth(); + var itemPaddingHeight = this.itemPaddingHeight(); + var startPosition = this.itemStartPosition(); + rect.width = itemWidth; + rect.height = itemHeight; + rect.x = index % maxCols * (itemWidth + itemPaddingWidth) + startPosition.x; + rect.y = Math.floor(index / maxCols) * (itemHeight + itemPaddingHeight) + startPosition.y; + return rect; + } + + Window_PagingBase.prototype.pageUpPosition = function () { + // overwrite this + return new Point(0, 0); + } + + Window_PagingBase.prototype.pageUpBitmap = function () { + // overwrite this + var bitmap = new Bitmap(32, 32); + bitmap.fillAll('white'); + return { "cold": bitmap, "hot": bitmap }; + } + + Window_PagingBase.prototype.pageDownPosition = function () { + // overwrite this + return new Point(0, 0); + } + + Window_PagingBase.prototype.pageDownBitmap = function () { + // overwrite this + var bitmap = new Bitmap(32, 32); + bitmap.fillAll('white'); + return { "cold": bitmap, "hot": bitmap }; + } + + Window_PagingBase.prototype.isShowPageButton = function () { + return true; + } + + Window_PagingBase.prototype.isShowPageNumber = function () { + return true; + } + + Window_PagingBase.prototype.pageNumberPosition = function () { + // overwrite this + return new Point(0, 0); + } + + Window_PagingBase.prototype.pageNumberStyle = function () { + return new PIXI.TextStyle(); + } + + Window_PagingBase.prototype.updatePageNumber = function (text, pageIndex, pageCount) { + // overwrite this + text.text = `${pageIndex + 1}/${pageCount}`; + } + + Window_PagingBase.prototype.createPageButtons = function () { + var bitmaps = null; + var position = null; + + this._pageUpButton = new Sprite_SFButton(); + this._pageUpButton.setClickHandler(this.onPageUpButtonClick.bind(this)); + bitmaps = this.pageUpBitmap(); + this._pageUpButton.setColdBitmap(bitmaps.cold); + this._pageUpButton.setHotBitmap(bitmaps.hot); + position = this.pageUpPosition(); + this._pageUpButton.move(position.x, position.y); + this._pageUpButton.visible = false; + this._pageUpButton.refresh(); + + this._pageDownButton = new Sprite_SFButton(); + this._pageDownButton.setClickHandler(this.onPageDownButtonClick.bind(this)); + bitmaps = this.pageDownBitmap(); + this._pageDownButton.setColdBitmap(bitmaps.cold); + this._pageDownButton.setHotBitmap(bitmaps.hot); + position = this.pageDownPosition(); + this._pageDownButton.move(position.x, position.y); + this._pageDownButton.visible = false; + this._pageDownButton.refresh(); + + this.addChild(this._pageUpButton); + this.addChild(this._pageDownButton); + } + + Window_PagingBase.prototype.createPageNumber = function () { + var style = this.pageNumberStyle(); + var position = this.pageNumberPosition(); + this._pageIndexText = new PIXI.Text('', style); + this._pageIndexText.anchor.set(0.5, 0.5); + this._pageIndexText.position.set(position.x, position.y); + this._pageIndexText.visible = false; + this.addChild(this._pageIndexText); + } + + Window_PagingBase.prototype.makeItemList = function () { + // overwrite this + return []; + } + + Window_PagingBase.prototype.setItemList = function (itemList) { + this._itemList = itemList; + this._pageMax = Math.ceil(this._itemList.length / this.maxPageItems()); + this._pageIndex = 0; + // this.refresh(); + } + + Window_PagingBase.prototype.setPageIndex = function (pageIndex) { + this._pageIndex = pageIndex.clamp(0, this._pageMax); + this.refresh(); + } + + Window_PagingBase.prototype.refresh = function () { + this.refreshItem(); + this.refreshPageNumber(); + this.refreshPageButton(); + this.setStateToItem(-1, 'pointer-out'); + } + + Window_PagingBase.prototype.refreshItem = function () { + this.contents.clear(); + this.drawAllItems(); + } + + Window_PagingBase.prototype.refreshPageNumber = function () { + if (!this.isShowPageNumber()) return; + var text = this._pageIndexText; + var pageIndex = this._pageIndex; + var pageCount = this._pageMax; + this.updatePageNumber(text, pageIndex, pageCount); + } + + Window_PagingBase.prototype.refreshPageButton = function () { + if (!this.isShowPageButton()) return; + var pageIndex = this._pageIndex; + var pageCount = this._pageMax; + var pageUpButton = this._pageUpButton; + var pageDownButton = this._pageDownButton; + pageUpButton.visible = pageIndex > 0; + pageDownButton.visible = pageIndex < pageCount - 1; + + if (!pageUpButton.visible) pageUpButton.releasePointer(); + if (!pageDownButton.visible) pageDownButton.releasePointer(); + } + + Window_PagingBase.prototype.onPageUpButtonClick = function () { + this.setPageIndex(this._pageIndex - 1); + } + + Window_PagingBase.prototype.onPageDownButtonClick = function () { + this.setPageIndex(this._pageIndex + 1); + } + + + Window_PagingBase.prototype.drawAllItems = function () { + var index = this._pageIndex * this.maxPageItems(); + var maxItems = this.maxPageItems(); + for (var i = 0; i < maxItems; i++) { + this.drawItem(index + i); + } + } + + Window_PagingBase.prototype.getItem = function (index) { + return this._itemList[index]; + } + + Window_PagingBase.prototype.drawItem = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.update = function () { + if (this.canUpdate()) { + Window_Base.prototype.update.call(this); + if (this._state !== 'pointer-out') { + this.onItemPointerOver(this._pointerIndex); + } + this.updatePointer(); + } + } + + Window_PagingBase.prototype.updatePointer = function () { + var pointer = this.getPointer(); + if (pointer) { + var x = this.canvasToLocalX(pointer.x); + var y = this.canvasToLocalY(pointer.y); + var maxItems = this.maxPageItems(); + var inFrame = false; + var baseIndex = this._pageIndex * maxItems; + for (var i = 0; i < maxItems; i++) { + var rect = this.itemRect(i); + if (rect.contains(x, y)) { + this.setPointerIndex(i + baseIndex, pointer); + inFrame = true; + break; + } + } + + if (!inFrame) { + this.setPointerIndex(-1, pointer); + pointer.removeUser(); + } else { + pointer.setUser(this); + } + + } + } + + Window_PagingBase.prototype.setPointerIndex = function (index, pointer) { + if (this._pointerIndex !== index) { + this.setStateToItem(index, 'pointer-over'); + } + if (index === -1) { + return; + } + var events = pointer.getEvents(); + for (var i = 0; i < events.length; i++) { + var event = events[i]; + if (event === 'pointer-down') { + this.setStateToItem(index, 'pointer-down'); + } else if (event === 'pointer-up') { + this.setStateToItem(index, 'pointer-over'); + } else if (event === 'pointer-cancel') { + this.setStateToItem(index, 'pointer-out'); + } + } + } + + Window_PagingBase.prototype.setStateToItem = function (index, state) { + if (index !== this._pointerIndex && this._pointerIndex !== -1) { + if (this._state === 'pointer-down') { + this._state = 'pointer-over'; + this.onItemPointerUp(this._pointerIndex); + } + if (this._state === 'pointer-over') { + this._state = 'pointer-out'; + this.onItemPointerLeave(this._pointerIndex); + } + + } + this._pointerIndex = index; + + if (this._pointerIndex === -1 || this._state === state) { + return; + } + + if (state === 'pointer-out') { + if (this._state === 'pointer-down') { + this._state = 'pointer-over'; + this.onItemPointerUp(this._pointerIndex); + } + if (this._state === 'pointer-over') { + this._state = 'pointer-out'; + this.onItemPointerLeave(this._pointerIndex); + } + } else if (state === 'pointer-down') { + if (this._state === 'pointer-out') { + this._state = 'pointer-over'; + this.onItemPointerEnter(this._pointerIndex); + } + if (this._state === 'pointer-over') { + this._state = 'pointer-down'; + this.onItemPointerDown(this._pointerIndex); + } + } else if (state === 'pointer-over') { + if (this._state === 'pointer-out') { + this._state = 'pointer-over'; + this.onItemPointerEnter(this._pointerIndex); + } + if (this._state === 'pointer-down') { + this._state = 'pointer-over'; + this.onItemPointerUp(this._pointerIndex); + this.onItemClick(this._pointerIndex); + } + } + + } + + Window_PagingBase.prototype.onItemPointerDown = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.onItemPointerUp = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.onItemPointerMove = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.onItemPointerOver = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.onItemPointerEnter = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.onItemPointerLeave = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.onItemClick = function (index) { + // overwrite this + } + + Window_PagingBase.prototype.releasePointer = function () { + Window_SFBase.prototype.releasePointer.call(this); + this.setStateToItem(-1, 'pointer-out'); + } + +})(); \ No newline at end of file diff --git a/js/plugins/SimpleMsgSideView.js b/js/plugins/SimpleMsgSideView.js new file mode 100644 index 0000000..73ce58b --- /dev/null +++ b/js/plugins/SimpleMsgSideView.js @@ -0,0 +1,91 @@ +//============================================================================= +// SimpleMsgSideView.js +//============================================================================= + +/*: + * @plugindesc at sideview battle, only display item/skill names. + * @author Sasuke KANNAZUKI + * + * @param displayAttack + * @desc Whether to display normal attack. 1:yes 0:no + * @default 0 + * + * @param position + * @desc Skill name display position. 0:left, 1:center + * @default 1 + * + * @help This plugin does not provide plugin commands. + * + * By not displaying the log and only displaying the skill name, + * the speed of battle will increase slightly. + */ + +/*:ja + * @plugindesc サイドビューバトルで技/アイテムの名前のみ表示します。 + * @author 神無月サスケ + * + * @param displayAttack + * @desc 通常攻撃も表示するか (1:する 0:しない) + * @default 0 + * + * @param position + * @desc 技名を表示する位置 (0:左寄せ, 1:中央) + * @default 1 + * + * @help このプラグインには、プラグインコマンドはありません。 + * + * ログを表示せず、技名のみを表示することで、戦闘のテンポが若干高速になります。 + */ + +(function() { + + var parameters = PluginManager.parameters('SimpleMsgSideView'); + var displayAttack = Number(parameters['displayAttack']) != 0; + var position = Number(parameters['position'] || 1); + + var _Window_BattleLog_addText = Window_BattleLog.prototype.addText; + Window_BattleLog.prototype.addText = function(text) { + if($gameSystem.isSideView()){ + this.refresh(); + this.wait(); + return; // not display battle log + } + _Window_BattleLog_addText.call(this, text); + }; + + // for sideview battle only + Window_BattleLog.prototype.addItemNameText = function(itemName) { + this._lines.push(itemName); + this.refresh(); + this.wait(); + }; + + var _Window_BattleLog_displayAction = + Window_BattleLog.prototype.displayAction; + Window_BattleLog.prototype.displayAction = function(subject, item) { + if($gameSystem.isSideView()){ + if(displayAttack || + !(DataManager.isSkill(item) && item.id == subject.attackSkillId())) { +   this.push('addItemNameText', item.name); // display item/skill name + } else { + this.push('wait'); + } + return; + } + _Window_BattleLog_displayAction.call(this, subject, item); + }; + + // to put skill/item name at center + var _Window_BattleLog_drawLineText = Window_BattleLog.prototype.drawLineText; + Window_BattleLog.prototype.drawLineText = function(index) { + if($gameSystem.isSideView() && position == 1){ + var rect = this.itemRectForText(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + this.drawText(this._lines[index], rect.x, rect.y, + rect.width, 'center'); + return; + } + _Window_BattleLog_drawLineText.call(this, index); + }; + +})(); diff --git a/js/plugins/TitleCommandPosition.js b/js/plugins/TitleCommandPosition.js new file mode 100644 index 0000000..09a7e02 --- /dev/null +++ b/js/plugins/TitleCommandPosition.js @@ -0,0 +1,72 @@ +//============================================================================= +// TitleCommandPosition.js +//============================================================================= + +/*: + * @plugindesc Changes the position of the title command window. + * @author Yoji Ojima + * + * @param Offset X + * @desc The offset value for the x coordinate. + * @default 0 + * + * @param Offset Y + * @desc The offset value for the y coordinate. + * @default 0 + * + * @param Width + * @desc The width of the command window. + * @default 240 + * + * @param Background + * @desc The background type. 0: Normal, 1: Dim, 2: Transparent + * @default 0 + * + * @help This plugin does not provide plugin commands. + */ + +/*:ja + * @plugindesc タイトルコマンドウィンドウの位置を変更します。 + * @author Yoji Ojima + * + * @param Offset X + * @desc X座標のオフセット値です。 + * @default 0 + * + * @param Offset Y + * @desc Y座標のオフセット値です。 + * @default 0 + * + * @param Width + * @desc コマンドウィンドウの幅です。 + * @default 240 + * + * @param Background + * @desc 背景タイプです。0: 通常、1: 暗くする、2: 透明 + * @default 0 + * + * @help このプラグインには、プラグインコマンドはありません。 + */ + +(function() { + + var parameters = PluginManager.parameters('TitleCommandPosition'); + var offsetX = Number(parameters['Offset X'] || 0); + var offsetY = Number(parameters['Offset Y'] || 0); + var width = Number(parameters['Width'] || 240); + var background = Number(parameters['Background'] || 0); + + var _Window_TitleCommand_updatePlacement = + Window_TitleCommand.prototype.updatePlacement; + Window_TitleCommand.prototype.updatePlacement = function() { + _Window_TitleCommand_updatePlacement.call(this); + this.x += offsetX; + this.y += offsetY; + this.setBackgroundType(background); + }; + + Window_TitleCommand.prototype.windowWidth = function() { + return width; + }; + +})(); diff --git a/js/plugins/WeaponSkill.js b/js/plugins/WeaponSkill.js new file mode 100644 index 0000000..ae94ef3 --- /dev/null +++ b/js/plugins/WeaponSkill.js @@ -0,0 +1,83 @@ +//============================================================================= +// WeaponSkill.js +//============================================================================= + +/*: + * @plugindesc Change skill id of attack for each weapon. + * @author Sasuke KANNAZUKI + * + * @help This plugin does not provide plugin commands. + * + * When is written in a weapon's note field, + * skill id # 3 is used for the weapon's attack. + * If nothing is written, default id(=1) is used. + * + * Check Points: + * - When multiple weapons are equipped, the skill id of the weapon + * held in the dominant hand (previously defined) is used. + * - It is most favorable for "skill type" to be "none"(=0), + * otherwise you cannot attack when your skill is blocked. + * + * Usage examples of this plugin: + * - to create all-range weapons + * - to create dual-attack or triple-attack weapons + * - If healing skill is set when actor attacks, you can choose a friend to heal. + * - It is possible to make a weapon that functions similar to a guard command. + */ + +/*:ja + * @plugindesc 武器ごとに通常攻撃のスキルIDを変更します。 + * @author 神無月サスケ + * + * @help このプラグインにはプラグインコマンドはありません。 + * + * 武器の「メモ」欄に、 と書いた場合、 + * 通常攻撃の際、3番のスキルが発動します。 + * ※特に記述がなければ、通常通り1番のスキルが採用されます。 + * + * チェックポイント: + * - 二刀流の場合、利き腕(先に定義された方)に持っているスキルIDが採用されます。 + * - スキルタイプは「なし」にするのが望ましいです。 + * さもなくば、技などを封じられたとき、攻撃が出来なくなります。 + * + * 想定される用途: + * - 全体攻撃可能な武器 + * - 2回攻撃、3回攻撃する武器 + * - 回復魔法をスキルに指定した場合、 + * 「攻撃」を選んだ際、味方の選択が出来、その仲間を回復します + * - 防御コマンドなどと同等になる武器も実現可能です。 + */ + +(function() { + + // + // set skill id for attack. + // + Game_Actor.prototype.attackSkillId = function() { + var normalId = Game_BattlerBase.prototype.attackSkillId.call(this); + if(this.hasNoWeapons()){ + return normalId; + } + var weapon = this.weapons()[0]; // at plural weapon, one's first skill. + var id = weapon.meta.skill_id; + return id ? Number(id) : normalId; + }; + + // + // for command at battle + // + var _Scene_Battle_commandAttack = Scene_Battle.prototype.commandAttack; + Scene_Battle.prototype.commandAttack = function() { + BattleManager.inputtingAction().setAttack(); + // normal attack weapon (or other single attack weapon) + var action = BattleManager.inputtingAction(); + if(action.needsSelection() && action.isForOpponent()){ + _Scene_Battle_commandAttack.call(this); + return; + } + // special skill weapon + this.onSelectAction(); + }; + +})(); + diff --git a/js/plugins/XdRs_MiniMap.js b/js/plugins/XdRs_MiniMap.js new file mode 100644 index 0000000..6573f80 --- /dev/null +++ b/js/plugins/XdRs_MiniMap.js @@ -0,0 +1,813 @@ +//================================================================================================================== +// Mini Map +//================================================================================================================== +/*: + * @plugindesc 实景小地图 。 + * + * @author 芯☆淡茹水 + * + * @help + *--------------------------------------------------------------------------------------------------------------------------------- + * 〓 说明 〓 + * 1,小地图显示对象(角色+事件)所备注的图标,来表示对象在小地图上的位置。 + * 对象(角色+事件)显示的图标序号,在其备注里写 => + * 例:备注 35 号图标 => + * + * 2,事件通过备注以及当前页事件项,来区分事件类型。 + * 具体备注为: + * Npc => + * 敌人 => //事件当前页需要有 战斗项 。 + * 传送点 => //事件当前页需要有 传送项 。 + * 门 => //事件当前页需要有 传送项 。 + * + * 3,事件备注了类型,并且是显示的状态(有行走图并且没有暂时移除),才会在小地图上显示。 + * + * 4,在事件里备注 => ,并且备注了它显示的图标(第一条), + * 可无条件的在小地图中显示这个事件。 + * + * 5,对象的图标,首先读取的是其备注的图标序号,然后才是插件设置项设置的基本图标。 + * 这两项都没有图标的对象,小地图上不显示。 + * + * 6,描绘地图名时的颜色,在地图备注 => + * 未备注的,默认为白色。 + * + * 7,小地图缩放比例,在脚本 244 行左右自行调节,由于本人比较懒,就不写随时更改比例的功能了。 + * + *--------------------------------------------------------------------------------------------------------------------------------- + * 〓 插件命令 〓 + * + * 收起小地图 => RetractMiniMap + * ※例如:用于剧情演出时,小地图遮挡住剧情人物的情况※ + * + *--------------------------------------------------------------------------------------------------------------------------------- + * + * @param key + * @desc 小地图快捷键键值。(例: M键 => 77) + * @default 77 + * + * @param width + * @desc 小地图窗口显示的宽。 + * @default Graphics.width / 3 + * + * @param height + * @desc 小地图窗口显示的高。 + * @default Graphics.height / 3 + * + * @param miniSize + * @desc 迷你按钮的尺寸(宽 && 高) + * @default 24 + * + * @param dpFollower + * @desc 是否将跟随的队员加入到小地图。(是:Y;否:N) + * @default Y + * + * @param dpHide + * @desc 角色接触到小地图时,是否隐藏小地图。(是:Y;否:N) + * @default Y + * + * @param dpDc1 + * @desc 传送点图标动态。(是:Y;否:N) + * @default Y + * + * @param dpDc2 + * @desc 门图标动态。(是:Y;否:N) + * @default Y + * + * @param dpMapName + * @desc 是否显示地图名。(是:Y;否:N) + * @default Y + * + * @param dpPlace + * @desc 是否显示角色坐标。(是:Y;否:N) + * @default Y + * + * @param dpScale + * @desc 是否显示小地图比例。(是:Y;否:N) + * @default Y + * + * @param color1 + * @desc 坐标名(X/Y)文字颜色。(格式:红,绿,蓝) + * @default 200,0,200 + * + * @param color2 + * @desc 坐标数字文字颜色。(格式:红,绿,蓝) + * @default 0,200,0 + * + * @param color3 + * @desc 小地图比例文字颜色。(格式:红,绿,蓝) + * @default 0,255,200 + * + * @param icon1 + * @desc 小地图 传送点 的默认图标序号。 + * @default 320 + * + * @param icon2 + * @desc 小地图 门 的默认图标序号。 + * @default 320 + * + * @param icon3 + * @desc 小地图 NPC 的默认图标序号。 + * @default 321 + * + * @param icon4 + * @desc 小地图 敌人 的默认图标序号。 + * @default 324 + * + * @param icon5 + * @desc 小地图 角色 的默认图标序号。 + * @default 322 + * + * @param icon6 + * @desc 小地图显示时,快捷按钮显示的图标序号。 + * @default 32 + * + * @param icon7 + * @desc 小地图隐藏时,快捷按钮显示的图标序号。 + * @default 48 + * +*/ +//================================================================================================================== +; var XdRsData = XdRsData || {}; +XdRsData.miniMap = {}; +XdRsData.miniMap.parameters = PluginManager.parameters('XdRs_MiniMap'); +//================================================================================================================== +Input.keyMapper[+XdRsData.miniMap.parameters['key']] = 'miniMap'; +//================================================================================================================== +Tilemap.prototype.affixMiniMapSign = function () { + this._miniMapSign = true; +}; +XdRsData.miniMap.TMPupdate = Tilemap.prototype.update; +Tilemap.prototype.update = function () { + !this._miniMapSign && XdRsData.miniMap.TMPupdate.call(this); +}; +XdRsData.miniMap.TMP_updateLayerPositions = Tilemap.prototype._updateLayerPositions; +Tilemap.prototype._updateLayerPositions = function (startX, startY) { + if (this._miniMapSign) this.updateMiniMapPositions(); + else XdRsData.miniMap.TMP_updateLayerPositions.call(this, startX, startY); +}; +Tilemap.prototype.updateMiniMapPositions = function () { + var ox = Math.floor(this.origin.x), oy = Math.floor(this.origin.y); + var x2 = ox.mod(this._layerWidth), y2 = oy.mod(this._layerHeight); + var w1 = ox < this._tileWidth ? this._width - x2 : this._layerWidth - x2; + var h1 = oy < this._tileHeight ? this._height - y2 : this._layerHeight - y2; + var w2 = this._width - w1, h2 = this._height - h1; + for (var i = 0; i < 2; i++) { + var children = !i ? this._lowerLayer.children : this._upperLayer.children; + children[0].move(0, 0, w1, h1); children[0].setFrame(x2, y2, w1, h1); + children[1].move(w1, 0, w2, h1); children[1].setFrame(0, y2, w2, h1); + children[2].move(0, h1, w1, h2); children[2].setFrame(x2, 0, w1, h2); + children[3].move(w1, h1, w2, h2); children[3].setFrame(0, 0, w2, h2); + } +}; +//================================================================================================================== +XdRsData.miniMap.side = function () { + return 8; +}; +XdRsData.miniMap.setupDisplaySize = function () { + try { + this._displayWidth = eval(this.parameters['width']); + this._displayHeight = eval(this.parameters['height']); + } catch (e) { + alert('小地图宽/高参数设置错误,恢复到默认尺寸。'); + this._displayWidth = Graphics.width / 3; + this._displayHeight = Graphics.height / 3; + } + this._displayWidth = Math.max(136, this._displayWidth); + this._displayHeight = Math.max(104, this._displayHeight); +}; +XdRsData.miniMap.displayWidth = function () { + !this._displayWidth && this.setupDisplaySize(); + return this._displayWidth; +}; +XdRsData.miniMap.displayHeight = function () { + !this._displayHeight && this.setupDisplaySize(); + return this._displayHeight; +}; +XdRsData.miniMap.windowWidth = function () { + return this.displayWidth() + this.side() * 2; +}; +XdRsData.miniMap.windowHeight = function () { + return this.displayHeight() + this.side() * 2; +}; +XdRsData.miniMap.realMapWidth = function () { + return $gameMap.width() * $gameMap.tileWidth(); +}; +XdRsData.miniMap.realMapHeight = function () { + return $gameMap.height() * $gameMap.tileHeight(); +}; +XdRsData.miniMap.makeTilemap = function () { + var scale = $gameSystem.miniMapData().scale; + var tilemap = new Tilemap(); + tilemap._margin = 0; + tilemap.width = this.displayWidth() / scale; + tilemap.height = this.displayHeight() / scale; + tilemap.tileWidth = $gameMap.tileWidth(); + tilemap.tileHeight = $gameMap.tileHeight(); + tilemap.scale = new Point(scale, scale); + tilemap.setData($gameMap.width(), $gameMap.height(), $gameMap.data()); + this.loadTileset(tilemap); + tilemap.refresh(); + tilemap.update(); + tilemap.affixMiniMapSign(); + return tilemap; +}; +XdRsData.miniMap.loadTileset = function (tilemap) { + var tileset = $gameMap.tileset(); + if (!tileset) return; + var data = tileset.tilesetNames; + for (var i = 0; i < data.length; i++) { + tilemap.bitmaps[i] = ImageManager.loadTileset(data[i]); + } +}; +XdRsData.miniMap.getDpState = function (sym) { + return this.parameters['dp' + sym] === 'Y'; +}; +XdRsData.miniMap.getColor = function (n) { + var data = this.parameters['color' + n] || '255,255,255'; + return 'rgb(' + data + ')'; +}; +XdRsData.miniMap.getMiniIcon = function (kind) { + return this.parameters['icon' + kind] || 0; +}; +XdRsData.miniMap.isDynamic = function (kind) { + if (![1, 2].contains(kind)) return false; + return this.getDpState('Dc' + kind); +}; +//================================================================================================================== +XdRsData.miniMap.GSinitialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function () { + XdRsData.miniMap.GSinitialize.call(this); + this.initMiniMapData(); +}; +Game_System.prototype.initMiniMapData = function () { + this._miniMapData = {}; + this._miniMapData.scale = 0.2; //缩放比例 ( 0.1 ~ 0.5之间较为合适,大了就失去小地图的意义)。 + this._miniMapData.visible = true; + this._miniMapData.opacity = 195; +}; +Game_System.prototype.miniMapData = function () { + return this._miniMapData; +}; +Game_System.prototype.setMiniMapData = function (sym, val) { + this._miniMapData[sym] = val; +}; +//================================================================================================================== +Game_Actor.prototype.baseMiniIcon = function () { + return XdRsData.miniMap.getMiniIcon(5); +}; +Game_Actor.prototype.miniIcon = function () { + var data = this.actor().note.match(//); + return data ? +RegExp.$1 : this.baseMiniIcon(); +}; +//================================================================================================================== +Game_Character.prototype.miniIcon = function () { + return this._miniIcon || 0; +}; +Game_Character.prototype.isMiniVisible = function () { + return this._characterName !== ''; +}; +//================================================================================================================== +XdRsData.miniMap.GPrefresh = Game_Player.prototype.refresh; +Game_Player.prototype.refresh = function () { + XdRsData.miniMap.GPrefresh.call(this); + this.refreshMiniIcon(); +}; +Game_Player.prototype.refreshMiniIcon = function () { + var actor = $gameParty.leader(); + this._miniIcon = actor ? actor.miniIcon() : 0; +}; +Game_Player.prototype.miniMapMembers = function () { + if (!XdRsData.miniMap.getDpState('Follower')) return [this]; + return this.followers()._data.concat([this]); +}; +//================================================================================================================== +XdRsData.miniMap.GFrefresh = Game_Follower.prototype.refresh; +Game_Follower.prototype.refresh = function () { + XdRsData.miniMap.GFrefresh.call(this); + this.refreshMiniIcon(); +}; +Game_Follower.prototype.refreshMiniIcon = function () { + this._miniIcon = this.actor() ? this.actor().miniIcon() : 0; +}; +//================================================================================================================== +XdRsData.miniMap.GEsetupPage = Game_Event.prototype.setupPage; +Game_Event.prototype.setupPage = function () { + XdRsData.miniMap.GEsetupPage.call(this); + this.setupMiniData(); +}; +Game_Event.prototype.setupMiniData = function () { + var data = [this.isTransfer(), this.isDoor(), this.isNpc(), this.isEnemy()]; + this._miniKind = data.indexOf(true) + 1; + this._miniIcon = this.notesMiniIcon() || this.baseMiniIcon(); +}; +Game_Event.prototype.baseMiniIcon = function () { + return XdRsData.miniMap.getMiniIcon(this._miniKind); +}; +Game_Event.prototype.notesMiniIcon = function () { + var notes = this.event().note.match(//i); + return notes ? +RegExp.$1 : null; +}; +Game_Event.prototype.miniKind = function () { + return this._miniKind || 0; +}; +Game_Event.prototype.isEnemy = function () { + return this.isMiniVisible() && this.isMiniNotes(//i) && this.hasCode(301); +}; +Game_Event.prototype.isNpc = function () { + return this.isMiniVisible() && this.isMiniNotes(//i); +}; +Game_Event.prototype.isTransfer = function () { + return this.isMiniNotes(//i) && this.hasCode(201); +}; +Game_Event.prototype.isDoor = function () { + return this.isMiniVisible() && this.isMiniNotes(//i) && this.hasCode(201); +}; +Game_Event.prototype.isMiniNotes = function (reg) { + return reg.test(this.event().note); +}; +Game_Event.prototype.isMiniVisible = function () { + if (this.isTransfer() || this.isMiniNotes(//i)) return true; + return Game_Character.prototype.isMiniVisible.call(this); +}; +Game_Event.prototype.hasCode = function (code) { + return this.page() && this.page().list.some(function (l) { + return l.code === code; + }); +}; +//================================================================================================================== +XdRsData.miniMap.GIpluginCommand = Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function (command, args) { + XdRsData.miniMap.GIpluginCommand.call(this, command, args); + command === 'RetractMiniMap' && $gameSystem.setMiniMapData('visible', false); +}; +//================================================================================================================== +function Window_MiniMap() { + this.initialize.apply(this, arguments); +} +Window_MiniMap.prototype = Object.create(Window_Base.prototype); +Window_MiniMap.prototype.constructor = Window_MiniMap; +Window_MiniMap.prototype.initialize = function () { + this._isVisible = $gameSystem.miniMapData().visible; + this.callSuper(); + this.createSprite(); + this.drawInfo(); +}; +Window_MiniMap.prototype.callSuper = function () { + var width = XdRsData.miniMap.windowWidth(); + var height = XdRsData.miniMap.windowHeight(); + var x = Graphics.width - width; + var y = this.standardY(height); + Window_Base.prototype.initialize.call(this, x, y, width, height); + this.opacity = $gameSystem.miniMapData().opacity; + this.contents.paintOpacity = this.opacity; +}; +Window_MiniMap.prototype.standardPadding = function () { + return XdRsData.miniMap.side(); +}; +Window_MiniMap.prototype.standardY = function (height) { + return this._isVisible ? 0 : -height; +}; +Window_MiniMap.prototype.lineHeight = function () { + return 20; +}; +Window_MiniMap.prototype.standardFontSize = function () { + return 16; +}; +Window_MiniMap.prototype.scaleText = function () { + var scale = $gameSystem.miniMapData().scale; + return '' + (1 / scale).toFixed(1) + ' : ' + 1; +}; +Window_MiniMap.prototype.mapNameColor = function () { + var data = $dataMap.note.match(//); + data = data ? RegExp.$1 : '255,255,255'; + return 'rgb(' + data + ')'; +}; +Window_MiniMap.prototype.createSprite = function () { + this._sprite = new Sprite_MiniMap(); + this.addChildToBack(this._sprite); +}; +Window_MiniMap.prototype.drawInfo = function () { + ['MapName', 'Place', 'Scale'].forEach(function (sym) { + XdRsData.miniMap.getDpState(sym) && this['draw' + sym](); + }, this); +}; +Window_MiniMap.prototype.drawMapName = function () { + // if (!$gameMap.displayName()) return; + // var w = this.contents.width / 2; + // this.changeTextColor(this.mapNameColor()); + // this.drawText($gameMap.displayName(), 4, 4, w); +}; +Window_MiniMap.prototype.drawPlace = function () { + this._dataX = $gamePlayer.x; + this._dataY = $gamePlayer.y; + var w = Math.min(this.contents.width / 3, 90); + var x1 = this.contents.width - w, x2 = x1 + w / 2; + this.contents.clearRect(x1 - 4, 0, w, this.lineHeight() + 8); + this.changeTextColor(XdRsData.miniMap.getColor(1)); + var cw = this.contents.measureTextWidth('X:') + 4; + this.drawText('X:', x1, 4, cw); + this.drawText('Y:', x2, 4, cw); + this.changeTextColor(XdRsData.miniMap.getColor(2)); + this.drawText('' + this._dataX, x1 + cw, 4, 30); + this.drawText('' + this._dataY, x2 + cw, 4, 30); +}; +Window_MiniMap.prototype.drawScale = function () { + var w = this.contents.width / 4; + var y = this.contents.height - this.lineHeight(); + var x = this.contents.width - w; + this.contents.clearRect(x, y, w, this.lineHeight()); + this.changeTextColor(XdRsData.miniMap.getColor(3)); + this.drawText(this.scaleText(), x, y, w, 'center'); +}; +Window_MiniMap.prototype.isPlayerTouched = function () { + var lx = $gamePlayer.screenX() - 40; + var rx = $gamePlayer.screenX() + 40; + var ty = $gamePlayer.screenY() - 80; + var by = $gamePlayer.screenY() + 20; + if (rx < this.x || by < this.y) return false; + if (lx > (this.x + this.width)) return false; + if (ty > (this.y + this.height)) return false; + return true; +}; +Window_MiniMap.prototype.isPlayerMoved = function () { + return this._dataX !== $gamePlayer.x || + this._dataY !== $gamePlayer.y; +}; +Window_MiniMap.prototype.isVisibleChanged = function () { + return this._isVisible !== $gameSystem.miniMapData().visible; +}; +Window_MiniMap.prototype.isMoveOver = function () { + if (this._isVisible) return this.y >= 0; + return this.y <= -this.height; +}; +Window_MiniMap.prototype.moveRange = function () { + var n = this.height / 10; + if (this._isVisible) n = Math.min(n, -this.y); + return this._isVisible ? n : -n; +}; +Window_MiniMap.prototype.update = function () { + Window_Base.prototype.update.call(this); + this.updateMove(); + this.updateVisible(); + this.updatePlayerMove(); + this.updatePlayerTouch(); +}; +Window_MiniMap.prototype.updateMove = function () { + if (!this._moving) return; + if (this.isMoveOver()) this._moving = false; + else this.y += this.moveRange(); +}; +Window_MiniMap.prototype.updateVisible = function () { + if (!this.isVisibleChanged()) return; + this._isVisible = $gameSystem.miniMapData().visible; + this._moving = true; +}; +Window_MiniMap.prototype.updatePlayerMove = function () { + if (!XdRsData.miniMap.getDpState('Place')) return; + this.isPlayerMoved() && this.drawPlace(); +}; +Window_MiniMap.prototype.updatePlayerTouch = function () { + if (!this._isVisible || !XdRsData.miniMap.getDpState('Hide')) return; + //this.visible = !this.isPlayerTouched(); + this._sprite.opacity = this.opacity = this.isPlayerTouched() ? 50 : $gameSystem.miniMapData().opacity; +}; +//================================================================================================================== +function Mini_Button() { + this.initialize.apply(this, arguments); +} +Mini_Button.prototype = Object.create(Sprite.prototype); +Mini_Button.prototype.constructor = Mini_Button; +Mini_Button.prototype.initialize = function (x) { + Sprite.prototype.initialize.call(this); + this.createBitmap(); + this.drawArrow(); + this._pressCount = 0; + this.anchor = new Point(0.5, 0.5); + this.move(x - this.sw(), this.sh()); +}; +Mini_Button.prototype.sw = function () { + return this.width / 2; +}; +Mini_Button.prototype.sh = function () { + return this.height / 2; +}; +Mini_Button.prototype.size = function () { + return +XdRsData.miniMap.parameters['miniSize'] || 24; +}; +Mini_Button.prototype.createBitmap = function () { + this.bitmap = new Bitmap(this.size(), this.size()); +}; +Mini_Button.prototype.drawArrow = function () { + this.bitmap.clear(); + this._lastState = $gameSystem.miniMapData().visible; + var n = this._lastState ? 6 : 7; + var index = XdRsData.miniMap.getMiniIcon(n); + var bitmap = ImageManager.loadSystem('IconSet'); + var pw = Window_Base._iconWidth, ph = Window_Base._iconHeight; + var sx = index % 16 * pw, sy = Math.floor(index / 16) * ph; + this.bitmap.blt(bitmap, sx, sy, pw, ph, 0, 0, this.size(), this.size()); +}; +Mini_Button.prototype.changeVisible = function () { + SoundManager.playOk(); + var state = $gameSystem.miniMapData().visible; + $gameSystem.setMiniMapData('visible', !state); +}; +Mini_Button.prototype.isStateChanged = function () { + return this._lastState !== $gameSystem.miniMapData().visible; +}; +Mini_Button.prototype.isTouch = function () { + var x = TouchInput.x, y = TouchInput.y; + var bx = this.x - this.sw(), by = this.y - this.sh(); + return x > bx && x < (bx + this.width) && + y > by && y < (by + this.height); +}; +Mini_Button.prototype.press = function () { + this.scale = new Point(0.9, 0.9); + this._pressCount = 8; + this.changeVisible(); +}; +Mini_Button.prototype.update = function () { + Sprite.prototype.update.call(this); + this.updateState(); + this.updateInput(); + this.updatePressed(); +}; +Mini_Button.prototype.updateState = function () { + this.isStateChanged() && this.drawArrow(); +}; +Mini_Button.prototype.updateInput = function () { + Input.isTriggered('miniMap') && this.changeVisible(); + if (!TouchInput.isTriggered()) return; + this.isTouch() && this.press(); +}; +Mini_Button.prototype.updatePressed = function () { + if (!this._pressCount) return; + this._pressCount--; + if (!this._pressCount) this.scale = new Point(1, 1); +}; +//================================================================================================================== +function Sprite_MiniMap() { + this.initialize.apply(this, arguments); +} +Sprite_MiniMap.prototype = Object.create(Sprite.prototype); +Sprite_MiniMap.prototype.constructor = Sprite_MiniMap; +Sprite_MiniMap.prototype.initialize = function () { + Sprite.prototype.initialize.call(this); + this.opacity = $gameSystem.miniMapData().opacity; + this.initData(); + this.createTileMap(); + this.createParts(); + this.refreshScroll(); +}; +Sprite_MiniMap.prototype.initData = function () { + this._scale = $gameSystem.miniMapData().scale; + var rw = XdRsData.miniMap.realMapWidth() * this._scale; + var rh = XdRsData.miniMap.realMapHeight() * this._scale; + this.width = Math.min(XdRsData.miniMap.displayWidth(), rw); + this.height = Math.min(XdRsData.miniMap.displayHeight(), rh); + this._tileWidth = $gameMap.tileWidth() * this._scale; + this._tileHeight = $gameMap.tileHeight() * this._scale; + this.setPosition(); +}; +Sprite_MiniMap.prototype.createTileMap = function () { + this._tileMap = XdRsData.miniMap.makeTilemap(); + this.addChild(this._tileMap); +}; +Sprite_MiniMap.prototype.createParts = function () { + this._parts = []; + var data = $gameMap.events().concat($gamePlayer.miniMapMembers()); + data.forEach(function (e) { + var part = new Sprite_MiniPart(e); + this._parts.push(part); + this.addChild(part); + }, this); +}; +Sprite_MiniMap.prototype.playerX = function () { + return $gamePlayer._realX * $gameMap.tileWidth(); +}; +Sprite_MiniMap.prototype.playerY = function () { + return $gamePlayer._realY * $gameMap.tileHeight(); +}; +Sprite_MiniMap.prototype.realX = function (x) { + x = (x + 0.5) * this._tileWidth; + return x - this._miniX * this._scale; +}; +Sprite_MiniMap.prototype.realY = function (y, add) { + y = (y + 1) * this._tileHeight; + return y - this._miniY * this._scale + add; +}; +Sprite_MiniMap.prototype.isScrolled = function () { + return this._dataX !== this._miniX || + this._dataY !== this._miniY; +}; +Sprite_MiniMap.prototype.setPosition = function () { + var x = y = XdRsData.miniMap.side(); + var dw = XdRsData.miniMap.displayWidth(); + var dh = XdRsData.miniMap.displayHeight(); + x = Math.max(x, (dw - this.width) / 2 + x); + y = Math.max(y, (dh - this.height) / 2 + y); + this.move(x, y); +}; +Sprite_MiniMap.prototype.refreshScroll = function () { + var mw = XdRsData.miniMap.realMapWidth(); + var mh = XdRsData.miniMap.realMapHeight(); + var tw = this._tileMap.width, th = this._tileMap.height; + this._miniX = this.playerX() - tw / 2; + this._miniY = this.playerY() - th / 2; + this._miniX = Math.max(0, Math.min(mw - tw, this._miniX)); + this._miniY = Math.max(0, Math.min(mh - th, this._miniY)); +}; +Sprite_MiniMap.prototype.update = function () { + Sprite.prototype.update.call(this); + this.updateScroll(); + this.updateScrolled(); +}; +Sprite_MiniMap.prototype.updateScroll = function () { + this.visible && $gamePlayer.isMoving() && this.refreshScroll(); +}; +Sprite_MiniMap.prototype.updateScrolled = function () { + if (!this.visible || !this.isScrolled()) return; + this._dataX = this._miniX; this._dataY = this._miniY; + this._tileMap.origin.x = this._miniX; + this._tileMap.origin.y = this._miniY; +}; +//================================================================================================================== +function Sprite_MiniPart() { + this.initialize.apply(this, arguments); +} +Sprite_MiniPart.prototype = Object.create(Sprite.prototype); +Sprite_MiniPart.prototype.constructor = Sprite_MiniPart; +Sprite_MiniPart.prototype.initialize = function (obj) { + Sprite.prototype.initialize.call(this); + this.initData(obj); + this.createBitmap(); + this.update(); +}; +Sprite_MiniPart.prototype.initData = function (obj) { + this._obj = obj; + this._dynamicY = 0; + this._dynamicCount = -1; +}; +Sprite_MiniPart.prototype.addRate = function () { + return this.isEvent() ? 0.3 : 0.4; +}; +Sprite_MiniPart.prototype.addSize = function (size) { + return size + size * this.addRate(); +}; +Sprite_MiniPart.prototype.bitmapWidth = function () { + var scale = $gameSystem.miniMapData().scale; + return this.addSize($gameMap.tileWidth() * scale); +}; +Sprite_MiniPart.prototype.bitmapHeight = function () { + var scale = $gameSystem.miniMapData().scale; + return this.addSize($gameMap.tileHeight() * scale); +}; +Sprite_MiniPart.prototype.anchorY = function () { + var scale = $gameSystem.miniMapData().scale; + return $gameMap.tileHeight() * scale / this.bitmap.height; +}; +Sprite_MiniPart.prototype.createBitmap = function () { + this.bitmap = new Bitmap(this.bitmapWidth(), this.bitmapHeight()); + this.anchor = new Point(0.5, this.anchorY()); + this.refresh(); +}; +Sprite_MiniPart.prototype.refresh = function () { + this.bitmap.clear(); + this._icon = this._obj.miniIcon(); + this.visible = this.isVisible(); + this.visible && this.drawPart(); +}; +Sprite_MiniPart.prototype.drawPart = function () { + var bitmap = ImageManager.loadSystem('IconSet'); + var pw = Window_Base._iconWidth, ph = Window_Base._iconHeight; + var sx = this._icon % 16 * pw, sy = Math.floor(this._icon / 16) * ph; + var bw = this.bitmap.width, bh = this.bitmap.height; + this.bitmap.blt(bitmap, sx, sy, pw, ph, 0, 0, bw, bh); +}; +Sprite_MiniPart.prototype.isEvent = function () { + return this._obj.constructor === Game_Event; +}; +Sprite_MiniPart.prototype.isVisible = function () { + return this._obj.isMiniVisible() && !!this._icon; +}; +Sprite_MiniPart.prototype.isDynamic = function () { + if (!this.isEvent()) return false; + return XdRsData.miniMap.isDynamic(this._obj.miniKind()); +}; +Sprite_MiniPart.prototype.isStateChanged = function () { + return this._icon !== this._obj.miniIcon() || + this.visible !== this.isVisible(); +}; +Sprite_MiniPart.prototype.isInScreen = function () { + var w = XdRsData.miniMap.displayWidth(); + var h = XdRsData.miniMap.displayHeight(); + var side = XdRsData.miniMap.side(); + return this.x >= 0 && this.y >= 0 && this.x < w && (this.y - side) < h; +}; +Sprite_MiniPart.prototype.dyAdd = function () { + var scale = $gameSystem.miniMapData().scale; + return 30 * scale / 10; +}; +Sprite_MiniPart.prototype.update = function () { + Sprite.prototype.update.call(this); + this.updateState(); + this.updateDynamic(); + this.updatePosition(); +}; +Sprite_MiniPart.prototype.updateState = function () { + this.isStateChanged() && this.refresh(); +}; +Sprite_MiniPart.prototype.updateDynamic = function () { + if (!this.isDynamic() || !(Graphics.frameCount % 2)) return; + this._dynamicCount = (this._dynamicCount + 1) % 20; + this._dynamicY += this._dynamicCount < 10 ? -this.dyAdd() : this.dyAdd(); +}; +Sprite_MiniPart.prototype.updatePosition = function () { + if (!this.parent) return; + this.x = this.parent.realX(this._obj._realX); + this.y = this.parent.realY(this._obj._realY, this._dynamicY); + this.visible = this.isInScreen(); + //this.opacity=this.isInScreen()?255:0; +}; +//================================================================================================================== +XdRsData.miniMap.WOaddGeneralOptions = Window_Options.prototype.addGeneralOptions; +Window_Options.prototype.addGeneralOptions = function () { + XdRsData.miniMap.WOaddGeneralOptions.call(this); + this.addCommand('小地图透明度', 'miniMapOpacity'); +}; +Window_Options.prototype.isMiniSymbol = function (symbol) { + return symbol === 'miniMapOpacity'; +}; +XdRsData.miniMap.WOstatusText = Window_Options.prototype.statusText; +Window_Options.prototype.statusText = function (index) { + if (this.isMiniSymbol(this.commandSymbol(index))) return this.miniValText(); + return XdRsData.miniMap.WOstatusText.call(this, index); +}; +Window_Options.prototype.miniValText = function () { + return '' + $gameSystem.miniMapData().opacity; +}; +Window_Options.prototype.setMiniVal = function (type) { + var val = $gameSystem.miniMapData().opacity; + val = (val + (type ? 10 : -10)) % 255; + return val < 5 ? 255 : val; +}; +Window_Options.prototype.changeMiniData = function (symbol, type) { + SoundManager.playCursor(); + var value = this.setMiniVal(type); + $gameSystem.setMiniMapData('opacity', value); + this.redrawItem(this.findSymbol(symbol)); +}; +XdRsData.miniMap.WOprocessOk = Window_Options.prototype.processOk; +Window_Options.prototype.processOk = function () { + var symbol = this.commandSymbol(this.index()); + if (this.isMiniSymbol(symbol)) this.changeMiniData(symbol, 1); + else XdRsData.miniMap.WOprocessOk.call(this); +}; +XdRsData.miniMap.WOcursorRight = Window_Options.prototype.cursorRight; +Window_Options.prototype.cursorRight = function (wrap) { + var symbol = this.commandSymbol(this.index()); + if (this.isMiniSymbol(symbol)) this.changeMiniData(symbol, 1); + else XdRsData.miniMap.WOcursorRight.call(this, wrap); +}; +XdRsData.miniMap.WOcursorLeft = Window_Options.prototype.cursorLeft; +Window_Options.prototype.cursorLeft = function (wrap) { + var symbol = this.commandSymbol(this.index()); + if (this.isMiniSymbol(symbol)) this.changeMiniData(symbol, 0); + else XdRsData.miniMap.WOcursorLeft.call(this, wrap); +}; +//================================================================================================================== +XdRsData.miniMap.SMcreateAllWindows = Scene_Map.prototype.createAllWindows; +Scene_Map.prototype.createAllWindows = function () { + XdRsData.miniMap.SMcreateAllWindows.call(this); + if (ConfigManager.ShowMiniMap) { + this.createMiniMap(); + } +}; +Scene_Map.prototype.createMiniMap = function () { + this._miniMap = new Window_MiniMap(); + this._miniButton = new Mini_Button(this._miniMap.x + this._miniMap.width);//图标X轴位置 + this.addChild(this._miniMap); + this.addChild(this._miniButton); +}; +Scene_Map.prototype.isTouchMiniButton = function () { + if (!TouchInput.isTriggered()) return false; + return this._miniButton && this._miniButton.isTouch(); +}; +XdRsData.miniMap.SMprocessMapTouch = Scene_Map.prototype.processMapTouch; +Scene_Map.prototype.processMapTouch = function () { + !this.isTouchMiniButton() && XdRsData.miniMap.SMprocessMapTouch.call(this); +}; +//================================================================================================================== +// end +//================================================================================================================== + +//================================================================================================================== +// Changed By SaltedFish +//================================================================================================================== +ConfigManager.ShowMiniMap = true; +var Imported = Imported || {}; +Imported.xdRs_MiniMap = true; + +//================================================================================================================== +// Scene_Map +//================================================================================================================== diff --git a/js/plugins/YEP_BattleEngineCore.js b/js/plugins/YEP_BattleEngineCore.js new file mode 100644 index 0000000..e3cb7c8 --- /dev/null +++ b/js/plugins/YEP_BattleEngineCore.js @@ -0,0 +1,5416 @@ +//============================================================================= +// Yanfly Engine Plugins - Battle Engine Core +// YEP_BattleEngineCore.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_BattleEngineCore = true; + +var Yanfly = Yanfly || {}; +Yanfly.BEC = Yanfly.BEC || {}; +Yanfly.BEC.version = 1.43; + +//============================================================================= + /*: + * @plugindesc v1.43a 战斗引擎核心☁️ + * @author Yanfly Engine Plugins + * + * @param ---General--- + * @text ---全局--- + * @default + * + * @param Action Speed + * @text 动作速度 + * @desc This is the formula used for an action's base speed. + * Default: agi + Math.randomInt(Math.floor(5 + agi / 4)) + * @default agi + * + * @param Default System + * @text 默认系统 + * @desc This is the default battle system your game uses. + * Default: dtb + * @default dtb + * + * @param ---Escape--- + * @text ---逃跑--- + * @default + * + * @param Escape Ratio + * @text 默认逃跑率 + * @desc This is the formula used to determine escape success. + * Default: 0.5 * $gameParty.agility() / $gameTroop.agility() + * @default 0.5 * $gameParty.agility() / $gameTroop.agility() + * + * @param Fail Escape Boost + * @text 失败+逃跑率 + * @desc Each time the player fails escape, increase the success + * rate by this much. Default: 0.1 + * @default 0.1 + * + * @param ---Animation--- + * @text ---动画--- + * @default + * + * @param Animation Base Delay + * @text 动画基本延迟 + * @desc This sets the base delay in between animations. + * Default: 8 + * @default 0 + * + * @param Animation Next Delay + * @text 动画下一个延迟 + * @desc This sets the sequential delay in between animations. + * Default: 12 + * @default 0 + * + * @param Certain Hit Animation + * @text 特定命中动画 + * @desc Default animation to play for certain hit skills. + * Use 0 if you wish for no animation. + * @default 120 + * + * @param Physical Animation + * @text 物理技能动画 + * @desc Default animation to play for physical skills. + * Use 0 if you wish for no animation. + * @default 52 + * + * @param Magical Animation + * @text 魔法技能动画 + * @desc Default animation to play for magical skills. + * Use 0 if you wish for no animation. + * @default 51 + * + * @param Enemy Attack Animation + * @text 敌人攻击动画 + * @desc This is the default attack animation played by enemies. + * Default: 0 + * @default 39 + * + * @param Reflect Animation + * @text 魔法反射动画 + * @desc The animation used when magic attacks are reflected. + * @default 42 + * + * @param Motion Waiting + * @text 运动等待 + * @desc Play animations after performing an action or during? + * During - false After - true Default: false + * @default false + * + * @param ---Frontview--- + * @text ---正视图--- + * @default + * + * @param Front Position X + * @desc This formula determines the actor's home X position. + * Default: 0 + * @default Graphics.boxWidth / 8 + Graphics.boxWidth / 4 * index + * + * @param Front Position Y + * @desc This formula determines the actor's home Y position. + * Default: 0 + * @default Graphics.boxHeight - 180 + * + * @param Front Actor Sprite + * @text 显示前角色精灵 + * @desc Show the actor battle sprite in frontview? + * NO - false YES - true Default - false + * @default false + * + * @param Front Sprite Priority + * @text 前精灵优先级 + * @desc Give actor sprites the priority of always being on top? + * 0 - Normal 1 - Actors on Top 2 - Enemies on Top + * @default 1 + * + * @param ---Sideview--- + * @text ---侧视图--- + * @default + * + * @param Home Position X + * @desc This formula determines the actor's home X position. + * Default: 600 + index * 32 + * @default screenWidth - 16 - (maxSize + 2) * 32 + index * 32 + * + * @param Home Position Y + * @desc This formula determines the actor's home Y position. + * Default: 280 + index * 48 + * @default screenHeight - statusHeight - maxSize * 48 + (index+1) * 48 - 32 + * + * @param Side Sprite Priority + * @text 侧精灵优先级 + * @desc Give actor sprites the priority of always being on top? + * 0 - Normal 1 - Actors on Top 2 - Enemies on Top + * @default 1 + * + * @param ---Sprites--- + * @text ---精灵--- + * @default + * + * @param Default X Anchor + * @desc Default value used for your sprites's X Anchor. + * Default: 0.5 + * @default 0.5 + * + * @param Default Y Anchor + * @desc Default value used for your sprites's Y Anchor. + * Default: 1.0 + * @default 1.0 + * + * @param Step Distance + * @text 步距 + * @desc 这是一个单位为采取行动而向前走的距离。 + * Default: 48 + * @default 48 + * + * @param Flinch Distance + * @text 退缩距离 + * @desc 在侧视图中,当一个单位受到伤害或闪避时,它将 + * 以像素为单位缩小一定距离。 + * @default 12 + * + * @param Show Shadows + * @text 显示阴影 + * @desc Do you wish to have shadows appear under actors? + * NO - false YES - true + * @default true + * + * @param ---Damage Popups--- + * @text ---伤害弹出窗口--- + * @default + * + * @param Popup Duration + * @text 弹出窗口持续时间 + * @desc Adjusts how many frames a popup will stay visible for. + * Default: 90 + * @default 128 + * + * @param Newest Popup Bottom + * @text 最新窗口底部弹出 + * @desc Places the newest popup at the bottom of a group. + * NO - false YES - true + * @default true + * + * @param Popup Overlap Rate + * @text 弹出重叠率 + * @desc When multiple damage popups appear, they cover each other. + * Use this to change the buffer rate amount for each sprite. + * @default 0.9 + * + * @param Critical Popup + * @text 关键弹出窗口 + * @desc Adjusts the popup's flashing color for critical hits. + * Default: 255, 0, 0, 160 + * @default 255, 0, 0, 160 + * + * @param Critical Duration + * @text 临界持续时间 + * @desc 闪烁将保留多少帧用于关键帧 + * How many frames the flashing will remain for a critical. + * Default: 60 + * @default 60 + * + * @param ---Tick-Settings--- + * @text ---Tick 设置--- + * @default + * + * @param Timed States + * @text 定时状态 + * @desc If the battle system is Tick-based, use time instead of + * turns for states? NO - false YES - true + * @default false + * + * @param Timed Buffs + * @text 定时增益 + * @desc If the battle system is Tick-based, use time instead of + * turns for buffs? NO - false YES - true + * @default false + * + * @param Turn Time + * @text 转弯时间 + * @desc 必须经过多少个记号才能等于一圈? + * How many ticks must past to equal 1 turn? + * @default 100 + * + * @param AI Self Turns + * @text AI自转 + * @desc Set AI to be based on their own individual turns? + * NO - false YES - true + * @default true + * + * @param ---Window Settings--- + * @text ---窗口设置--- + * @default + * + * @param Lower Windows + * @text 底部窗口 + * @desc Places the skill and item windows at the screen's bottom. + * OFF - false ON - true + * @default true + * + * @param Window Rows + * @text 窗口行 + * @desc For lower windows, how many rows of items do you wish for + * the windows to display? + * @default 4 + * + * @param Command Window Rows + * @text 命令窗口行 + * @desc Sets the number of rows for each command window to display. + * Default: 4 + * @default 4 + * + * @param Command Alignment +* @text 命令对齐 + * @desc Sets the text alignment for the Party/Actor Commands. + * Default: left + * @default center + * + * @param Start Actor Command + * @text 启用角色命令 + * @desc Starts turn with the Actor Command Window instead of Party. + * OFF - false ON - true + * @default true + * + * @param Current Max + * @text 显示HP/MP的当前最大值 + * @desc Display the entire current / max value of HP/MP? + * NO - false YES - true Default: true + * @default false + * + * @param ---Selection Help--- + * @text ---选择帮助--- + * @default + * + * @param Mouse Over + * @text 鼠标悬停 + * @desc Allows you to mouse over the enemies to auto-select them. + * OFF - false ON - true + * @default true + * + * @param Select Help Window + * @text 选择帮助窗口 + * @desc When selecting actors and enemies, show the help window? + * NO - false YES - true + * @default true + * + * @param User Help Text + * @text 用户帮助文本 + * @desc The singular form of 'User' used in a help window. + * @default 用户 + * + * @param Ally Help Text + * @text 队友帮助文本*单 + * @desc The singular form of 'Ally' used in a help window. + * @default 队友 + * + * @param Allies Help Text + * @text 队友帮助文本*复 + * @desc The plural form of 'Allies' used in a help window. + * @default 全体队友 + * + * @param Enemy Help Text + * @text 敌人帮助文本*单 + * @desc The singular form of 'Enemy' used in a help window. + * @default 敌人 + * + * @param Enemies Help Text + * @text 敌人帮助文本*复 + * @desc The plural form of 'Enemy' used in a help window. + * @default 全体敌人 + * + * @param All Help Text + * @text 所有帮助文字 + * @desc When selecting a entire group of targets. + * %1 - Target Group (Allies or Enemies) + * @default %1 + * + * @param Random Help Text + * @text 随机目标帮助文字 + * @desc When selecting a random selection of targets. + * %1 - Target Group (Allies or Enemies) %2 - Number + * @default %2 随机 %1 + * + * @param ---Enemy Select--- + * @text ---敌人选择--- + * @default + * + * @param Visual Enemy Select + * @text 视觉敌人选择 + * @desc Replaces the enemy selection screen with a more visual one. + * OFF - false ON - true + * @default true + * + * @param Show Enemy Name + * @text 显示敌人名称 + * @desc Show enemy names with Visual Enemy Select. + * OFF - false ON - true + * @default true + * + * @param Show Select Box + * @text 显示敌人选择框 + * @desc Show a selection box when selecting enemies. + * OFF - false ON - true + * @default false + * + * @param Enemy Font Size + * @text 敌人字体大小 + * @desc Changes the font size used to display enemy names. + * Default: 28 + * @default 20 + * + * @param Enemy Auto Select + * @text 初始自动选择敌人 + * @desc Changes what enemy is automatically selected at first. + * LEFT - 0 RIGHT - this.furthestRight() + * @default this.furthestRight() + * + * @param ---Actor Select--- + * @text ---角色选择--- + * @default + * + * @param Visual Actor Select + * @text 视觉角色选择 + * @desc Allows you to click the actor on screen to select it. + * OFF - false ON - true + * @default true + * + * @param ---Battle Log--- + * @text ---战斗日志--- + * @default + * + * @param Show Emerge Text + * @text 显示出现文本 + * @desc Shows the battle start text for enemies appearing. + * OFF - false ON - true + * @default false + * + * @param Show Pre-Emptive Text + * @text 显示优先文本 + * @desc Shows the text for getting a pre-emptive attack. + * OFF - false ON - true + * @default true + * + * @param Show Surprise Text + * @text 显示惊喜文本 + * @desc Shows the text for getting a surprise attack. + * OFF - false ON - true + * @default true + * + * @param Optimize Speed + * @text 优化速度 + * @desc Cuts log base line process to optimize the battle speed. + * OFF - false ON - true + * @default true + * + * @param Show Action Text + * @text 显示操作文本 + * @desc Displays full action text or a simplified version of it. + * SIMPLE - false FULL - true + * @default false + * + * @param Show State Text + * @text 显示状态文本 + * @desc Shows all text regarding states. + * OFF - false ON - true + * @default false + * + * @param Show Buff Text + * @text 显示Buff文本 + * @desc Shows all text regarding buffs. + * OFF - false ON - true + * @default false + * + * @param Show Counter Text + * @text 显示反击文本 + * @desc Shows text regarding counter attacks. + * OFF - false ON - true + * @default true + * + * @param Show Reflect Text + * @text 显示反射文本 + * @desc Shows text regarding reflected spells. + * OFF - false ON - true + * @default true + * + * @param Show Substitute Text + * @text 显示替代伤害文本 + * @desc Shows text regarding substituted damage. + * OFF - false ON - true + * @default true + * + * @param Show Fail Text + * @text 显示攻击失败文本 + * @desc Shows text regarding failed attacks. + * OFF - false ON - true + * @default false + * + * @param Show Critical Text + * @text 显示暴击文本 + * @desc Shows text regarding critical hits. + * OFF - false ON - true + * @default false + * + * @param Show Miss Text + * @text 显示Miss文本 + * @desc Shows text regarding missed attacks. + * OFF - false ON - true + * @default false + * + * @param Show Evasion Text + * @text 显示闪避文本 + * @desc Shows text regarding evaded attacks. + * OFF - false ON - true + * @default false + * + * @param Show HP Text + * @text 显示HP文本 + * @desc Shows text regarding HP damage or heals. + * OFF - false ON - true + * @default false + * + * @param Show MP Text + * @text 显示MP文本 + * @desc Shows text regarding MP damage or heals. + * OFF - false ON - true + * @default false + * + * @param Show TP Text + * @text 显示TP文本 + * @desc Shows text regarding TP damage or heals. + * OFF - false ON - true + * @default false + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * RPG Maker MV默认的战斗系统已经支持流行的横版战斗,我们可以使用战斗核心 + * 引擎来增加更多的特点和能力 + * 这个插件改变了战斗系统的很多方面,使其看起来更像现代的角色扮演游戏,而 + * 不是过时笨重的那种。这改变了战斗界面的文本的显示以及出现方式。 + * + * ============================================================================ + * Battle Messages + * ============================================================================ + * + * 当改变了战斗过程中的选项和信息时候,插入下面的标签就可以让信息在战斗记 + * 录里居中 + * + *
+ * 这个标签可以覆盖所有的战斗记录窗口,并且将视为一种居中战斗文本信息的指令。 + * + * SParam公式*有几个记事标签,你可以用来改变某些技能和项目的出现方式, + * 因为你不想在名字中出现像“哈罗德攻击”这样的名字。 + * + * 技能和物品标签: + * + * + * 这会将显示的文本更改为x。 + * + * + * 这会将显示的图标更改为x。 + * + * ============================================================================ + * Battle Windows + * ============================================================================ + * + * 为了使战斗系统的导航更加简便,这里有很多选项来调整战斗系统的角色窗口之 + * 后出现。 + * + * ============================================================================ + * Battle Order + * ============================================================================ + * + * 这个战斗回合系统也被修复,这样,任何有敏捷值改变的情况的战斗,将会在当 + * 前回合生效而不是下个回合。行动速度计算也被调整过,移除了过去速度计算公 + * 式带有随机的因素,让敏捷值可以更加实际的作为一个战术上的因素。 + * + * Skill and Item Notetag: + * + * + * 这可以让您突破编辑器的限制-2000和2000允许您 + * 控制你的动作速度。 + * + * ============================================================================ + * Multiple Hits + * ============================================================================ + * + * 如果伤害标签在行动中消失,多重伤害系统不会中断。这个通过切换永久状态来 + * 实现的。如果要使用这个特性,请确保数据库中存在一个永久状态;如果不想使 + * 用,请将永久状态参数ID改为0。 + * + * ============================================================================ + * Popup Revamp + * ============================================================================ + * + * 尽管伤害数值的弹出系统和原版MV看起来一样,但是他们的进程是完全不同的。 + * 在之前,弹出系统在1帧只会弹出一次,但现在,我们可以在同1帧显示所有伤害 + * ,这使其看起来更加平滑。 + + * + * ============================================================================ + * Common Events + * ============================================================================ + * + * 无论敌人队伍是否存活,公共事件将会在每次行动结束的时候执行,通过恰当的 + * 放置行动序列标签,你可以让技能的公共事件在一个行动当中执行。但是,请注 + * 意如果你让一个行动在另一个行动当中执行,剩余的行动序列将会变成空的来取 + * 代新的行动。 + * + * ============================================================================ + * Casting Animations + * ============================================================================ + * + * 角色动作将会协助提供给玩家,让他们明白战斗者是谁,以及技能使用类型。这 + * 个插件可以让技能拥有动作,这些动作是可以为单独技能自定调整的 + * + * Skill Notetag: + * + * 设置技能动作ID,设置0将会取消动作 + * + * ============================================================================ + * Changing Battle Systems + * ============================================================================ + * + * 当玩家不在战斗时,你可以通过插件命令改变战斗系统。如果只使用这个插件 + * 这里只包含了默认的战斗系统 + * + * Plugin Command: + * setBattleSys DTB 设置战斗为默认回合制 + * + * 未来其他插件将会包含其他战斗系统 + * + * ============================================================================ + * Sideview Actions + * ============================================================================ + * + * 在软件默认的战斗系统里,竖向和横向的战斗方式都没有显示反击,显示魔法攻 + * 击,或者任何战斗者的替换队员。这个战斗系统核心引擎可以提供给横版战斗模 + * 式的游戏更好的战斗队员显示效果。 + * + * 魔法攻击也将会显示一个相应的动画,来告诉玩家已经准备好战斗。这个动画可 + * 以用参数改变,但是角色,职业,敌人,武器,装备和状态可以根据需要显示独 + * 有的动画。 + * + * Actor, Class, Enemy, Weapon, Armor, and State Notetag: + * + * 改变角色的动画为X。这将影响角色,职业,敌人,武器,装备及状态等等 + * + * 有时,你不希望你的敌人可以移动,或者你不希望某个角色移动。他们只是固定 + * 的。为了完成这件事,你可以使用下面这个标签禁止参与战斗者移动。 + * + * Actor, Class, Enemy, Weapon, Armor, and State Notetag: + * + * 阻止了参与战斗者移动。这将影响角色,职业,敌人,武器,装备及状态等等。 + * 如果敌人在其行动的时候不能移动,他将会像竖版战斗那样闪烁。 + * + * ============================================================================ + * Custom Sideview Battler Anchor + * ============================================================================ + * + * 横向战斗时,角色图通常被置于中间,并且固定在脚部,而不是所有的横版战斗 + * 都会这样。用这个事件,对于那些不遵从标准的角色,我们可以用不同的手段固 + * 定他们。 + * + * Actor, Class, Weapon, Armor, State Notetags: + * + * + * 这个设置了角色横向战斗时,侧视图的位置。系统默认值中,X=0.5,Y=1.0。如 + * 果你希望X可以向左一点,你需要设置它小于5.或者设置大于5来使其向右。为了 + * 提高Y方向,你需要设置小于1.0的值。请不断调整直到你完成了最正确的设置。 + * +*如果一个锚有多个特性,产生不同的锚,它将是 +*在类似于以下顺序的优先级列表中使用: + * + * States + * Weapons + * Armors + * Class + * Actor + * Default + * + * 优先级越高,优先级越高。 + * + * ============================================================================ + * 敌人攻击动画 + * ============================================================================ + * + * 为了给你的敌人提供独特的攻击动画,你可以使用这个标签: + * + * Enemy Notetag: + * + * 将x替换为要设置为 + * 敌人的默认攻击动画。 + * + * ============================================================================ + * 自动状态删除条件 + * ============================================================================ + * + * 默认情况下,角色扮演者MV的战斗系统会自动移除状态 + * 三种不同的情况:无、动作结束、转身结束。 + * + * 无和转弯端按预期工作。然而,行动结束了,然而 + * 各州在战斗开始时撤军,而不是在战斗结束时撤军。 + * 这是改变和更新,只发生在战斗的行动结束。 + * + * 现在又增加了两个自动条件:动作开始和转弯开始。 + * 可以使用以下注释标记添加和实现这些注释: + * + * State Notetags: + * + * + * 这将导致此状态更新其在开始时剩余的回合数 + * 行动。x是它将持续的圈数。如果你用x到y,在 + * 应用该状态,该状态将被随机数圈移除 + * 从x到y。 + * + * + * + * 这将导致状态更新其在循环开始时剩余的轮数 + * 战斗回合。x是它将持续的圈数。如果你用x到y, + * 在应用状态时,状态将被随机删除 + * 从x转到y。 + * + * 有行动结束的状态对他们来说有一个独特的特征,如果施法者 + * 状态是当前活跃的战斗者(主体),如果状态是 + * 应用于用户本身,他们将获得一个“自由转身”。“自由转弯”是 + * 以减轻用户因某个动作而损失1个回合的持续时间 + * 结束时间,他们将失去在国家统治下的好处 + * 转弯的时机。 + * + * ============================================================================ + * 动作序列 + * ============================================================================ + * + * Yanfly引擎插件-战斗引擎核心包括 + * 使用自定义动作序列。动作顺序是 + * 该游戏创造了一个定制的视觉和机械技能。 + * 然而,战斗引擎的核心将只包括最基本的行动 + * 因此,有关如何创建自定义操作序列的说明 + * 将包含在此插件的未来扩展插件的帮助文件中。 + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.43a: + * - Bug fixed to prevent crash if non-existent actions are used. + * - Optimization update. + * + * Version 1.42: + * - Optimization update. + * + * Version 1.41: + * - Fixed a bug that allowed certain sprites to remain in the active pool + * while party members were removed midway through battle. + * + * Version 1.40: + * - Updated for RPG Maker MV version 1.3.2. + * + * Version 1.39c: + * - Fixed a bug that caused dead actors to not be a part of action sequence + * targeting for "Not Focus". + * - Optimization update. + * - Updated "queueForceAction" to utilize both numbers and actual targets. + * + * Version 1.38a: + * - Optimization update. + * - Compatibility update for Selection Control v1.08. + * - Bug fixed for mirrored animations on enemies. + * + * Version 1.37: + * - Fixed a bug where if the enemy's size is too small, the enemy's name + * during selection will be cut off. + * + * Version 1.36d: + * - Made an update for the battle background image snaps when there is no + * battleback being used. This will prevent the player party and enemy troop + * from appearing in the background snapshot when entering menus mid-battle. + * - 'Death Break' action sequence now only triggers upon dead status and not + * an 'or 0 HP' condition. + * - Updated Forced Action sequencing for more efficiency. + * - 'Action Times+' traits now work properly for DTB again. + * - Optimized message displaying for battle log. + * - Optimized z sorting algorithm for sprites. + * + * Verison 1.35d: + * - Scopes that target a dead ally will automatically target the first dead + * ally now. Scopes that target all dead allies will lock onto the first dead + * ally. This will hopefully provide less confusion amongst playing. + * - Added anti-crash measure for sprite bitmaps. + * - Added anti-crash measure for faux actions. + * - Added anti-crash measure to prevent non-existant animations from playing. + * - Added a check that prevents hidden battlers from appearing when using + * certain action sequences. + * + * Version 1.34a: + * - Fixed a bug where 'NOT FOCUS' targets were not including dead members. + * - Fixed a bug where using NOT FOCUS would cause dead targets to be visible. + * + * Version 1.33: + * - Updated for RPG Maker MV version 1.1.0. + * + * Version 1.32d: + * - Fixed a bug that caused a crash when an actor died. + * - Added a motion engine to be used for future plugins. + * - Preparation for a future plugin. + * - and notetags for actors are now extended + * to actors, classes, weapons, armors, and states. + * - Added and notetags for skills and + * items. These notetags will alter the display name shown and icon shown + * respectively while performing a skill. + * - Switched Magic Reflect checking order with Counterattack checking order. + * This is to give priority to reflected actions over countered actions. + * + * Version 1.31b: + * - States with Action End now have a unique trait to them where if the caster + * of the state is the current active battler (subject) and if the state is + * then applied on the user itself, they will gain a 'free turn'. The 'free + * turn' is to mitigate the user from losing 1 duration of the turn since with + * an Action End timing, they would lose the benefit of being under the state + * for that turn's timing. + * - Added failsafes for Free Turns in case other plugins have overwritten the + * on battle start functions. + * - Added a compatibility update to Animated SV Enemies for dead motion. + * + * Version 1.30: + * - Optimization update. + * - Fixed a bug that prevented added state effects be unable to apply if they + * are an added Death state. + * - Battlelog lines are now able to display text codes. + * + * Version 1.29: + * - Fixed a bug with the 'else if' action sequences not working in the right + * order of sequence conditions. + * + * Version 1.28d: + * - Fixed a bug if instant casting a skill that would make an opponent battler + * to force an action to end incorrectly. Thanks to DoubleX for the fix. + * - Fixed a bug with mouse over not working properly. + * - Fixed a bug regarding forced actions that will cause the battle to freeze + * if the forced action causes the main active subject to leave the battle. + * - Fixed a bug with timed states not updating their turns properly. + * - Changed priority of IF action sequences to higher to no longer interfere + * other action sequences. + * + * Version 1.27: + * - Mechanic change. This will only affect those using turn-based state timing + * mechanics. Turn End state updates are now shifted from Turn End to occur at + * Regeneration timing to have a more synchronized aspect. The timings are very + * close so there's next to no notice in difference. Buff turn updates are also + * moved to the regeneration timing, too. + * + * Version 1.26: + * - Added 'Mouse Over' parameter to Selection Help. This parameter enables + * mouse users to simply hover over the enemy to select them rather than having + * to click an enemy twice to select them. + * + * Version 1.25f: + * - Added failsafes for Forced Action queues. + * - Added 'Show Select Box' parameter when selecting enemies. + * - Fixed a bug that caused End Turn events to not function properly. + * - Battle animations, by default, are positioned relative to the base bitmap + * for its target sprite. However, actor sprites do not have a base bitmap and + * therefore, battle animations, regardless of position, will always target the + * actor sprite's feet. This update now gives actor sprites a base bitmap. + * - Readjusted sprite width and sprite height calculations. + * - Added a failsafe for when no sideview actor graphics are used. + * + * Version 1.24: + * - Implemented a Forced Action queue list. This means if a Forced Action + * takes place in the middle of an action, the action will resume after the + * forced action finishes rather than cancels it out like MV does. + * + * Version 1.23: + * - Fixed a bug that didn't regenerate HP/MP/TP properly for tick-based. + * + * Version 1.22: + * - Fixed a bug within MV that caused Forced Actions at Turn End to prompt and + * trigger all turn-end related activities (such as regeneration and state turn + * updating). + * - Made a mechanic change so that Action Start and Action End state turns do + * not update their turns through forced actions. + * + * Version 1.21: + * - Fixed a bug where states Action End weren't going down properly with DTB. + * + * Version 1.20: + * - Fixed a bug where revived actors using instant cast aren't properly set to + * use actions immediately. + * + * Version 1.19: + * - Added notetag for enemies. + * - Added 'AI Self Turns' for Tick-Based Battles. Enemies can now have their + * A.I. revolve around their own individual turns rather than the battle's. + * - Mechanic change for states. Following suit with the change to Action End + * removal, there are now two more conditions added: Action Start, Turn Start. + * - Added , , , and + * notetags for automatic state removal. + * + * Version 1.18: + * - Fixed a bug with irregular targeting scopes. + * - Fixed an MV-related bug with Recover All event not refreshing battlers. + * + * Version 1.17b: + * - Fixed a bug with action end states to remove multiple at once. + * - Fixed a visual error with flinching sprites. + * - Added 'Current Max' parameter to change HP current/max display in battle. + * - Mechanic change for states that update on Action End to end at the end of + * a battler's turn instead of at the start. + * - Began preparations for another battle system. + * + * Version 1.16: + * - Fixed an issue with mirrored enemies having mirrored state icons. + * + * Version 1.15a: + * - Fixed a bug revolving the status window not updating. + * - Updated default home position formula to better fit other party sizes. + * New Home Position X: + * screenWidth - 16 - (maxSize + 2) * 32 + index * 32 + * New Home Position Y: + * screenHeight - statusHeight - maxSize * 48 + (index+1) * 48 - 16 + * + * Version 1.14: + * - Fixed a bug with Forced Actions locking out the battle. + * - New mechanic: For tick-based battle systems, states with action-end will + * go down in turns based on how many actions took place for the actor instead. + * Previously, they were indistinguishable from states with Turn End removal. + * - New mechanic: Using Instant Skills/Items from YEP_InstantCast.js will also + * cause states with action-end to go down in turns upon using actions. + * + * Version 1.13a: + * - Fixed a bug that made battlebacks disappear. + * - Reworked visual enemy selection. + * - Victory phase doesn't immediately display level up changes in battle + * status window. + * - Fixed a bug with the visual enemy select showing dead enemy names. + * + * Version 1.12b: + * - If the Battle HUD has been hidden for whatever reason during the victory + * sequence, it will be returned. + * - Added and notetags to break past editor limits. + * - Added new conditions where the battle won't end until all action sequences + * have been fulfilled. + * + * Version 1.11: + * - Fixed a bug that didn't show HP/MP Regeneration. + * + * Version 1.10: + * - Removed immortal state dependancy. Immortality is now its own setting. + * - Added more abbreviated variables for action speed calculation. + * - Fixed a bug where all-scope attacks would reveal Appear-Halfway enemies. + * - Fixed a bug where the battle wouldn't end if the final enemy was killed + * by state damage. + * + * Version 1.09: + * - Fixed a undefined actor bug for refreshing the status window. + * - Added 'Show Shadows' parameter to the plugin settings. + * - Reworked the default action sequences so that forced actions do not appear + * on top of each other and party-heal animations occur simultaneously. + * + * Version 1.08: + * - Fixed a bug where battlers gaining HP/MP in the damage formula for + * themselves wouldn't trigger popups. + * - Fixed a bug where if the party failed to escape from battle, states that + * would be removed by battle still get removed. *Fixed by Emjenoeg* + * - Fixed a bug where instant death skills didn't work. + * - Changed Sprite Priority settings to decide whether actors, enemies, or + * neither would always be on top. + * + * Version 1.07: + * - Optimized status window to refresh at a minimum. + * - Set up frame work for future plugins: + * - Added 'Escape Ratio' and 'Fail Escape Boost' to parameters to allow users + * to set the escape ratio they want. + * - Added 'Front Sprite Priority' and 'Side Sprite Priority' to parameters to + * dictate if actor sprites are always on top. + * - Added 'Tick-Settings' category for tick-based battle systems. + * + * Version 1.06: + * - Fixed a bug that causes dead actors at the start of battle to not spawn. + * - Fixed a bug where the help window on an empty slot would show the + * previous skill's message. + * + * Version 1.05: + * - Added new target typing: Character X, which allows you to select + * specifically the actor with an actor ID of X if he/she/it is in the party. + * - Fixed a bug that prevented Miss and Evade popups from showing. + * + * Version 1.04: + * - Fixed a bug where popups didn't show under certain animation types. + * - Fixed certain battler motions from not refreshing correctly. + * - Actions with no scope will not trigger the confirmation selection window. + * + * Version 1.03: + * - Added 'Wait for Effect' action sequence. + * - Actions now wait for effects (such as collapsing) to be done before + * continuing on with battle or to end battle. + * + * Version 1.02: + * - Fixed a bug where the help window would retain descriptions on no skills. + * - Synched up weapons with actor sprites so they would occur simultaneously. + * - Fixed an issue where requesting certain motions from enemies that don't + * exist would cause them to crash. + * + * Version 1.01: + * - Skills and items that affect both HP and MP will now show popups for both. + * + * Version 1.00: + * - Finished plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_BattleEngineCore'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.BECSystem = String(Yanfly.Parameters['Default System']); +Yanfly.Param.BECEscRatio = String(Yanfly.Parameters['Escape Ratio']); +Yanfly.Param.BECEscFail = String(Yanfly.Parameters['Fail Escape Boost']); +Yanfly.Param.CastCertHit = Number(Yanfly.Parameters['Certain Hit Animation']); +Yanfly.Param.CastPhysical = Number(Yanfly.Parameters['Physical Animation']); +Yanfly.Param.CastMagical = Number(Yanfly.Parameters['Magical Animation']); +Yanfly.Param.EnemyAtkAni = Number(Yanfly.Parameters['Enemy Attack Animation']); +Yanfly.Param.BECOptSpeed = String(Yanfly.Parameters['Optimize Speed']); +Yanfly.Param.BECOptSpeed = eval(Yanfly.Param.BECOptSpeed); +Yanfly.Param.BECEmergeText = String(Yanfly.Parameters['Show Emerge Text']); +Yanfly.Param.BECEmergeText = eval(Yanfly.Param.BECEmergeText); +Yanfly.Param.BECPreEmpText = String(Yanfly.Parameters['Show Pre-Emptive Text']); +Yanfly.Param.BECPreEmpText = eval(Yanfly.Param.BECPreEmpText); +Yanfly.Param.BECSurpText = String(Yanfly.Parameters['Show Surprise Text']); +Yanfly.Param.BECSurpText = eval(Yanfly.Param.BECSurpText); +Yanfly.Param.BECPopupOverlap = String(Yanfly.Parameters['Popup Overlap Rate']); +Yanfly.Param.BECPopupOverlap = eval(Yanfly.Param.BECPopupOverlap); +Yanfly.Param.BECNewPopBottom = String(Yanfly.Parameters['Newest Popup Bottom']); +Yanfly.Param.BECNewPopBottom = eval(Yanfly.Param.BECNewPopBottom); +Yanfly.Param.BECStartActCmd = String(Yanfly.Parameters['Start Actor Command']); +Yanfly.Param.BECStartActCmd = eval(Yanfly.Param.BECStartActCmd); +Yanfly.Param.BECCurMax = eval(String(Yanfly.Parameters['Current Max'])); +Yanfly.Param.BECSelectHelp = String(Yanfly.Parameters['Select Help Window']); +Yanfly.Param.BECSelectHelp = eval(Yanfly.Param.BECSelectHelp); +Yanfly.Param.BECHelpUserTx = String(Yanfly.Parameters['User Help Text']); +Yanfly.Param.BECHelpAllyTx = String(Yanfly.Parameters['Ally Help Text']); +Yanfly.Param.BECHelpAlliesTx = String(Yanfly.Parameters['Allies Help Text']); +Yanfly.Param.BECHelpEnemyTx = String(Yanfly.Parameters['Enemy Help Text']); +Yanfly.Param.BECHelpEnemiesTx = String(Yanfly.Parameters['Enemies Help Text']); +Yanfly.Param.BECHelpAllTx = String(Yanfly.Parameters['All Help Text']); +Yanfly.Param.BECHelpRandTx = String(Yanfly.Parameters['Random Help Text']); +Yanfly.Param.BECFrontPosX = String(Yanfly.Parameters['Front Position X']); +Yanfly.Param.BECFrontPosY = String(Yanfly.Parameters['Front Position Y']); +Yanfly.Param.BECFrontSprite = String(Yanfly.Parameters['Front Actor Sprite']); +Yanfly.Param.BECFrontSprite = eval(Yanfly.Param.BECFrontSprite); +Yanfly.Param.BECFrSpPrio = String(Yanfly.Parameters['Front Sprite Priority']); +Yanfly.Param.BECHomePosX = String(Yanfly.Parameters['Home Position X']); +Yanfly.Param.BECHomePosY = String(Yanfly.Parameters['Home Position Y']); +Yanfly.Param.BECSideSpPrio = String(Yanfly.Parameters['Side Sprite Priority']); +Yanfly.Param.BECSideSpPrio = eval(Yanfly.Param.BECSideSpPrio); +Yanfly.Param.BECAnchorX = Number(Yanfly.Parameters['Default X Anchor']); +Yanfly.Param.BECAnchorY = Number(Yanfly.Parameters['Default Y Anchor']); +Yanfly.Param.BECStepDist = Number(Yanfly.Parameters['Step Distance']); +Yanfly.Param.BECFlinchDist = Number(Yanfly.Parameters['Flinch Distance']); +Yanfly.Param.BECShowShadows = String(Yanfly.Parameters['Show Shadows']); +Yanfly.Param.BECShowShadows = eval(Yanfly.Param.BECShowShadows); +Yanfly.Param.BECPopupDur = Number(Yanfly.Parameters['Popup Duration']); +Yanfly.Param.BECCritPopup = String(Yanfly.Parameters['Critical Popup']); +Yanfly.Param.BECCritDur = Number(Yanfly.Parameters['Critical Duration']); +Yanfly.Param.BECActionSpeed = String(Yanfly.Parameters['Action Speed']); +Yanfly.Param.BECReflectAni = Number(Yanfly.Parameters['Reflect Animation']); +Yanfly.Param.BECMotionWait = String(Yanfly.Parameters['Motion Waiting']); +Yanfly.Param.BECMotionWait = eval(Yanfly.Param.BECMotionWait); +Yanfly.Param.BECTimeStates = String(Yanfly.Parameters['Timed States']); +Yanfly.Param.BECTimeStates = eval(Yanfly.Param.BECTimeStates); +Yanfly.Param.BECTimeBuffs = String(Yanfly.Parameters['Timed Buffs']); +Yanfly.Param.BECTimeBuffs = eval(Yanfly.Param.BECTimeBuffs); +Yanfly.Param.BECTurnTime = Number(Yanfly.Parameters['Turn Time']); +Yanfly.Param.BECAISelfTurn = eval(String(Yanfly.Parameters['AI Self Turns'])); +Yanfly.Param.BECLowerWindows = String(Yanfly.Parameters['Lower Windows']); +Yanfly.Param.BECLowerWindows = eval(Yanfly.Param.BECLowerWindows); +Yanfly.Param.BECSelectMouseOver = eval(String(Yanfly.Parameters['Mouse Over'])); +Yanfly.Param.BECEnemySelect = String(Yanfly.Parameters['Visual Enemy Select']); +Yanfly.Param.BECEnemySelect = eval(Yanfly.Param.BECEnemySelect); +Yanfly.Param.BECActorSelect = String(Yanfly.Parameters['Visual Actor Select']); +Yanfly.Param.BECActorSelect = eval(Yanfly.Param.BECActorSelect); +Yanfly.Param.BECWindowRows = Number(Yanfly.Parameters['Window Rows']); +Yanfly.Param.BECEnemyFontSize = Number(Yanfly.Parameters['Enemy Font Size']); +Yanfly.Param.BECShowEnemyName = String(Yanfly.Parameters['Show Enemy Name']); +Yanfly.Param.BECShowEnemyName = eval(Yanfly.Param.BECShowEnemyName); +Yanfly.Param.BECShowSelectBox = String(Yanfly.Parameters['Show Select Box']); +Yanfly.Param.BECShowSelectBox = eval(Yanfly.Param.BECShowSelectBox); +Yanfly.Param.BECEnemyAutoSel = String(Yanfly.Parameters['Enemy Auto Select']); +Yanfly.Param.BECCommandAlign = String(Yanfly.Parameters['Command Alignment']); +Yanfly.Param.BECCommandRows = Number(Yanfly.Parameters['Command Window Rows']); +Yanfly.Param.BECAniBaseDel = Number(Yanfly.Parameters['Animation Base Delay']); +Yanfly.Param.BECAniNextDel = Number(Yanfly.Parameters['Animation Next Delay']); + +Yanfly.Param.BECFullActText = String(Yanfly.Parameters['Show Action Text']); +Yanfly.Param.BECFullActText = eval(Yanfly.Param.BECFullActText); +Yanfly.Param.BECShowCntText = String(Yanfly.Parameters['Show Counter Text']); +Yanfly.Param.BECShowCntText = eval(Yanfly.Param.BECShowCntText); +Yanfly.Param.BECShowRflText = String(Yanfly.Parameters['Show Reflect Text']); +Yanfly.Param.BECShowRflText = eval(Yanfly.Param.BECShowRflText); +Yanfly.Param.BECShowSubText = String(Yanfly.Parameters['Show Substitute Text']); +Yanfly.Param.BECShowSubText = eval(Yanfly.Param.BECShowSubText); +Yanfly.Param.BECShowFailText = String(Yanfly.Parameters['Show Fail Text']); +Yanfly.Param.BECShowFailText = eval(Yanfly.Param.BECShowFailText); +Yanfly.Param.BECShowCritText = String(Yanfly.Parameters['Show Critical Text']); +Yanfly.Param.BECShowCritText = eval(Yanfly.Param.BECShowCritText); +Yanfly.Param.BECShowMissText = String(Yanfly.Parameters['Show Miss Text']); +Yanfly.Param.BECShowMissText = eval(Yanfly.Param.BECShowMissText); +Yanfly.Param.BECShowEvaText = String(Yanfly.Parameters['Show Evasion Text']); +Yanfly.Param.BECShowEvaText = eval(Yanfly.Param.BECShowEvaText); +Yanfly.Param.BECShowHpText = String(Yanfly.Parameters['Show HP Text']); +Yanfly.Param.BECShowHpText = eval(Yanfly.Param.BECShowHpText); +Yanfly.Param.BECShowMpText = String(Yanfly.Parameters['Show MP Text']); +Yanfly.Param.BECShowMpText = eval(Yanfly.Param.BECShowMpText); +Yanfly.Param.BECShowTpText = String(Yanfly.Parameters['Show TP Text']); +Yanfly.Param.BECShowTpText = eval(Yanfly.Param.BECShowTpText); +Yanfly.Param.BECShowStateText = String(Yanfly.Parameters['Show State Text']); +Yanfly.Param.BECShowStateText = eval(Yanfly.Param.BECShowStateText); +Yanfly.Param.BECShowBuffText = String(Yanfly.Parameters['Show Buff Text']); +Yanfly.Param.BECShowBuffText = eval(Yanfly.Param.BECShowBuffText); + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.BEC.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.BEC.DataManager_isDatabaseLoaded.call(this)) return false; + if (!Yanfly._loaded_YEP_BattleEngineCore) { + this.processMELODYNotetags($dataSkills); + this.processMELODYNotetags($dataItems); + this.processBECNotetags1($dataSkills); + this.processBECNotetags2($dataSkills); + this.processBECNotetags2($dataItems); + this.processBECNotetags3($dataEnemies); + this.processBECNotetags4($dataActors); + this.processBECNotetags4($dataClasses); + this.processBECNotetags4($dataWeapons); + this.processBECNotetags4($dataArmors); + this.processBECNotetags4($dataEnemies); + this.processBECNotetags4($dataStates); + this.processBECNotetags5($dataActors, true); + this.processBECNotetags5($dataClasses, false); + this.processBECNotetags5($dataWeapons, false); + this.processBECNotetags5($dataArmors, false); + this.processBECNotetags5($dataStates, false); + this.processBECNotetags6($dataStates); + Yanfly._loaded_YEP_BattleEngineCore = true; + } + return true; +}; + +DataManager.processMELODYNotetags = function(group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + if (obj.actionsMade) continue; + obj.actionsMade = true; + var notedata = obj.note.split(/[\r\n]+/); + + var actionType = 0; + this.setDefaultActions(obj); + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:SETUP ACTION|setup)>/i)) { + actionType = 1; + obj.setupActions = []; + } else if (line.match(/<\/(?:SETUP ACTION|setup)>/i)) { + var actionType = 0; + } else if (line.match(/<(?:WHOLE ACTION|whole)>/i)) { + actionType = 2; + obj.wholeActions = []; + } else if (line.match(/<\/(?:WHOLE ACTION|whole)>/i)) { + var actionType = 0; + } else if (line.match(/<(?:TARGET ACTION|target)>/i)) { + actionType = 3; + obj.targetActions = []; + } else if (line.match(/<\/(?:TARGET ACTION|target)>/i)) { + var actionType = 0; + } else if (line.match(/<(?:FOLLOW ACTION|follow)>/i)) { + actionType = 4; + obj.followActions = []; + } else if (line.match(/<\/(?:FOLLOW ACTION|follow)>/i)) { + var actionType = 0; + } else if (line.match(/<(?:FINISH ACTION|finish)>/i)) { + actionType = 5; + obj.finishActions = []; + } else if (line.match(/<\/(?:FINISH ACTION|finish)>/i)) { + var actionType = 0; + } else { + this.convertSequenceLine(obj, line, actionType); + } + } + } +}; + +Yanfly.BEC.DefaultActionSetup = [ + ['CLEAR BATTLE LOG'], + ['DISPLAY ACTION'], + ['IMMORTAL', ['TARGETS', 'TRUE']], + ['PERFORM START'], + ['WAIT FOR MOVEMENT'], + ['CAST ANIMATION'], + ['WAIT FOR ANIMATION'] +]; +Yanfly.BEC.DefaultActionWhole = [ + ['PERFORM ACTION'], +]; +Yanfly.BEC.DefaultActionTarget = [ + ['PERFORM ACTION'], +]; +if (Yanfly.Param.BECMotionWait) { + Yanfly.BEC.DefaultActionWhole.push(['MOTION WAIT', ['USER']]); + Yanfly.BEC.DefaultActionTarget.push(['MOTION WAIT', ['USER']]); +} else { + Yanfly.BEC.DefaultActionWhole.push(['WAIT', [10]]); + Yanfly.BEC.DefaultActionTarget.push(['WAIT', [10]]); +}; +Yanfly.BEC.DefaultActionWhole.push(['ACTION ANIMATION']); +Yanfly.BEC.DefaultActionWhole.push(['WAIT FOR ANIMATION']); +Yanfly.BEC.DefaultActionTarget.push(['ACTION ANIMATION']); +Yanfly.BEC.DefaultActionTarget.push(['WAIT FOR ANIMATION']); +Yanfly.BEC.DefaultActionFollow = [ +]; +Yanfly.BEC.DefaultActionFinish = [ + ['IMMORTAL', ['TARGETS', 'FALSE']], + ['WAIT FOR NEW LINE'], + ['CLEAR BATTLE LOG'], + ['PERFORM FINISH'], + ['WAIT FOR MOVEMENT'], + ['WAIT FOR EFFECT'], + ['ACTION COMMON EVENT'], +]; +DataManager.setDefaultActions = function(obj) { + obj.setupActions = Yanfly.BEC.DefaultActionSetup.slice(); + if (this.isWholeAction(obj)) { + obj.wholeActions = Yanfly.BEC.DefaultActionWhole.slice(); + this.addActionEffects(obj, obj.wholeActions); + obj.targetActions = []; + } else { + obj.wholeActions = []; + obj.targetActions = Yanfly.BEC.DefaultActionTarget.slice(); + this.addActionEffects(obj, obj.targetActions); + } + obj.followActions = Yanfly.BEC.DefaultActionFollow.slice(); + obj.finishActions = Yanfly.BEC.DefaultActionFinish.slice(); +}; + +DataManager.isWholeAction = function(obj) { + if (obj.animationId > 0 && $dataAnimations[obj.animationId]) { + var animation = $dataAnimations[obj.animationId]; + if (animation.position === 3) return true; + if (animation.position !== 3 && [2, 8, 10].contains(obj.scope)) return true; + } + return false; +}; + +DataManager.addActionEffects = function(obj, array) { + for (;;) { + array[array.length] = ['ACTION EFFECT']; + array[array.length] = ['DEATH BREAK']; + obj.repeats -= 1; + if (obj.repeats <= 0) break; + array[array.length] = ['WAIT', [8]]; + } + obj.repeats = 1; +}; + +Yanfly.BEC.SeqType6 = + /[ ]*(.*):[ ](.*),[ ](.*),[ ](.*),[ ](.*),[ ](.*),[ ](.*)/i; +Yanfly.BEC.SeqType5 = + /[ ]*(.*):[ ](.*),[ ](.*),[ ](.*),[ ](.*),[ ](.*)/i; +Yanfly.BEC.SeqType4 = + /[ ]*(.*):[ ](.*),[ ](.*),[ ](.*),[ ](.*)/i; +Yanfly.BEC.SeqType3 = + /[ ]*(.*):[ ](.*),[ ](.*),[ ](.*)/i; +Yanfly.BEC.SeqType2 = + /[ ]*(.*):[ ](.*),[ ](.*)/i; +Yanfly.BEC.SeqType1 = + /[ ]*(.*):[ ](.*)/i; +Yanfly.BEC.SeqType0 = + /[ ]*(.*)/i; +DataManager.convertSequenceLine = function(obj, line, actionType) { + if (actionType <= 0 || actionType > 5) return; + Yanfly.BEC.SeqType; + var seqArgs; + if (line.match(Yanfly.BEC.SeqType6)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = + [RegExp.$2, RegExp.$3, RegExp.$4, RegExp.$5, RegExp.$6, RegExp.$7]; + } else if (line.match(Yanfly.BEC.SeqType5)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = [RegExp.$2, RegExp.$3, RegExp.$4, RegExp.$5, RegExp.$6]; + } else if (line.match(Yanfly.BEC.SeqType4)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = [RegExp.$2, RegExp.$3, RegExp.$4, RegExp.$5]; + } else if (line.match(Yanfly.BEC.SeqType3)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = [RegExp.$2, RegExp.$3, RegExp.$4]; + } else if (line.match(Yanfly.BEC.SeqType2)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = [RegExp.$2, RegExp.$3]; + } else if (line.match(Yanfly.BEC.SeqType1)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = [RegExp.$2]; + } else if (line.match(Yanfly.BEC.SeqType0)) { + Yanfly.BEC.SeqType = RegExp.$1; + seqArgs = []; + } else { + return; + } + var array = [Yanfly.BEC.SeqType, seqArgs]; + if (actionType === 1) obj.setupActions[obj.setupActions.length] = array; + if (actionType === 2) obj.wholeActions[obj.wholeActions.length] = array; + if (actionType === 3) obj.targetActions[obj.targetActions.length] = array; + if (actionType === 4) obj.followActions[obj.followActions.length] = array; + if (actionType === 5) obj.finishActions[obj.finishActions.length] = array; +}; + +DataManager.processBECNotetags1 = function(group) { + var note1 = /<(?:CAST ANIMATION|cast ani):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.castAnimation = 0; + if (obj.hitType === 0) obj.castAnimation = Yanfly.Param.CastCertHit; + if (obj.hitType === 1) obj.castAnimation = Yanfly.Param.CastPhysical; + if (obj.hitType === 2) obj.castAnimation = Yanfly.Param.CastMagical; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.castAnimation = parseInt(RegExp.$1); + } + } + } +}; + +DataManager.processBECNotetags2 = function(group) { + var note1 = /<(?:ACTION COPY):[ ](.*):[ ]*(\d+)>/i; + var note2 = /<(?:SPEED):[ ]([\+\-]\d+)>/i; + var note3 = /<(?:DISPLAY NAME|DISPLAY TEXT):[ ](.*)>/i; + var note4 = /<(?:DISPLAY ICON):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.battleDisplayText = obj.name; + obj.battleDisplayIcon = obj.iconIndex; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + var text = String(RegExp.$1).toUpperCase(); + var target; + if (['I', 'ITEM'].contains(text)) { + target = $dataItems[parseInt(RegExp.$2)]; + } else if (['S', 'SKILL'].contains(text)) { + target = $dataSkills[parseInt(RegExp.$2)]; + } + if (target) { + obj.setupActions = target.setupActions.slice(); + obj.wholeActions = target.wholeActions.slice(); + obj.targetActions = target.targetActions.slice(); + obj.followActions = target.followActions.slice(); + obj.finishActions = target.finishActions.slice(); + } + } else if (line.match(note2)) { + obj.speed = parseInt(RegExp.$1); + } else if (line.match(note3)) { + obj.battleDisplayText = String(RegExp.$1); + } else if (line.match(note4)) { + obj.battleDisplayIcon = parseInt(RegExp.$1); + } + } + } +}; + +DataManager.processBECNotetags3 = function(group) { + var note1 = /<(?:ATTACK ANIMATION|attack ani):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.attackAnimationId = Yanfly.Param.EnemyAtkAni; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.attackAnimationId = parseInt(RegExp.$1); + } + } + } +}; + +DataManager.processBECNotetags4 = function(group) { + var note1 = /<(?:REFLECT ANIMATION|reflect ani):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.reflectAnimationId = 0; + obj.spriteCannotMove = false; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1)) { + obj.reflectAnimationId = parseInt(RegExp.$1); + } else if (line.match(/<(?:SPRITE CANNOT MOVE)>/i)) { + obj.spriteCannotMove = true; + } + } + } +}; + +DataManager.processBECNotetags5 = function(group, isActor) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + if (isActor) { + obj.anchorX = Yanfly.Param.BECAnchorX; + obj.anchorY = Yanfly.Param.BECAnchorY; + } + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:ANCHOR X):[ ](\d+)[.](\d+)>/i)) { + obj.anchorX = eval(String(RegExp.$1) + '.' + String(RegExp.$2)); + } else if (line.match(/<(?:ANCHOR Y):[ ](\d+)[.](\d+)>/i)) { + obj.anchorY = eval(String(RegExp.$1) + '.' + String(RegExp.$2)); + } + } + } +}; + +DataManager.processBECNotetags6 = function(group) { + var note1a = /<(?:ACTION START):[ ](\d+)>/i; + var note1b = /<(?:ACTION START):[ ](\d+)[ ](?:THROUGH|to)[ ](\d+)>/i; + var note2a = /<(?:TURN START):[ ](\d+)>/i; + var note2b = /<(?:TURN START):[ ](\d+)[ ](?:THROUGH|to)[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(note1a)) { + var turns = parseInt(RegExp.$1); + obj.autoRemovalTiming = 3; + obj.maxTurns = turns; + obj.minTurns = turns; + } else if (line.match(note1b)) { + var turns1 = parseInt(RegExp.$1); + var turns2 = parseInt(RegExp.$2); + obj.autoRemovalTiming = 3; + obj.maxTurns = turns1; + obj.minTurns = turns2; + } else if (line.match(note2a)) { + var turns = parseInt(RegExp.$1); + obj.autoRemovalTiming = 4; + obj.maxTurns = turns; + obj.minTurns = turns; + } else if (line.match(note2b)) { + var turns1 = parseInt(RegExp.$1); + var turns2 = parseInt(RegExp.$2); + obj.autoRemovalTiming = 4; + obj.maxTurns = turns1; + obj.minTurns = turns2; + } + } + } +}; + +//============================================================================= +// TouchInput +//============================================================================= + +Yanfly.BEC.TouchInput_onMouseMove = TouchInput._onMouseMove; +TouchInput._onMouseMove = function(event) { + Yanfly.BEC.TouchInput_onMouseMove.call(this, event); + this._mouseOverX = Graphics.pageToCanvasX(event.pageX); + this._mouseOverY = Graphics.pageToCanvasY(event.pageY); +}; + +//============================================================================= +// BattleManager +//============================================================================= + +Yanfly.BEC.BattleManager_initMembers = BattleManager.initMembers; +BattleManager.initMembers = function() { + Yanfly.BEC.BattleManager_initMembers.call(this); + this._forceSelection = false; + this._allSelection = false; + this._victoryPhase = false; + this._forceActionQueue = []; +}; + +BattleManager.isBattleSystem = function(value) { + return value.toLowerCase() === $gameSystem.getBattleSystem(); +}; + +BattleManager.isDTB = function() { + return this.isBattleSystem('dtb'); +}; + +BattleManager.isTurnBased = function() { + if (this.isDTB()) return true; + return false; +}; + +BattleManager.isTickBased = function() { + return !this.isTurnBased(); +}; + +BattleManager.tickRate = function() { + return 1; +}; + +BattleManager.forceSelection = function() { + this._forceSelection = true; +}; + +BattleManager.isForceSelection = function() { + return this._forceSelection; +}; + +BattleManager.resetSelection = function() { + this._forceSelection = false; +}; + +BattleManager.startAllSelection = function() { + this._allSelection = true; +}; + +BattleManager.isAllSelection = function() { + return this._allSelection && BattleManager.isInputting(); +}; + +BattleManager.stopAllSelection = function() { + this._allSelection = false; +}; + +Yanfly.BEC.BattleManager_makeEscapeRatio = BattleManager.makeEscapeRatio; +BattleManager.makeEscapeRatio = function() { + if (this.isDTB()) { + var code = Yanfly.Param.BECEscRatio; + try { + this._escapeRatio = eval(code); + } catch (e) { + this._escapeRatio = 0; + Yanfly.Util.displayError(e, code, 'ESCAPE RATIO FORMULA ERROR'); + } + var code = Yanfly.Param.BECEscFail; + try { + this._escapeFailBoost = eval(code); + } catch (e) { + this._escapeFailBoost = 0; + Yanfly.Util.displayError(e, code, 'ESCAPE FAIL BOOST FORMULA ERROR'); + } + } else { + this._escapeFailBoost = 0.1; + Yanfly.BEC.BattleManager_makeEscapeRatio.call(this); + } +}; + +BattleManager.timeBasedStates = function() { + if (!$gameParty.inBattle()) return false; + if (this.isTurnBased()) return false; + if (this._timeBasedStates !== undefined) return this._timeBasedStates; + this._timeBasedStates = Yanfly.Param.BECTimeStates; + return this._timeBasedStates; +}; + +BattleManager.timeBasedBuffs = function() { + if (!$gameParty.inBattle()) return false; + if (this.isTurnBased()) return false; + if (this._timeBasedBuffs !== undefined) return this._timeBasedBuffs; + this._timeBasedBuffs = Yanfly.Param.BECTimeBuffs; + return this._timeBasedBuffs; +}; + +BattleManager.displayStartMessages = function() { + if (Yanfly.Param.BECEmergeText) { + $gameTroop.enemyNames().forEach(function(name) { + $gameMessage.add(TextManager.emerge.format(name)); + }); + } + if (this._preemptive && Yanfly.Param.BECPreEmpText) { + $gameMessage.add(TextManager.preemptive.format($gameParty.name())); + } else if (this._surprise && Yanfly.Param.BECSurpText) { + $gameMessage.add(TextManager.surprise.format($gameParty.name())); + } +}; + +BattleManager.registerSprite = function(battler, sprite) { + if (!this._registeredSprites) this._registeredSprites = {}; + if (battler.isActor()) var id = 100000 + battler.actorId(); + if (battler.isEnemy()) var id = 200000 + battler.index(); + this._registeredSprites[id] = sprite; +}; + +BattleManager.getSprite = function(battler) { + if (!this._registeredSprites) this._registeredSprites = {}; + if (battler.isActor()) var id = 100000 + battler.actorId(); + if (battler.isEnemy()) var id = 200000 + battler.index(); + return this._registeredSprites[id]; +}; + +BattleManager.setSpritePriority = function() { + if ($gameSystem.isSideView()) { + this._spritePriority = Yanfly.Param.BECSideSpPrio; + } else { + this._spritePriority = Yanfly.Param.BECFrontSprite; + } + if (this._spritePriority === false) this._spritePriority = 0; + if (this._spritePriority === true) this._spritePriority = 1; +}; + +BattleManager.getSpritePriority = function() { + if (!this._spritePriority) this.setSpritePriority(); + return this._spritePriority; +}; + +BattleManager.changeActor = function(newActorIndex, lastActorActionState) { + var lastActor = this.actor(); + this._actorIndex = newActorIndex; + var newActor = this.actor(); + if (lastActor) { + lastActor.setActionState(lastActorActionState); + lastActor.spriteReturnHome(); + } + if (newActor) { + newActor.setActionState('inputting'); + newActor.spriteStepForward(); + } +}; + +BattleManager.createActions = function() { + $gameParty.createActions(); + $gameTroop.createActions(); +}; + +BattleManager.clearInputtingAction = function() { + if (this.inputtingAction()) this.inputtingAction().clear(); +}; + +Yanfly.BEC.BattleManager_checkBattleEnd = BattleManager.checkBattleEnd; +BattleManager.checkBattleEnd = function() { + if (this._phase === 'actionList') return false; + if (this._phase === 'actionTargetList') return false; + if (this._phase === 'action') return false; + if (this._phase === 'phaseChange') return false; + if ($gameTroop.isEventRunning()) return false; + return Yanfly.BEC.BattleManager_checkBattleEnd.call(this); +}; + +Yanfly.BEC.BattleManager_processTurn = BattleManager.processTurn; +BattleManager.processTurn = function() { + this._processTurn = true; + Yanfly.BEC.BattleManager_processTurn.call(this); + this._processTurn = false; +}; + +Yanfly.BEC.BattleManager_processVictory = BattleManager.processVictory; +BattleManager.processVictory = function() { + this._logWindow.clear(); + this._victoryPhase = true; + if (this._windowLayer) this._windowLayer.x = 0; + Yanfly.BEC.BattleManager_processVictory.call(this); +}; + +BattleManager.processEscape = function() { + $gameParty.performEscape(); + SoundManager.playEscape(); + var success = this._preemptive ? true : (Math.random() < this._escapeRatio); + if ($gamePlayer.isDebugThrough()) success = true; + if (success) { + $gameParty.performEscapeSuccess(); + this.displayEscapeSuccessMessage(); + this._escaped = true; + this.processAbort(); + } else { + this.displayEscapeFailureMessage(); + this._escapeRatio += this._escapeFailBoost; + $gameParty.clearActions(); + this.startTurn(); + } + return success; +}; + +Yanfly.BEC.BattleManager_processAbort = BattleManager.processAbort; +BattleManager.processAbort = function() { + $gameParty.removeBattleStates(); + Yanfly.BEC.BattleManager_processAbort.call(this); +}; + +BattleManager.refreshAllMembers = function() { + $gameParty.refreshMembers(); + $gameTroop.refreshMembers(); +}; + +BattleManager.startTurn = function() { + this._enteredEndPhase = false; + this._phase = 'turn'; + this.clearActor(); + $gameTroop.increaseTurn(); + $gameParty.onTurnStart(); + $gameTroop.onTurnStart(); + this._performedBattlers = []; + this.makeActionOrders(); + $gameParty.requestMotionRefresh(); + this._logWindow.startTurn(); + this._subject = this.getNextSubject(); +}; + +Yanfly.BEC.BattleManager_endTurn = BattleManager.endTurn; +BattleManager.endTurn = function() { + if (this.isTurnBased() && this._spriteset.isPopupPlaying()) return; + if (this.isTurnBased() && this._enteredEndPhase) { + this._phase = 'turnEnd'; + this._preemptive = false; + this._surprise = false; + return; + } + this._enteredEndPhase = true; + Yanfly.BEC.BattleManager_endTurn.call(this); + BattleManager.refreshAllMembers(); +}; + +BattleManager.getNextSubject = function() { + if ($gameTroop.turnCount() <= 0) return; + this._performedBattlers = this._performedBattlers || []; + this.makeActionOrders(); + for (;;) { + var battlerArray = []; + for (var i = 0; i < this._actionBattlers.length; ++i) { + var obj = this._actionBattlers[i]; + if (!this._performedBattlers.contains(obj)) battlerArray.push(obj); + } + this._actionBattlers = battlerArray; + var battler = this._actionBattlers.shift(); + if (!battler) return null; + if (battler.isBattleMember() && battler.isAlive()) { + this._performedBattlers.push(battler); + return battler; + } + } +}; + +BattleManager.update = function() { + if (!this.isBusy() && !this.updateEvent()) { + switch (this._phase) { + case 'start': + this.startInput(); + break; + case 'turn': + this.updateTurn(); + break; + case 'action': + this.updateAction(); + break; + case 'phaseChange': + this.updatePhase(); + break; + case 'actionList': + this.updateActionList() + break; + case 'actionTargetList': + this.updateActionTargetList() + break; + case 'turnEnd': + this.updateTurnEnd(); + break; + case 'battleEnd': + this.updateBattleEnd(); + break; + } + } +}; + +BattleManager.updateEvent = function() { + if (this._processingForcedAction) return false; + switch (this._phase) { + case 'start': + case 'turn': + case 'turnEnd': + case 'actionList': + case 'actionTargetList': + if (this.isActionForced()) { + this.processForcedAction(); + return true; + } else { + return this.updateEventMain(); + } + } + return this.checkAbort(); +}; + +BattleManager.queueForceAction = function(user, skillId, target) { + if (target === undefined) { + var targetIndex = 0; + } else if (typeof target === 'number') { + var targetIndex = target; + } else { + var targetIndex = target.index(); + } + var param = [ + user.isEnemy() ? 0 : 1, + user.isActor() ? user.actorId() : user.index(), + skillId, + targetIndex + ]; + var command = { + code: 339, + indent: 0, + parameters: param + } + $gameTemp.forceActionQueue(command); + this.clearResults(); + if (this.isTickBased()) this._phase = 'action'; +}; + +BattleManager.addText = function(text, wait) { + if (!SceneManager._scene._logWindow) return; + wait = wait || 0; + SceneManager._scene._logWindow.addText(text); + if (wait <= 0) return; + var last = this._actionList[this._actionList.length - 1]; + if (last && last[0] === 'WAIT') return; + this._actionList.push(['WAIT', [wait]]); +}; + +BattleManager.clearResults = function() { + var group = this.allBattleMembers(); + var length = group.length; + for (var i = 0; i < length; ++i) { + var member = group[i]; + if (member) member.clearResult(); + } + this._allTargets = []; + this._targets = []; + this._target = undefined; +}; + +Yanfly.BEC.BattleManager_forceAction = BattleManager.forceAction; +BattleManager.forceAction = function(battler) { + if (this._subject) this._subject.clearResult(); + this.createForceActionFailSafes(); + this.savePreForceActionSettings(); + Yanfly.BEC.BattleManager_forceAction.call(this, battler); +}; + +BattleManager.createForceActionFailSafes = function() { + this._actionList = this._actionList || []; + this._targets = this._targets || []; + this._allTargets = this._allTargets || []; + this._individualTargets = this._individualTargets || []; + this._phaseSteps = this._phaseSteps || []; + this._conditionFlags = this._conditionFlags || []; + this._trueFlags = this._trueFlags || []; +}; + +BattleManager.savePreForceActionSettings = function() { + var settings = this.setPreForceActionSettings(); + this._forceActionQueue.push(settings); +}; + +BattleManager.setPreForceActionSettings = function() { + return { + subject: this._subject, + action: JsonEx.makeDeepCopy(this._action), + actionList: JsonEx.makeDeepCopy(this._actionList), + targets: this._targets.slice(), + allTargets: this._allTargets.slice(), + indTargets: this._individualTargets.slice(), + phaseSteps: JsonEx.makeDeepCopy(this._phaseSteps), + returnPhase: this._returnPhase, + phase: this._phase, + conditionFlags: JsonEx.makeDeepCopy(this._conditionFlags), + trueFlags: JsonEx.makeDeepCopy(this._trueFlags) + } +}; + +BattleManager.loadPreForceActionSettings = function() { + var settings = this._forceActionQueue[0]; + if (settings) { + this._forceActionQueue.shift(); + this.resetPreForceActionSettings(settings); + return this._subject && this._subject.isAppeared(); + } else { + return false; + } +}; + +BattleManager.resetPreForceActionSettings = function(settings) { + this._subject = settings['subject']; + this._action = settings['action']; + this._actionList = settings['actionList']; + this._targets = settings['targets']; + this._allTargets = settings['allTargets']; + this._individualTargets = settings['indTargets']; + this._phaseSteps = settings['phaseSteps']; + this._returnPhase = settings['returnPhase']; + this._conditionFlags = settings['conditionFlags']; + this._trueFlags = settings['trueFlags']; + this._phase = settings['phase']; +}; + +Yanfly.BEC.BattleManager_processForcedAction = + BattleManager.processForcedAction; +BattleManager.processForcedAction = function() { + if (this._actionForcedBattler) { + this._preForcePhase = this._phase; + this._processingForcedAction = true; + } + Yanfly.BEC.BattleManager_processForcedAction.call(this); +}; + +BattleManager.setTargets = function(array) { + this._targets = []; + var max = array.length; + for (var i = 0; i < max; ++i) { + var target = array[i]; + if (target) this._targets.push(target); + } +}; + +BattleManager.updateAction = function() { + var target = this._targets.shift(); + if (target) { + this.invokeAction(this._subject, target); + } else { + if (this._returnPhase === 'target') { + this.setTargets([this._individualTargets[0]]); + this._phase = 'actionTargetList'; + } else { + this.setTargets(this._allTargets.slice()); + this._phase = 'actionList'; + } + } +}; + +BattleManager.invokeAction = function(subject, target) { + if (!Yanfly.Param.BECOptSpeed) this._logWindow.push('pushBaseLine'); + var normal = true; + if (Math.random() < this._action.itemMrf(target)) { + this.invokeMagicReflection(subject, target); + } else if (Math.random() < this._action.itemCnt(target)) { + this.invokeCounterAttack(subject, target); + } else { + this.invokeNormalAction(subject, target); + } + if (subject) subject.setLastTarget(target); + if (!Yanfly.Param.BECOptSpeed) this._logWindow.push('popBaseLine'); +}; + +BattleManager.invokeCounterAttack = function(subject, target) { + var action = new Game_Action(target); + this._logWindow.displayCounter(target); + action.setAttack(); + action.apply(subject); + this._logWindow.displayActionResults(target, subject); + if (subject.isDead()) subject.performCollapse(); +}; + +Yanfly.BEC.BattleManager_invokeMagicReflection = + BattleManager.invokeMagicReflection; +BattleManager.invokeMagicReflection = function(subject, target) { + Yanfly.BEC.BattleManager_invokeMagicReflection.call(this, subject, target); + if (subject.isDead()) subject.performCollapse(); +}; + +BattleManager.updatePhase = function() { + var phase = this._phaseSteps.shift(); + if (phase) this.createPhaseChanges(); + switch (phase) { + case 'setup': + this.createSetupActions(); + break; + case 'whole': + this.createWholeActions(); + break; + case 'target': + this.createTargetActions(); + break; + case 'follow': + this.createFollowActions(); + break; + case 'finish': + this.createFinishActions(); + break; + default: + this.endAction(); + break; + } +}; + +BattleManager.createPhaseChanges = function() { + this._phase = 'actionList'; + this.setTargets(this._allTargets.slice()); + this._conditionFlags = []; + this._trueFlags = []; +}; + +BattleManager.createSetupActions = function() { + $gameTemp.clearActionSequenceSettings(); + this._returnPhase = 'setup'; + this._actionList = this._action.item().setupActions.slice(); +}; + +BattleManager.createWholeActions = function() { + this._returnPhase = 'whole'; + this._actionList = this._action.item().wholeActions.slice(); +}; + +BattleManager.createTargetActions = function() { + this._returnPhase = 'target'; + this._phase = 'actionTargetList'; + this.setTargets([this._individualTargets[0]]); + this._actionList = this._action.item().targetActions.slice(); +}; + +BattleManager.createFollowActions = function() { + this._returnPhase = 'follow'; + this._actionList = this._action.item().followActions.slice(); +}; + +BattleManager.createFinishActions = function() { + this._returnPhase = 'finish'; + this._actionList = this._action.item().finishActions.slice(); +}; + +Yanfly.BEC.BattleManager_endAction = BattleManager.endAction; +BattleManager.endAction = function() { + if (this._subject) { + this._subject.onAllActionsEnd(); + } + if (this._processingForcedAction) { + this._subject.removeCurrentAction(); + this._phase = this._preForcePhase; + } + this._processingForcedAction = false; + if (this.loadPreForceActionSettings()) return; + Yanfly.BEC.BattleManager_endAction.call(this); +}; + +BattleManager.updateActionList = function() { + for (;;) { + this._actSeq = this._actionList.shift(); + if (this._actSeq) { + if (!this.actionConditionsMet(this._actSeq)) continue; + var seqName = this._actSeq[0].toUpperCase(); + if (!this.processActionSequenceCheck(seqName, this._actSeq[1])) { + break; + } + } else { + this._phase = 'phaseChange'; + break; + } + } +}; + +BattleManager.updateActionTargetList = function() { + for (;;) { + this._actSeq = this._actionList.shift(); + if (this._actSeq) { + if (!this.actionConditionsMet(this._actSeq)) continue; + var seqName = this._actSeq[0].toUpperCase(); + if (!this.processActionSequenceCheck(seqName, this._actSeq[1])) { + break; + } + } else if (this._individualTargets.length > 0) { + this._individualTargets.shift(); + if (this._individualTargets.length > 0) { + this.setTargets([this._individualTargets[0]]); + this._actionList = this._action.item().targetActions.slice(); + } else { + this._phase = 'phaseChange'; + break; + } + } else { + this._phase = 'phaseChange'; + break; + } + } +}; + +BattleManager.updateActionTargetList = function() { + for (;;) { + this._actSeq = this._actionList.shift(); + if (this._actSeq) { + if (!this.actionConditionsMet(this._actSeq)) continue; + var seqName = this._actSeq[0].toUpperCase(); + if (!this.processActionSequenceCheck(seqName, this._actSeq[1])) { + break; + } + } else if (this._individualTargets.length > 0) { + this._individualTargets.shift(); + if (this._individualTargets.length > 0) { + this.setTargets([this._individualTargets[0]]); + this._actionList = this._action.item().targetActions.slice(); + } else { + this._phase = 'phaseChange'; + break; + } + } else { + this._phase = 'phaseChange'; + break; + } + } +}; + +BattleManager.startAction = function() { + var subject = this._subject; + if (!subject) return this.endAction(); + var action = subject.currentAction(); + this._action = action; + if (!this._action) return this.endAction(); + if (!this._action.item()) return this.endAction(); + var targets = action.makeTargets(); + this.setTargets(targets); + this._allTargets = targets.slice(); + this._individualTargets = targets.slice(); + this._phase = 'phaseChange'; + this._phaseSteps = ['setup', 'whole', 'target', 'follow', 'finish']; + this._returnPhase = ''; + this._actionList = []; + subject.useItem(this._action.item()); + this._action.applyGlobal(); + this._logWindow.startAction(this._subject, this._action, this._targets); +}; + +BattleManager.processActionSequenceCheck = function(actionName, actionArgs) { + // IF condition + if (actionName.match(/IF[ ](.*)/i)) { + return this.actionIfConditions(actionName, actionArgs); + } + return this.processActionSequence(actionName, actionArgs) +}; + +BattleManager.processActionSequence = function(actionName, actionArgs) { + // NO ACTION + if (actionName === '') { + return true; + } + // ACTION ANIMATION + if (actionName === 'ACTION ANIMATION') { + return this.actionActionAnimation(actionArgs); + } + // ACTION EFFECT + if (actionName === 'ACTION COMMON EVENT') { + return this.actionActionCommonEvent(); + } + // ACTION EFFECT + if (actionName === 'ACTION EFFECT') { + return this.actionActionEffect(actionArgs); + } + // ANI WAIT: frames + if (['ANI WAIT', 'ANIWAIT', 'ANIMATION WAIT'].contains(actionName)) { + return this.actionAniWait(actionArgs[0]); + } + // CAST ANIMATION + if (actionName === 'CAST ANIMATION') { + return this.actionCastAnimation(); + } + // CLEAR BATTLE LOG + if (actionName === 'CLEAR BATTLE LOG') { + return this.actionClearBattleLog(); + } + // DEATH BREAK + if (actionName === 'DEATH BREAK') { + return this.actionDeathBreak(); + } + // DISPLAY ACTION + if (actionName === 'DISPLAY ACTION') { + return this.actionDisplayAction(); + } + // IMMORTAL: targets, true/false + if (actionName === 'IMMORTAL') { + return this.actionImmortal(actionArgs); + } + // MOTION WAIT + if (actionName === 'MOTION WAIT') { + return this.actionMotionWait(actionArgs); + } + // PERFORM ACTION + if (actionName === 'PERFORM ACTION') { + return this.actionPerformAction(); + } + // PERFORM FINISH + if (actionName === 'PERFORM FINISH') { + return this.actionPerformFinish(); + } + // PERFORM START + if (actionName === 'PERFORM START') { + return this.actionPerformStart(); + } + // WAIT: frames + if (actionName === 'WAIT') { + return this.actionWait(actionArgs[0]); + } + // WAIT FOR ANIMATION + if (actionName === 'WAIT FOR ANIMATION') { + return this.actionWaitForAnimation(); + } + // WAIT FOR EFFECT + if (actionName === 'WAIT FOR EFFECT') { + return this.actionWaitForEffect(); + } + // WAIT FOR MOVEMENT + if (actionName === 'WAIT FOR MOVEMENT') { + return this.actionWaitForMovement(); + } + // WAIT FOR NEW LINE + if (actionName === 'WAIT FOR NEW LINE') { + return this.actionWaitForNewLine(); + } + // WAIT FOR POPUPS + if (actionName === 'WAIT FOR POPUPS') { + return this.actionWaitForPopups(); + } + return false; +}; + +BattleManager.makeActionTargets = function(string) { + var targets = [] + string = string.toUpperCase() + if (['SUBJECT', 'USER'].contains(string)) { + return [this._subject]; + } + if (['TARGET', 'TARGETS'].contains(string)) { + var group = this._targets; + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ACTORS', 'EXISTING ACTORS', 'ALIVE ACTORS'].contains(string)) { + var group = $gameParty.aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ACTORS ALL', 'ALL ACTORS', 'PARTY'].contains(string)) { + var group = $gameParty.battleMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['DEAD ACTORS', 'DEAD ACTOR'].contains(string)) { + var group = $gameParty.deadMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target) targets.push(target); + } + return targets; + } + if (['ACTORS NOT USER', 'ACTORS NOT SUBJECT'].contains(string)) { + var group = $gameParty.aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target !== this._subject && target.isAppeared()) { + targets.push(target); + } + } + return targets; + } + if (['ENEMIES', 'EXISTING ENEMIES', 'ALIVE ENEMIES', 'TROOP', + 'TROOPS'].contains(string)) { + var group = $gameTroop.aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ENEMIES ALL', 'ALL ENEMIES'].contains(string)) { + var group = $gameTroop.members(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['DEAD ENEMIES', 'DEAD ENEMY'].contains(string)) { + var group = $gameTroop.deadMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target) targets.push(target); + } + return targets; + } + if (['ENEMIES NOT USER', 'ENEMIES NOT SUBJECT', 'TROOP NOT USER', + 'TROOP NOT SUBJECT'].contains(string)) { + var group = $gameTroop.aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target !== this._subject && target.isAppeared()) { + targets.push(target); + } + } + return targets; + } + if (string.match(/ACTOR[ ](\d+)/i)) { + var target = $gameParty.battleMembers()[parseInt(RegExp.$1)]; + if (target && target.isAppeared()) return [target]; + } + if (string.match(/ENEMY[ ](\d+)/i)) { + var target = $gameTroop.members()[parseInt(RegExp.$1)]; + if (target && target.isAppeared()) return [target]; + } + if (['FRIEND', 'FRIENDS', 'ALLIES'].contains(string)) { + var group = this._action.friendsUnit().aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ALL FRIENDS', 'ALL ALLIES'].contains(string)) { + var group = this._action.friendsUnit().members(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['DEAD FRIEND', 'DEAD FRIENDS', 'DEAD ALLIES'].contains(string)) { + var group = this._action.friendsUnit().deadMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['OPPONENT', 'OPPONENTS', 'RIVALS', 'FOES'].contains(string)) { + var group = this._action.opponentsUnit().aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ALL OPPONENTS', 'ALL RIVALS', 'ALL FOES'].contains(string)) { + var group = this._action.opponentsUnit().members(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['DEAD OPPONENT', 'DEAD OPPONENTS', 'DEAD RIVALS', + 'DEAD FOES'].contains(string)) { + var group = this._action.opponentsUnit().deadMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target) targets.push(target); + } + return targets; + } + if (['FRIENDS NOT USER', 'ALLIES NOT USER'].contains(string)) { + var group = this._action.friendsUnit().aliveMembers(); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target !== this._subject && target.isAppeared()) { + targets.push(target); + } + } + return targets; + } + if (string.match(/(?:FRIEND|ALLY)[ ](\d+)/i)) { + var target = this._action.friendsUnit().members()[parseInt(RegExp.$1)]; + if (target && target.isAppeared()) return [target]; + } + if (string.match(/(?:OPPONENT|FOE|RIVAL)[ ](\d+)/i)) { + var target = this._action.opponentsUnit().members()[parseInt(RegExp.$1)] + if (target && target.isAppeared()) return [target]; + } + if (['ALL ALIVE'].contains(string)) { + var group = this._action.friendsUnit().aliveMembers(); + group = group.concat(this._action.opponentsUnit().aliveMembers()); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ALL MEMBERS'].contains(string)) { + var group = this._action.friendsUnit().members(); + group = group.concat(this._action.opponentsUnit().members()); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + return targets; + } + if (['ALL DEAD'].contains(string)) { + var group = this._action.friendsUnit().deadMembers(); + group = group.concat(this._action.opponentsUnit().deadMembers()); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target) targets.push(target); + } + return targets; + } + if (['ALL NOT USER'].contains(string)) { + var group = this._action.friendsUnit().aliveMembers(); + group = group.concat(this._action.opponentsUnit().aliveMembers()); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target !== this._subject && target.isAppeared()) { + targets.push(target); + } + } + return targets; + } + if (['FOCUS', 'PARTICIPANTS'].contains(string)) { + var group = this._targets; + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target && target.isAppeared()) targets.push(target); + } + if (!targets.contains(this._subject)) targets.push(this._subject); + return targets; + } + if (['NOT FOCUS', 'NONPARTICIPANTS'].contains(string)) { + var group = this._action.friendsUnit().members(); + group = group.concat(this._action.opponentsUnit().members()); + for (var i = 0; i < group.length; ++i) { + var target = group[i]; + if (target) { + if (target === this._subject) continue; + if (target.isHidden()) continue; + if (this._targets.contains(target)) continue; + + if (target.isDead()) { + if (Imported.YEP_X_AnimatedSVEnemies && target.isEnemy()) { + if (target.hasSVBattler() && !target.sideviewCollapse()) { + // Ignore + } else { + continue; + } + } else if (target.isActor()) { + // Ignore + } else { + continue; + } + } + + targets.push(target); + } + } + return targets; + } + if (string.match(/(?:CHAR|CHARA|CHARACTER)[ ](\d+)/i)) { + var actorId = parseInt(RegExp.$1); + var actor = $gameActors.actor(actorId); + if (actor && $gameParty.battleMembers().contains(actor)) { + return [actor]; + } + } + if ('FIRST' === string.toUpperCase()) { + return [this._targets[0]]; + } + return targets; +}; + +BattleManager.actionConditionsMet = function(actSeq) { + var ci = this._conditionFlags.length - 1; + var actionName = actSeq[0]; + var actionArgs = actSeq[1]; + var subject = this._subject; + var user = this._subject; + var target = this._targets[0]; + var targets = this._targets; + var action = this._action; + var item = this._action.item(); + if (actionName.match(/ELSE[ ]IF[ ](.*)/i)) { + if (this._conditionFlags.length <= 0) return false; + if (this._conditionFlags[ci]) { + this._conditionFlags[ci] = false; + this._trueFlags[ci] = true; + } else if (!this._conditionFlags[ci] && !this._trueFlags[ci]) { + var text = String(RegExp.$1); + try { + this._conditionFlags[ci] = eval(text); + this._trueFlags[ci] = eval(text); + } catch (e) { + Yanfly.Util.displayError(e, text, 'ACTION SEQUENCE IF CONDITION ERROR'); + this._conditionFlags[ci] = false; + this._trueFlags[ci] = false; + } + } + return false; + } else if (actionName.match(/ELSE[ ]*(.*)/i)) { + if (this._conditionFlags.length <= 0) return false; + if (this._conditionFlags[ci]) { + this._conditionFlags[ci] = false; + this._trueFlags[ci] = true; + } else if (!this._conditionFlags[ci] && !this._trueFlags[ci]) { + this._conditionFlags[ci] = true; + this._trueFlags[ci] = true; + } + return false; + } else if (actionName.toUpperCase() === 'END') { + if (this._conditionFlags.length <= 0) return false; + this._conditionFlags.pop(); + this._trueFlags.pop(); + return false; + } + if (this._conditionFlags.length > 0) return this._conditionFlags[ci]; + return true +}; + +BattleManager.actionActionAnimation = function(actionArgs) { + if (actionArgs && actionArgs[0]) { + var targets = this.makeActionTargets(actionArgs[0]); + } else { + var targets = this._targets; + } + var mirror = false; + if (actionArgs && actionArgs[1]) { + if (actionArgs[1].toUpperCase() === 'MIRROR') mirror = true; + } + var subject = this._subject; + var group = targets.filter(Yanfly.Util.onlyUnique); + var aniId = this._action.item().animationId; + if (aniId < 0) { + if (mirror) { + this._logWindow.showActorAtkAniMirror(subject, group); + } else { + this._logWindow.showAttackAnimation(subject, group); + } + } else { + this._logWindow.showNormalAnimation(group, aniId, mirror); + } + return true; +}; + +BattleManager.actionActionCommonEvent = function() { + this._action.item().effects.forEach(function(effect) { + if (effect.code === Game_Action.EFFECT_COMMON_EVENT) { + $gameTemp.reserveCommonEvent(effect.dataId); + } + }, this); + return false; +}; + +BattleManager.actionActionEffect = function(actionArgs) { + if (actionArgs && actionArgs[0]) { + var targets = this.makeActionTargets(actionArgs[0]); + } else { + var targets = this._targets; + } + targets.forEach(function(target) { + if (target !== undefined) { + var alreadyDead = target.isDead(); + this.invokeAction(this._subject, target); + if (target.isDead() && !alreadyDead) { + target.performCollapse(); + } + } + }, this); + return true; +}; + +BattleManager.actionAniWait = function(frames) { + frames *= Yanfly.Param.AnimationRate || 4; + this._logWindow._waitCount = parseInt(frames); + return false; +}; + +BattleManager.actionCastAnimation = function() { + if (!$gameSystem.isSideView() && this._subject.isActor()) return true; + if (!this._action.isAttack() && !this._action.isGuard() && + this._action.isSkill()) { + if (this._action.item().castAnimation > 0) { + var ani = $dataAnimations[this._action.item().castAnimation] + this._logWindow.showAnimation(this._subject, [this._subject], + this._action.item().castAnimation); + } + } + return true; +}; + + +BattleManager.actionClearBattleLog = function() { + this._logWindow.clear(); + return false; +}; + +BattleManager.actionDeathBreak = function() { + if (this._subject.isDead()) { + this._targets = []; + this._actionList = []; + this._individualTargets = []; + this._phase = 'phaseChange'; + return false; + } + return true; +}; + +BattleManager.actionDisplayAction = function() { + this._logWindow.displayAction(this._subject, this._action.item()); + return false; +}; + +BattleManager.actionIfConditions = function(actionName, actionArgs) { + var subject = this._subject; + var user = this._subject; + var target = this._targets[0]; + var targets = this._targets; + var action = this._action; + var item = this._action.item(); + var actionName = this._actSeq[0]; + if (actionName.match(/IF[ ](.*)/i)) { + var text = String(RegExp.$1); + try { + this._conditionFlags.push(eval(text)); + } catch (e) { + this._conditionFlags.push(false); + Yanfly.Util.displayError(e, text, 'ACTION SEQUENCE IF CONDITION ERROR'); + } + this._trueFlags.push(false); + var ci = this._conditionFlags.length; + } + return true; +}; + +BattleManager.actionImmortal = function(actionArgs) { + var targets = + this.makeActionTargets(actionArgs[0]).filter(Yanfly.Util.onlyUnique); + try { + var value = eval(String(actionArgs[1]).toLowerCase()); + } catch (e) { + var value = false; + } + targets.forEach(function (target) { + if (value) { + target.addImmortal(); + } else { + var alreadyDead = target.isDead(); + target.removeImmortal(); + } + }, this); + return true; +}; + +BattleManager.actionMotionWait = function(actionArgs) { + var targets = this.makeActionTargets(actionArgs[0]); + if (targets[0].isActor() && targets[0].isSpriteVisible()) { + this._logWindow._waitCount += 12; + return false; + } + return true; +}; + +BattleManager.actionPerformAction = function() { + this._logWindow.performAction(this._subject, this._action); + if (this._subject.isActor() && this._subject.isSpriteVisible) { + this._logWindow._waitCount += 20; + return false; + } + return true; +}; + +BattleManager.actionPerformFinish = function() { + this._logWindow.performActionEnd(this._subject); + $gameParty.aliveMembers().forEach(function(member) { + member.spriteReturnHome(); + }); + $gameTroop.aliveMembers().forEach(function(member) { + member.spriteReturnHome(); + }); + return true; +}; + +BattleManager.actionPerformStart = function() { + this._logWindow.performActionStart(this._subject, this._action); + return true; +}; + +BattleManager.actionWait = function(frames) { + this._logWindow._waitCount = parseInt(frames); + return false; +}; + +BattleManager.actionWaitForAnimation = function() { + this._logWindow.waitForAnimation(); + return false; +}; + +BattleManager.actionWaitForEffect = function() { + this._logWindow.waitForEffect(); + return false; +}; + +BattleManager.actionWaitForMovement = function() { + this._logWindow.waitForMovement(); + return false; +}; + +BattleManager.actionWaitForNewLine = function() { + this._logWindow.waitForNewLine(); + return false; +}; + +BattleManager.actionWaitForPopups = function() { + this._logWindow.waitForPopups(); + return false; +}; + +//============================================================================= +// SceneManager +//============================================================================= + +Yanfly.BEC.SceneManager_snapForBackground = SceneManager.snapForBackground; +SceneManager.snapForBackground = function() { + if ($gameParty.inBattle()) { + var spriteset = this._scene._spriteset; + if (spriteset.battleback1Name() === '' && + spriteset.battleback2Name() === '') { + return; + } + } + Yanfly.BEC.SceneManager_snapForBackground.call(this); +}; + +//============================================================================= +// Sprite_Battler +//============================================================================= + +Yanfly.BEC.Sprite_Battler_initialize = Sprite_Battler.prototype.initialize; +Sprite_Battler.prototype.initialize = function(battler) { + this.preSpriteInitialize(battler); + Yanfly.BEC.Sprite_Battler_initialize.call(this, battler); +}; + +Sprite_Battler.prototype.preSpriteInitialize = function(battler) { +}; + +Yanfly.BEC.Sprite_Battler_update = Sprite_Battler.prototype.update; +Sprite_Battler.prototype.update = function() { + Yanfly.BEC.Sprite_Battler_update.call(this); + if (this._postSpriteInitialized) return; + this.postSpriteInitialize(); +}; + +Sprite_Battler.prototype.postSpriteInitialize = function() { + this._postSpriteInitialized = true; +}; + +Yanfly.BEC.Sprite_Battler_initMembers = Sprite_Battler.prototype.initMembers; +Sprite_Battler.prototype.initMembers = function() { + Yanfly.BEC.Sprite_Battler_initMembers.call(this); + this.adjustAnchor(); + this.setZ(); +}; + +Sprite_Battler.prototype.adjustAnchor = function() { + this.anchor.x = 0.5; + this.anchor.y = 1.0; +}; + +Sprite_Battler.prototype.setZ = function() { + this.z = 1; +}; + +Sprite_Battler.prototype.setupDamagePopup = function() { + if (this._battler.isDamagePopupRequested()) { + if (this._battler.isSpriteVisible()) { + var sprite = new Sprite_Damage(); + sprite.x = this.x + this.damageOffsetX(); + sprite.y = this.y + this.damageOffsetY(); + sprite.setup(this._battler); + this.pushDamageSprite(sprite); + BattleManager._spriteset.addChild(sprite); + this._battler.clearResult(); + } + } else { + this._battler.clearDamagePopup(); + } +}; + +Sprite_Battler.prototype.pushDamageSprite = function(sprite) { + var heightBuffer = Yanfly.Param.BECPopupOverlap; + if (Yanfly.Param.BECNewPopBottom) { + this._damages.push(sprite); + this._damages.forEach(function(spr) { + for (var i = 0; i < spr.children.length; i++) { + childSprite = spr.children[i]; + childSprite.anchor.y += heightBuffer; + } + }, this); + } else { + this._damages.push(sprite); + heightBuffer *= this._damages.length + for (var i = 0; i < sprite.children.length; i++) { + childSprite = sprite.children[i]; + childSprite.anchor.y += heightBuffer; + } + } +}; + +Yanfly.BEC.Sprite_Battler_setBattler = Sprite_Battler.prototype.setBattler; +Sprite_Battler.prototype.setBattler = function(battler) { + Yanfly.BEC.Sprite_Battler_setBattler.call(this, battler); + if (battler) battler.setBattler(this); +}; + +Yanfly.BEC.Sprite_Battler_startMove = Sprite_Battler.prototype.startMove; +Sprite_Battler.prototype.startMove = function(x, y, duration) { + if (this._battler && !this._battler.spriteCanMove()) return; + Yanfly.BEC.Sprite_Battler_startMove.call(this, x, y, duration); +}; + +Sprite_Battler.prototype.stepForward = function() { + this.startMove(Yanfly.Param.BECStepDist, 0, 12); +}; + +Sprite_Battler.prototype.stepBack = function() { + this.startMove(0, 0, 12); +}; + +Sprite_Battler.prototype.stepFlinch = function() { + var flinchX = this.x - this._homeX - Yanfly.Param.BECFlinchDist; + var flinchY = this.y - this._homeY; + this.startMove(flinchX, flinchY, 6); +}; + +Sprite_Battler.prototype.stepSubBack = function() { + var backX = -1 * this.width / 2; + this.startMove(backX, 0, 6); +}; + +Sprite_Battler.prototype.stepToSubstitute = function(focus) { + var target = focus.battler(); + var targetX = (this.x - this._homeX) + (target._homeX - this._homeX); + var targetY = (this.y - this._homeY) + (target._homeY - this._homeY);; + if (focus.isActor()) targetX -= this._mainSprite.width / 2; + if (focus.isEnemy()) targetX += this.width / 2; + this.startMove(targetX, targetY, 1); +}; + +Sprite_Battler.prototype.startMotion = function(motionType) { +}; + +Sprite_Battler.prototype.forceMotion = function(motionType) { +}; + +Sprite_Battler.prototype.refreshMotion = function() { +}; + +Sprite_Battler.prototype.startActionMotion = function() { +}; + +Sprite_Battler.prototype.moveForward = function(distance, frames) { + distance = parseInt(distance); + frames = parseInt(frames); + if (this._battler.isActor()) distance *= -1; + var moveX = this.x - this._homeX + distance; + var moveY = this.y - this._homeY; + this.startMove(moveX, moveY, frames); +}; + +Sprite_Battler.prototype.moveToPoint = function(pointX, pointY, frames) { + pointX = parseInt(pointX); + pointY = parseInt(pointY); + var targetX = pointX - this._homeX; + var targetY = pointY - this._homeY; + this.startMove(targetX, targetY, frames); +}; + +Sprite_Battler.prototype.setMirror = function(value) { + if (this.scale.x > 0 && value) this.scale.x *= -1; + if (this.scale.x < 0 && !value) this.scale.x *= -1; +}; + +Sprite_Battler.prototype.isPopupPlaying = function() { + if (this._damages.length > 0) { + for (var i = 0; i < this._damages.length; ++i) { + return this._damages[i].isPlaying(); + } + } + return false; +}; + +//============================================================================= +// Sprite_Actor +//============================================================================= + +Sprite_Actor.prototype.preSpriteInitialize = function(battler) { + Sprite_Battler.prototype.preSpriteInitialize.call(this, battler); +}; + +Sprite_Actor.prototype.postSpriteInitialize = function() { + Sprite_Battler.prototype.postSpriteInitialize.call(this); +}; + +Yanfly.BEC.Sprite_Actor_updateShadow = Sprite_Actor.prototype.updateShadow; +Sprite_Actor.prototype.updateShadow = function() { + if (this._hideShadows === undefined) { + this._hideShadows = Yanfly.Param.BECShowShadows; + } + if (!this._hideShadows) return this._shadowSprite.visible = false; + Yanfly.BEC.Sprite_Actor_updateShadow.call(this); +}; + +Sprite_Actor.prototype.setActorHome = function(index) { + var screenWidth = Graphics.boxWidth; + var screenHeight = Graphics.boxHeight; + var maxSize = $gameParty.maxBattleMembers(); + var partySize = $gameParty.battleMembers().length; + var statusHeight = eval(Yanfly.Param.BECCommandRows); + statusHeight *= Window_Base.prototype.lineHeight.call(this); + statusHeight += Window_Base.prototype.standardPadding.call(this) * 2; + if ($gameSystem.isSideView()) { + var code = Yanfly.Param.BECHomePosX; + try { + var homeX = eval(code); + } catch (e) { + var homeX = 0; + Yanfly.Util.displayError(e, code, 'SIDE VIEW HOME X FORMULA ERROR'); + } + var code = Yanfly.Param.BECHomePosY; + try { + var homeY = eval(code); + } catch (e) { + var homeY = 0; + Yanfly.Util.displayError(e, code, 'SIDE VIEW HOME Y FORMULA ERROR'); + } + } else { + var code = Yanfly.Param.BECFrontPosX; + try { + var homeX = eval(code); + } catch (e) { + var homeX = 0; + Yanfly.Util.displayError(e, code, 'FRONT VIEW HOME X FORMULA ERROR'); + } + var code = Yanfly.Param.BECFrontPosY; + try { + var homeY = eval(code); + } catch (e) { + var homeY = 0; + Yanfly.Util.displayError(e, code, 'FRONT VIEW HOME Y FORMULA ERROR'); + } + } + this._checkAliveStatus = false; + if ($gameParty.battleMembers()[index]) { + var actor = $gameParty.battleMembers()[index]; + if (actor.isAlive()) this._checkAliveStatus = true; + } + this.setHome(homeX, homeY); + this.moveToStartPosition(); +}; + +Sprite_Actor.prototype.moveToStartPosition = function() { + if (BattleManager._bypassMoveToStartLocation) return; + if ($gameSystem.isSideView() && this._checkAliveStatus) { + this.startMove(300, 0, 0); + } +}; + +Sprite_Actor.prototype.setupMotion = function() { +}; + +Sprite_Actor.prototype.forceMotion = function(motionType) { + var newMotion = Sprite_Actor.MOTIONS[motionType]; + this._motion = newMotion; + this._motionCount = 0; + this._pattern = 0; +}; + +Sprite_Actor.prototype.updateTargetPosition = function() { +}; + +Sprite_Actor.prototype.updateMotion = function() { + this.updateMotionCount(); +}; + +Sprite_Actor.prototype.onMoveEnd = function() { + Sprite_Battler.prototype.onMoveEnd.call(this); +}; + +Sprite_Actor.prototype.stepForward = function() { + this.startMove(-Yanfly.Param.BECStepDist, 0, 12); +}; + +Sprite_Actor.prototype.stepFlinch = function() { + var flinchX = this.x - this._homeX + Yanfly.Param.BECFlinchDist; + var flinchY = this.y - this._homeY; + this.startMove(flinchX, flinchY, 6); +}; + +Sprite_Actor.prototype.stepSubBack = function() { + var backX = this._mainSprite.width / 2; + this.startMove(backX, 0, 6); +}; + +Yanfly.BEC.Sprite_Actor_updateBitmap = Sprite_Actor.prototype.updateBitmap; +Sprite_Actor.prototype.updateBitmap = function() { + var name = this._actor.battlerName(); + var needUpdate = false; + if (this._battlerName !== name) needUpdate = true; + Yanfly.BEC.Sprite_Actor_updateBitmap.call(this); + if (needUpdate) this.adjustAnchor(); +}; + +Sprite_Actor.prototype.adjustAnchor = function() { + if (!this._mainSprite) return; + this._mainSprite.anchor.x = this._actor.anchorX(); + this._mainSprite.anchor.y = this._actor.anchorY(); +}; + +Yanfly.BEC.Sprite_Actor_updateFrame = Sprite_Actor.prototype.updateFrame; +Sprite_Actor.prototype.updateFrame = function() { + Yanfly.BEC.Sprite_Actor_updateFrame.call(this); + if (!this._mainSprite) return; + if (!this._mainSprite.bitmap) return; + if (this._mainSprite.bitmap.width > 0 && !this.bitmap) { + var sw = this._mainSprite.bitmap.width / 9; + var sh = this._mainSprite.bitmap.height / 6; + this.bitmap = new Bitmap(sw, sh); + } +}; + +Yanfly.BEC.Sprite_Actor_refreshMotion = Sprite_Actor.prototype.refreshMotion; +Sprite_Actor.prototype.refreshMotion = function() { + var actor = this._actor; + if (!actor) return; + var motionGuard = Sprite_Actor.MOTIONS['guard']; + if (this._motion === motionGuard && !BattleManager.isInputting()) return; + var stateMotion = actor.stateMotionIndex(); + if (actor.isInputting() || actor.isActing()) { + this.startMotion(actor.idleMotion()); + } else if (stateMotion === 3) { + this.startMotion(actor.deadMotion()); + } else if (stateMotion === 2) { + this.startMotion(actor.sleepMotion()); + } else if (actor.isChanting()) { + this.startMotion(actor.chantMotion()); + } else if (actor.isGuard() || actor.isGuardWaiting()) { + this.startMotion(actor.guardMotion()); + } else if (stateMotion === 1) { + this.startMotion(actor.abnormalMotion()); + } else if (actor.isDying()) { + this.startMotion(actor.dyingMotion()); + } else if (actor.isUndecided()) { + this.startMotion(actor.idleMotion()); + } else { + this.startMotion(actor.waitMotion()); + } +}; + +//============================================================================= +// Sprite_Enemy +//============================================================================= + +Sprite_Enemy.prototype.preSpriteInitialize = function(battler) { + Sprite_Battler.prototype.preSpriteInitialize.call(this, battler); + this._visualSelect = Yanfly.Param.BECEnemySelect; + if (this._visualSelect) this.createVisualSelectWindow(); +}; + +Yanfly.BEC.Sprite_Enemy_update = Sprite_Enemy.prototype.update; +Sprite_Enemy.prototype.update = function() { + Yanfly.BEC.Sprite_Enemy_update.call(this); + this.addVisualSelectWindow(); +}; + +Sprite_Enemy.prototype.addVisualSelectWindow = function() { + if (!this._visualSelect) return; + if (this._addedVisualSelect) return; + if (!SceneManager._scene) return; + var scene = SceneManager._scene; + if (!scene._windowLayer) return; + this._addedVisualSelect = true; + scene.addChild(this._visualSelectWindow); +}; + +Sprite_Enemy.prototype.createVisualSelectWindow = function() { + this._visualSelectWindow = new Window_EnemyVisualSelect(); +}; + +Yanfly.BEC.Sprite_Enemy_setBattler = Sprite_Enemy.prototype.setBattler; +Sprite_Enemy.prototype.setBattler = function(battler) { + Yanfly.BEC.Sprite_Enemy_setBattler.call(this, battler); + if (this._visualSelectWindow) this._visualSelectWindow.setBattler(battler); +}; + +//============================================================================= +// Sprite_Weapon +//============================================================================= + +Yanfly.BEC.Sprite_Weapon_setup = Sprite_Weapon.prototype.setup; +Sprite_Weapon.prototype.setup = function(weaponImageId) { + Yanfly.BEC.Sprite_Weapon_setup.call(this, weaponImageId); + this._animationCount -= 1; // Synch with sprite +}; + +//============================================================================= +// Sprite_Damage +//============================================================================= + +Yanfly.BEC.Sprite_Damage_initialize = Sprite_Damage.prototype.initialize; +Sprite_Damage.prototype.initialize = function() { + Yanfly.BEC.Sprite_Damage_initialize.call(this); + this._duration = Yanfly.Param.BECPopupDur; +}; + +Sprite_Damage.prototype.setup = function(target) { + this._result = target.shiftDamagePopup(); + var result = this._result; + if (result.missed || result.evaded) { + this.createMiss(); + } else if (result.hpAffected) { + this.createDigits(0, result.hpDamage); + } else if (target.isAlive() && result.mpDamage !== 0) { + this.createDigits(2, result.mpDamage); + } + if (result.critical) { + this.setupCriticalEffect(); + } +}; + +Sprite_Damage.prototype.setupCriticalEffect = function() { + this._flashColor = eval('[' + Yanfly.Param.BECCritPopup + ']'); + this._flashDuration = Yanfly.Param.BECCritDur; +}; + +//============================================================================= +// Sprite_StateIcon +//============================================================================= + +Yanfly.BEC.Sprite_StateIcon_update = Sprite_StateIcon.prototype.update; +Sprite_StateIcon.prototype.update = function() { + Yanfly.BEC.Sprite_StateIcon_update.call(this); + this.updateMirror(); +}; + +Sprite_StateIcon.prototype.updateMirror = function() { + if (this.parent.scale.x < 0) this.scale.x = -1 * Math.abs(this.scale.x); + if (this.parent.scale.x > 0) this.scale.x = Math.abs(this.scale.x); +}; + +//============================================================================= +// Sprite_StateOverlay +//============================================================================= + +Yanfly.BEC.Sprite_StateOverlay_update = Sprite_StateOverlay.prototype.update; +Sprite_StateOverlay.prototype.update = function() { + Yanfly.BEC.Sprite_StateOverlay_update.call(this); + this.updateMirror(); +}; + +Sprite_StateOverlay.prototype.updateMirror = function() { + if (this.parent.scale.x < 0) this.scale.x = -1 * Math.abs(this.scale.x); + if (this.parent.scale.x > 0) this.scale.x = Math.abs(this.scale.x); +}; + +//============================================================================= +// Spriteset_Battle +//============================================================================= + +Spriteset_Battle.prototype.isBusy = function() { + return false; +}; + +Yanfly.BEC.Spriteset_Battle_update = Spriteset_Battle.prototype.update; +Spriteset_Battle.prototype.update = function() { + Yanfly.BEC.Spriteset_Battle_update.call(this); + this.updateZCoordinates(); +}; + +Spriteset_Battle.prototype.updateZCoordinates = function() { + if (Imported.YEP_ImprovedBattlebacks) { + this.updateBattlebackGroupRemove(); + } else { + this._battleField.removeChild(this._back1Sprite); + this._battleField.removeChild(this._back2Sprite); + } + this._battleField.children.sort(this.battleFieldDepthCompare); + if (Imported.YEP_ImprovedBattlebacks) { + this.updateBattlebackGroupAdd(); + } else { + this._battleField.addChildAt(this._back2Sprite, 0); + this._battleField.addChildAt(this._back1Sprite, 0); + } +}; + +Spriteset_Battle.prototype.battleFieldDepthCompare = function(a, b) { + var priority = BattleManager.getSpritePriority(); + if (a._battler && b._battler && priority !== 0) { + if (priority === 1) { + if (a._battler.isActor() && b._battler.isEnemy()) return 1; + if (a._battler.isEnemy() && b._battler.isActor()) return -1; + } else if (priority === 2) { + if (a._battler.isActor() && b._battler.isEnemy()) return -1; + if (a._battler.isEnemy() && b._battler.isActor()) return 1; + } + } + if (a.z < b.z) return -1; + if (a.z > b.z) return 1; + if (a.y < b.y) return -1; + if (a.y > b.y) return 1; + return 0; +}; + +Spriteset_Battle.prototype.isPopupPlaying = function() { + return this.battlerSprites().some(function(sprite) { + return sprite.isPopupPlaying(); + }); +}; + +Yanfly.BEC.Spriteset_Battle_battlerSprites = + Spriteset_Battle.prototype.battlerSprites; +Spriteset_Battle.prototype.battlerSprites = function() { + var sprites = Yanfly.BEC.Spriteset_Battle_battlerSprites.call(this); + var length = sprites.length; + var result = []; + for (var i = 0; i < length; ++i) { + var sprite = sprites[i]; + if (!sprite) continue; + if (!sprite._battler) continue; + result.push(sprite); + } + return result; +}; + +//============================================================================= +// Game_Temp +//============================================================================= + +Game_Temp.prototype.clearActionSequenceSettings = function() { +}; + +Game_Temp.prototype.forceActionQueue = function(command) { + if (!this._forceActionQueue) { + this._forceActionQueue = JsonEx.makeDeepCopy($dataCommonEvents[1]); + this._forceActionQueue.list = []; + } + this._forceActionQueue.list.push(command); +}; + +Yanfly.BEC.Game_Temp_clearCommonEvent = Game_Temp.prototype.clearCommonEvent; +Game_Temp.prototype.clearCommonEvent = function() { + this._forceActionQueue = undefined; + Yanfly.BEC.Game_Temp_clearCommonEvent.call(this); +}; + +Yanfly.BEC.Game_Temp_isCommonEventReserved = + Game_Temp.prototype.isCommonEventReserved; +Game_Temp.prototype.isCommonEventReserved = function() { + if (this._forceActionQueue) return true; + return Yanfly.BEC.Game_Temp_isCommonEventReserved.call(this); +}; + +Yanfly.BEC.Game_Temp_reservedCommonEvent = + Game_Temp.prototype.reservedCommonEvent; +Game_Temp.prototype.reservedCommonEvent = function() { + if (this._forceActionQueue) { + return this._forceActionQueue; + } + return Yanfly.BEC.Game_Temp_reservedCommonEvent.call(this); +}; + +//============================================================================= +// Game_System +//============================================================================= + +Yanfly.BEC.Game_System_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() { + Yanfly.BEC.Game_System_initialize.call(this); + this.initBattleSystem(); +}; + +Game_System.prototype.initBattleSystem = function() { + this._battleSystem = Yanfly.Param.BECSystem.toLowerCase(); +}; + +Game_System.prototype.getBattleSystem = function() { + if (this._battleSystem === undefined) this.initBattleSystem(); + return this._battleSystem; +}; + +Game_System.prototype.setBattleSystem = function(type) { + this._battleSystem = type.toLowerCase(); +}; + +//============================================================================= +// Game_Interpreter +//============================================================================= + +Yanfly.BEC.Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function(command, args) { + Yanfly.BEC.Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'setBattleSys' && !$gameParty.inBattle()) { + this.setBattleSystem(args[0]); + } +}; + +Game_Interpreter.prototype.setBattleSystem = function(value) { + $gameSystem.setBattleSystem(value); +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Game_Action.prototype.speed = function() { + var user = this.subject(); var a = user; + var maxhp = user.mhp; var mhp = user.mhp; var hp = user.hp; + var maxmp = user.mmp; var mmp = user.mmp; var mp = user.mp; + var maxtp = user.maxTp(); var mtp = user.maxTp(); var tp = user.tp; + var atk = user.atk; var def = user.def; var mat = user.mat; + var int = user.mat; var mdf = user.mdf; var res = user.res; + var agi = user.agi; var luk = user.luk; + var code = Yanfly.Param.BECActionSpeed; + try { + var speed = eval(code); + } catch (e) { + var speed = 0; + Yanfly.Util.displayError(e, code, 'ACTION SPEED FORMULA ERROR'); + } + if (this.item()) speed += this.item().speed; + if (this.isAttack()) speed += this.subject().attackSpeed(); + return speed; +}; + +Yanfly.BEC.Game_Action_apply = Game_Action.prototype.apply; +Game_Action.prototype.apply = function(target) { + target._result = null; + target._result = new Game_ActionResult(); + this.subject()._result = null; + this.subject()._result = new Game_ActionResult(); + Yanfly.BEC.Game_Action_apply.call(this, target); + if ($gameParty.inBattle()) { + target.startDamagePopup(); + target.performResultEffects(); + if (target !== this.subject()) this.subject().startDamagePopup(); + } +}; + +Game_Action.prototype.itemEffectAddAttackState = function(target, effect) { + this.subject().attackStates().forEach(function(stateId) { + var chance = effect.value1; + chance *= target.stateRate(stateId); + chance *= this.subject().attackStatesRate(stateId); + chance *= this.lukEffectRate(target); + if (Math.random() < chance) { + if (stateId === target.deathStateId()) { + if (target.isImmortal()) target.removeImmortal(); + } + target.addState(stateId); + this.makeSuccess(target); + } + }.bind(this), target); +}; + +Game_Action.prototype.itemEffectAddNormalState = function(target, effect) { + var stateId = effect.dataId; + var chance = effect.value1; + if (!this.isCertainHit()) { + chance *= target.stateRate(stateId); + chance *= this.lukEffectRate(target); + } + if (Math.random() < chance) { + if (stateId === target.deathStateId()) { + if (target.isImmortal()) target.removeImmortal(); + } + target.addState(stateId); + this.makeSuccess(target); + } +}; + +Yanfly.BEC.Game_Action_applyGlobal = Game_Action.prototype.applyGlobal; +Game_Action.prototype.applyGlobal = function() { + if ($gameParty.inBattle()) return; + Yanfly.BEC.Game_Action_applyGlobal.call(this); +}; + +Yanfly.BEC.Game_Action_needsSelection = Game_Action.prototype.needsSelection; +Game_Action.prototype.needsSelection = function() { + if ($gameParty.inBattle() && this.item().scope === 0) return false; + if ($gameParty.inBattle() && BattleManager.isForceSelection()) return true; + return Yanfly.BEC.Game_Action_needsSelection.call(this); +}; + +//============================================================================= +// Game_BattlerBase +//============================================================================= + +Yanfly.BEC.Game_BattlerBase_recoverAll = Game_BattlerBase.prototype.recoverAll; +Game_BattlerBase.prototype.recoverAll = function() { + Yanfly.BEC.Game_BattlerBase_recoverAll.call(this); + this.refresh(); + if ($gameParty.inBattle()) this.forceMotionRefresh(); +}; + +Game_BattlerBase.prototype.requestStatusRefresh = function() { + this._statusRefreshRequested = true; +}; + +Game_BattlerBase.prototype.isStatusRefreshRequested = function() { + return this._statusRefreshRequested; +}; + +Game_BattlerBase.prototype.completetStatusRefreshRequest = function() { + this._statusRefreshRequested = false; +}; + +Game_BattlerBase.prototype.updateStateTicks = function() { + var needRefresh = false; + for (var i = 0; i < this._states.length; ++i) { + var stateId = this._states[i]; + var state = $dataStates[stateId]; + if (!state) continue; + if (state.autoRemovalTiming !== 2) continue; + if (!this._stateTurns[stateId]) continue; + var value = BattleManager.tickRate() / Yanfly.Param.BECTurnTime; + var shown1 = Math.ceil(this._stateTurns[stateId]); + this._stateTurns[stateId] -= value; + var shown2 = Math.ceil(this._stateTurns[stateId]); + if (shown1 !== shown2) needRefresh = true; + if (this._stateTurns[stateId] <= 0) this.removeState(stateId); + } + if (needRefresh) this.refresh(); +}; + +Game_BattlerBase.prototype.isBypassUpdateTurns = function() { + if ($gameTroop.isEventRunning()) return true; + return false; +}; + +Game_BattlerBase.prototype.updateStateTurns = function() { + this.updateStateTurnEnd(); +}; + +Game_BattlerBase.prototype.updateStateTurnTiming = function(timing) { + if (this.isBypassUpdateTurns()) return; + var statesRemoved = []; + this._freeStateTurn = this._freeStateTurn || []; + for (var i = 0; i < this._states.length; ++i) { + var stateId = this._states[i]; + var state = $dataStates[stateId]; + if (!state) continue; + if (state.autoRemovalTiming !== timing) continue; + if (!this._stateTurns[stateId]) continue; + if (this._freeStateTurn.contains(stateId)) { + var index = this._freeStateTurn.indexOf(stateId); + this._freeStateTurn.splice(index, 1); + } else { + this._stateTurns[stateId] -= 1; + } + if (this._stateTurns[stateId] <= 0) statesRemoved.push(stateId); + } + for (var i = 0; i < statesRemoved.length; ++i) { + var stateId = statesRemoved[i]; + this.removeState(stateId); + } +}; + +Game_BattlerBase.prototype.updateStateActionStart = function() { + this.updateStateTurnTiming(3); +}; + +Game_BattlerBase.prototype.updateStateActionEnd = function() { + this.updateStateTurnTiming(1); +}; + +Game_BattlerBase.prototype.updateStateTurnStart = function() { + this.updateStateTurnTiming(4); +}; + +Game_BattlerBase.prototype.updateStateTurnEnd = function() { + this.updateStateTurnTiming(2); +}; + +Game_BattlerBase.prototype.updateBuffTicks = function() { + var needRefresh = false; + for (var i = 0; i < this._buffTurns.length; i++) { + if (this._buffTurns[i] <= 0) continue; + var value = BattleManager.tickRate() / Yanfly.Param.BECTurnTime; + var shown1 = Math.ceil(this._buffTurns[i]); + this._buffTurns[i] -= value; + var shown2 = Math.ceil(this._buffTurns[i]); + if (shown1 !== shown2) needRefresh = true; + if (this._buffTurns[i] <= 0) this.removeBuff(i); + } + if (needRefresh) this.refresh(); +}; + +Game_BattlerBase.prototype.timedTick = function() { + return 1 * BattleManager.tickRate(); +}; + +Yanfly.BEC.Game_BattlerBase_isStateResist = + Game_BattlerBase.prototype.isStateResist; +Game_BattlerBase.prototype.isStateResist = function(stateId) { + if (stateId === this.deathStateId() && this.isImmortal()) return true; + return Yanfly.BEC.Game_BattlerBase_isStateResist.call(this, stateId); +}; + +Game_BattlerBase.prototype.isImmortal = function() { + return this._immortalState; +}; + +Yanfly.BEC.Game_BattlerBase_paySkillCost = + Game_BattlerBase.prototype.paySkillCost; +Game_BattlerBase.prototype.paySkillCost = function(skill) { + this.requestStatusRefresh(); + Yanfly.BEC.Game_BattlerBase_paySkillCost.call(this, skill); +}; + +//============================================================================= +// Game_Battler +//============================================================================= + +Yanfly.BEC.Game_Battler_useItem = Game_Battler.prototype.useItem; +Game_Battler.prototype.useItem = function(item) { + Yanfly.BEC.Game_Battler_useItem.call(this, item); + this.refresh(); + if (!$gameParty.inBattle()) return; + this.increaseSelfTurnCount(); + this.updateStateActionStart(); +}; + +Yanfly.BEC.Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart; +Game_Battler.prototype.onBattleStart = function() { + Yanfly.BEC.Game_Battler_onBattleStart.call(this); + this._freeStateTurn = []; + this._immortalState = false; + this._selfTurnCount = 0; +}; + +Yanfly.BEC.Game_Battler_onBattleEnd = Game_Battler.prototype.onBattleEnd; +Game_Battler.prototype.onBattleEnd = function() { + Yanfly.BEC.Game_Battler_onBattleEnd.call(this); + this._freeStateTurn = []; + this._immortalState = false; +}; + +Yanfly.BEC.Game_Battler_isSelected = Game_Battler.prototype.isSelected; +Game_Battler.prototype.isSelected = function() { + if ($gameParty.inBattle() && BattleManager.isAllSelection()) { + if (!this.isAppeared()) return false; + var action = BattleManager.inputtingAction(); + if (action && action.item()) { + if (this.isDead() && this.isEnemy()) return false; + if (this.isDead() && this.isActor()) return action.isForDeadFriend(); + if (action.isForFriend() && this.isActor()) return true; + if (action.isForOpponent() && this.isEnemy()) return true; + } + } + return Yanfly.BEC.Game_Battler_isSelected.call(this); +}; + +Yanfly.BEC.Game_Battler_regenerateAll = Game_Battler.prototype.regenerateAll; +Game_Battler.prototype.regenerateAll = function() { + this.clearResult(); + var lifeState = this.isAlive(); + Yanfly.BEC.Game_Battler_regenerateAll.call(this); + if (!BattleManager.timeBasedStates()) this.updateStateTurns(); + if (!BattleManager.timeBasedBuffs()) { + this.updateBuffTurns(); + this.removeBuffsAuto(); + } + if (this.isDead() && lifeState === true) { + this.performCollapse(); + } + if ($gameParty.inBattle()) this.startDamagePopup(); +}; + +Game_Battler.prototype.addImmortal = function() { + this._immortalState = true; +}; + +Game_Battler.prototype.removeImmortal = function() { + var alreadyDead = this.isDead(); + this._immortalState = false; + this.refresh(); + if (this.isDead() && !alreadyDead) this.performCollapse(); +}; + +Yanfly.BEC.Game_Battler_removeState = Game_Battler.prototype.removeState; +Game_Battler.prototype.removeState = function(stateId) { + Yanfly.BEC.Game_Battler_removeState.call(this, stateId); +}; + +Game_Battler.prototype.clearDamagePopup = function() { + this._damagePopup = []; +}; + +Game_Battler.prototype.isDamagePopupRequested = function() { + if (!this._damagePopup) this.clearDamagePopup(); + return this._damagePopup.length > 0; +}; + +Game_Battler.prototype.startDamagePopup = function() { + var result = this.result(); + if (result.missed || result.evaded) { + var copyResult = JsonEx.makeDeepCopy(result); + copyResult.hpAffected = false; + copyResult.mpDamage = 0; + this._damagePopup.push(copyResult); + } + if (result.hpAffected) { + var copyResult = JsonEx.makeDeepCopy(result); + copyResult.mpDamage = 0; + this._damagePopup.push(copyResult); + } + if (result.mpDamage !== 0) { + var copyResult = JsonEx.makeDeepCopy(result); + copyResult.hpAffected = false; + this._damagePopup.push(copyResult); + } +}; + +Game_Battler.prototype.shiftDamagePopup = function() { + if (!this._damagePopup) this.clearDamagePopup(); + return this._damagePopup.shift(); +}; + +Yanfly.BEC.Game_Battler_performCollapse = + Game_Battler.prototype.performCollapse; +Game_Battler.prototype.performCollapse = function() { + Yanfly.BEC.Game_Battler_performCollapse.call(this); + if ($gameParty.inBattle()) this.forceMotion(this.deadMotion()); +}; + +Game_Battler.prototype.performResultEffects = function() { + var result = this.result(); + if (result.missed && result.physical) this.performMiss(); + if (result.evaded) { + if (result.physical) { + this.performEvasion(); + } else { + this.performMagicEvasion(); + } + } + if (result.hpAffected) { + if (result.hpDamage > 0 && !result.drain) { + this.performDamage(); + } + if (result.hpDamage < 0) { + this.performRecovery(); + } + } + if (this.isAlive() && result.mpDamage !== 0 && result.mpDamage < 0) { + this.performRecovery(); + } + if (this.isAlive() && result.tpDamage !== 0 && result.tpDamage < 0) { + this.performRecovery(); + } +}; + +Yanfly.BEC.Game_Battler_performDamage = + Game_Battler.prototype.performDamage; +Game_Battler.prototype.performDamage = function() { + Yanfly.BEC.Game_Battler_performDamage.call(this); + this.performFlinch(); +}; + +Yanfly.BEC.Game_Battler_performMiss = Game_Battler.prototype.performMiss; +Game_Battler.prototype.performMiss = function() { + Yanfly.BEC.Game_Battler_performMiss.call(this); + this.performFlinch(); +}; + +Yanfly.BEC.Game_Battler_performEvasion = + Game_Battler.prototype.performEvasion; +Game_Battler.prototype.performEvasion = function() { + Yanfly.BEC.Game_Battler_performEvasion.call(this); + this.performFlinch(); +}; + +Yanfly.BEC.Game_Battler_performMagicEvasion = + Game_Battler.prototype.performMagicEvasion; +Game_Battler.prototype.performMagicEvasion = function() { + Yanfly.BEC.Game_Battler_performMagicEvasion.call(this); + this.performFlinch(); +}; + +Game_Battler.prototype.performFlinch = function() { + if (this._flinched || !$gameSystem.isSideView()) return; + this._flinched = true; + this.spriteStepFlinch(); +}; + +Yanfly.BEC.Game_Battler_performReflection = + Game_Battler.prototype.performReflection; +Game_Battler.prototype.performReflection = function() { + Yanfly.BEC.Game_Battler_performReflection.call(this); + if (!$gameSystem.isSideView() && this.isActor()) return; + var animationId = this.reflectAnimationId(); + var mirror = this.isActor(); + this.startAnimation(animationId, mirror, 0); +}; + +Yanfly.BEC.Game_Battler_performSubstitute = + Game_Battler.prototype.performSubstitute; +Game_Battler.prototype.performSubstitute = function(target) { + Yanfly.BEC.Game_Battler_performSubstitute.call(this, target); + if (!$gameSystem.isSideView()) return; + this._flinched = true; + if (BattleManager._action.isForAll()) { + this.spriteStepForward(); + target.spriteStepSubBack(); + } else { + this.spriteStepToSubstitute(target); + target.spriteStepSubBack(); + } +}; + +Game_Battler.prototype.setBattler = function(sprite) { + BattleManager.registerSprite(this, sprite); +}; + +Game_Battler.prototype.battler = function() { + return BattleManager.getSprite(this); +}; + +Game_Battler.prototype.requestMotion = function(motionType) { + this._motionType = motionType; + if (this.battler()) { + this.battler().startMotion(motionType); + } +}; + +Game_Battler.prototype.forceMotion = function(motionType) { + this._motionType = motionType; + if (this.battler()) { + this.battler().forceMotion(motionType); + } +}; + +Game_Battler.prototype.startWeaponAnimation = function(weaponImageId) { + this._weaponImageId = weaponImageId; + if (this.battler()) { + this.battler().setupWeaponAnimation(); + } +}; + +Game_Battler.prototype.performActionStart = function(action) { + if (!action.isGuard()) { + this.setActionState('acting'); + this.spriteStepForward(); + } +}; + +Yanfly.BEC.Game_Battler_performActionEnd = + Game_Battler.prototype.performActionEnd; +Game_Battler.prototype.performActionEnd = function() { + Yanfly.BEC.Game_Battler_performActionEnd.call(this); + this.spriteReturnHome(); +}; + +Game_Battler.prototype.spriteStepForward = function() { + if ($gameSystem.isSideView() && this.battler()) { + this.battler().stepForward(); + } +}; + +Game_Battler.prototype.spriteStepBack = function() { + if ($gameSystem.isSideView() && this.battler()) { + this.battler().stepBack(); + } +}; + +Game_Battler.prototype.spriteStepSubBack = function() { + if ($gameSystem.isSideView() && this.battler()) { + this.battler().stepSubBack(); + } +}; + +Game_Battler.prototype.spriteStepToSubstitute = function(target) { + if ($gameSystem.isSideView() && this.battler()) { + this.battler().stepToSubstitute(target); + } +}; + +Game_Battler.prototype.spriteStepFlinch = function() { + if ($gameSystem.isSideView() && this.battler()) { + this.battler().stepFlinch(); + } +}; + +Game_Battler.prototype.spriteReturnHome = function() { + if ($gameSystem.isSideView() && this.battler()) { + this._flinched = false; + this.spriteFaceForward(); + this.battler().stepBack(); + if (this.numActions() <= 0) { + this.setActionState('undecided'); + } + this.battler().refreshMotion(); + } +}; + +Game_Battler.prototype.reflectAnimationId = function() { + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state.reflectAnimationId > 0) return state.reflectAnimationId; + } + return Yanfly.Param.BECReflectAni; +}; + +Game_Battler.prototype.spriteCanMove = function() { + if (!$gameSystem.isSideView()) return false; + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state.spriteCannotMove) return false; + } + return this.canMove(); +}; + +Game_Battler.prototype.spritePosX = function() { + if ($gameSystem.isSideView() && this.battler()) { + return this.battler().x; + } else if (this.battler()) { + return this.battler().x; + } else { + return 0; + } +}; + +Game_Battler.prototype.spritePosY = function() { + if ($gameSystem.isSideView() && this.battler()) { + return this.battler().y; + } else if (this.battler()) { + return this.battler().y; + } else { + return 0; + } +}; + +Game_Battler.prototype.spriteWidth = function() { + if ($gameSystem.isSideView() && this.battler() && this.battler().bitmap) { + return this.battler().bitmap.width; + } else if (this.battler() && this.battler().bitmap) { + return this.battler().bitmap.width; + } else { + return 1; + } +}; + +Game_Battler.prototype.spriteHeight = function() { + if ($gameSystem.isSideView() && this.battler() && this.battler().bitmap) { + return this.battler().bitmap.height; + } else if (this.battler() && this.battler().bitmap) { + return this.battler().bitmap.height; + } else { + return 1; + } +}; + +Game_Battler.prototype.anchorX = function() { + return Yanfly.Param.BECAnchorX; +}; + +Game_Battler.prototype.anchorY = function() { + return Yanfly.Param.BECAnchorY; +}; + +Game_Battler.prototype.spriteHomeX = function() { + if ($gameSystem.isSideView() && this.battler()) { + return this.battler()._homeX; + } else { + return 0; + } +}; + +Game_Battler.prototype.spriteHomeY = function() { + if ($gameSystem.isSideView() && this.battler()) { + return this.battler()._homeY; + } else { + return 0; + } +}; + +Game_Battler.prototype.setMirror = function(value) { + if ($gameSystem.isSideView() && this.battler() && this.spriteCanMove()) { + this.battler().setMirror(value); + } +}; + +Game_Battler.prototype.spriteFaceForward = function() { + this.setMirror(false); +}; + +Game_Battler.prototype.spriteFaceBackward = function() { + this.setMirror(true); +}; + +Game_Battler.prototype.spriteFacePoint = function(pointX, pointY) { + if (this.spritePosX() > pointX) { + this.spriteFaceBackward(); + } else { + this.spriteFaceForward(); + } +}; + +Game_Battler.prototype.spriteFaceAwayPoint = function(pointX, pointY) { + if (this.spritePosX() > pointX) { + this.spriteFaceForward(); + } else { + this.spriteFaceBackward(); + } +}; + +Game_Battler.prototype.spriteFaceTarget = function(target) { + if (!target) return; + var pointX = target.spritePosX(); + var pointY = target.spritePosY(); + this.spriteFacePoint(pointX, pointY); +}; + +Game_Battler.prototype.spriteFaceAwayTarget = function(target) { + if (!target) return; + var pointX = target.spritePosX(); + var pointY = target.spritePosY(); + this.spriteFaceAwayPoint(pointX, pointY); +}; + +Game_Battler.prototype.spriteFaceHome = function() { + var pointX = this.spriteHomeX(); + var pointY = this.spriteHomeY(); + this.spriteFacePoint(pointX, pointY); +}; + +Game_Battler.prototype.spriteFaceAwayHome = function() { + var pointX = target.spriteHomeX(); + var pointY = target.spriteHomeY(); + this.spriteFaceAwayPoint(pointX, pointY); +}; + +Game_Battler.prototype.attackMotion = function() { + return 'thrust'; +}; + +Game_Battler.prototype.performAttack = function() { +}; + +Game_Battler.prototype.forceMotionRefresh = function() { + if (!$gameParty.inBattle()) return; + if (this.battler()) this.battler().refreshMotion(); +}; + +Game_Battler.prototype.requestMotionRefresh = function() { + var deadMotion = this.deadMotion(); + if (this.isDead() && this._motionType !== deadMotion) { + this.requestMotion(deadMotion); + } + if (this.isDead() && this._motionType === deadMotion) return; + if (this._motionType === 'victory') return; + if (this._motionType === 'escape' && !BattleManager.isInputting()) return; + if (this._motionType === 'guard' && !BattleManager.isInputting()) return; + this.clearMotion(); + if (this.battler() && BattleManager.isInputting()) { + this.battler().refreshMotion(); + } +}; + +Game_Battler.prototype.onTurnStart = function() { + this.updateStateTurnStart(); +}; + +Game_Battler.prototype.onTurnEnd = function() { + this.clearResult(); + if (BattleManager.isTurnBased()) { + this.regenerateAll(); + } else if (BattleManager.isTickBased() && !BattleManager.isTurnEnd()) { + this.regenerateAll(); + } + this.removeStatesAuto(2); +}; + +Yanfly.BEC.Game_Battler_onAllActionsEnd = + Game_Battler.prototype.onAllActionsEnd; +Game_Battler.prototype.onAllActionsEnd = function() { + Yanfly.BEC.Game_Battler_onAllActionsEnd.call(this); + if (!BattleManager._processTurn) this.updateStateActionEnd(); +}; + +Game_Battler.prototype.updateTick = function() { + if (BattleManager.timeBasedStates()) this.updateStateTicks(); + if (BattleManager.timeBasedBuffs()) this.updateBuffTicks(); +}; + +Game_Battler.prototype.increaseSelfTurnCount = function() { + if (this._selfTurnCount === undefined) this._selfTurnCount = 0; + this._selfTurnCount += 1; +}; + +Game_Battler.prototype.turnCount = function() { + if (BattleManager.isTurnBased()) return $gameTroop.turnCount(); + if (BattleManager.isTickBased() && Yanfly.Param.BECAISelfTurn) { + return this._selfTurnCount; + } + return $gameTroop.turnCount(); +}; + +Game_Battler.prototype.createActions = function() { + if (this.currentAction()) return; + this.makeActions(); +}; + +Yanfly.BEC.Game_Battler_addState = Game_Battler.prototype.addState; +Game_Battler.prototype.addState = function(stateId) { + Yanfly.BEC.Game_Battler_addState.call(this, stateId); + if (this.canAddStateFreeTurn(stateId)) this.setStateFreeTurn(stateId); +}; + +Game_Battler.prototype.canAddStateFreeTurn = function(stateId) { + if (!$gameParty.inBattle()) return false; + if (BattleManager._subject !== this) return false; + if ($dataStates[stateId].autoRemovalTiming !== 1) return false; + if (Imported.YEP_BuffsStatesCore) { + if ($dataStates[stateId].reapplyRules === 0) return false; + } + return true; +}; + +Game_Battler.prototype.setStateFreeTurn = function(stateId) { + this._freeStateTurn = this._freeStateTurn || []; + this._freeStateTurn.push(stateId); +}; + +Game_Battler.prototype.idleMotion = function() { + return 'walk'; +}; + +Game_Battler.prototype.deadMotion = function() { + return 'dead'; +}; + +Game_Battler.prototype.sleepMotion = function() { + return 'sleep'; +}; + +Game_Battler.prototype.chantMotion = function() { + return 'chant'; +}; + +Game_Battler.prototype.guardMotion = function() { + return 'guard'; +}; + +Game_Battler.prototype.abnormalMotion = function() { + return 'abnormal'; +}; + +Game_Battler.prototype.dyingMotion = function() { + return 'dying'; +}; + +Game_Battler.prototype.waitMotion = function() { + return 'wait'; +}; + +Yanfly.BEC.Game_Battler_startAnimation = Game_Battler.prototype.startAnimation; +Game_Battler.prototype.startAnimation = function(animationId, mirror, delay) { + if (!$dataAnimations[animationId]) return; + Yanfly.BEC.Game_Battler_startAnimation.call(this, animationId, mirror, delay); +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +Yanfly.BEC.Game_Actor_refresh = Game_Actor.prototype.refresh; +Game_Actor.prototype.refresh = function() { + this._anchorX = undefined; + this._anchorY = undefined; + Yanfly.BEC.Game_Actor_refresh.call(this); + if ($gameParty.inBattle()) this.requestStatusRefresh(); +}; + +Game_Actor.prototype.isSpriteVisible = function() { + if ($gameSystem.isSideView()) return true; + return Yanfly.Param.BECFrontSprite; +}; + +Game_Actor.prototype.reflectAnimationId = function() { + if (this.actor().reflectAnimationId > 0) { + return this.actor().reflectAnimationId; + } + if (this.currentClass().reflectAnimationId > 0) { + return this.currentClass().reflectAnimationId; + } + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.reflectAnimationId > 0) { + return equip.reflectAnimationId; + } + } + return Game_Battler.prototype.reflectAnimationId.call(this); +}; + +Game_Actor.prototype.spriteCanMove = function() { + if (this.actor().spriteCannotMove) return false; + if (this.currentClass().spriteCannotMove) return false; + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.spriteCannotMove) return false; + } + return Game_Battler.prototype.spriteCanMove.call(this); +}; + +Game_Actor.prototype.spriteWidth = function() { + if ($gameSystem.isSideView() && this.battler()) { + return this.battler()._mainSprite.width; + } else { + return 1; + } +}; + +Game_Actor.prototype.spriteHeight = function() { + if ($gameSystem.isSideView() && this.battler()) { + return this.battler()._mainSprite.height; + } else { + return 1; + } +}; + +Game_Actor.prototype.anchorX = function() { + if (this._anchorX !== undefined) return this._anchorX; + var length = this.states().length; + for (var i = 0; i < length; ++i) { + var obj = this.states()[i]; + if (obj && obj.anchorX !== undefined) { + this._anchorX = obj.anchorX; + return this._anchorX; + } + } + length = this.equips().length; + for (var i = 0; i < length; ++i) { + var obj = this.equips()[i]; + if (obj && obj.anchorX !== undefined) { + this._anchorX = obj.anchorX; + return this._anchorX; + } + } + if (this.currentClass().anchorX !== undefined) { + this._anchorX = this.currentClass().anchorX; + return this._anchorX; + } + this._anchorX = this.actor().anchorX; + return this._anchorX; +}; + +Game_Actor.prototype.anchorY = function() { + if (this._anchorY !== undefined) return this._anchorY; + var length = this.states().length; + for (var i = 0; i < length; ++i) { + var obj = this.states()[i]; + if (obj && obj.anchorY !== undefined) { + this._anchorY = obj.anchorY; + return this._anchorY; + } + } + length = this.equips().length; + for (var i = 0; i < length; ++i) { + var obj = this.equips()[i]; + if (obj && obj.anchorY !== undefined) { + this._anchorY = obj.anchorY; + return this._anchorY; + } + } + if (this.currentClass().anchorY !== undefined) { + this._anchorY = this.currentClass().anchorY; + return this._anchorY; + } + this._anchorY = this.actor().anchorY; + return this._anchorY; +}; + +Game_Actor.prototype.spriteFacePoint = function(pointX, pointY) { + if (this.spritePosX() > pointX) { + this.spriteFaceForward(); + } else { + this.spriteFaceBackward(); + } +}; + +Game_Actor.prototype.spriteFaceAwayPoint = function(pointX, pointY) { + if (this.spritePosX() > pointX) { + this.spriteFaceBackward(); + } else { + this.spriteFaceForward(); + } +}; + +Game_Actor.prototype.performAttack = function() { + var weapons = this.weapons(); + var wtypeId = weapons[0] ? weapons[0].wtypeId : 0; + var attackMotion = $dataSystem.attackMotions[wtypeId]; + if (attackMotion) { + if (attackMotion.type === 0) { + this.forceMotion('thrust'); + } else if (attackMotion.type === 1) { + this.forceMotion('swing'); + } else if (attackMotion.type === 2) { + this.forceMotion('missile'); + } + this.startWeaponAnimation(attackMotion.weaponImageId); + } +}; + +Game_Actor.prototype.attackMotion = function() { + var weapons = this.weapons(); + var wtypeId = weapons[0] ? weapons[0].wtypeId : 0; + var attackMotion = $dataSystem.attackMotions[wtypeId]; + if (attackMotion) { + if (attackMotion.type === 0) { + return 'thrust'; + } else if (attackMotion.type === 1) { + return 'swing'; + } else if (attackMotion.type === 2) { + return 'missile'; + } + }; + return 'thrust'; +}; + +Game_Actor.prototype.performEscapeSuccess = function() { + if (this.battler()) { + this.performEscape(); + this.battler().startMove(300, 0, 60); + } +}; + +//============================================================================= +// Game_Enemy +//============================================================================= + +if (!Game_Enemy.prototype.skills) { +Game_Enemy.prototype.skills = function() { + var skills = [] + for (var i = 0; i < this.enemy().actions.length; ++i) { + var skill = $dataSkills[this.enemy().actions[i].skillId] + if (skill) skills.push(skill); + } + return skills; +} +}; // (!Game_Enemy.prototype.skills) + +Game_Enemy.prototype.performActionStart = function(action) { + Game_Battler.prototype.performActionStart.call(this, action); + if (!$gameSystem.isSideView() || !this.spriteCanMove()) { + this.requestEffect('whiten'); + } +}; + +Yanfly.BEC.Game_Enemy_performDamage = Game_Enemy.prototype.performDamage; +Game_Enemy.prototype.performDamage = function() { + if ($gameSystem.isSideView()) { + Game_Battler.prototype.performDamage.call(this); + SoundManager.playEnemyDamage(); + } else { + Yanfly.BEC.Game_Enemy_performDamage.call(this); + } +}; + +Game_Enemy.prototype.attackAnimationId = function() { + return this.enemy().attackAnimationId; +}; + +Game_Enemy.prototype.attackAnimationId1 = function() { + return this.attackAnimationId(); +}; + +Game_Enemy.prototype.attackAnimationId2 = function() { + return this.attackAnimationId(); +}; + +Game_Enemy.prototype.reflectAnimationId = function() { + if (this.enemy().reflectAnimationId > 0) { + return this.enemy().reflectAnimationId; + } + return Game_Battler.prototype.reflectAnimationId.call(this); +}; + +Game_Enemy.prototype.spriteCanMove = function() { + if (this.enemy().spriteCannotMove) return false; + return Game_Battler.prototype.spriteCanMove.call(this); +}; + +Game_Enemy.prototype.meetsTurnCondition = function(param1, param2) { + var n = this.turnCount(); + if (param2 === 0) { + return n === param1; + } else { + return n > 0 && n >= param1 && n % param2 === param1 % param2; + } +}; + +//============================================================================= +// Game_Unit +//============================================================================= + +Game_Unit.prototype.createActions = function() { + var max = this.members().length; + for (var i = 0; i < max; ++i) { + var member = this.members()[i]; + if (member) member.createActions(); + } +}; + +Game_Unit.prototype.requestMotionRefresh = function() { + var max = this.members().length; + for (var i = 0; i < max; ++i) { + var member = this.members()[i]; + if (member) member.requestMotionRefresh(); + } +}; + +Game_Unit.prototype.onTurnStart = function() { + var max = this.members().length; + for (var i = 0; i < max; ++i) { + var member = this.members()[i]; + if (member) { + member.onTurnStart(); + member.refresh(); + } + } +}; + +Game_Unit.prototype.updateTick = function() { + var max = this.members().length; + for (var i = 0; i < max; ++i) { + var member = this.members()[i]; + if (member) member.updateTick(); + } +}; + +Game_Unit.prototype.refreshMembers = function() { + var group = this.allMembers(); + var length = group.length; + for (var i = 0; i < length; ++i) { + var member = group[i]; + if (member) member.refresh(); + } +}; + +//============================================================================= +// Game_Party +//============================================================================= + +Game_Party.prototype.performEscapeSuccess = function() { + for (var i = 0; i < this.members().length; ++i) { + var member = this.members()[i]; + if (member) member.performEscapeSuccess(); + } +}; + +//============================================================================= +// Game_Troop +//============================================================================= + +Game_Troop.prototype.allMembers = function() { + return this.members(); +}; + +//============================================================================= +// Scene_Battle +//============================================================================= + +Yanfly.BEC.Scene_Battle_update = Scene_Battle.prototype.update; +Scene_Battle.prototype.update = function() { + Yanfly.BEC.Scene_Battle_update.call(this); + this.updateStatusWindowRequests(); +}; + +Scene_Battle.prototype.updateStatusWindowRequests = function() { + if (!this._statusWindow) return; + if (this._statusWindow.isClosed()) return; + this._statusWindow.updateStatusRequests(); +}; + +Yanfly.BEC.Scene_Battle_createSkillWindow = + Scene_Battle.prototype.createSkillWindow; +Scene_Battle.prototype.createSkillWindow = function() { + Yanfly.BEC.Scene_Battle_createSkillWindow.call(this); + if (Yanfly.Param.BECLowerWindows) { + this.adjustLowerWindow(this._skillWindow); + } +}; + +Yanfly.BEC.Scene_Battle_createItemWindow = + Scene_Battle.prototype.createItemWindow; +Scene_Battle.prototype.createItemWindow = function() { + Yanfly.BEC.Scene_Battle_createItemWindow.call(this); + if (Yanfly.Param.BECLowerWindows) { + this.adjustLowerWindow(this._itemWindow); + } +}; + +Yanfly.BEC.Scene_Battle_createActorWindow = + Scene_Battle.prototype.createActorWindow; +Scene_Battle.prototype.createActorWindow = function() { + Yanfly.BEC.Scene_Battle_createActorWindow.call(this); + this._actorWindow.x = Graphics.boxWidth - this._actorWindow.width; + if (Yanfly.Param.BECSelectHelp) { + this._actorWindow.setHelpWindow(this._helpWindow); + } +}; + +Yanfly.BEC.Scene_Battle_createEnemyWindow = + Scene_Battle.prototype.createEnemyWindow; +Scene_Battle.prototype.createEnemyWindow = function() { + Yanfly.BEC.Scene_Battle_createEnemyWindow.call(this); + if (Yanfly.Param.BECSelectHelp) { + this._enemyWindow.setHelpWindow(this._helpWindow); + } +}; + +Scene_Battle.prototype.adjustLowerWindow = function(win) { + win.height = win.fittingHeight(Yanfly.Param.BECWindowRows); + win.y = Graphics.boxHeight - win.height; +}; + +Yanfly.BEC.Scene_Battle_startPartyCommandSelection = + Scene_Battle.prototype.startPartyCommandSelection; +Scene_Battle.prototype.startPartyCommandSelection = function() { + if (this.isStartActorCommand()) { + this.selectNextCommand(); + } else { + Yanfly.BEC.Scene_Battle_startPartyCommandSelection.call(this); + } +}; + +Scene_Battle.prototype.isStartActorCommand = function() { + if (this._isStartActorCommand === undefined) { + this._isStartActorCommand = Yanfly.Param.BECStartActCmd; + } + return this._isStartActorCommand; +}; + +Yanfly.BEC.Scene_Battle_selectPreviousCommand = + Scene_Battle.prototype.selectPreviousCommand; +Scene_Battle.prototype.selectPreviousCommand = function() { + if (this.isStartActorCommand()) { + BattleManager.selectPreviousCommand(); + if (BattleManager.isInputting() && BattleManager.actor()) { + this.startActorCommandSelection(); + } else { + Yanfly.BEC.Scene_Battle_startPartyCommandSelection.call(this); + } + } else { + Yanfly.BEC.Scene_Battle_selectPreviousCommand.call(this); + } +}; + +Yanfly.BEC.Scene_Battle_selectNextCommand = + Scene_Battle.prototype.selectNextCommand; +Scene_Battle.prototype.selectNextCommand = function() { + Yanfly.BEC.Scene_Battle_selectNextCommand.call(this); + this._helpWindow.clear(); + BattleManager.stopAllSelection(); +}; + +Yanfly.BEC.Scene_Battle_commandSkill = Scene_Battle.prototype.commandSkill; +Scene_Battle.prototype.commandSkill = function() { + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_commandSkill.call(this); +}; + +Yanfly.BEC.Scene_Battle_commandItem = Scene_Battle.prototype.commandItem; +Scene_Battle.prototype.commandItem = function() { + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_commandItem.call(this); +}; + +Yanfly.BEC.Scene_Battle_startActorCommandSelection = + Scene_Battle.prototype.startActorCommandSelection; +Scene_Battle.prototype.startActorCommandSelection = function() { + BattleManager.createActions(); + Yanfly.BEC.Scene_Battle_startActorCommandSelection.call(this); + this._statusWindow.refresh(); +}; + +Yanfly.BEC.Scene_Battle_selectActorSelection = + Scene_Battle.prototype.selectActorSelection; +Scene_Battle.prototype.selectActorSelection = function() { + if (Yanfly.Param.BECSelectHelp) this._helpWindow.show(); + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_selectActorSelection.call(this); + this._actorWindow.autoSelect(); +}; + +Yanfly.BEC.Scene_Battle_onActorCancel = Scene_Battle.prototype.onActorCancel; +Scene_Battle.prototype.onActorCancel = function() { + if (Yanfly.Param.BECSelectHelp) this._helpWindow.hide(); + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onActorCancel.call(this); + BattleManager.stopAllSelection(); + BattleManager.clearInputtingAction(); +}; + +Yanfly.BEC.Scene_Battle_selectEnemySelection = + Scene_Battle.prototype.selectEnemySelection; +Scene_Battle.prototype.selectEnemySelection = function() { + if (Yanfly.Param.BECSelectHelp) this._helpWindow.show(); + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_selectEnemySelection.call(this); + this._enemyWindow.autoSelect(); +}; + +Yanfly.BEC.Scene_Battle_onEnemyCancel = Scene_Battle.prototype.onEnemyCancel; +Scene_Battle.prototype.onEnemyCancel = function() { + if (Yanfly.Param.BECSelectHelp) this._helpWindow.hide(); + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onEnemyCancel.call(this); + BattleManager.stopAllSelection(); + BattleManager.clearInputtingAction(); +}; + +Yanfly.BEC.Scene_Battle_onSelectAction = Scene_Battle.prototype.onSelectAction; +Scene_Battle.prototype.onSelectAction = function() { + if (Yanfly.Param.BECSelectHelp) BattleManager.forceSelection(); + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onSelectAction.call(this); + if (Yanfly.Param.BECSelectHelp) BattleManager.resetSelection(); +}; + +Yanfly.BEC.Scene_Battle_onSkillOk = + Scene_Battle.prototype.onSkillOk; +Scene_Battle.prototype.onSkillOk = function() { + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onSkillOk.call(this); +}; + +Yanfly.BEC.Scene_Battle_onSkillCancel = + Scene_Battle.prototype.onSkillCancel; +Scene_Battle.prototype.onSkillCancel = function() { + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onSkillCancel.call(this); + BattleManager.clearInputtingAction(); +}; + +Yanfly.BEC.Scene_Battle_onItemOk = + Scene_Battle.prototype.onItemOk; +Scene_Battle.prototype.onItemOk = function() { + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onItemOk.call(this); +}; + +Yanfly.BEC.Scene_Battle_onItemCancel = + Scene_Battle.prototype.onItemCancel; +Scene_Battle.prototype.onItemCancel = function() { + this._helpWindow.clear(); + Yanfly.BEC.Scene_Battle_onItemCancel.call(this); + BattleManager.clearInputtingAction(); +}; + +//============================================================================= +// Window_Selectable +//============================================================================= + +Yanfly.BEC.Window_Selectable_isCursorMovable = + Window_Selectable.prototype.isCursorMovable; +Window_Selectable.prototype.isCursorMovable = function() { + if (this._inputLock) return false; + return Yanfly.BEC.Window_Selectable_isCursorMovable.call(this); +}; + +//============================================================================= +// Window_Help +//============================================================================= + +Yanfly.BEC.Window_Help_clear = Window_Help.prototype.clear; +Window_Help.prototype.clear = function() { + Yanfly.BEC.Window_Help_clear.call(this); + this.contents.clear(); +}; + +Window_Help.prototype.setBattler = function(battler) { + this.contents.clear(); + this.clear(); + this.resetFontSettings(); + if (!$gameParty.inBattle()) return; + if (!battler) return; + var action = BattleManager.inputtingAction(); + if (this.specialSelectionText(action)) { + this.drawSpecialSelectionText(action); + } else { + this.drawBattler(battler); + } +}; + +Window_Help.prototype.specialSelectionText = function(action) { + BattleManager.resetSelection(); + if (!action) return false; + return !action.needsSelection(); +}; + +Window_Help.prototype.drawBattler = function(battler) { + var text = battler.name(); + var wx = 0; + var wy = (this.contents.height - this.lineHeight()) / 2; + this.drawText(text, wx, wy, this.contents.width, 'center'); +}; + +Window_Help.prototype.drawSpecialSelectionText = function(action) { + var wx = 0; + var wy = (this.contents.height - this.lineHeight()) / 2; + var text = ''; + if (action.isForUser()) { + text = Yanfly.Param.BECHelpUserTx; + } else if (action.isForRandom()) { + BattleManager.startAllSelection(); + var fmt = Yanfly.Param.BECHelpRandTx; + if (action.isForOpponent() && action.numTargets() !== 1) { + var target = Yanfly.Param.BECHelpEnemiesTx; + } else if (action.isForOpponent() && action.numTargets() === 1) { + var target = Yanfly.Param.BECHelpEnemyTx; + } else if (action.isForFriend() && action.numTargets() !== 1) { + var target = Yanfly.Param.BECHelpAlliesTx; + } else { + var target = Yanfly.Param.BECHelpAllyTx; + } + text = fmt.format(target, Yanfly.Util.toGroup(action.numTargets())); + } else if (action.isForAll()) { + BattleManager.startAllSelection(); + var fmt = Yanfly.Param.BECHelpAllTx; + if (action.isForOpponent()) { + var target = Yanfly.Param.BECHelpEnemiesTx; + } else { + var target = Yanfly.Param.BECHelpAlliesTx; + } + text = fmt.format(target); + } + this.drawText(text, wx, wy, this.contents.width, 'center'); +}; + +//============================================================================= +// Window_BattleActor +//============================================================================= + +Window_BattleActor.prototype.autoSelect = function() { + var action = BattleManager.inputtingAction(); + if (!action) return; + this._inputLock = false; + this._selectDead = false; + if (action.isForUser()) { + this.select(BattleManager.actor().index()); + this._inputLock = true; + } else if (action.isForDeadFriend()) { + this._selectDead = true; + this.autoSelectFirstDeadActor(); + if (action.isForAll()) this._inputLock = true; + } +}; + +Window_BattleActor.prototype.autoSelectFirstDeadActor = function() { + var length = $gameParty.members().length; + for (var i = 0; i < length; ++i) { + var member = $gameParty.members()[i]; + if (member && member.isDead()) return this.select(i); + } +}; + +Window_BattleActor.prototype.isOkEnabled = function() { + if (this._selectDead) return this.actor().isDead(); + return Window_Selectable.prototype.isOkEnabled.call(this); +}; + +Window_BattleActor.prototype.updateHelp = function() { + if (!this._helpWindow) return; + this._helpWindow.setBattler(this.actor()); +}; + +Yanfly.BEC.Window_BattleActor_processTouch = + Window_BattleActor.prototype.processTouch; +Window_BattleActor.prototype.processTouch = function() { + if (Yanfly.Param.BECActorSelect && this.isOpenAndActive()) { + if (TouchInput.isTriggered() && !this.isTouchedInsideFrame()) { + if (this.getClickedActor() >= 0) { + var index = this.getClickedActor(); + if (this.index() === index) { + return this.processOk(); + } else { + SoundManager.playCursor(); + return this.select(index); + } + } + } + if (TouchInput.isPressed() && !this.isTouchedInsideFrame()) { + if (this.getClickedActor() >= 0) { + var index = this.getClickedActor(); + if (this.index() !== index) { + SoundManager.playCursor(); + return this.select(index); + } + } + } + if (Yanfly.Param.BECSelectMouseOver) { + var index = this.getMouseOverActor(); + if (index >= 0 && this.index() !== index) { + SoundManager.playCursor(); + return this.select(index); + } + } + } + Yanfly.BEC.Window_BattleActor_processTouch.call(this); +}; + +Window_BattleActor.prototype.getClickedActor = function() { + for (var i = 0; i < $gameParty.battleMembers().length; ++i) { + var actor = $gameParty.battleMembers().reverse()[i]; + if (!actor) continue; + if (this.isClickedActor(actor)) { + if (this._selectDead && !actor.isDead()) continue; + if (this._inputLock && actor.index() !== this.index()) continue; + return actor.index(); + } + } + return -1; +}; + +Window_BattleActor.prototype.isClickedActor = function(actor) { + if (!actor) return false; + if (!actor.isSpriteVisible()) return false; + if (!actor.isAppeared()) return false; + if ($gameTemp._disableMouseOverSelect) return false; + var x = TouchInput.x; + var y = TouchInput.y; + var rect = new Rectangle(); + rect.width = actor.spriteWidth(); + rect.height = actor.spriteHeight(); + rect.x = actor.spritePosX() - rect.width / 2; + rect.y = actor.spritePosY() - rect.height; + return (x >= rect.x && y >= rect.y && x < rect.x + rect.width && + y < rect.y + rect.height); +}; + +Window_BattleActor.prototype.getMouseOverActor = function() { + for (var i = 0; i < $gameParty.battleMembers().length; ++i) { + var actor = $gameParty.battleMembers().reverse()[i]; + if (!actor) continue; + if (this.isMouseOverActor(actor)) { + if (this._selectDead && !actor.isDead()) continue; + if (this._inputLock && actor.index() !== this.index()) continue; + return actor.index(); + } + } + return -1; +}; + +Window_BattleActor.prototype.isMouseOverActor = function(actor) { + if (!actor) return false; + if (!actor.isSpriteVisible()) return false; + if (!actor.isAppeared()) return false; + if ($gameTemp._disableMouseOverSelect) return false; + var x = TouchInput._mouseOverX; + var y = TouchInput._mouseOverY; + var rect = new Rectangle(); + rect.width = actor.spriteWidth(); + rect.height = actor.spriteHeight(); + rect.x = actor.spritePosX() - rect.width / 2; + rect.y = actor.spritePosY() - rect.height; + return (x >= rect.x && y >= rect.y && x < rect.x + rect.width && + y < rect.y + rect.height); +}; + +//============================================================================= +// Window_BattleEnemy +//============================================================================= + +Yanfly.DisableWebGLMask = false; + +Yanfly.BEC.Window_BattleEnemy_initialize = + Window_BattleEnemy.prototype.initialize; +Window_BattleEnemy.prototype.initialize = function(x, y) { + if (Yanfly.Param.BECEnemySelect) { + x -= Graphics.boxWidth * 200; + y -= Graphics.boxHeight * 200; + }; + Yanfly.BEC.Window_BattleEnemy_initialize.call(this, x, y); +}; + +Yanfly.BEC.WindowLayer_webglMaskWindow = + WindowLayer.prototype._webglMaskWindow; +WindowLayer.prototype._webglMaskWindow = function(renderSession, win) { + if (win._ignoreMask) return; + Yanfly.BEC.WindowLayer_webglMaskWindow.call(this, renderSession, win); +}; + +Yanfly.BEC.Window_BattleEnemy_maxCols = + Window_BattleEnemy.prototype.maxCols; +Window_BattleEnemy.prototype.maxCols = function() { + if (Yanfly.Param.BECEnemySelect) return this._enemies.length; + return Yanfly.BEC.Window_BattleEnemy_maxCols.call(this); +}; + +Window_BattleEnemy.prototype.allowedTargets = function() { + var targets = []; + targets = targets.concat($gameTroop.aliveMembers()); + return targets; +}; + +Window_BattleEnemy.prototype.refresh = function() { + this._enemies = this.allowedTargets(); + this.sortTargets(); + Window_Selectable.prototype.refresh.call(this); +}; + +Window_BattleEnemy.prototype.sortTargets = function() { + this._enemies.sort(function(a, b) { + if (a.spritePosX() == b.spritePosX()) { + return a.spritePosY() - b.spritePosY(); + } + return a.spritePosX() - b.spritePosX(); + }); +}; + +Window_BattleEnemy.prototype.autoSelect = function() { + var selectIndex = eval(Yanfly.Param.BECEnemyAutoSel); + this.select(selectIndex); +}; + +Window_BattleEnemy.prototype.furthestRight = function() { + return this.maxItems() - 1; +}; + +Window_BattleEnemy.prototype.updateHelp = function() { + if (!this._helpWindow) return; + this._helpWindow.setBattler(this.enemy()); +}; + +Yanfly.BEC.Window_BattleEnemy_processTouch = + Window_BattleEnemy.prototype.processTouch; +Window_BattleEnemy.prototype.processTouch = function() { + if (Yanfly.Param.BECEnemySelect && this.isOpenAndActive()) { + if (TouchInput.isTriggered() && !this.isTouchedInsideFrame()) { + if (this.getClickedEnemy() >= 0) { + var index = this.getClickedEnemy(); + if (this.index() === index) { + return this.processOk(); + } else { + SoundManager.playCursor(); + return this.select(index); + } + } + } + if (TouchInput.isPressed() && !this.isTouchedInsideFrame()) { + if (this.getClickedEnemy() >= 0) { + var index = this.getClickedEnemy(); + if (this.index() !== index) { + SoundManager.playCursor(); + return this.select(index); + } + } + } + if (Yanfly.Param.BECSelectMouseOver) { + var index = this.getMouseOverEnemy(); + if (index >= 0 && this.index() !== index) { + SoundManager.playCursor(); + return this.select(index); + } + } + }; + Yanfly.BEC.Window_BattleEnemy_processTouch.call(this); +}; + +Window_BattleEnemy.prototype.getClickedEnemy = function() { + for (var i = 0; i < this._enemies.length; ++i) { + var enemy = this._enemies[i]; + if (!enemy) continue; + if (this.isClickedEnemy(enemy)) { + if (this._selectDead && !enemy.isDead()) continue; + var index = this._enemies.indexOf(enemy) + if (this._inputLock && index !== this.index()) continue; + return index; + } + } + return -1; +}; + +Window_BattleEnemy.prototype.isClickedEnemy = function(enemy) { + if (!enemy) return false; + if (!enemy.isSpriteVisible()) return false; + if ($gameTemp._disableMouseOverSelect) return false; + var x = TouchInput.x; + var y = TouchInput.y; + var rect = new Rectangle(); + rect.width = enemy.spriteWidth(); + rect.height = enemy.spriteHeight(); + rect.x = enemy.spritePosX() - rect.width / 2; + rect.y = enemy.spritePosY() - rect.height; + return (x >= rect.x && y >= rect.y && x < rect.x + rect.width && + y < rect.y + rect.height); +}; + +Window_BattleEnemy.prototype.getMouseOverEnemy = function() { + for (var i = 0; i < this._enemies.length; ++i) { + var enemy = this._enemies[i]; + if (!enemy) continue; + if (this.isMouseOverEnemy(enemy)) { + if (this._selectDead && !enemy.isDead()) continue; + var index = this._enemies.indexOf(enemy) + if (this._inputLock && index !== this.index()) continue; + return index; + } + } + return -1; +}; + +Window_BattleEnemy.prototype.isMouseOverEnemy = function(enemy) { + if (!enemy) return false; + if (!enemy.isSpriteVisible()) return false; + if ($gameTemp._disableMouseOverSelect) return false; + var x = TouchInput._mouseOverX; + var y = TouchInput._mouseOverY; + var rect = new Rectangle(); + rect.width = enemy.spriteWidth(); + rect.height = enemy.spriteHeight(); + rect.x = enemy.spritePosX() - rect.width / 2; + rect.y = enemy.spritePosY() - rect.height; + return (x >= rect.x && y >= rect.y && x < rect.x + rect.width && + y < rect.y + rect.height); +}; + +//============================================================================= +// Window_EnemyVisualSelect +//============================================================================= + +function Window_EnemyVisualSelect() { + this.initialize.apply(this, arguments); +} + +Window_EnemyVisualSelect.prototype = Object.create(Window_Base.prototype); +Window_EnemyVisualSelect.prototype.constructor = Window_EnemyVisualSelect; + +Window_EnemyVisualSelect.prototype.initialize = function() { + Window_Base.prototype.initialize.call(this, 0, 0, 1, 1); + this._battler = null; + this._battlerName = ''; + this._requestRefresh = false; + this._showSelectCursor = Yanfly.Param.BECShowSelectBox; + this._showEnemyName = Yanfly.Param.BECShowEnemyName; + this.contentsOpacity = 0; + this.opacity = 0; +}; + +Window_EnemyVisualSelect.prototype.setBattler = function(battler) { + if (this._battler === battler) return; + this._battler = battler; + this._battlerName = battler.name(); +}; + +Window_EnemyVisualSelect.prototype.update = function() { + Window_Base.prototype.update.call(this); + if (!this._battler) return; + this.updateWindowAspects(); +}; + +Window_EnemyVisualSelect.prototype.updateWindowAspects = function() { + this.updateBattlerName(); + this.updateWindowSize(); + this.updateWindowPosition(); + this.updateOpacity(); + this.updateRefresh(); + this.updateCursor(); +}; + +Window_EnemyVisualSelect.prototype.updateBattlerName = function() { + if (this._battlerName !== this._battler.name()) + this._battlerName = this._battler.name(); + this._requestRefresh = true; + this._nameTextWidth = undefined; +}; + +Window_EnemyVisualSelect.prototype.updateWindowSize = function() { + var spriteWidth = this._battler.spriteWidth(); + this.contents.fontSize = Yanfly.Param.BECEnemyFontSize; + if (this._nameTextWidth === undefined) { + this._nameTextWidth = this.textWidth(this._battler.name()); + } + var textWidth = this._nameTextWidth; + textWidth += this.textPadding() * 2; + var width = Math.max(spriteWidth, textWidth) + this.standardPadding() * 2; + width = Math.ceil(width); + var height = this._battler.spriteHeight() + this.standardPadding() * 2; + height = Math.ceil(height); + height = Math.max(height, this.lineHeight() + this.standardPadding() * 2); + if (width === this.width && height === this.height) return; + this.width = width; + this.height = height; + this.createContents(); + this._requestRefresh = true; + this.makeWindowBoundaries(); +}; + +Window_EnemyVisualSelect.prototype.makeWindowBoundaries = function() { + if (!this._requestRefresh) return; + this._minX = -1 * this.standardPadding(); + this._maxX = Graphics.boxWidth - this.width + this.standardPadding(); + this._minY = -1 * this.standardPadding(); + this._maxY = Graphics.boxHeight - this.height + this.standardPadding(); + this._maxY -= SceneManager._scene._statusWindow.height; +}; + +Window_EnemyVisualSelect.prototype.updateWindowPosition = function() { + if (!this._battler) return; + this.x = -1 * this.width / 2; + this.y = -1 * this.height + this.standardPadding(); + this.x += this._battler.spritePosX(); + this.y += this._battler.spritePosY(); + this.x = this.x.clamp(this._minX, this._maxX); + this.y = this.y.clamp(this._minY, this._maxY); +}; + +Window_EnemyVisualSelect.prototype.updateOpacity = function() { + if (this.isShowWindow()) { + this.contentsOpacity += 32; + } else { + this.contentsOpacity -= 32; + } +}; + +Window_EnemyVisualSelect.prototype.isShowWindow = function() { + var scene = SceneManager._scene; + if (!scene._enemyWindow) return false; + var enemyWindow = scene._enemyWindow; + if (!enemyWindow.active) return false; + if (!this._battler.isAppeared()) return false; + if (this._battler.isDead()) { + return enemyWindow._selectDead; + } + return enemyWindow._enemies.contains(this._battler); +}; + +Window_EnemyVisualSelect.prototype.updateCursor = function() { + if (this.isShowCursor()) { + var wy = this.contents.height - this.lineHeight(); + this.setCursorRect(0, wy, this.contents.width, this.lineHeight()); + } else { + this.setCursorRect(0, 0, 0, 0); + } +}; + +Window_EnemyVisualSelect.prototype.isShowCursor = function() { + if (!this._showSelectCursor) return false; + var scene = SceneManager._scene; + if (!scene._enemyWindow) return false; + var enemyWindow = scene._enemyWindow; + if (!enemyWindow.active) return false; + if (!this._battler.isAppeared()) return false; + return this._battler.isSelected(); +}; + +Window_EnemyVisualSelect.prototype.updateRefresh = function() { + if (this._requestRefresh) this.refresh(); +}; + +Window_EnemyVisualSelect.prototype.refresh = function() { + this.contents.clear(); + if (!this._battler) return; + if (!this._showEnemyName) return; + if (this._battler.isHidden()) return; + this._requestRefresh = false; + this.contents.fontSize = Yanfly.Param.BECEnemyFontSize; + var text = this._battler.name(); + var wy = this.contents.height - this.lineHeight(); + this.drawText(text, 0, wy, this.contents.width, 'center'); +}; + +//============================================================================= +// Window_PartyCommand +//============================================================================= + +Window_PartyCommand.prototype.itemTextAlign = function() { + return Yanfly.Param.BECCommandAlign; +}; + +Window_PartyCommand.prototype.numVisibleRows = function() { + return Yanfly.Param.BECCommandRows; +}; + +//============================================================================= +// Window_ActorCommand +//============================================================================= + +Window_ActorCommand.prototype.itemTextAlign = function() { + return Yanfly.Param.BECCommandAlign; +}; + +Window_ActorCommand.prototype.numVisibleRows = function() { + return Yanfly.Param.BECCommandRows; +}; + +//============================================================================= +// Window_BattleStatus +//============================================================================= + +Window_BattleStatus.prototype.numVisibleRows = function() { + return Yanfly.Param.BECCommandRows; +}; + +Window_BattleStatus.prototype.updateStatusRequests = function() { + if (BattleManager._victoryPhase) return; + for (var i = 0; i < $gameParty.battleMembers().length; ++i) { + var actor = $gameParty.battleMembers()[i]; + if (!actor) continue; + if (actor.isStatusRefreshRequested()) this.processStatusRefresh(i); + } +}; + +Window_BattleStatus.prototype.processStatusRefresh = function(index) { + var actor = $gameParty.battleMembers()[index]; + if (!actor) return; + var rect = this.itemRect(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + this.drawItem(index); + actor.completetStatusRefreshRequest(); +}; + +Window_BattleStatus.prototype.update = function() { + Window_Selectable.prototype.update.call(this); +}; + +if (!Yanfly.Param.BECCurMax) { + +Window_BattleStatus.prototype.drawCurrentAndMax = function(current, max, x, y, + width, color1, color2) { + var labelWidth = this.textWidth('HP'); + var valueWidth = this.textWidth(Yanfly.Util.toGroup(max)); + var slashWidth = this.textWidth('/'); + var x1 = x + width - valueWidth; + this.changeTextColor(color1); + this.drawText(Yanfly.Util.toGroup(current), x1, y, valueWidth, 'right'); +}; + +}; // Yanfly.Param.BECCurMax + +//============================================================================= +// Window_BattleLog +//============================================================================= + +Yanfly.BEC.Window_BattleLog_isFastForward = + Window_BattleLog.prototype.isFastForward; +Window_BattleLog.prototype.isFastForward = function() { + if (Yanfly.Param.BECOptSpeed) return true; + return Yanfly.BEC.Window_BattleLog_isFastForward.call(this); +}; + +Window_BattleLog.prototype.updateWaitCount = function() { + if (this._waitCount > 0) { + this._waitCount -= 1; + if (this._waitCount < 0) { + this._waitCount = 0; + } + return true; + } + return false; +}; + +Window_BattleLog.prototype.animationBaseDelay = function() { + return Yanfly.Param.BECAniBaseDel; +}; + +Window_BattleLog.prototype.animationNextDelay = function() { + return Yanfly.Param.BECAniNextDel; +}; + +Window_BattleLog.prototype.updateWaitMode = function() { + var waiting = false; + switch (this._waitMode) { + case 'effect': + waiting = this._spriteset.isEffecting(); + break; + case 'movement': + waiting = this._spriteset.isAnyoneMoving(); + break; + case 'animation': + waiting = this._spriteset.isAnimationPlaying(); + break; + case 'popups': + waiting = this._spriteset.isPopupPlaying(); + break; + } + if (!waiting) { + this._waitMode = ''; + } + return waiting; +}; + +Window_BattleLog.prototype.startAction = function(subject, action, targets) { +}; + +Window_BattleLog.prototype.endAction = function(subject) { +}; + +Window_BattleLog.prototype.waitForAnimation = function() { + this.setWaitMode('animation'); +}; + +Window_BattleLog.prototype.waitForEffect = function() { + this.setWaitMode('effect'); +}; + +Window_BattleLog.prototype.waitForPopups = function() { + this.setWaitMode('popups'); +}; + +Yanfly.BEC.Window_BattleLog_displayAction = + Window_BattleLog.prototype.displayAction; +Window_BattleLog.prototype.displayAction = function(subject, item) { + if (Yanfly.Param.BECFullActText) { + Yanfly.BEC.Window_BattleLog_displayAction.call(this, subject, item); + } else { + this._actionIcon = this.displayIcon(item); + var text = this.displayText(item); + this.push('addText', '' + text); + if (item.message2) { + this.push('addText', '
' + item.message2.format(text)); + } + } +}; + +Window_BattleLog.prototype.displayIcon = function(item) { + if (!item) return 0; + return item.battleDisplayIcon; +}; + +Window_BattleLog.prototype.displayText = function(item) { + if (!item) return ''; + return item.battleDisplayText; +}; + +Yanfly.BEC.Window_BattleLog_displayActionResults = + Window_BattleLog.prototype.displayActionResults; +Window_BattleLog.prototype.displayActionResults = function(subject, target) { + if (Yanfly.Param.BECOptSpeed) { + if (target.result().used) { + this.displayCritical(target); + this.displayDamage(target); + this.displayAffectedStatus(target); + this.displayFailure(target); + } + } else { + Yanfly.BEC.Window_BattleLog_displayActionResults.call(this, subject, + target); + } + if (target.isDead()) target.performCollapse(); +}; + +Yanfly.BEC.Window_BattleLog_drawLineText = + Window_BattleLog.prototype.drawLineText; +Window_BattleLog.prototype.drawLineText = function(index) { + if (this._lines[index].match('
')) { + this.drawCenterLine(index); + } else if (this._lines[index].match('')) { + this.drawSimpleActionLine(index); + } else { + Yanfly.BEC.Window_BattleLog_drawLineText.call(this, index); + } +}; + +Window_BattleLog.prototype.textWidthEx = function(text) { + return this.drawTextEx(text, 0, this.contents.height + this.lineHeight()); +}; + +Window_BattleLog.prototype.drawCenterLine = function(index) { + var text = this._lines[index].replace('
', ''); + var rect = this.itemRectForText(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + var tw = this.textWidthEx(text); + var wx = rect.x + (rect.width - tw) / 2; + this.resetFontSettings(); + this.drawTextEx(text, wx, rect.y); +}; + +Window_BattleLog.prototype.drawSimpleActionLine = function(index) { + var text = this._lines[index].replace('', ''); + var rect = this.itemRectForText(index); + this.contents.clearRect(rect.x, rect.y, rect.width, rect.height); + if (this._actionIcon) { + var tw = this.textWidth(text); + var ix = (rect.width - tw) / 2 - 4; + this.drawIcon(this._actionIcon, ix, rect.y + 2); + } + this.drawText(text, rect.x, rect.y, Graphics.boxWidth, 'center'); +}; + +Window_BattleLog.prototype.displayCounter = function(target) { + if (Yanfly.Param.BECShowCntText) { + this.addText(TextManager.counterAttack.format(target.name())); + } + target.performCounter(); + this.showAttackAnimation(target, [BattleManager._subject]); + this.waitForAnimation(); +}; + +Window_BattleLog.prototype.displayReflection = function(target) { + if (Yanfly.Param.BECShowRflText) { + this.addText(TextManager.magicReflection.format(target.name())); + } + target.performReflection(); + var animationId = BattleManager._action.item().animationId; + this.showNormalAnimation([BattleManager._subject], animationId); + this.waitForAnimation(); +}; + +Window_BattleLog.prototype.displaySubstitute = function(substitute, target) { + if (Yanfly.Param.BECShowSubText) { + var substName = substitute.name(); + this.addText(TextManager.substitute.format(substName, target.name())); + } + substitute.performSubstitute(target); +}; + +Yanfly.BEC.Window_BattleLog_displayFailure = + Window_BattleLog.prototype.displayFailure; +Window_BattleLog.prototype.displayFailure = function(target) { + if (!Yanfly.Param.BECShowFailText) return; + Yanfly.BEC.Window_BattleLog_displayFailure.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayCritical = + Window_BattleLog.prototype.displayCritical; +Window_BattleLog.prototype.displayCritical = function(target) { + if (!Yanfly.Param.BECShowCritText) return; + Yanfly.BEC.Window_BattleLog_displayCritical.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayMiss = + Window_BattleLog.prototype.displayMiss; +Window_BattleLog.prototype.displayMiss = function(target) { + if (!Yanfly.Param.BECShowMissText) return; + Yanfly.BEC.Window_BattleLog_displayMiss.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayEvasion = + Window_BattleLog.prototype.displayEvasion; +Window_BattleLog.prototype.displayEvasion = function(target) { + if (!Yanfly.Param.BECShowEvaText) return; + Yanfly.BEC.Window_BattleLog_displayEvasion.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayHpDamage = + Window_BattleLog.prototype.displayHpDamage; +Window_BattleLog.prototype.displayHpDamage = function(target) { + if (!Yanfly.Param.BECShowHpText) return; + Yanfly.BEC.Window_BattleLog_displayHpDamage.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayMpDamage = + Window_BattleLog.prototype.displayMpDamage; +Window_BattleLog.prototype.displayMpDamage = function(target) { + if (!Yanfly.Param.BECShowMpText) return; + Yanfly.BEC.Window_BattleLog_displayMpDamage.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayTpDamage = + Window_BattleLog.prototype.displayTpDamage; +Window_BattleLog.prototype.displayTpDamage = function(target) { + if (!Yanfly.Param.BECShowTpText) return; + Yanfly.BEC.Window_BattleLog_displayTpDamage.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayCurrentState = + Window_BattleLog.prototype.displayCurrentState; +Window_BattleLog.prototype.displayCurrentState = function(subject) { + if (!Yanfly.Param.BECShowStateText) return; + Yanfly.BEC.Window_BattleLog_displayCurrentState.call(this, subject); +}; + +Yanfly.BEC.Window_BattleLog_displayAddedStates = + Window_BattleLog.prototype.displayAddedStates; +Window_BattleLog.prototype.displayAddedStates = function(target) { + if (!Yanfly.Param.BECShowStateText) return; + Yanfly.BEC.Window_BattleLog_displayAddedStates.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayRemovedStates = + Window_BattleLog.prototype.displayRemovedStates; +Window_BattleLog.prototype.displayRemovedStates = function(target) { + if (!Yanfly.Param.BECShowStateText) return; + Yanfly.BEC.Window_BattleLog_displayRemovedStates.call(this, target); +}; + +Yanfly.BEC.Window_BattleLog_displayChangedBuffs = + Window_BattleLog.prototype.displayChangedBuffs; +Window_BattleLog.prototype.displayChangedBuffs = function(target) { + if (!Yanfly.Param.BECShowBuffText) return; + Yanfly.BEC.Window_BattleLog_displayChangedBuffs.call(this, target); +}; + +Window_BattleLog.prototype.popupDamage = function(target) { +}; + +Yanfly.BEC.Window_BattleLog_showEnemyAttackAnimation = + Window_BattleLog.prototype.showEnemyAttackAnimation; +Window_BattleLog.prototype.showEnemyAttackAnimation = +function(subject, targets) { + if ($gameSystem.isSideView()) { + this.showNormalAnimation(targets, subject.attackAnimationId(), false); + } else { + this.showNormalAnimation(targets, subject.attackAnimationId(), false); + Yanfly.BEC.Window_BattleLog_showEnemyAttackAnimation.call(this, subject, + targets); + } +}; + +Window_BattleLog.prototype.showActorAtkAniMirror = function(subject, targets) { + if (subject.isActor()) { + this.showNormalAnimation(targets, subject.attackAnimationId1(), true); + this.showNormalAnimation(targets, subject.attackAnimationId2(), false); + } else { + this.showNormalAnimation(targets, subject.attackAnimationId1(), true) + } +}; + +//============================================================================= +// New Function +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +Yanfly.Util.displayError = function(e, code, message) { + console.log(message); + console.log(code || 'NON-EXISTENT'); + console.error(e); + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + if (!require('nw.gui').Window.get().isDevToolsOpen()) { + require('nw.gui').Window.get().showDevTools(); + } + } +}; + +if (!Yanfly.Util.toGroup) { + Yanfly.Util.toGroup = function(inVal) { + return inVal; + } +}; + +Yanfly.Util.getRange = function(n, m) { + var result = []; + for (var i = n; i <= m; ++i) result.push(i); + return result; +}; + +Yanfly.Util.onlyUnique = function(value, index, self) { + return self.indexOf(value) === index; +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_BuffsStatesCore.js b/js/plugins/YEP_BuffsStatesCore.js new file mode 100644 index 0000000..39d641e --- /dev/null +++ b/js/plugins/YEP_BuffsStatesCore.js @@ -0,0 +1,2118 @@ +//============================================================================= +// Yanfly Engine Plugins - Buffs & States Core +// YEP_BuffsStatesCore.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_BuffsStatesCore = true; + +var Yanfly = Yanfly || {}; +Yanfly.BSC = Yanfly.BSC || {}; +Yanfly.BSC.version = 1.12; + +//============================================================================= + /*: + * @plugindesc v1.12a 效果状态核心☁️ + * @author Yanfly Engine Plugins + * + * @param ---Turn指示器--- + * @default + * + * @param Show Turns + * @text 显示回合数 + * @desc 显示buff和states的剩余回合数? + * NO - false YES - true + * @default true + * + * @param Font Size + * @text 字体大小 + * @desc The default font size used for turn count. + * Default: 28 + * @default 16 + * + * @param Turn Alignment + * @text 回合对准 + * @desc How do you want to align the turns? + * left center right + * @default right + * + * @param Turn Buffer X + * @text 回合缓冲器X + * @desc Buffer the x position of the turn by this much. + * @default -3 + * + * @param Turn Buffer Y + * @text 回合缓冲器Y + * @desc Buffer the y position of the turn by this much. + * @default -6 + * + * @param State Color + * @desc The default text color used for state turns. + * @default 0 + * + * @param Buff Color + * @desc The default text color used for buffs. + * @default 24 + * + * @param Debuff Color + * @desc The default text color used for debuffs. + * @default 2 + * + * @param ---敌人图标--- + * @default + * + * @param Show Enemy Icons + * @text 显示敌人图标 + * @desc Do you wish to show enemy state icons? + * NO - false YES - true + * @default true + * + * @param Enemy Buff Turn + * @desc Do you wish to show enemy buff turns remaining? + * NO - false YES - true + * @default true + * + * @param Enemy State Turn + * @desc Do you wish to show enemy state turns remaining? + * NO - false YES - true + * @default true + * + * @param Enemy State Counter + * @text 显示敌人状态计数器 + * @desc Do you wish to show enemy state counters? + * NO - false YES - true + * @default true + * + * @param ---Buff设置--- + * @default + * + * @param Default Limit + * @text 默认限制 + * @desc The default number of times you can stack buff/debuff. + * Default: 2 + * @default 4 + * + * @param Maximum Limit + * @text 最大限度 + * @desc The maximum number of times you can stack buff/debuff. + * @default 8 + * + * @param Buff Formula + * @text Buff公式 + * @desc The formula used for buff rate calculation. + * Default: this._buffs[paramId] * 0.25 + 1.0 + * @default this._buffs[paramId] * 0.25 + 1.0 + * + * @param Show Buff Rate + * @text 显示Buff增/减益 + * @desc Shows the buff/debuff rate for buffs and debuffs. + * YES - true NO - false + * @default false + * + * @param ---状态设置--- + * @default + * + * @param Reapply Rules + * @text 重新应用规则 + * @desc 重新应用已存在状态时的规则: + * 0 - Ignore 1 - Reset 2 - Add + * @default 1 + * + * @param Show Enemy Turns + * @text 显示敌人回合 + * @desc If using Battle Engine Core, show turns in help window? + * NO - false YES - true + * @default true + * + * @param ---计数器设置--- + * @default + * + * @param Counter Font Size + * @text 计数器字体大小 + * @desc The default font size used for state counters. + * Default: 28 + * @default 16 + * + * @param Counter Alignment + * @text 计数器对齐 + * @desc How do you want to align the counter? + * left center right + * @default center + * + * @param Counter Buffer X + * @text 计数器缓冲区X + * @desc Buffer the x position of the counter by this much. + * @default 0 + * + * @param Counter Buffer Y + * @text 计数器缓冲区Y + * @desc Buffer the y position of the counter by this much. + * @default 8 + * + * @param Counter Color + * @text 计数器颜色 + * @desc The default text color used for state counters. + * @default 0 + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * 如果你在使用YEP_BattleEngineCore.js,请放在YEP_BattleEngineCore.js下面 + * + * Alter the basic mechanics behind buffs and states that aren't adjustable + * within the RPG Maker editor. Such mechanics include altering the maximum + * number of times buffs can stack, changing the turns remaining on buffs and + * 这可以改变增益效果和状态。这些包括增益效果持续时间,回合等等 + * + * 我们为增益效果、减益效果、状态等添加了一个回合指示器。你可以通过插件参 + * 数来设置增益和减益效果,或者也可以用单独的设置来改变状态 + * + * 并且,有很多自定义模式可以来设置,你可以用JS语言来更好的设置状态或者其 + * 他特殊影响 + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * 下面这个标签你可以用来调整状态和效果 + * + * --- Buff Related --- + * + * Actor, Class, Enemy, Weapon, Armor, and State notetags: + * + * + * + * + * Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi', + * or 'luk' without the quotes. This notetag adjusts the maximum number of + * times the stat can be buffed or debuffed to the Maximum Limit cap in the + * plugin parameters.设置状态调整数值 + * + * Skill and Item Notetags: + * + * + * + * 设置持续回合 + * Modifies already applied buff/debuff turns on target by x value. If this + * brings a buff/debuff to 0 or below, the buff/debuff is removed. + * + * --- State Related --- + * + * State Notetags: + * + * + * Show/hide the turn count remaining for the state. This will override the + * default setting.显示回合数 + * + * + * Sets the font size used for this specific state to be x. This will + * override the default setting.显示回合数文本大小 + * + * + * + * + * This sets the text alignment for the turn count indicator. This will + * override the default setting.显示回合数的位置 + * + * + * + * + * + * Allows you to adjust the x/y position manually for the turn count for this + * particular state. This will override the settings.调整显示回合数的位置 + * + * + * This will set the turn count display color to text color x. This will + * override the default setting.显示回合数的文本颜色 + * + * + * + * + * 当状态再次应用时的规则。如果是忽略,则继续计回合数,如果重置,则回合数 + * 为默认值,如果叠加,则加到原有回合数上 + * + * Skill and Item Notetags: + * + * + * + * + * Modifies already applied state x turns on target by y value. If this + * brings the state to 0 or below turns, the state is removed. If you are + * using named states and have multiple states with the same name, priority + * 改变状态持续时间。如果你使用名字来设置,当重名时,优先考虑ID最高的 + * + * Enemy Notetags: + * + * + * Affected by the Battle Engine Core. When selecting enemies, the state + * turns will show up in the help window. You can use this to have certain + * enemies show the state turns or hide them.显示状态持续回合 + * + * ============================================================================ + * Lunatic Mode - Custom Turn Modifiers + * ============================================================================ + * + * For those with an understanding of JavaScript, you can use these notetags to + * give conditional turn modifiers when altering a target's buff/state turn + * count. Follow the instructions below: + * + * Skill and Item Notetags: + * + * + * turn = 10; + * turn += user.agi; + * + * Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi', + * or 'luk' without the quotes. Whatever the 'turn' variable returns is what + * the turn count will be set to for the stat buff. + * + * + * turn = 10; + * turn += user.agi; + * + * Replace 'stat' with 'maxhp', 'maxmp', 'atk', 'def', 'mat', 'mdf', 'agi', + * or 'luk' without the quotes. Whatever the 'turn' variable returns is what + * the turn count will be set to for the stat debuff. + * + * + * turn = 10; + * turn += user.agi; + * + * This alters the turn count for state x. Whatever the 'turn' variable + * returns is what the turn count will be set for state x. + * + * + * turn = 10; + * turn += user.agi; + * + * This alters the turn count for state 'name'. Whatever the 'turn' variable + * returns is what the turn count will be set for state 'name'. If you have + * multiple states in your database with the same name, priority will be + * given to the state with the highest ID. + * + * ============================================================================ + * Lunatic Mode - Custom Timing Effects + * ============================================================================ + * + * For those with an understanding of JavaScript, you can use these notetags to + * cause code to run at certain times. + * + * Quick Reference: + * - Apply: When a state is added. + * - Remove: When a state is removed. + * - Leave: When a state expires by reaching 0 turns. + * - Turn Start: Whenever the battler's turn starts. + * - Action Start: Whenever the battler performs a new action. + * - Action End: Whenever the battler finishes an action. + * - Regenerate: Whenever the battler would regenerate HP/MP/TP. + * - Turn End: Whenever the battler's turn ends. + * - Battle: Whenever a battle is started. + * - Victory: Whenever a battle is won. *Note1 + * - Escape: Whenever a battle is escaped. *Note1 + * - Defeat: Whenever a battle is lost. *Note1 + * + * *Note1: If the state is set to expire on battle end, the expiration will + * occur before the custom effects would take place, meaning the effects will + * not occur at all unless the expiration is set to off. + * + * State Notetags: + * + * --- Timing Effects --- + * + * These effects specifically occur at certain intervals or timings. + * + * + * code + * code + * + * The code in between these notetags will run when the state is added onto + * a battler. The code will process after the state is actually applied. + * + * + * code + * code + * + * The code in between these notetags will run when the state is removed from + * a battler either manually or due to turn decay. The code will process + * after the state is actually removed but before . + * + * + * code + * code + * + * The code in between these notetags will run when the state is removed from + * a battler due to turn decay. The code will process after the state is + * actually removed and after . + * + * + * code + * code + * + * This requires YEP_BattleEngineCore. This effect will run at the start of + * each of the battler's turns. The code will process after all the other + * turn start effects have taken course. + * + * + * code + * code + * + * This effect will run at the start of each of the battler's actions. The + * code will process before the skill/item cost takes place. + * + * + * code + * code + * + * This effect will run at the end of each of the battler's actions. The + * code will process before the action end steps takes place. + * + * + * code + * code + * + * This effect will run whenever the battler would regenerate HP, MP, or TP. + * The code will process after all the other regenerate effects have ran. + * + * + * code + * code + * + * This effect will run at the end of each of the battler's turns. The code + * will process after all the other turn end effects have taken course. + * + * + * code + * code + * + * This effect will occur at the start of battle if the battler has the state + * already applied (usually through a passive state). + * + * + * code + * code + * + * This effect will occur at the end of battle if the party is victorious. + * This will only apply to the player's party. If this state can expire at + * the end of battle, this effect will not occur as state expiration will + * occur before this effect will happen. + * + * + * code + * code + * + * This effect will occur at the end of battle if the party has escaped. + * This will only apply to the player's party. If this state can expire at + * the end of battle, this effect will not occur as state expiration will + * occur before this effect will happen. + * + * + * code + * code + * + * This effect will occur at the end of battle if the party is defeated. + * This will only apply to the player's party. If this state can expire at + * the end of battle, this effect will not occur as state expiration will + * occur before this effect will happen. + * + * ============================================================================ + * Lunatic Mode - Custom Action Effects + * ============================================================================ + * + * For those with an understanding of JavaScript, you can use these notetags to + * cause code to run during actions. + * + * Quick Reference: + * Action Starts + * - Attacker: Initiate + * - Defender: Select + * Action Connects as a Success Hit, skip if Missed or Evaded + * - Attacker: Confirm + * - Defender: React + * Damage is Applied to the Defender + * - Defender: Respond + * - Attacker: Establish + * These occur regardless if the action is successfully hit. + * - Defender: Deselect + * - Attacker: Conclude + * + * State Notetags: + * + * --- On Action Effects --- + * + * These effects specifically occur when the battler is a target of an action. + * + * + * code + * code + * + * This effect will run when the battler selects a target. This will occur + * before hit/miss/evade confirmation and damage execution. This effect will + * run before everything else has taken course. + * + * + * code + * code + * + * This effect will run when the battler is selected as a target. This will + * occur before hit/miss/evade confirmation and damage execution. This effect + * will run after before everything else has ran. + * + * + * code + * code + * + * This effect will run when the battler connects a hit and before damage + * execution occurs. This effect will run after and + * and before everything else. + * + * + * value -= 100; + * value -= user.def; + * + * This effect will run when the battler is selected as a target. This will + * occur only if the action connects and will occur before damage execution. + * This effect will run before damage calculation occurs and will return the + * 'value' variable as a damage modifier. After , this + * effect will run. + * + * + * code + * code + * + * This effect will run when the battler is selected as a target. This will + * occur only if the action connects and will occur after damage execution. + * This effect will run after damage calculation occurs. The 'value' variable + * is equal to the damage dealt to the battler. This is the first effect to + * run after damage execution has taken place. + * + * + * code + * code + * + * This effect will run when the battler connects a hit and after damage + * execution occurs. This effect will run after has + * occurred and before everything else. + * + * + * code + * code + * + * This effect will run when the battler is selected as a target. This will + * occur after hit/miss/evade confirmation and damage execution. This effect + * will run after everything else has taken course. + * + * + * code + * code + * + * This is the final effect to be run after the battler selects a target and + * will occur after hit/miss/evade confirmation and damage execution. + * + * ============================================================================ + * Lunatic Mode - State Counters + * ============================================================================ + * + * State Counters are newly added features to suplement states. They are used + * purely in custom manners, which means they do not serve any function by + * themselves. State Counters can be used to note a number of stacks, a stored + * percentage, display a message, etc. All of it is purely updated based on + * JavaScript functions. + * + * --- + * + * There are a couple of notetags you can use for states: + * + * + * This adjusts the font size of the counter. + * + * + * + * + * This changes the alignment of the counter text. + * + * + * + * This adjusts the X buffer range for the counter text. + * + * + * + * This adjusts the Y buffer range for the counter text. + * + * + * This changes the font color of the text to the text color x. + * + * --- + * + * The following are JavaScript functions you may use to adjust counters: + * + * battler.clearStateCounters(); + * - This will clear all the counter values for all states. + * + * battler.setStateCounter(stateId, value); + * - This will set the counter value for the particular state to 'value'. + * + * battler.addStateCounter(stateId, value); + * - This will add to the counter value for the state. The counter must be + * a number in order for this to work. + * + * battler.clampStateCounter(stateId, min, max); + * - This will set a minimum and maximum value for the counter value of the + * particular state. The counter must be a number in order for this to work. + * + * battler.removeStateCounter(stateId) + * - This will clear the counter value for the state. + * + * battler.getStateCounter(stateId) + * - This will return the current state counter value. + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.12a: + * - Lunatic Mode fail safes added. + * - Optimization update. + * + * Version 1.11: + * - Fixed a bug involving Lunatic state effects not occuring in the right + * order when a state is removed. + * + * Version 1.10b: + * - Added new plugin parameter: Show Buff Rate. This will display the current + * buff or debuff rate on the buff icon. + * - Optimization Update. + * - Documentation fix for battler.clampStateCounter(stateId, min, max). + * + * Version 1.09b: + * - Added new plugin parameters: Show Enemy Icons, Enemy Buff Turn, Enemy + * State Turn, and Enemy State Counter to optionally display the enemy state + * icons, states, buffs, their turns, and their counters. + * - Added 'Lunatic Mode - State Counters'. Read more on it in the help file! + * - Added anti-crash method for newly added effect in case non-YEP plugins + * have non-battlers attached to battler sprites. + * - Fixed a bug that prevented screen flashes when walking around on the map + * when an actor is poisoned. + * + * Version 1.08: + * - Fixed an issue that caused adding states midway through Lunatic Mode to + * shift the order of states around causing some effects to be skipped. + * + * Version 1.07: + * - Updated for RPG Maker MV version 1.1.0. + * + * Version 1.06: + * - Added new notetags for , , + * , and for Lunatic Mode. + * + * Version 1.05a: + * - Fixed a bug with the 'Show Turns' parameter not working properly. + * - Fixed a bug with math issues for timed states. + * + * Version 1.04: + * - Changed timing of when Add/Remove/Leave Lunatic Effects occur to add more + * flexibility in custom effects. + * - Added a fail safe for when there are no targets to modify. + * - Fixed a bug with reapply ignore states. + * + * Version 1.03a: + * - Fixed a bug that would cause NaN to show up in state turns. + * + * Version 1.02: + * - Synched up with tick-based battle systems. + * + * Version 1.01: + * - Fixed a bug that didn't reset the font settings with the battle status. + * + * Version 1.00: + * - Finished Plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_BuffsStatesCore'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.BSCShowTurns = eval(String(Yanfly.Parameters['Show Turns'])); +Yanfly.Param.BSCFontSize = String(Yanfly.Parameters['Font Size']); +Yanfly.Param.BSCTurnAlign = String(Yanfly.Parameters['Turn Alignment']); +Yanfly.Param.BSCTurnBufferX = Number(Yanfly.Parameters['Turn Buffer X']); +Yanfly.Param.BSCTurnBufferY = Number(Yanfly.Parameters['Turn Buffer Y']); +Yanfly.Param.BSCTurnColor = Number(Yanfly.Parameters['State Color']); +Yanfly.Param.BSCBuffColor = Number(Yanfly.Parameters['Buff Color']); +Yanfly.Param.BSCDebuffColor = Number(Yanfly.Parameters['Debuff Color']); + +Yanfly.Param.BSCShowEnemyIcon = String(Yanfly.Parameters['Show Enemy Icons']); +Yanfly.Param.BSCShowEnemyIcon = eval(Yanfly.Param.BSCShowEnemyIcon); +Yanfly.Param.BSCEnemyBTurn = String(Yanfly.Parameters['Enemy Buff Turn']); +Yanfly.Param.BSCEnemyBTurn = eval(Yanfly.Param.BSCEnemyBTurn); +Yanfly.Param.BSCEnemyTurn = String(Yanfly.Parameters['Enemy State Turn']); +Yanfly.Param.BSCEnemyTurn = eval(Yanfly.Param.BSCEnemyTurn); +Yanfly.Param.BSCEnemyCounter = String(Yanfly.Parameters['Enemy State Counter']); +Yanfly.Param.BSCEnemyCounter = eval(Yanfly.Param.BSCEnemyCounter); + +Yanfly.Param.BSCDefaultLimit = Number(Yanfly.Parameters['Default Limit']); +Yanfly.Param.BSCMaximumLimit = Number(Yanfly.Parameters['Maximum Limit']); +Yanfly.Param.BSCBuffFormula = String(Yanfly.Parameters['Buff Formula']); +Yanfly.Param.BSCShowBuffRate = String(Yanfly.Parameters['Show Buff Rate']); +Yanfly.Param.BSCShowBuffRate = eval(Yanfly.Param.BSCShowBuffRate); + +Yanfly.Param.BSCReapplyRules = Number(Yanfly.Parameters['Reapply Rules']); +Yanfly.Param.BSCShowEnemyTurns = String(Yanfly.Parameters['Show Enemy Turns']); +Yanfly.Param.BSCShowEnemyTurns = eval(Yanfly.Param.BSCShowEnemyTurns); + +Yanfly.Param.BSCCounterSize = Number(Yanfly.Parameters['Counter Font Size']); +Yanfly.Param.BSCCounterAlign = String(Yanfly.Parameters['Counter Alignment']); +Yanfly.Param.BSCCounterBufferX = Number(Yanfly.Parameters['Counter Buffer X']); +Yanfly.Param.BSCCounterBufferY = Number(Yanfly.Parameters['Counter Buffer Y']); +Yanfly.Param.BSCCounterColor = Number(Yanfly.Parameters['Counter Color']); + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.BSC.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.BSC.DataManager_isDatabaseLoaded.call(this)) return false; + if (!Yanfly._loaded_YEP_BuffsStatesCore) { + this.processBSCNotetagsT($dataStates); + this.processBSCNotetags1($dataStates); + this.processBSCNotetags2($dataActors); + this.processBSCNotetags2($dataClasses); + this.processBSCNotetags2($dataEnemies); + this.processBSCNotetags2($dataWeapons); + this.processBSCNotetags2($dataArmors); + this.processBSCNotetags2($dataStates); + this.processBSCNotetags3($dataSkills); + this.processBSCNotetags3($dataItems); + this.processBSCNotetags4($dataEnemies); + Yanfly._loaded_YEP_BuffsStatesCore = true; + } + return true; +}; + +DataManager.processBSCNotetagsT = function(group) { + if (Yanfly.StateIdRef) return; + Yanfly.StateIdRef = {}; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + if (obj.name.length <= 0) continue; + Yanfly.StateIdRef[obj.name.toUpperCase()] = n; + } +}; + +DataManager.processBSCNotetags1 = function(group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.showTurns = Yanfly.Param.BSCShowTurns; + obj.turnAlign = Yanfly.Param.BSCTurnAlign; + obj.turnFontSize = Yanfly.Param.BSCFontSize; + obj.turnBufferX = Yanfly.Param.BSCTurnBufferX; + obj.turnBufferY = Yanfly.Param.BSCTurnBufferY; + obj.turnColor = Yanfly.Param.BSCTurnColor; + obj.reapplyRules = Yanfly.Param.BSCReapplyRules; + this.initStateEval(obj); + this.initStateCounter(obj); + var evalMode = 'none'; + var evalType = 'none'; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:SHOW TURNS)>/i)) { + obj.showTurns = true; + } else if (line.match(/<(?:HIDE TURNS)>/i)) { + obj.showTurns = false; + } else if (line.match(/<(?:TURN ALIGNMENT|turn align):[ ](.*)>/i)) { + obj.turnAlign = String(RegExp.$1).toLowerCase(); + } else if (line.match(/<(?:TURN FONT SIZE):[ ](\d+)>/i)) { + obj.turnFontSize = parseInt(RegExp.$1); + } else if (line.match(/<(?:TURN BUFFER X):[ ]([\+\-]\d+)>/i)) { + obj.turnBufferX = parseInt(RegExp.$1); + } else if (line.match(/<(?:TURN BUFFER Y):[ ]([\+\-]\d+)>/i)) { + obj.turnBufferY = parseInt(RegExp.$1); + } else if (line.match(/<(?:TURN COLOR):[ ](\d+)>/i)) { + obj.turnColor = parseInt(RegExp.$1); + } else if (line.match(/<(?:REAPPLY IGNORE TURNS)>/i)) { + obj.reapplyRules = 0; + } else if (line.match(/<(?:REAPPLY RESET TURNS)>/i)) { + obj.reapplyRules = 1; + } else if (line.match(/<(?:REAPPLY ADD TURNS)>/i)) { + obj.reapplyRules = 2; + } else if (line.match(//i)) { + var name = String(RegExp.$1).toUpperCase(); + evalMode = 'custom state effect'; + if (['APPLY', 'ADD'].contains(name)) { + evalType = 'addState'; + } else if (['REMOVE', 'ERASE'].contains(name)) { + evalType = 'removeState'; + } else if (['LEAVE', 'DECAY'].contains(name)) { + evalType = 'leaveState'; + } else if (['TURN START', 'BEGIN'].contains(name)) { + evalType = 'turnStartState'; + } else if (['TURN END', 'CLOSE'].contains(name)) { + evalType = 'turnEndState'; + } else if (['REGENERATE', 'REGEN', 'WHILE'].contains(name)) { + evalType = 'regenerateState'; + } else if (['SELECT', 'ONTARGET'].contains(name)) { + evalType = 'selectState'; + } else if (['DESELECT', 'OFFTARGET'].contains(name)) { + evalType = 'deselectState'; + } else if (['REACT', 'REACTION'].contains(name)) { + evalType = 'reactState'; + } else if (['RESPOND', 'RESPONSE'].contains(name)) { + evalType = 'respondState'; + } else if (['INITIATE', 'ONAPPLY'].contains(name)) { + evalType = 'initiateState'; + } else if (['CONFIRM', 'PREDAMAGE', 'PRE-DAMAGE'].contains(name)) { + evalType = 'confirmState'; + } else if (['ESTABLISH', 'POSTDAMAGE', 'POST-DAMAGE'].contains(name)) { + evalType = 'establishState'; + } else if (['CONCLUDE', 'OFFAPPLY'].contains(name)) { + evalType = 'concludeState'; + } else if (['ACTION START', 'START'].contains(name)) { + evalType = 'actionStartState'; + } else if (['ACTION END', 'FINISH'].contains(name)) { + evalType = 'actionEndState'; + } else if (['BATTLE', 'BATTLE START'].contains(name)) { + evalType = 'battle'; + } else if (['VICTORY', 'BATTLE VICTORY'].contains(name)) { + evalType = 'victory'; + } else if (['DEFEAT', 'BATTLE DEFEAT'].contains(name)) { + evalType = 'defeat'; + } else if (['ESCAPE', 'BATTLE ESCAPE'].contains(name)) { + evalType = 'escape'; + } + } else if (line.match(/<\/CUSTOM[ ](.*)[ ]EFFECT>/i)) { + evalMode = 'none'; + evalType = 'none'; + } else if (evalMode === 'custom state effect') { + obj.customEffectEval[evalType] = obj.customEffectEval[evalType] + + line + '\n'; + } else if (line.match(//i)) { + obj.stateCounterSettings['size'] = parseInt(RegExp.$1); + } else if (line.match(//i)) { + obj.stateCounterSettings['align'] = String(RegExp.$1).toLowerCase(); + } else if (line.match(//i)) { + obj.stateCounterSettings['bufferX'] = parseInt(RegExp.$1); + } else if (line.match(//i)) { + obj.stateCounterSettings['bufferY'] = parseInt(RegExp.$1); + } else if (line.match(//i)) { + obj.stateCounterSettings['color'] = parseInt(RegExp.$1); + } + } + } +}; + +DataManager.initStateEval = function(obj) { + obj.customEffectEval = {}; + obj.customEffectEval['addState'] = ''; + obj.customEffectEval['removeState'] = ''; + obj.customEffectEval['leaveState'] = ''; + obj.customEffectEval['turnStartState'] = ''; + obj.customEffectEval['turnEndState'] = ''; + obj.customEffectEval['regenerateState'] = ''; + obj.customEffectEval['selectState'] = ''; + obj.customEffectEval['deselectState'] = ''; + obj.customEffectEval['reactState'] = ''; + obj.customEffectEval['respondState'] = ''; + obj.customEffectEval['initiateState'] = ''; + obj.customEffectEval['concludeState'] = ''; + obj.customEffectEval['confirmState'] = ''; + obj.customEffectEval['establishState'] = ''; + obj.customEffectEval['actionStartState'] = ''; + obj.customEffectEval['actionEndState'] = ''; + obj.customEffectEval['battle'] = ''; + obj.customEffectEval['victory'] = ''; + obj.customEffectEval['defeat'] = ''; + obj.customEffectEval['escape'] = ''; +}; + +DataManager.initStateCounter = function(obj) { + obj.stateCounterSettings = {}; + obj.stateCounterSettings['size'] = Yanfly.Param.BSCCounterSize || 16; + obj.stateCounterSettings['align'] = Yanfly.Param.BSCCounterAlign; + if (obj.stateCounterSettings['align'] === 'undefined') { + obj.stateCounterSettings['align'] = 'center'; + } + obj.stateCounterSettings['bufferX'] = Yanfly.Param.BSCCounterBufferX || 0; + obj.stateCounterSettings['bufferY'] = Yanfly.Param.BSCCounterBufferY || 8; + obj.stateCounterSettings['color'] = Yanfly.Param.BSCCounterColor || 0; +}; + +DataManager.processBSCNotetags2 = function(group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.maxBuff = [0, 0, 0, 0, 0, 0, 0, 0]; + obj.maxDebuff = [0, 0, 0, 0, 0, 0, 0, 0]; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:MAX)[ ](.*)[ ](?:BUFF):[ ]([\+\-]\d+)>/i)) { + var paramId = 8; + var stat = String(RegExp.$1).toUpperCase(); + var limit = parseInt(RegExp.$2); + if (['MAXHP', 'MAX HP', 'MHP', 'HP'].contains(stat)) { + paramId = 0; + } else if (['MAXMP', 'MAX MP', 'MMP', 'MP'].contains(stat)) { + paramId = 1; + } else if (['ATK', 'STR'].contains(stat)) { + paramId = 2; + } else if (['DEF'].contains(stat)) { + paramId = 3; + } else if (['MAT', 'INT'].contains(stat)) { + paramId = 4; + } else if (['MDF', 'RES'].contains(stat)) { + paramId = 5; + } else if (['AGI', 'SPD'].contains(stat)) { + paramId = 6; + } else if (['LUK'].contains(stat)) { + paramId = 7; + } + obj.maxBuff[paramId] = limit; + } else if (line.match(/<(?:MAX)[ ](.*)[ ](?:DEBUFF):[ ]([\+\-]\d+)>/i)) { + var paramId = 8; + var stat = String(RegExp.$1).toUpperCase(); + var limit = parseInt(RegExp.$2); + if (['MAXHP', 'MAX HP', 'MHP', 'HP'].contains(stat)) { + paramId = 0; + } else if (['MAXMP', 'MAX MP', 'MMP', 'MP'].contains(stat)) { + paramId = 1; + } else if (['ATK', 'STR'].contains(stat)) { + paramId = 2; + } else if (['DEF'].contains(stat)) { + paramId = 3; + } else if (['MAT', 'INT'].contains(stat)) { + paramId = 4; + } else if (['MDF', 'RES'].contains(stat)) { + paramId = 5; + } else if (['AGI', 'SPD'].contains(stat)) { + paramId = 6; + } else if (['LUK'].contains(stat)) { + paramId = 7; + } + obj.maxDebuff[paramId] = limit; + } + } + } +}; + +DataManager.processBSCNotetags3 = function(group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.modifyTurnBuff = [0, 0, 0, 0, 0, 0, 0, 0]; + obj.modifyTurnDebuff = [0, 0, 0, 0, 0, 0, 0, 0]; + obj.modifyTurnBuffEval = ['', '', '', '', '', '', '', '']; + obj.modifyTurnDebuffEval = ['', '', '', '', '', '', '', '']; + obj.modifyTurnState = {}; + obj.modifyTurnStateEval = {}; + var evalMode = 'none'; + var evalLine = ''; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(.*)[ ](?:BUFF TURNS):[ ]([\+\-]\d+)>/i)) { + var paramId = 8; + var stat = String(RegExp.$1).toUpperCase(); + var value = parseInt(RegExp.$2); + if (['MAXHP', 'MAX HP', 'MHP', 'HP'].contains(stat)) { + paramId = 0; + } else if (['MAXMP', 'MAX MP', 'MMP', 'MP'].contains(stat)) { + paramId = 1; + } else if (['ATK', 'STR'].contains(stat)) { + paramId = 2; + } else if (['DEF'].contains(stat)) { + paramId = 3; + } else if (['MAT', 'INT'].contains(stat)) { + paramId = 4; + } else if (['MDF', 'RES'].contains(stat)) { + paramId = 5; + } else if (['AGI', 'SPD'].contains(stat)) { + paramId = 6; + } else if (['LUK'].contains(stat)) { + paramId = 7; + } + obj.modifyTurnBuff[paramId] = value; + } else if (line.match(/<(.*)[ ](?:DEBUFF TURNS):[ ]([\+\-]\d+)>/i)) { + var paramId = 8; + var stat = String(RegExp.$1).toUpperCase(); + var value = parseInt(RegExp.$2); + if (['MAXHP', 'MAX HP', 'MHP', 'HP'].contains(stat)) { + paramId = 0; + } else if (['MAXMP', 'MAX MP', 'MMP', 'MP'].contains(stat)) { + paramId = 1; + } else if (['ATK', 'STR'].contains(stat)) { + paramId = 2; + } else if (['DEF'].contains(stat)) { + paramId = 3; + } else if (['MAT', 'INT'].contains(stat)) { + paramId = 4; + } else if (['MDF', 'RES'].contains(stat)) { + paramId = 5; + } else if (['AGI', 'SPD'].contains(stat)) { + paramId = 6; + } else if (['LUK'].contains(stat)) { + paramId = 7; + } + obj.modifyTurnDebuff[paramId] = value; + } else if (line.match(/<(?:CUSTOM)[ ](.*)[ ](?:BUFF TURNS)>/i)) { + evalMode = 'custom buff'; + evalLine = ''; + } else if (line.match(/<\/(?:CUSTOM)[ ](.*)[ ](?:BUFF TURNS)>/i)) { + var paramId = 8; + var stat = String(RegExp.$1).toUpperCase(); + if (['MAXHP', 'MAX HP', 'MHP', 'HP'].contains(stat)) { + paramId = 0; + } else if (['MAXMP', 'MAX MP', 'MMP', 'MP'].contains(stat)) { + paramId = 1; + } else if (['ATK', 'STR'].contains(stat)) { + paramId = 2; + } else if (['DEF'].contains(stat)) { + paramId = 3; + } else if (['MAT', 'INT'].contains(stat)) { + paramId = 4; + } else if (['MDF', 'RES'].contains(stat)) { + paramId = 5; + } else if (['AGI', 'SPD'].contains(stat)) { + paramId = 6; + } else if (['LUK'].contains(stat)) { + paramId = 7; + } + obj.modifyTurnBuffEval[paramId] = evalLine; + evalMode = 'none'; + evalLine = ''; + } else if (evalMode === 'custom buff') { + evalLine = evalLine + line + '\n'; + } else if (line.match(//i)) { + obj.modifyTurnState[parseInt(RegExp.$1)] = parseInt(RegExp.$2); + } else if (line.match(//i)) { + var name = String(RegExp.$1).toUpperCase(); + var value = parseInt(RegExp.$2); + var id = Yanfly.StateIdRef[name]; + obj.modifyTurnState[id] = value; + } else if (line.match(/<(?:CUSTOM STATE)[ ](.*)[ ](?:TURNS)>/i)) { + evalMode = 'custom state'; + evalLine = ''; + } else if (line.match(/<\/(?:CUSTOM STATE)[ ](.*)[ ](?:TURNS)>/i)) { + var text = String(RegExp.$1); + if (text.match(/(\d+)/i)) { + var id = parseInt(RegExp.$1); + } else { + var id = Yanfly.StateIdRef[text.toUpperCase()]; + } + obj.modifyTurnStateEval[id] = evalLine; + evalMode = 'none'; + evalLine = ''; + } else if (evalMode === 'custom state') { + evalLine = evalLine + line + '\n'; + } + } + } +}; + +DataManager.processBSCNotetags4 = function(group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.showStateTurns = Yanfly.Param.BSCShowEnemyTurns; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:SHOW STATE TURNS)>/i)) { + obj.showStateTurns = true; + } else if (line.match(/<(?:HIDE STATE TURNS)>/i)) { + obj.showStateTurns = false; + } + } + } +}; + +//============================================================================= +// BattleManager +//============================================================================= + +Yanfly.BSC.BattleManager_startAction = BattleManager.startAction; +BattleManager.startAction = function() { + if (this._subject) this._subject.onActionStartStateEffects(); + Yanfly.BSC.BattleManager_startAction.call(this); +}; + +Yanfly.BSC.BattleManager_endAction = BattleManager.endAction; +BattleManager.endAction = function() { + if (this._subject) this._subject.onActionEndStateEffects(); + Yanfly.BSC.BattleManager_endAction.call(this); +}; + +Yanfly.BSC.BattleManager_endBattle = BattleManager.endBattle; +BattleManager.endBattle = function(result) { + if (result === 0) { + $gameParty.processStateEval('victory'); + } else if (result === 1) { + $gameParty.processStateEval('escape'); + } else if (result === 2) { + $gameParty.processStateEval('defeat'); + } + Yanfly.BSC.BattleManager_endBattle.call(this, result); +}; + +//============================================================================= +// Game_BattlerBase +//============================================================================= + +Yanfly.BSC.Game_BattlerBase_initMembers = + Game_BattlerBase.prototype.initMembers; +Game_BattlerBase.prototype.initMembers = function() { + Yanfly.BSC.Game_BattlerBase_initMembers.call(this); + this.initStateCounter(); +}; + +Yanfly.BSC.Game_BattlerBase_refresh = Game_BattlerBase.prototype.refresh; +Game_BattlerBase.prototype.refresh = function() { + this._cacheParamBuffRate = {}; + Yanfly.BSC.Game_BattlerBase_refresh.call(this); +}; + +Game_BattlerBase.prototype.stateOrigin = function(stateId) { + if (this._stateOrigin === undefined) this._stateOrigin = {}; + if (!this._stateOrigin[stateId]) return this; + var arr = this._stateOrigin[stateId]; + if (arr[0] === 0) return $gameActors.actor(arr[1]); + if (arr[0] === 1) return $gameTroop.members()[arr[1]]; + return this; +}; + +Game_BattlerBase.prototype.setStateOrigin = function(stateId, battler) { + if (this._stateOrigin === undefined) this._stateOrigin = {}; + if (!$gameParty.inBattle()) return; + if (!battler) { + var battler = BattleManager._subject; + if (!battler) return; + } + if (battler.isActor()) { + var arr = [0, battler._actorId]; + } else { + var arr = [1, battler.index()]; + } + this._stateOrigin[stateId] = arr; +}; + +Game_BattlerBase.prototype.clearStateOrigin = function(stateId) { + if (this._stateOrigin === undefined) this._stateOrigin = {}; + this._stateOrigin[stateId] = undefined; +}; + +Game_BattlerBase.prototype.clearEnemyStateOrigins = function() { + var length = $dataStates.length; + for (var i = 0; i < length; ++i) { + if (this._stateOrigin === undefined) this._stateOrigin = {}; + if (this._stateOrigin[i] === undefined) continue; + var data = this._stateOrigin[i]; + if (data[0] === 1) this.clearStateOrigin(i); + } +}; + +Game_BattlerBase.prototype.stateTurns = function(stateId) { + return this._stateTurns[stateId]; +}; + +Game_BattlerBase.prototype.setStateTurns = function(stateId, turns) { + if (Imported.YEP_BattleEngineCore && !Yanfly.Param.BECTimeStates) { + turns = Math.floor(turns); + } + this._stateTurns[stateId] = turns; +}; + +Game_BattlerBase.prototype.buffTurns = function(paramId) { + return this._buffTurns[paramId]; +}; + +Game_BattlerBase.prototype.setBuffTurns = function(paramId, turns) { + if (Imported.YEP_BattleEngineCore && !Yanfly.Param.BECTimeBuffs) { + turns = Math.floor(turns); + } + this._buffTurns[paramId] = turns; +}; + +Game_BattlerBase.prototype.paramBuffRate = function(paramId) { + if (this._cacheParamBuffRate === undefined) this._cacheParamBuffRate = {}; + if (this._cacheParamBuffRate[paramId] !== undefined) { + return this._cacheParamBuffRate[paramId]; + } + var code = Yanfly.Param.BSCBuffFormula; + try { + var rate = eval(code); + } catch (e) { + var rate = 1; + Yanfly.Util.displayError(e, code, 'PARAM BUFF RATE FORMULA ERROR'); + } + this._cacheParamBuffRate[paramId] = rate; + return this._cacheParamBuffRate[paramId]; +}; + +Game_BattlerBase.prototype.isMaxBuffAffected = function(paramId) { + var limit = Math.max(1, this.maxBuffLimit(paramId)); + var max = Yanfly.Param.BSCMaximumLimit; + return this._buffs[paramId] === Math.min(limit, max); +}; + +Game_BattlerBase.prototype.maxBuffLimit = function(paramId) { + var value = Yanfly.Param.BSCDefaultLimit; + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + if (state.maxBuff) value += state.maxBuff[paramId]; + } + return value; +}; + +Game_BattlerBase.prototype.isMaxDebuffAffected = function(paramId) { + var limit = Math.min(-1, this.maxDebuffLimit(paramId)); + var max = Yanfly.Param.BSCMaximumLimit * -1; + return this._buffs[paramId] === Math.max(limit, max); +}; + +Game_BattlerBase.prototype.maxDebuffLimit = function(paramId) { + var value = -1 * Yanfly.Param.BSCDefaultLimit; + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + if (state.maxDebuff) value -= state.maxDebuff[paramId]; + } + return value; +}; + +Game_BattlerBase.prototype.buffIconIndex = function(buffLevel, paramId) { + if (buffLevel > 0) { + var level = Math.min(buffLevel - 1, 1); + return Game_BattlerBase.ICON_BUFF_START + (level) * 8 + paramId; + } else if (buffLevel < 0) { + var level = Math.min(-buffLevel - 1, 1); + return Game_BattlerBase.ICON_DEBUFF_START + (level) * 8 + paramId; + } else { + return 0; + } +}; + +Yanfly.BSC.Game_BattlerBase_resetStateCounts = + Game_BattlerBase.prototype.resetStateCounts; +Game_BattlerBase.prototype.resetStateCounts = function(stateId) { + var state = $dataStates[stateId]; + if (state.reapplyRules === 1) { + Yanfly.BSC.Game_BattlerBase_resetStateCounts.call(this, stateId); + } else if (state.reapplyRules === 2) { + this._stateTurns[stateId] = this._stateTurns[stateId] || 0; + var variance = 1 + Math.max(state.maxTurns - state.minTurns, 0); + this._stateTurns[stateId] += state.minTurns + Math.randomInt(variance); + } else if (state.reapplyRules === 0 && state.minTurns) { + if (this._stateTurns[stateId] === undefined) { + Yanfly.BSC.Game_BattlerBase_resetStateCounts.call(this, stateId); + } + } +}; + + +Game_BattlerBase.prototype.initStateCounter = function() { + this._stateCounter = {}; +}; + +Game_BattlerBase.prototype.clearStateCounters = function() { + this._stateCounter = {}; +}; + +Game_BattlerBase.prototype.setStateCounter = function(stateId, value) { + if (this._stateCounter === undefined) this.initStateCounter(); + this._stateCounter[stateId] = value; + this.refresh(); +}; + +Game_BattlerBase.prototype.addStateCounter = function(stateId, value) { + if (this._stateCounter === undefined) this.initStateCounter(); + this.setStateCounter(stateId, value + (this.getStateCounter(stateId) || 0)); +}; + +Game_BattlerBase.prototype.clampStateCounter = function(stateId, min, max) { + var value = this.getStateCounter(stateId).clamp(min, max); + this.setStateCounter(stateId, value); +}; + +Game_BattlerBase.prototype.removeStateCounter = function(stateId) { + if (this._stateCounter === undefined) this.initStateCounter(); + this._stateCounter[stateId] = undefined; +}; + +Game_BattlerBase.prototype.getStateCounter = function(stateId) { + if (this._stateCounter === undefined) this.initStateCounter(); + return this._stateCounter[stateId]; +}; + +Game_BattlerBase.prototype.statesAndBuffs = function() { + var group = this.states(); + var length = group.length; + var array = []; + for (var i = 0; i < length; ++i) { + var state = group[i]; + if (state && state.iconIndex > 0) array.push(state); + } + for (var i = 0; i < 8; ++i) { + if (this._buffs[i]) array.push(i); + } + return array; +}; + +//============================================================================= +// Game_Battler +//============================================================================= + +Game_Battler.prototype.hasState = function(stateId) { + return this.states().contains($dataStates[stateId]); +}; + +Game_Battler.prototype.customEffectEval = function(stateId, type) { + var state = $dataStates[stateId]; + if (!state) return; + if (state.customEffectEval[type] === '') return; + var a = this; + var user = this; + var target = this; + var origin = this.stateOrigin(stateId); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var code = state.customEffectEval[type]; + try { + eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, + 'CUSTOM STATE ' + stateId + ' CODE ERROR'); + } +}; + +Yanfly.BSC.Game_Battler_addState = Game_Battler.prototype.addState; +Game_Battler.prototype.addState = function(stateId) { + var addable = this.isStateAddable(stateId); + Yanfly.BSC.Game_Battler_addState.call(this, stateId); + if (addable) { + this.setStateOrigin(stateId); + this.addStateEffects(stateId); + } +}; + +Game_Battler.prototype.addStateEffects = function(stateId) { + this.customEffectEval(stateId, 'addState'); +}; + +Yanfly.BSC.Game_Battler_removeState = Game_Battler.prototype.removeState; +Game_Battler.prototype.removeState = function(stateId) { + var affected = this.isStateAffected(stateId); + Yanfly.BSC.Game_Battler_removeState.call(this, stateId); + this.removeStateCounter(stateId); + if (affected) { + this.removeStateEffects(stateId); + this.clearStateOrigin(stateId); + } +}; + +Game_Battler.prototype.removeStateEffects = function(stateId) { + this.customEffectEval(stateId, 'removeState'); + if ($gameTemp._customLeaveEffectEval) this.leaveStateEffects(stateId); +}; + +Yanfly.BSC.Game_Battler_removeStatesAuto = + Game_Battler.prototype.removeStatesAuto; +Game_Battler.prototype.removeStatesAuto = function(timing) { + $gameTemp._customLeaveEffectEval = true; + Yanfly.BSC.Game_Battler_removeStatesAuto.call(this, timing); + $gameTemp._customLeaveEffectEval = undefined; +}; + +Game_Battler.prototype.leaveStateEffects = function(stateId) { + this.customEffectEval(stateId, 'leaveState'); +}; + +Game_Battler.prototype.onTurnStartStateEffects = function() { + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (state) this.turnStartStateEffects(state.id); + } +}; + +Game_Battler.prototype.turnStartStateEffects = function(stateId) { + this.customEffectEval(stateId, 'turnStartState'); +}; + +Game_Battler.prototype.onTurnEndStateEffects = function() { + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (state) this.turnEndStateEffects(state.id); + } +}; + +Game_Battler.prototype.turnEndStateEffects = function(stateId) { + this.customEffectEval(stateId, 'turnEndState'); +}; + +Yanfly.BSC.Game_Battler_onTurnEnd = Game_Battler.prototype.onTurnEnd; +Game_Battler.prototype.onTurnEnd = function() { + Yanfly.BSC.Game_Battler_onTurnEnd.call(this); + if (this.meetTurnEndStateEffectsConditions()) this.onTurnEndStateEffects(); +}; + +Game_Battler.prototype.meetTurnEndStateEffectsConditions = function() { + if (Imported.YEP_BattleEngineCore) { + if (BattleManager.isTurnBased()) { + return true; + } else if (BattleManager.isTickBased() && !BattleManager.isTurnEnd()) { + return true; + } else { + return false; + } + } + return true; +}; + +Game_Battler.prototype.onRegenerateStateEffects = function() { + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (state) this.regenerateStateEffects(state.id); + } +}; + +Game_Battler.prototype.regenerateStateEffects = function(stateId) { + if ($gameParty.inBattle()) this.clearResult(); + var lifeState = this.isAlive(); + this.customEffectEval(stateId, 'regenerateState'); + if ($gameParty.inBattle() && this.isDead() && lifeState === true) { + this.performCollapse(); + } + if (!Imported.YEP_BattleEngineCore) return; + if ($gameParty.inBattle()) this.startDamagePopup(); +}; + +Yanfly.BSC.Game_Battler_regenerateAll = Game_Battler.prototype.regenerateAll; +Game_Battler.prototype.regenerateAll = function() { + this.onRegenerateStateEffects(); + Yanfly.BSC.Game_Battler_regenerateAll.call(this); +}; + +if (Imported.YEP_BattleEngineCore) { + +Yanfly.BSC.Game_BattlerBase_updateStateTicks = + Game_BattlerBase.prototype.updateStateTicks; +Game_BattlerBase.prototype.updateStateTicks = function() { + $gameTemp._customLeaveEffectEval = true; + Yanfly.BSC.Game_BattlerBase_updateStateTicks.call(this); + $gameTemp._customLeaveEffectEval = undefined; +}; + +Yanfly.BSC.Game_BattlerBase_updateStateTurnTiming = + Game_BattlerBase.prototype.updateStateTurnTiming; +Game_BattlerBase.prototype.updateStateTurnTiming = function(timing) { + $gameTemp._customLeaveEffectEval = true; + Yanfly.BSC.Game_BattlerBase_updateStateTurnTiming.call(this, timing); + $gameTemp._customLeaveEffectEval = undefined; +}; + +Yanfly.BSC.Game_Battler_onTurnStart = + Game_Battler.prototype.onTurnStart; +Game_Battler.prototype.onTurnStart = function() { + Yanfly.BSC.Game_Battler_onTurnStart.call(this); + if (this.meetTurnStartStateEffectsConditions()) { + this.onTurnStartStateEffects(); + } +}; + +Game_Battler.prototype.meetTurnStartStateEffectsConditions = function() { + return true; +}; + +}; // Imported.YEP_BattleEngineCore + +Game_Battler.prototype.onActionStartStateEffects = function() { + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (state) this.actionStartStateEffects(state.id); + } +}; + +Game_Battler.prototype.actionStartStateEffects = function(stateId) { + this.customEffectEval(stateId, 'actionStartState'); +}; + +Game_Battler.prototype.onActionEndStateEffects = function() { + var states = this.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (state) this.actionEndStateEffects(state.id); + } +}; + +Game_Battler.prototype.actionEndStateEffects = function(stateId) { + this.customEffectEval(stateId, 'actionEndState'); +}; + +Yanfly.BSC.Game_Battler_onBattleEnd = Game_Battler.prototype.onBattleEnd; +Game_Battler.prototype.onBattleEnd = function() { + Yanfly.BSC.Game_Battler_onBattleEnd.call(this); + this.clearEnemyStateOrigins(); +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +Game_Actor.prototype.maxBuffLimit = function(paramId) { + var value = Game_Battler.prototype.maxBuffLimit.call(this, paramId); + value += this.actor().maxBuff[paramId]; + value += this.currentClass().maxBuff[paramId]; + var length = this.equips().length; + for (var i = 0; i < length; ++i) { + var equip = this.equips()[i]; + if (!equip) continue; + if (equip.maxBuff) value += equip.maxBuff[paramId]; + } + return value; +}; + +Game_Actor.prototype.maxDebuffLimit = function(paramId) { + var value = Game_Battler.prototype.maxDebuffLimit.call(this, paramId); + value -= this.actor().maxDebuff[paramId]; + value -= this.currentClass().maxDebuff[paramId]; + var length = this.equips().length; + for (var i = 0; i < length; ++i) { + var equip = this.equips()[i]; + if (!equip) continue; + if (equip.maxDebuff) value -= equip.maxDebuff[paramId]; + } + return value; +}; + +//============================================================================= +// Game_Enemy +//============================================================================= + +Game_Enemy.prototype.maxBuffLimit = function(paramId) { + var value = Game_Battler.prototype.maxBuffLimit.call(this, paramId); + value += this.enemy().maxBuff[paramId]; + return value; +}; + +Game_Enemy.prototype.maxDebuffLimit = function(paramId) { + var value = Game_Battler.prototype.maxDebuffLimit.call(this, paramId); + value -= this.enemy().maxDebuff[paramId]; + return value; +}; + +//============================================================================= +// Game_Unit +//============================================================================= + +Game_Unit.prototype.processStateEval = function(type) { + var length1 = this.allMembers().length; + for (var i = 0; i < length1; ++i) { + var member = this.allMembers()[i]; + if (!member) return; + member.refresh(); + var states = member.states(); + var length2 = states.length; + for (var j = 0; j < length2; ++j) { + var state = states[j]; + if (state) member.customEffectEval(state.id, type); + } + } +}; + +Yanfly.BSC.Game_Unit_onBattleStart = Game_Unit.prototype.onBattleStart; +Game_Unit.prototype.onBattleStart = function() { + Yanfly.BSC.Game_Unit_onBattleStart.call(this); + this.processStateEval('battle'); +}; + +//============================================================================= +// Game_Troop +//============================================================================= + +Game_Troop.prototype.allMembers = function() { + return this.members(); +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Yanfly.BSC.Game_Action_applyItemUserEffect = + Game_Action.prototype.applyItemUserEffect; +Game_Action.prototype.applyItemUserEffect = function(target) { + Yanfly.BSC.Game_Action_applyItemUserEffect.call(this, target); + if (!target) return; + this.applyModifyBuffTurns(target); + this.applyModifyDebuffTurns(target); + this.applyModifyStateTurns(target); +}; + +Game_Action.prototype.applyModifyBuffTurns = function(target) { + if (!this.item()) return; + var affected = false; + for (var i = 0; i < 8; ++i) { + if (!target.isBuffAffected(i)) continue; + var turn = this.item().modifyTurnBuff[i] + target.buffTurns(i); + turn = this.applyBuffTurnsEval(turn, i, target); + target.setBuffTurns(i, turn); + if (target.buffTurns(i) <= 0) target.eraseBuff(i); + affected = true; + } + if (affected) target.refresh(); +}; + +Game_Action.prototype.applyBuffTurnsEval = function(turn, paramId, target) { + if (this.item().modifyTurnBuffEval[paramId] === '') return turn; + var item = this.item(); + var a = this.subject(); + var b = target; + var user = this.subject(); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var code = this.item().modifyTurnBuffEval[paramId]; + try { + eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, 'CUSTOM BUFF TURN SET ERROR'); + } + return turn; +}; + +Game_Action.prototype.applyModifyDebuffTurns = function(target) { + if (!this.item()) return; + var affected = false; + for (var i = 0; i < 8; ++i) { + if (!target.isDebuffAffected(i)) continue; + var turn = this.item().modifyTurnDebuff[i] + target.buffTurns(i); + turn = this.applyDebuffTurnsEval(turn, i, target); + target.setBuffTurns(i, turn); + if (target.buffTurns(i) <= 0) target.eraseBuff(i); + affected = true; + } + if (affected) target.refresh(); +}; + +Game_Action.prototype.applyDebuffTurnsEval = function(turn, paramId, target) { + if (this.item().modifyTurnBuffEval[paramId] === '') return turn; + var item = this.item(); + var a = this.subject(); + var b = target; + var user = this.subject(); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var code = this.item().modifyTurnBuffEval[paramId]; + try { + eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, 'CUSTOM DEBUFF TURN SET ERROR'); + } + return turn; +}; + +Game_Action.prototype.applyModifyStateTurns = function(target) { + if (!this.item()) return; + var affected = false; + var states = target.states() + var length = states.length; + var removed = []; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (state.autoRemovalTiming <= 0) continue; + if (!target.isStateAffected(state.id)) continue; + var turn = target.stateTurns(state.id); + if (this.item().modifyTurnState[state.id]) { + turn += this.item().modifyTurnState[state.id]; + } + turn = this.applyStateTurnsEval(turn, state.id, target); + target.setStateTurns(state.id, turn); + if (target.stateTurns(state.id) <= 0) removed.push(state.id); + } + for (var i = 0; i < removed.length; ++i) { + target.removeState(removed[i]); + affected = true; + } + if (affected) target.refresh(); +}; + +Game_Action.prototype.applyStateTurnsEval = function(turn, stateId, target) { + if (this.item().modifyTurnStateEval[stateId] === undefined) return turn; + var item = this.item(); + var a = this.subject(); + var b = target; + var user = this.subject(); + var origin = target.stateOrigin(stateId); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var code = this.item().modifyTurnStateEval[stateId]; + try { + eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, 'CUSTOM STATE TURN SET ERROR'); + } + return turn; +}; + +Yanfly.BSC.Game_Action_apply = Game_Action.prototype.apply; +Game_Action.prototype.apply = function(target) { + this.onApplyStateEffects(target); + this.onSelectStateEffects(target); + Yanfly.BSC.Game_Action_apply.call(this, target); + this.onDeselectStateEffects(target); + this.offApplyStateEffects(target); +}; + +Game_Action.prototype.customEffectEval = +function(target, stateId, type, side, value) { + var state = $dataStates[stateId]; + if (!state) return value; + if (state.customEffectEval[type] === '') return value; + var attacker = this.subject(); + var defender = target; + var a = this.subject(); + var b = target; + var user = this.subject(); + var origin = side.stateOrigin(stateId); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var code = state.customEffectEval[type]; + try { + eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, + 'CUSTOM STATE ' + stateId + ' CODE ERROR'); + } + return value; +}; + +Game_Action.prototype.onApplyStateEffects = function(target) { + var states = this.subject().states(); + var length = this.subject().states().length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + this.initiateStateEffects(target, state.id) + } +}; + +Game_Action.prototype.initiateStateEffects = function(target, stateId) { + this.customEffectEval(target, stateId, 'initiateState', this.subject()); +}; + +Game_Action.prototype.onSelectStateEffects = function(target) { + var states = target.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + this.selectStateEffects(target, state.id) + } +}; + +Game_Action.prototype.selectStateEffects = function(target, stateId) { + this.customEffectEval(target, stateId, 'selectState', target); +}; + +Game_Action.prototype.onDeselectStateEffects = function(target) { + var states = target.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + this.deselectStateEffects(target, state.id) + } +}; + +Game_Action.prototype.deselectStateEffects = function(target, stateId) { + this.customEffectEval(target, stateId, 'deselectState', target); +}; + +Game_Action.prototype.offApplyStateEffects = function(target) { + var states = this.subject().states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + this.concludeStateEffects(target, state.id) + } +}; + +Game_Action.prototype.concludeStateEffects = function(target, stateId) { + this.customEffectEval(target, stateId, 'concludeState', this.subject()); +}; + +Yanfly.BSC.Game_Action_executeDamage = Game_Action.prototype.executeDamage; +Game_Action.prototype.executeDamage = function(target, value) { + value = this.onPreDamageStateEffects(target, value); + value = this.onReactStateEffects(target, value); + Yanfly.BSC.Game_Action_executeDamage.call(this, target, value); + value = this.onRespondStateEffects(target, value); + value = this.onPostDamageStateEffects(target, value); +}; + +Game_Action.prototype.onPreDamageStateEffects = function(target, value) { + var states = this.subject().states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + value = this.confirmStateEffects(target, state.id, value); + } + return value; +}; + +Game_Action.prototype.confirmStateEffects = function(target, stateId, value) { + return this.customEffectEval(target, stateId, 'confirmState', + this.subject(), value); +}; + +Game_Action.prototype.onReactStateEffects = function(target, value) { + var states = target.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + value = this.reactStateEffects(target, state.id, value); + } + return value; +}; + +Game_Action.prototype.reactStateEffects = function(target, stateId, value) { + return this.customEffectEval(target, stateId, 'reactState', target, value); +}; + +Game_Action.prototype.onRespondStateEffects = function(target, value) { + var states = target.states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + value = this.respondStateEffects(target, state.id, value); + } + return value; +}; + +Game_Action.prototype.respondStateEffects = function(target, stateId, value) { + return this.customEffectEval(target, stateId, 'respondState', + target, value); +}; + +Game_Action.prototype.onPostDamageStateEffects = function(target, value) { + var states = this.subject().states(); + var length = states.length; + for (var i = 0; i < length; ++i) { + var state = states[i]; + if (!state) continue; + value = this.establishStateEffects(target, state.id, value); + } + return value; +}; + +Game_Action.prototype.establishStateEffects = function(target, stateId, value) { + return this.customEffectEval(target, stateId, 'establishState', + this.subject(), value); +}; + +//============================================================================= +// Sprite_StateIcon +//============================================================================= + +if (!Yanfly.Param.BSCShowEnemyIcon) { + +Sprite_StateIcon.prototype.updateFrame = function() { +}; + +} else { + +Yanfly.BSC.Sprite_StateIcon_initMembers = + Sprite_StateIcon.prototype.initMembers; +Sprite_StateIcon.prototype.initMembers = function() { + Yanfly.BSC.Sprite_StateIcon_initMembers.call(this); + this._turnCounterSprite = new Sprite(); + this.addChild(this._turnCounterSprite); + this._turnCounterSprite.anchor.x = 0.5; + this._turnCounterSprite.anchor.y = 0.5; + var w = Window_Base._iconWidth; + var h = Window_Base._iconHeight; + this._turnCounterSprite.bitmap = new Bitmap(w, h); +}; + +Yanfly.BSC.Sprite_StateIcon_updateFrame = + Sprite_StateIcon.prototype.updateFrame; +Sprite_StateIcon.prototype.updateFrame = function() { + Yanfly.BSC.Sprite_StateIcon_updateFrame.call(this); + if (this._turnCounterSprite) this.updateTurnAndCounter(); +}; + +Sprite_StateIcon.prototype.updateTurnAndCounter = function() { + this._turnCounterSprite.bitmap.clear(); + if (!this._battler) return; + var group = this._battler.statesAndBuffs(); + if (group.length <= 0) return; + var state = group[this._animationIndex]; + if (typeof state === 'number') { + if (Yanfly.Param.BSCEnemyBTurn) { + this.drawBuffTurns(state); + if (Yanfly.Param.BSCShowBuffRate) { + this.drawBuffRate(state) + } + } + } else { + if (Yanfly.Param.BSCEnemyTurn) this.drawStateTurns(state); + if (Yanfly.Param.BSCEnemyCounter) this.drawStateCounter(state); + } +}; + +Sprite_StateIcon.prototype.textColor = function(n) { + return SceneManager._scene._statusWindow.textColor(n); +}; + +Sprite_StateIcon.prototype.drawStateTurns = function(state) { + if (!state) return; + if (!state.showTurns) return; + if (state.autoRemovalTiming <= 0) return; + var turns = this._battler.stateTurns(state.id); + if (turns !== 0 && !turns) return; + var turns = Yanfly.Util.toGroup(Math.ceil(turns)); + var wx = state.turnBufferX; + var wy = state.turnBufferY - 2; + var ww = Window_Base._iconWidth; + var wh = Window_Base.prototype.lineHeight.call(this); + var contents = this._turnCounterSprite.bitmap; + contents.fontSize = state.turnFontSize; + contents.textColor = this.textColor(state.turnColor); + contents.drawText(turns, wx, wy, ww, wh, state.turnAlign); +}; + +Sprite_StateIcon.prototype.drawStateCounter = function(state) { + var value = this._battler.getStateCounter(state.id); + if (value === undefined) return; + var settings = state.stateCounterSettings; + value = Yanfly.Util.toGroup(value); + var wx = settings.bufferX; + var wy = settings.bufferY - 2; + var ww = Window_Base._iconWidth; + var wh = Window_Base.prototype.lineHeight.call(this); + var contents = this._turnCounterSprite.bitmap; + contents.fontSize = settings.size; + contents.textColor = this.textColor(settings.color); + contents.drawText(value, wx, wy, ww, wh, settings.align); +}; + +Sprite_StateIcon.prototype.drawBuffTurns = function(paramId) { + if (!Yanfly.Param.BSCShowTurns) return; + var turns = this._battler.buffTurns(paramId); + turns = Yanfly.Util.toGroup(Math.ceil(turns)); + var wx = Yanfly.Param.BSCTurnBufferX; + var wy = Yanfly.Param.BSCTurnBufferY - 2; + var ww = Window_Base._iconWidth; + var wh = Window_Base.prototype.lineHeight.call(this); + var contents = this._turnCounterSprite.bitmap; + contents.fontSize = Yanfly.Param.BSCFontSize; + if (this._battler.isBuffAffected(paramId)) { + contents.textColor = this.textColor(Yanfly.Param.BSCBuffColor); + } else { + contents.textColor = this.textColor(Yanfly.Param.BSCDebuffColor); + } + contents.drawText(turns, wx, wy, ww, wh, Yanfly.Param.BSCTurnAlign); +}; + +Sprite_StateIcon.prototype.drawBuffRate = function(paramId) { + if (!Yanfly.Param.BSCShowTurns) return; + var value = this._battler.paramBuffRate(paramId); + var text = Math.floor(value * 100) + '%'; + var wx = Yanfly.Param.BSCCounterBufferX || 0; + var wy = (Yanfly.Param.BSCCounterBufferY || 8) - 2; + var ww = Window_Base._iconWidth; + var wh = Window_Base.prototype.lineHeight.call(this); + var contents = this._turnCounterSprite.bitmap; + contents.fontSize = Yanfly.Param.BSCFontSize * 0.75; + contents.textColor = this.textColor(0); + contents.drawText(text, wx, wy, ww, wh, 'center'); +}; + +}; // Yanfly.Param.BSCShowEnemyIcon + +//============================================================================= +// Window_Base +//============================================================================= + +Yanfly.BSC.Window_Base_drawActorIcons = Window_Base.prototype.drawActorIcons; +Window_Base.prototype.drawActorIcons = function(actor, wx, wy, ww) { + ww = ww || 144; + Yanfly.BSC.Window_Base_drawActorIcons.call(this, actor, wx, wy, ww); + this.drawActorIconsTurns(actor, wx, wy, ww); +}; + +Window_Base.prototype.drawActorIconsTurns = function(actor, wx, wy, ww) { + var iw = Window_Base._iconWidth; + var icons = actor.allIcons().slice(0, Math.floor(ww / iw)); + var max = icons.length; + var shownMax = Math.floor(ww / iw); + for (var i = 0; i < actor.states().length; ++i) { + if (shownMax <= 0) break; + var state = actor.states()[i]; + if (state.iconIndex <= 0) continue; + if (state.autoRemovalTiming > 0) { + this.drawStateTurns(actor, state, wx, wy); + } + this.drawStateCounter(actor, state, wx, wy); + wx += iw; + --shownMax; + } + for (var i = 0; i < 8; ++i) { + if (shownMax <= 0) break; + if (actor._buffs[i] === 0) continue; + this.drawBuffTurns(actor, i, wx, wy); + if (Yanfly.Param.BSCShowBuffRate) { + this.drawBuffRate(actor, i, wx, wy); + } + wx += iw; + --shownMax; + } + this.resetFontSettings(); + this.resetTextColor(); +}; + +Window_Base.prototype.drawStateTurns = function(actor, state, wx, wy) { + if (!state.showTurns) return; + var turns = actor.stateTurns(state.id); + if (turns !== 0 && !turns) return; + var turns = Yanfly.Util.toGroup(Math.ceil(turns)); + wx += state.turnBufferX; + wy += state.turnBufferY; + this.changePaintOpacity(true); + this.changeTextColor(this.textColor(state.turnColor)); + this.contents.fontSize = state.turnFontSize; + this.drawText(turns, wx, wy, Window_Base._iconWidth, state.turnAlign); + this.resetFontSettings(); + this.resetTextColor(); +}; + +Window_Base.prototype.drawStateCounter = function(actor, state, wx, wy) { + var value = actor.getStateCounter(state.id); + if (value === undefined) return; + var settings = state.stateCounterSettings; + value = Yanfly.Util.toGroup(value); + wx += settings.bufferX; + wy += settings.bufferY; + this.changePaintOpacity(true); + this.changeTextColor(this.textColor(settings.color)); + this.contents.fontSize = settings.size; + this.drawText(value, wx, wy, Window_Base._iconWidth, settings.align); + this.resetFontSettings(); + this.resetTextColor(); +}; + +Window_Base.prototype.drawBuffTurns = function(actor, paramId, wx, wy) { + if (!Yanfly.Param.BSCShowTurns) return; + var turns = Yanfly.Util.toGroup(Math.ceil(actor.buffTurns(paramId))); + wx += Yanfly.Param.BSCTurnBufferX; + wy += Yanfly.Param.BSCTurnBufferY; + this.changePaintOpacity(true); + this.contents.fontSize = Yanfly.Param.BSCFontSize; + if (actor.isBuffAffected(paramId)) { + this.changeTextColor(this.textColor(Yanfly.Param.BSCBuffColor)); + } else { + this.changeTextColor(this.textColor(Yanfly.Param.BSCDebuffColor)); + } + var align = Yanfly.Param.BSCTurnAlign; + this.drawText(turns, wx, wy, Window_Base._iconWidth, align); + this.resetFontSettings(); + this.resetTextColor(); +}; + +Window_Base.prototype.drawBuffRate = function(actor, paramId, wx, wy) { + var value = actor.paramBuffRate(paramId); + if (value === undefined) return; + value = Math.floor(value * 100) + '%'; + this.contents.fontSize = (Yanfly.Param.BSCCounterSize || 16) * 0.75; + wx += Yanfly.Param.BSCCounterBufferX || 0; + wy += Yanfly.Param.BSCCounterBufferY || 8; + this.changePaintOpacity(true); + this.drawText(value, wx, wy, Window_Base._iconWidth, 'center'); + this.resetFontSettings(); + this.resetTextColor(); +}; + +//============================================================================= +// Window_Help +//============================================================================= + +if (Imported.YEP_BattleEngineCore) { + +Yanfly.BSC.Window_Help_drawBattler = Window_Help.prototype.drawBattler; +Window_Help.prototype.drawBattler = function(battler) { + this.resetFontSettings(); + var length = battler.allIcons().length; + if (length <= 0) { + Yanfly.BSC.Window_Help_drawBattler.call(this, battler); + } else { + this.drawBattlerWithIcons(battler); + } +}; + +Window_Help.prototype.drawBattlerWithIcons = function(battler) { + var icons = battler.allIcons(); + var text = battler.name(); + var wx = 0; + var wy = 0; + this.drawText(text, wx, wy, this.contents.width, 'center'); + wy += this.lineHeight(); + var ww = icons.length * Window_Base._iconWidth; + ww = Math.min(ww, this.contents.width); + wx = (this.contents.width - ww) / 2; + this.drawActorIcons(battler, wx, wy, ww); +}; + +}; // Imported.YEP_BattleEngineCore + +//============================================================================= +// Utilities +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +if (!Yanfly.Util.toGroup) { + Yanfly.Util.toGroup = function(inVal) { + return inVal; + } +}; + +Yanfly.Util.displayError = function(e, code, message) { + console.log(message); + console.log(code || 'NON-EXISTENT'); + console.error(e); + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + if (!require('nw.gui').Window.get().isDevToolsOpen()) { + require('nw.gui').Window.get().showDevTools(); + } + } +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_CoreEngine.js b/js/plugins/YEP_CoreEngine.js new file mode 100644 index 0000000..ecbfa19 --- /dev/null +++ b/js/plugins/YEP_CoreEngine.js @@ -0,0 +1,2755 @@ +//============================================================================= +// Yanfly Engine Plugins - Core Engine +// YEP_CoreEngine.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_CoreEngine = true; + +var Yanfly = Yanfly || {}; +Yanfly.Core = Yanfly.Core || {}; +Yanfly.Core.version = 1.31; + +//============================================================================= +/*: + * @plugindesc v1.31 [v1.0] 系统 - 引擎核心 + * @author Yanfly Engine Plugins (drill_up翻译) + * + * @param ---屏幕--- + * @default + * + * @param 屏幕宽度 + * @parent ---屏幕--- + * @type number + * @min 0 + * @desc 游戏屏幕窗口的宽度,默认816。 + * @default 816 + * + * @param 屏幕高度 + * @parent ---屏幕--- + * @type number + * @min 0 + * @desc 游戏屏幕窗口的高度,默认624。 + * @default 624 + * + * @param 屏幕重置-战斗背景 + * @parent ---屏幕--- + * @type boolean + * @on 重置 + * @off 不重置 + * @desc 重置后屏幕的分辨率将被锁定。根据屏幕的高宽来拓宽,而不是缩放。(注意,该选项与mog动态战斗背景相冲突,建议选择 不重置。) + * @default false + * + * @param 屏幕重置-标题 + * @parent ---屏幕--- + * @type boolean + * @on 重置 + * @off 不重置 + * @desc 重置后屏幕的分辨率将被锁定。根据屏幕的高宽来拓宽,而不是缩放。 + * @default true + * + * @param 屏幕重置-游戏结束 + * @parent ---屏幕--- + * @type boolean + * @on 重置 + * @off 不重置 + * @desc 重置后屏幕的分辨率将被锁定。根据屏幕的高宽来拓宽,而不是缩放。 + * @default true + * + * @param 控制台 + * @parent ---屏幕--- + * @type boolean + * @on 打开 + * @off 关闭 + * @desc 测试或调试时,可以通过控制台查看消息。 + * 打开 - true,关闭 - false + * @default false + * + * @param 是否重置角色战斗位置 + * @parent ---屏幕--- + * @type boolean + * @on 重置 + * @off 不重置 + * @desc 重置 - true,不重置 - false + * @default true + * + * @param 游戏字体加载延时 + * @parent ---屏幕--- + * @type number + * @min 0 + * @desc 如果你用超过10M字体,(手机端)加载可能要较长时间,这里设置最大加载时间,单位毫秒,2000毫秒=2秒,0为无限时间。 + * @default 0 + * + * @param 是否锁定实际比例 + * @parent ---屏幕--- + * @type boolean + * @on 锁定 + * @off 不锁定 + * @desc 默认不锁定,当你拉伸游戏窗口时,画面会根据固定比值来缩放。 + * @default false + * + * @param 是否自动释放缓存 + * @parent ---屏幕--- + * @type boolean + * @on 开启 + * @off 关闭 + * @desc 在菜单、地图、战斗之间切换时,自动清除游戏的缓存对象。 + * @default true + * + * @param ---金钱--- + * @desc + * + * @param 金钱最大值 + * @parent ---金钱--- + * @type number + * @min 1 + * @desc 玩家携带的金钱的最大值。 + *(程序允许最大值 9007199254740992,16位) + * @default 99999999 + * + * @param 金钱字体大小 + * @parent ---金钱--- + * @type number + * @min 1 + * @desc 金钱的字体大小。默认28。 + * @default 20 + * + * @param 金钱图标 + * @parent ---金钱--- + * @type number + * @min 0 + * @desc 显示金钱的图标的编号,0为没有图标。 + * @default 163 + * + * @param 金钱超出消息 + * @parent ---金钱--- + * @desc 当金钱数字太长,导致窗口显示不了,会使用该用语来表示金钱数值。 + * @default 数不尽 + * + * @param ---物品--- + * @desc + * + * @param 物品最大值 + * @parent ---物品--- + * @type number + * @min 1 + * @desc 玩家携带的物品的最大值。 + *(程序允许最大值 9007199254740992,16位) + * @default 9999 + * + * @param 物品字体大小 + * @parent ---物品--- + * @type number + * @min 1 + * @desc 物品的字体大小。默认28。 + * @default 20 + * + * @param ---能力值--- + * @default + * + * @param 角色等级最大值 + * @parent ---能力值--- + * @type number + * @min 1 + * @desc 角色的最大等级。 + *(程序允许最大值 9007199254740992,16位) + * @default 99 + * + * @param 角色生命最大值 + * @parent ---能力值--- + * @type number + * @min 1 + * @desc 角色的最大生命上限。 + *(程序允许最大值 9007199254740992,16位) + * @default 9999 + * + * @param 角色魔法最大值 + * @parent ---能力值--- + * @type number + * @min 0 + * @desc 角色的最大魔法上限。 + *(程序允许最大值 9007199254740992,16位) + * @default 9999 + * + * @param 角色属性最大值 + * @parent ---能力值--- + * @type number + * @min 1 + * @desc 角色的六个属性(攻击、防御等)的最大上限。 + *(程序允许最大值 9007199254740992,16位) + * @default 999 + * + * @param 敌人生命最大值 + * @parent ---能力值--- + * @type number + * @min 1 + * @desc 敌人的最大生命上限。 + *(程序允许最大值 9007199254740992,16位) + * @default 999999 + * + * @param 敌人魔法最大值 + * @parent ---能力值--- + * @type number + * @min 0 + * @desc 敌人的最大魔法上限。 + *(程序允许最大值 9007199254740992,16位) + * @default 9999 + * + * @param 敌人属性最大值 + * @parent ---能力值--- + * @type number + * @min 1 + * @desc 敌人的六个属性(攻击、防御等)的最大上限。 + *(程序允许最大值 9007199254740992,16位) + * Default: 999 + * @default 999 + * + * @param ---战斗--- + * @desc + * + * @param 动画速度 + * @parent ---战斗--- + * @type number + * @min 1 + * @desc 动画播放的帧间隔,默认4,帧间隔越大,动画越慢。 + * @default 4 + * + * @param 是否闪烁选中目标 + * @parent ---战斗--- + * @type boolean + * @on 闪烁 + * @off 不闪烁 + * @desc 选中一个敌人时,敌人将会闪烁白底。 + * @default false + * + * @param 遇敌动画是否显示角色 + * @parent ---战斗--- + * @type boolean + * @on 显示 + * @off 隐藏 + * @desc 角色遇敌后,角色行走图将保持显示在遇敌黑边中。 + * @default false + * + * @param 战斗结束是否显示角色 + * @parent ---战斗--- + * @type boolean + * @on 显示 + * @off 隐藏 + * @desc 角色战斗结束后,(sv)角色行走图将保持显示在战斗结束界面。 + * @default false + * + * @param ---地图优化--- + * @desc + * + * @param 角色生命变化时是否刷新 + * @parent ---地图优化--- + * @type boolean + * @on 刷新 + * @off 不刷新 + * @desc 角色生命值变化时,角色行走图将刷新一次。 + * @default true + * + * @param 角色魔法变化时是否刷新 + * @parent ---地图优化--- + * @type boolean + * @on 刷新 + * @off 不刷新 + * @desc 角色魔法值变化时,角色行走图将刷新一次。 + * @default true + * + * @param 角色怒气变化时是否刷新 + * @parent ---地图优化--- + * @type boolean + * @on 刷新 + * @off 不刷新 + * @desc 角色怒气值变化时,角色行走图将刷新一次。 + * @default false + * + * @param ---字体--- + * @desc + * + * @param 中文模式的字体 + * @parent ---字体--- + * @desc 如果你的设置为中文模式,将用该字体。默认设置:SimHei,Heiti TC,sans-serif。(rmmv都为默认模式,中文模式需要另调) + * @default SimHei, Heiti TC, sans-serif + * + * @param 日韩模式的字体 + * @parent ---字体--- + * @desc 如果你的设置为日韩模式,将用该字体。默认设置:Dotum,AppleGothic,sans-serif。(rmmv都为默认模式,日韩模式需要另调) + * @default Dotum, AppleGothic, sans-serif + * + * @param 默认模式的字体 + * @parent ---字体--- + * @desc 默认模式使用的字体,默认设置:GameFont。 + * @default GameFont, Verdana, Arial, Courier New + * + * @param 默认字体大小 + * @parent ---字体--- + * @type number + * @min 1 + * @desc 所有菜单、界面默认最初的字体大小,默认: 28。 + * @default 28 + * + * @param 默认对齐方式 + * @parent ---字体--- + * @type combo + * @option left + * @option center + * @option right + * @desc 所有选项命令窗口默认最初的对齐方式。left-左对齐,center-居中,right-右对齐。 + * @default left + * + * @param ---窗口--- + * @default + * + * @param 是否使用数字逗号分割 + * @parent ---窗口--- + * @type boolean + * @on 使用 + * @off 不使用 + * @desc 窗口中,数字逗号将分割超长数字,比如 11,223,423。 + * @default true + * + * @param 默认行高 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的行高,单位像素,默认: 36。 + * @default 36 + * + * @param 默认图标大小 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的图标大小,单位像素,默认: 32。 + * @default 32 + * + * @param 默认图标高度 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的图标高度,单位像素,默认: 32。 + * @default 32 + * + * @param 默认脸图宽度 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的脸图宽度,单位像素,默认: 144。 + * @default 144 + * + * @param 默认脸图高度 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的脸图高度,单位像素,默认: 144。 + * @default 144 + * + * @param 默认窗口内边距 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的窗口内边距,单位像素,默认: 18。 + * @default 18 + * + * @param 默认文本内边距 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的文本内边距,单位像素,默认: 6。 + * @default 6 + * + * @param 默认窗口透明度 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc 所有窗口默认最初的窗口透明度,单位像素,默认: 192。 + * @default 192 + * + * @param YEP条是否描边 + * @parent ---窗口--- + * @type boolean + * @on 描边 + * @off 不描边 + * @desc YEP插件中所有条(生命条、魔法条等)将会描边。 + * @default true + * + * @param 默认YEP条行高 + * @parent ---窗口--- + * @type number + * @min 0 + * @desc YEP插件中所有条(生命条、魔法条等)的行高,默认6。 + * @default 18 + * + * @param 是否绘制YEP怒气条 + * @parent ---窗口--- + * @type boolean + * @on 绘制 + * @off 不绘制 + * @desc 主菜单将会在魔法条下绘制YEP怒气条。(mog全自定义主菜单直接覆盖该功能。) + * @default true + * + * @param ---窗口颜色--- + * @default + * + * @param 颜色-普通文本 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口中普通文本的颜色。默认: 0。 + * @default 0 + * + * @param 颜色-系统文本 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口中系统文本的颜色。默认: 16。 + * @default 16 + * + * @param 颜色-角色垂死 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 角色生命值处于即将死亡状态的文本颜色。默认: 17。 + * @default 17 + * + * @param 颜色-角色死亡 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 角色生命值处于死亡状态的文本颜色。默认: 18。 + * @default 18 + * + * @param 颜色-YEP条背景色 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口、菜单中YEP条的背景色。默认: 19。 + * @default 19 + * + * @param 颜色-生命条左 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 菜单中生命条左侧颜色。默认: 20。 + * @default 20 + * + * @param 颜色-生命条右 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 菜单中生命条右侧颜色。默认: 21。 + * @default 21 + * + * @param 颜色-魔法条左 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 菜单中魔法条左侧颜色。默认: 22。 + * @default 22 + * + * @param 颜色-魔法条右 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 菜单中魔法条右侧颜色。默认: 23。 + * @default 23 + * + * @param 颜色-魔法消耗 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口中魔法消耗的文本颜色。默认: 23。 + * @default 23 + * + * @param 颜色-强化 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口中强化的文本颜色。默认: 24。 + * @default 24 + * + * @param 颜色-弱化 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口中弱化的文本颜色。默认: 25。 + * @default 25 + * + * @param 颜色-怒气条左 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 菜单中怒气条左侧的文本颜色。默认: 28。 + * @default 28 + * + * @param 颜色-怒气条右 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 菜单中怒气条右侧的文本颜色。默认: 29。 + * @default 29 + * + * @param 颜色-怒气消耗 + * @parent ---窗口颜色--- + * @type number + * @min 0 + * @max 31 + * @desc 窗口中怒气消耗的文本颜色。默认: 29。 + * @default 29 + * + * @help + * ============================================================================ + * 插件介绍 + * ============================================================================ + * Yanfly Engine Plugins - YEP核心引擎是一款基础的插件,它具有巴拉巴拉…… + * 的功能。 + * (英文写了许多官方性的无用的话,此处我全部省略。) + * ★★尽量放在最靠上的位置★★ + * + * ============================================================================ + * 设定注意事项 + * ============================================================================ + * 1.插件的作用域:地图界面、战斗界面、菜单界面。 + * 作用于许多地方,分布广泛,主要改进rmmv的基础结构。 + * 2.因为插件修改最基础的内容,最好将插件放在最靠上的位置。 + * + * ============================================================================ + * 可选设定 - 物品 + * ============================================================================ + * + * 插件指令(获得金钱):GainGold 1234567890 + * 插件指令(失去金钱):LoseGold 9876543210 + * + * 物品注释(设置价格): + * 武器注释(设置价格): + * 防具注释(设置价格): + * + * 物品注释(设置上限): + * 武器注释(设置上限): + * 防具注释(设置上限): + * + * ============================================================================ + * 可选设定 - 能力值 + * ============================================================================ + * + * 角色注释(初始等级): + * 角色注释(最大等级): + * + * 技能注释(等级需求): + * 职业中设置了在N级学习的技能,那个技能添加了上面的注释, + * 将会改变为200级学习到。 + * + * 武器/防具注释(加生命): + * 武器/防具注释(加魔法): + * 武器/防具注释(加攻击): + * 武器/防具注释(加防御): + * 武器/防具注释(加魔攻): + * 武器/防具注释(加魔防): + * 武器/防具注释(加敏捷): + * 武器/防具注释(加幸运): + * 武器/防具注释(减生命): + * 武器/防具注释(减魔法): + * 武器/防具注释(减攻击): + * 武器/防具注释(减防御): + * 武器/防具注释(减魔攻): + * 武器/防具注释(减魔防): + * 武器/防具注释(减敏捷): + * 武器/防具注释(减幸运): + * 武器和防具中可以有多个注释,它们的效果会叠加在一起。 + * + * 敌人注释(设置生命): + * 敌人注释(设置魔法): + * 敌人注释(设置攻击): + * 敌人注释(设置防御): + * 敌人注释(设置魔攻): + * 敌人注释(设置魔防): + * 敌人注释(设置敏捷): + * 敌人注释(设置幸运): + * + * 敌人注释(设置掉钱): + * 敌人注释(设置经验): + * + * ============================================================================ + * 脚本调用安全性说明 + * ============================================================================ + * + * 其它插件很可能覆盖了该插件的某些部分,可能会引起冲突而造成该插件报错。 + * 经过优化这里已经避免了大部分的报错。 + * + * 但是,如果你在浏览器中测试游戏,产生的错误仍然会在控制台上显示。 + * (YEP表示报错也不影响运行,但是报错的锅不归他) + * + * ============================================================================ + * ----插件性能 + * ============================================================================ + * 工作类型: 持续执行、单次执行 + * 时间复杂度: 无法确定 + * 测试方法: 无 + * 测试结果: 无 + * + * 1.由于该插件为底层引擎,分布广泛,不属于任何独立模块,所以无法给定准确 + * 的性能值。 + * + * ============================================================================ + * Bug修复说明 + * ============================================================================ + * This plugin fixes a few bugs found present within RPG Maker MV. Of them are + * the following: + * + * Animation Overlay + * When a skill/item that targets multiple enemies at once using a fullscreen + * animation, it will overlay multiple times causing the image to look + * distorted by a series of overlayed effects. The plugin fixes this issue by + * having only one animation played over the group instead of every one. + * + * Audio Volume Stacking + * Sometimes when multiple sound effects are played in the same frame with + * the exact settings (usually due to animaitons), the volume stacks upon + * each other, causing them to not play the intended volume for the effect. + * This plugin fixes this issue by preventing sound effects of the same exact + settings from playing during the same frame, allowing only the first to + go through without stacking the volume higher. + * + * Event Movement Speed + * The movement speed of events are slightly slower than what they should be + * due a small error in the source code. The plugin fixes this issue and they + * move at the properly speed. + * + * Event Movement Queue + * If an event were to move through an event command, changing a condition + * that would set the event to change to a different page would cause that + * event's move route to halt in its tracks. The plugin fixes this issue and + * the event's move route will finish. + * + * Event Colliding + * Events cannot move over other events with a Below Player setting. This + * makes it difficult for certain types of puzzles or events to exist. This + * plugin fixes this issue by making the collision check only apply to events + * of "Same as Characters" priority. Any event that's above or below the + * characters will no longer collide with other events. + * + * Screen Tearing + * When moving slowly, the tiles on the screen tear. While it's not + * noticeable on all systems, slower computers will definitely show it. The + * plugin will fix this issue and synch the tiles to keep up to pace with + * the screen's camera movement properly. + * + * Sprite Distortion + * Because of JavaScript's strange mathematical behavior, sometimes values + * with decimal places cause spritesheets to end up looking distorted. The + * plugin will get rid of the decimal places and have sprite sheets take out + * frames properly by using integer values only. + * + * ============================================================================ + * 版本更新日志 + * ============================================================================ + * Version 1.31: + * - Added Fallen Angel Olivia's full error message display to the Core Engine + * (with her permission of course). + * - Bug fixed regarding blend modes and bush depth making sprites not blend + * properly in-game. + * - Tab key no longer requires you to press it twice before triggering Tab-key + * related inputs. + * + * Version 1.30: + * - Bug fixed for audio Sound Effect stacking. + * - Optimization update. + * + * Version 1.29: + * - Bypass the isDevToolsOpen() error when bad code is inserted into a script + * call or custom Lunatic Mode code segment due to updating to MV 1.6.1. + * + * Version 1.28: + * - Upon pressing F5 to reload your game, this will close the DevTools Debug + * Console if it is opened before reloading. This is because reloading with it + * closed ends up reloading the game faster. + * - New plugin parameters added: Refresh Update HP, MP, and TP + * - Option to choose to do a full actor refresh upon changing HP, MP, or TP + * - This is to reduce overall map lagging. + * + * Version 1.27: + * - Updated for RPG Maker MV version 1.6.0: + * - Fixing script call checks made with switches and self switches under + * conditional branches due to how ES6 handles === differently. + * + * Version 1.26: + * - Updated for RPG Maker MV version 1.6.0: + * - Removal of the destructive code in Scene_Item.update function. + * - Open Console parameter now occurs after the map's been loaded or after + * the battle has started. This is because after the 1.6.0 changes, loading + * the console before anything else will lock up other aspects of RPG Maker + * from loading properly. + * + * Version 1.25: + * - Updated for RPG Maker MV version 1.5.0. + * - Updated Scale Title and Scale GameOver to work with 1.5.0. + * + * Version 1.24: + * - Screen jittering prevention is now prevented for RPG Maker MV 1.3.4 and + * above since Pixi4 handles that now. + * + * Version 1.23: + * - For RPG Maker MV version 1.3.2 and above, the 'Scale Battlebacks' plugin + * parameter will now recreate the battleback sprites in a different format. + * This is because battleback scaling with Tiling Sprites is just too volatile. + * Battleback sprites are now just regular sprites instead of tiling sprites. + * This may or may not cause plugin incompatibilities with other plugins that + * alter battlebacks. + * - For RPG Maker MV version 1.3.4, Game_Actor.meetsUsableItemConditions is + * now updated to return a check back to the original Game_BattlerBase version + * to maintain compatibility with other plugins. + * + * Version 1.22: + * - Added 'Show Events Transition' plugin parameter. Enabling this will make + * events on the map no longer hide themselves while entering battle during the + * transition. + * - Added 'Show Events Snapshot' plugin parameter. Enabling this will keep + * events shown as a part of the battle snapshot when entering battle. + * - Irregular code in damage formulas, script calls, conditional branches, and + * variable events will no longer crash the game. Instead, it will force open + * the console window to display the error only during Test Play. + * + * Version 1.21: + * - Fixed a bug with scaling battlebacks not working properly for Front View. + * - Optimization update to keep garbage collection across all scenes. + * + * Version 1.20: + * - Altered increasing resolution function. + * - Added 'Update Real Scale' plugin parameter. This is best left alone for + * now and to be used if a later update meshes with rendered scaling. + * - Added memory clear functionality for versions under 1.3.2 to free up more + * memory upon leaving the map scene. + * - Added 'Collection Clear' plugin parameter. This option, if left on, will + * clear the attached children to Scene_Map and Scene_Battle upon switching to + * a different scene. This will potentially free up memory from various objects + * added to those scenes from other plugins (depending on how they're added) + * and serve as a means of reducing memory bloat. + * + * Version 1.19: + * - Updated for RPG Maker MV version 1.3.2. + * - Fixed 'LearnSkill' function for actors to not be bypassed if a piece of + * equipment has temporarily added a skill. + * + * Version 1.18: + * - Fixed a bug with scaling battlebacks not working properly for Front View. + * + * Version 1.17: + * - Updated for RPG Maker MV version 1.3.0. + * + * Version 1.16: + * - Fixed a bug with RPG Maker MV's inherent 'drawTextEx' function. By default + * it calculates the text height and then resets the font settings before + * drawing the text, which makes the text height inconsistent if it were to + * match the calculated height settings. + * + * Version 1.15: + * - Window's are now set to have only widths and heights of whole numbers. No + * longer is it possible for them to have decimal values. This is to reduce any + * and all clipping issues caused by non-whole numbers. + * + * Version 1.14: + * - Optimization update for RPG Maker MV itself by replacing more memory + * intensive loops in commonly used functions with more efficient loops. + * + * Version 1.13: + * - Updated for RPG Maker MV version 1.1.0. + * + * Version 1.12: + * - Fixed a bug with a notetag: . Now, the notetag works + * with both and + * + * Version 1.11: + * - Made fixes to the MV Source Code where FaceWidth was using a hard-coded + * 144 value regardless of what was changed for the Face Width parameter. + * - Fixed a notetag that wasn't working with the enemy EXP values. + * - Updated battler repositioning to no longer clash when entering-exiting the + * scene with Row Formation. + * + * Version 1.10: + * - Removed an MV bugfix that was applied through MV's newes tupdate. + * + * Version 1.09: + * - Changed minimum display width for status drawing to accomodate Party + * Formation defaults. + * + * Version 1.08: + * - Fixed a bug within the MV Source with changing classes and maintaining + * levels, even though the feature to maintain the levels has been removed. + * + * Version 1.07: + * - Fixed an issue with the gauges drawing outlines thicker than normal at odd + * intervals when windows are scaled irregularly. + * + * Version 1.06: + * - Removed event frequency bug fix since it's now included in the source. + * + * Version 1.05: + * - Added 'Scale Game Over' parameter to plugin settings. + * + * Version 1.04: + * - Reworked math for calculating scaled battleback locations. + * - Fixed a bug where if the party failed to escape from battle, states that + * would be removed by battle still get removed. *Fixed by Emjenoeg* + * + * Version 1.03: + * - Fixed a strange bug that made scaled battlebacks shift after one battle. + * + * Version 1.02: + * - Fixed a bug that made screen fading on mobile devices work incorrectly. + * - Added 'Scale Battlebacks' and 'Scale Title' parameters. + * + * Version 1.01: + * - Fixed a bug that where if button sprites had different anchors, they would + * not be properly clickable. *Fixed by Zalerinian* + * + * Version 1.00: + * - Finished plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_CoreEngine'); +Yanfly.Param = Yanfly.Param || {}; +Yanfly.Icon = Yanfly.Icon || {}; + +Yanfly.Param.ScreenWidth = Number(Yanfly.Parameters['屏幕宽度'] || 816); +Yanfly.Param.ScreenHeight = Number(Yanfly.Parameters['屏幕高度'] || 624); +Yanfly.Param.ScaleBattleback = String(Yanfly.Parameters['屏幕重置-战斗背景']); +Yanfly.Param.ScaleBattleback = eval(Yanfly.Param.ScaleBattleback); +Yanfly.Param.ScaleTitle = eval(String(Yanfly.Parameters['屏幕重置-标题'])); +Yanfly.Param.ScaleGameOver = eval(String(Yanfly.Parameters['屏幕重置-游戏结束'])); +Yanfly.Param.OpenConsole = String(Yanfly.Parameters['控制台']); +Yanfly.Param.OpenConsole = eval(Yanfly.Param.OpenConsole); +Yanfly.Param.ReposBattlers = String(Yanfly.Parameters['是否重置角色战斗位置']); +Yanfly.Param.ReposBattlers = eval(Yanfly.Param.ReposBattlers); +Yanfly.Param.GameFontTimer = Number(Yanfly.Parameters['游戏字体加载延时']); +Yanfly.Param.UpdateRealScale = String(Yanfly.Parameters['是否锁定实际比例']); +Yanfly.Param.UpdateRealScale = eval(Yanfly.Param.UpdateRealScale); +Yanfly.Param.CollectionClear = String(Yanfly.Parameters['是否自动释放缓存']); +Yanfly.Param.CollectionClear = eval(Yanfly.Param.CollectionClear); + +Yanfly.Param.MaxGold = String(Yanfly.Parameters['金钱最大值']); +Yanfly.Param.GoldFontSize = Number(Yanfly.Parameters['金钱字体大小']); +Yanfly.Icon.Gold = Number(Yanfly.Parameters['金钱图标']); +Yanfly.Param.GoldOverlap = String(Yanfly.Parameters['金钱超出消息']); + +Yanfly.Param.MaxItem = Number(Yanfly.Parameters['物品最大值']); +Yanfly.Param.ItemQuantitySize = Number(Yanfly.Parameters['物品字体大小']); + +Yanfly.Param.MaxLevel = Number(Yanfly.Parameters['角色等级最大值']); +Yanfly.Param.EnemyMaxHp = Number(Yanfly.Parameters['敌人生命最大值']); +Yanfly.Param.EnemyMaxMp = Number(Yanfly.Parameters['敌人魔法最大值']); +Yanfly.Param.EnemyParam = Number(Yanfly.Parameters['敌人属性最大值']); +Yanfly.Param.ActorMaxHp = Number(Yanfly.Parameters['角色生命最大值']); +Yanfly.Param.ActorMaxMp = Number(Yanfly.Parameters['角色魔法最大值']); +Yanfly.Param.ActorParam = Number(Yanfly.Parameters['角色属性最大值']); + +Yanfly.Param.AnimationRate = Number(Yanfly.Parameters['动画速度']); +Yanfly.Param.FlashTarget = eval(String(Yanfly.Parameters['是否闪烁选中目标'])); +Yanfly.Param.ShowEvTrans = String(Yanfly.Parameters['遇敌动画是否显示角色']); +Yanfly.Param.ShowEvTrans = eval(Yanfly.Param.ShowEvTrans); +Yanfly.Param.ShowEvSnap = String(Yanfly.Parameters['战斗结束是否显示角色']); +Yanfly.Param.ShowEvSnap = eval(Yanfly.Param.ShowEvSnap); + +Yanfly.Param.RefreshUpdateHp = String(Yanfly.Parameters['角色生命变化时是否刷新']); +Yanfly.Param.RefreshUpdateHp = eval(Yanfly.Param.RefreshUpdateHp); +Yanfly.Param.RefreshUpdateMp = String(Yanfly.Parameters['角色魔法变化时是否刷新']); +Yanfly.Param.RefreshUpdateMp = eval(Yanfly.Param.RefreshUpdateMp); +Yanfly.Param.RefreshUpdateTp = String(Yanfly.Parameters['角色怒气变化时是否刷新']); +Yanfly.Param.RefreshUpdateTp = eval(Yanfly.Param.RefreshUpdateTp); + +Yanfly.Param.ChineseFont = String(Yanfly.Parameters['中文模式的字体']); +Yanfly.Param.KoreanFont = String(Yanfly.Parameters['日韩模式的字体']); +Yanfly.Param.DefaultFont = String(Yanfly.Parameters['默认模式的字体']); +Yanfly.Param.FontSize = Number(Yanfly.Parameters['默认字体大小']); +Yanfly.Param.TextAlign = String(Yanfly.Parameters['默认对齐方式']); + +Yanfly.Param.DigitGroup = eval(String(Yanfly.Parameters['是否使用数字逗号分割'])); +Yanfly.Param.LineHeight = Number(Yanfly.Parameters['默认行高']); +Yanfly.Param.IconWidth = Number(Yanfly.Parameters['默认图标大小'] || 32);; +Yanfly.Param.IconHeight = Number(Yanfly.Parameters['默认图标高度'] || 32);; +Yanfly.Param.FaceWidth = Number(Yanfly.Parameters['默认脸图宽度'] || 144); +Yanfly.Param.FaceHeight = Number(Yanfly.Parameters['默认脸图高度'] || 144); +Yanfly.Param.WindowPadding = Number(Yanfly.Parameters['默认窗口内边距']); +Yanfly.Param.TextPadding = Number(Yanfly.Parameters['默认文本内边距']); +Yanfly.Param.WindowOpacity = Number(Yanfly.Parameters['默认窗口透明度']); +Yanfly.Param.GaugeOutline = eval(String(Yanfly.Parameters['YEP条是否描边'])); +Yanfly.Param.GaugeHeight = Number(Yanfly.Parameters['默认YEP条行高']); +Yanfly.Param.MenuTpGauge = eval(String(Yanfly.Parameters['是否绘制YEP怒气条'])); + +Yanfly.Param.ColorNormal = Number(Yanfly.Parameters['颜色-普通文本']); +Yanfly.Param.ColorSystem = Number(Yanfly.Parameters['颜色-系统文本']); +Yanfly.Param.ColorCrisis = Number(Yanfly.Parameters['颜色-角色垂死']); +Yanfly.Param.ColorDeath = Number(Yanfly.Parameters['颜色-角色死亡']); +Yanfly.Param.ColorGaugeBack = Number(Yanfly.Parameters['颜色-YEP条背景色']); +Yanfly.Param.ColorHpGauge1 = Number(Yanfly.Parameters['颜色-生命条左']); +Yanfly.Param.ColorHpGauge2 = Number(Yanfly.Parameters['颜色-生命条右']); +Yanfly.Param.ColorMpGauge1 = Number(Yanfly.Parameters['颜色-魔法条左']); +Yanfly.Param.ColorMpGauge2 = Number(Yanfly.Parameters['颜色-魔法条右']); +Yanfly.Param.ColorMpCost = Number(Yanfly.Parameters['颜色-魔法消耗']); +Yanfly.Param.ColorPowerUp = Number(Yanfly.Parameters['颜色-强化']); +Yanfly.Param.ColorPowerDown = Number(Yanfly.Parameters['颜色-弱化']); +Yanfly.Param.ColorTpGauge1 = Number(Yanfly.Parameters['颜色-怒气条左']); +Yanfly.Param.ColorTpGauge2 = Number(Yanfly.Parameters['颜色-怒气条右']); +Yanfly.Param.ColorTpCost = Number(Yanfly.Parameters['颜色-怒气消耗']); + +//============================================================================= +// Bitmap +//============================================================================= + +Yanfly.Core.Bitmap_initialize = Bitmap.prototype.initialize; +Bitmap.prototype.initialize = function (width, height) { + Yanfly.Core.Bitmap_initialize.call(this, width, height); + this.fontFace = Yanfly.Param.DefaultFont; +}; + +Yanfly.Core.Bitmap_blt = Bitmap.prototype.blt; +Bitmap.prototype.blt = function (source, sx, sy, sw, sh, dx, dy, dw, dh) { + sx = Math.floor(sx); + sy = Math.floor(sy); + sw = Math.floor(sw); + sh = Math.floor(sh); + dx = Math.floor(dx); + dy = Math.floor(dy); + dw = Math.floor(dw); + dh = Math.floor(dh); + Yanfly.Core.Bitmap_blt.call(this, source, sx, sy, sw, sh, dx, dy, dw, dh); +}; + +Yanfly.Core.Bitmap_fillRect = Bitmap.prototype.fillRect; +Bitmap.prototype.fillRect = function (x, y, w, h, c) { + x = Math.floor(x); + y = Math.floor(y); + w = Math.floor(w); + h = Math.floor(h); + Yanfly.Core.Bitmap_fillRect.call(this, x, y, w, h, c); +}; + +Yanfly.Core.Bitmap_gradientFillRect = Bitmap.prototype.gradientFillRect; +Bitmap.prototype.gradientFillRect = function (x, y, w, h, c1, c2, ve) { + Yanfly.Core.Bitmap_gradientFillRect.call(this, x, y, w, h, c1, c2, ve); +}; + +Yanfly.Core.Bitmap_drawCircle = Bitmap.prototype.drawCircle; +Bitmap.prototype.drawCircle = function (x, y, r, c) { + x = Math.floor(x); + y = Math.floor(y); + Yanfly.Core.Bitmap_drawCircle.call(this, x, y, r, c); +}; + +Yanfly.Core.Bitmap_drawText = Bitmap.prototype.drawText; +Bitmap.prototype.drawText = function (text, x, y, mW, l, align) { + x = Math.floor(x); + y = Math.floor(y); + if (mW < 0) mW = 0; + mW = Math.floor(mW); + l = Math.floor(l); + Yanfly.Core.Bitmap_drawText.call(this, text, x, y, mW, l, align); +}; + +//============================================================================= +// Graphics +//============================================================================= + +if (Yanfly.Param.UpdateRealScale) { + + Graphics._updateRealScale = function () { + if (this._stretchEnabled) { + var h = window.innerWidth / this._width; + var v = window.innerHeight / this._height; + this._realScale = Math.min(h, v); + if (this._realScale >= 3) this._realScale = 3; + else if (this._realScale >= 2) this._realScale = 2; + else if (this._realScale >= 1.5) this._realScale = 1.5; + else if (this._realScale >= 1) this._realScale = 1; + else this._realScale = 0.5; + } else { + this._realScale = this._scale; + } + }; + +}; // Yanfly.Param.UpdateRealScale + +Graphics.printFullError = function (name, message, stack) { + stack = this.processErrorStackMessage(stack); + if (this._errorPrinter) { + this._errorPrinter.innerHTML = + this._makeFullErrorHtml(name, message, stack); + } + this._applyCanvasFilter(); + this._clearUpperCanvas(); +}; + +Graphics._makeFullErrorHtml = function (name, message, stack) { + var text = ''; + for (var i = 2; i < stack.length; ++i) { + text += '' + stack[i] + '
'; + } + return ('' + stack[0] + '
' + + '' + stack[1] + '
' + text); +}; + +Graphics.processErrorStackMessage = function (stack) { + var data = stack.split(/(?:\r\n|\r|\n)/); + data.unshift('Game has encountered a bug. Please report it.
'); + for (var i = 1; i < data.length; ++i) { + data[i] = data[i].replace(/[\(](.*[\/])/, '('); + } + data.push('
Press F5 to restart the game.' + + '
'); + return data; +}; + +Yanfly.Core.Graphics_updateErrorPrinter = Graphics._updateErrorPrinter; +Graphics._updateErrorPrinter = function () { + Yanfly.Core.Graphics_updateErrorPrinter.call(this); + this._errorPrinter.height = this._height * 0.5; + this._errorPrinter.style.textAlign = 'left'; + this._centerElement(this._errorPrinter); +}; + +SceneManager.catchException = function (e) { + if (e instanceof Error) { + Graphics.printFullError(e.name, e.message, e.stack); + console.error(e.stack); + } else { + Graphics.printError('UnknownError', e); + } + AudioManager.stopAll(); + this.stop(); +}; + +//============================================================================= +// Input +//============================================================================= + +Yanfly.Core.Input_shouldPreventDefault = Input._shouldPreventDefault; +Input._shouldPreventDefault = function (keyCode) { + if (keyCode === 9) return true; + return Yanfly.Core.Input_shouldPreventDefault.call(this, keyCode); +}; + +//============================================================================= +// Sprite +//============================================================================= + +Yanfly.Core.Sprite_updateTransform = Sprite.prototype.updateTransform; +Sprite.prototype.updateTransform = function () { + Yanfly.Core.Sprite_updateTransform.call(this); + this.worldTransform.tx = Math.floor(this.worldTransform.tx); + this.worldTransform.ty = Math.floor(this.worldTransform.ty); +}; + +//============================================================================= +// ScreenSprite +//============================================================================= + +Yanfly.Core.ScreenSprite_initialize = ScreenSprite.prototype.initialize; +ScreenSprite.prototype.initialize = function () { + Yanfly.Core.ScreenSprite_initialize.call(this); + if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.3.0') return; + this.scale.x = Graphics.boxWidth * 10; + this.scale.y = Graphics.boxHeight * 10; + this.anchor.x = 0.5; + this.anchor.y = 0.5; + this.x = 0; + this.y = 0; +}; + +//============================================================================= +// Window +//============================================================================= + +Yanfly.Core.Window_refreshAllParts = Window.prototype._refreshAllParts; +Window.prototype._refreshAllParts = function () { + this._roundWhUp(); + Yanfly.Core.Window_refreshAllParts.call(this); +}; + +Window.prototype._roundWhUp = function () { + this._width = Math.ceil(this._width); + this._height = Math.ceil(this._height); +}; + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.Core.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function () { + if (!Yanfly.Core.DataManager_isDatabaseLoaded.call(this)) return false; + if (!Yanfly._loaded_YEP_CoreEngine) { + this.processCORENotetags1($dataItems); + this.processCORENotetags1($dataWeapons); + this.processCORENotetags1($dataArmors); + this.processCORENotetags2($dataEnemies); + this.processCORENotetags3($dataActors); + this.processCORENotetags4($dataClasses); + Yanfly._loaded_YEP_CoreEngine = true; + } + return true; +}; + +DataManager.processCORENotetags1 = function (group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.maxItem = Yanfly.Param.MaxItem; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:PRICE):[ ](\d+)>/i)) { + obj.price = parseInt(RegExp.$1); + } else if (line.match(/<(?:MAX ITEM):[ ](\d+)>/i)) { + obj.maxItem = Math.max(1, parseInt(RegExp.$1)); + } else if (line.match(/<(.*):[ ]([\+\-]\d+)>/i)) { + var stat = String(RegExp.$1).toUpperCase(); + var value = parseInt(RegExp.$2); + switch (stat) { + case 'HP': + case 'MAXHP': + case 'MAX HP': + obj.params[0] = value; + break; + case 'MP': + case 'MAXMP': + case 'MAX MP': + case 'SP': + case 'MAXSP': + case 'MAX SP': + obj.params[1] = value; + break; + case 'ATK': + case 'STR': + obj.params[2] = value; + break; + case 'DEF': + obj.params[3] = value; + break; + case 'MAT': + case 'INT' || 'SPI': + obj.params[4] = value; + break; + case 'MDF': + case 'RES': + obj.params[5] = value; + break; + case 'AGI': + case 'SPD': + obj.params[6] = value; + break; + case 'LUK': + obj.params[7] = value; + break; + case 'EXP': + case 'XP': + obj.exp = value; + break; + } + } + } + } +}; + +DataManager.processCORENotetags2 = function (group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:GOLD):[ ](\d+)>/i)) { + obj.gold = parseInt(RegExp.$1); + } else if (line.match(/<(.*):[ ](\d+)>/i)) { + var stat = String(RegExp.$1).toUpperCase(); + var value = parseInt(RegExp.$2); + switch (stat) { + case 'HP': + case 'MAXHP': + case 'MAX HP': + obj.params[0] = value; + break; + case 'MP': + case 'MAXMP': + case 'MAX MP': + case 'SP': + case 'MAXSP': + case 'MAX SP': + obj.params[1] = value; + break; + case 'ATK': + case 'STR': + obj.params[2] = value; + break; + case 'DEF': + obj.params[3] = value; + break; + case 'MAT': + case 'INT': + case 'SPI': + obj.params[4] = value; + break; + case 'MDF': + case 'RES': + obj.params[5] = value; + break; + case 'AGI': + case 'SPD': + obj.params[6] = value; + break; + case 'LUK': + obj.params[7] = value; + break; + case 'EXP': + case 'XP': + obj.exp = value; + break; + } + } + } + } +}; + +DataManager.processCORENotetags3 = function (group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.maxLevel = Yanfly.Param.MaxLevel; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:MAX LEVEL):[ ](\d+)>/i)) { + obj.maxLevel = parseInt(RegExp.$1); + if (obj.maxLevel < 1) obj.maxLevel = 1; + } else if (line.match(/<(?:INITIAL LEVEL):[ ](\d+)>/i)) { + obj.initialLevel = parseInt(RegExp.$1); + if (obj.initialLevel < 1) obj.initialLevel = 1; + } + } + } +}; + +DataManager.processCORENotetags4 = function (group) { + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.learnings.forEach(function (learning) { + if (learning.note.match(/<(?:LEARN LEVEL|LEARN AT LEVEL):[ ](\d+)>/i)) { + learning.level = parseInt(RegExp.$1); + if (learning.level < 1) obj.maxLevel = 1; + } + }, this); + } +}; + +//============================================================================= +// AudioManager Stacking Volume Bug Fix +//============================================================================= + +Yanfly.Core.AudioManager_playSe = AudioManager.playSe; +AudioManager.playSe = function (se) { + this._frameSe = this._frameSe || []; + if (this.uniqueCheckSe(se)) { + Yanfly.Core.AudioManager_playSe.call(this, se); + this._frameSe.push(se); + } +}; + +AudioManager.uniqueCheckSe = function (se1) { + if (this._frameSe.contains(se1)) return false; + return true; +}; + +AudioManager.clearUniqueCheckSe = function () { + this._frameSe = []; +}; + +Yanfly.Core.SceneManager_updateInputData = SceneManager.updateInputData; +SceneManager.updateInputData = function () { + Yanfly.Core.SceneManager_updateInputData.call(this); + AudioManager.clearUniqueCheckSe(); +}; + +//============================================================================= +// SceneManager +//============================================================================= + +SceneManager._screenWidth = Yanfly.Param.ScreenWidth; +SceneManager._screenHeight = Yanfly.Param.ScreenHeight; +SceneManager._boxWidth = Yanfly.Param.ScreenWidth; +SceneManager._boxHeight = Yanfly.Param.ScreenHeight + +Yanfly.Core.SceneManager_run = SceneManager.run; +SceneManager.run = function (sceneClass) { + Yanfly.Core.SceneManager_run.call(this, sceneClass); + Yanfly.updateResolution(); + if (!Utils.isNwjs()) return; + if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= "1.6.0") return; + if (Yanfly.Param.OpenConsole) Yanfly.openConsole(); +}; + +Yanfly.updateResolution = function () { + var resizeWidth = Yanfly.Param.ScreenWidth - window.innerWidth; + var resizeHeight = Yanfly.Param.ScreenHeight - window.innerHeight; + if (!Imported.ScreenResolution) { + window.moveBy(-1 * resizeWidth / 2, -1 * resizeHeight / 2); + window.resizeBy(resizeWidth, resizeHeight); + } +}; + +Yanfly.openConsole = function () { + Yanfly._openedConsole = true; + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + var _debugWindow = require('nw.gui').Window.get().showDevTools(); + if (_debugWindow) _debugWindow.moveTo(0, 0); + window.focus(); + } +}; + +Yanfly.Core.SceneManager_onKeyDown = SceneManager.onKeyDown; +SceneManager.onKeyDown = function (event) { + if (!event.ctrlKey && !event.altKey && event.keyCode === 116) { + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + var win = require('nw.gui').Window.get(); + win.closeDevTools(); + } + } + Yanfly.Core.SceneManager_onKeyDown.call(this, event); +}; + +if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= "1.6.0") { + + Yanfly.openConsole = function () { + Yanfly._openedConsole = true; + if (!Yanfly.Param.OpenConsole) return; + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + var win = require('nw.gui').Window.get(); + win.showDevTools(); + setTimeout(this.focusWindow.bind(this, win), 500); + } + }; + + Yanfly.focusWindow = function (win) { + win.focus(); + }; + + Yanfly.Core.Scene_Map_update = Scene_Map.prototype.update; + Scene_Map.prototype.update = function () { + Yanfly.Core.Scene_Map_update.call(this); + if (!Yanfly._openedConsole) Yanfly.openConsole(); + }; + + Yanfly.Core.Scene_Battle_update = Scene_Battle.prototype.update; + Scene_Battle.prototype.update = function () { + Yanfly.Core.Scene_Battle_update.call(this); + if (!Yanfly._openedConsole) Yanfly.openConsole(); + }; + +}; // 1.6.0 + +//============================================================================= +// BattleManager +//============================================================================= + +Yanfly.Core.BattleManager_displayStartMessages = + BattleManager.displayStartMessages; +BattleManager.displayStartMessages = function () { + Yanfly.Core.BattleManager_displayStartMessages.call(this); + $gameTroop.members().forEach(function (enemy) { + enemy.recoverAll(); + }); +}; + +BattleManager.processEscape = function () { + $gameParty.performEscape(); + SoundManager.playEscape(); + var success = this._preemptive ? true : (Math.random() < this._escapeRatio); + if (success) { + $gameParty.removeBattleStates(); + this.displayEscapeSuccessMessage(); + this._escaped = true; + this.processAbort(); + } else { + this.displayEscapeFailureMessage(); + this._escapeRatio += 0.1; + $gameParty.clearActions(); + this.startTurn(); + } + return success; +}; + +//============================================================================= +// Game_BattlerBase +//============================================================================= + +Game_BattlerBase.prototype.paramMax = function (paramId) { + if (paramId === 0) { + return Yanfly.Param.EnemyMaxHp; + } else if (paramId === 1) { + return Yanfly.Param.EnemyMaxMp; + } else { + return Yanfly.Param.EnemyParam; + } +}; + +Yanfly.Core.Game_BattlerBase_refresh = Game_BattlerBase.prototype.refresh; + +Game_BattlerBase.prototype.mapRegenUpdateCheck = function (type) { + if ($gameParty.inBattle()) return true; + if (type === 'hp') { + return Yanfly.Param.RefreshUpdateHp; + } else if (type === 'mp') { + return Yanfly.Param.RefreshUpdateMp; + } else if (type === 'tp') { + return Yanfly.Param.RefreshUpdateTp; + } +}; + +Game_BattlerBase.prototype.setHp = function (hp) { + if (this._hp === hp) return; + this._hp = hp; + if (this.mapRegenUpdateCheck('hp')) { + this.refresh(); + } else { + Yanfly.Core.Game_BattlerBase_refresh.call(this); + } +}; + +Game_BattlerBase.prototype.setMp = function (mp) { + if (this._mp === mp) return; + this._mp = mp; + if (this.mapRegenUpdateCheck('mp')) { + this.refresh(); + } else { + Yanfly.Core.Game_BattlerBase_refresh.call(this); + } +}; + +Game_BattlerBase.prototype.setTp = function (tp) { + if (this._tp === tp) return; + this._tp = tp; + if (this.mapRegenUpdateCheck('tp')) { + this.refresh(); + } else { + Yanfly.Core.Game_BattlerBase_refresh.call(this); + } +}; + +//============================================================================= +// Game_Battler +//============================================================================= + +Game_Battler.prototype.onTurnEnd = function () { + this.clearResult(); + this.regenerateAll(); + this.updateStateTurns(); + this.updateBuffTurns(); + this.removeStatesAuto(2); +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +Yanfly.Core.Game_Actor_isMaxLevel = Game_Actor.prototype.isMaxLevel; +Game_Actor.prototype.isMaxLevel = function () { + if (this.maxLevel() === 0) return false; + return Yanfly.Core.Game_Actor_isMaxLevel.call(this); +}; + +Game_Actor.prototype.paramMax = function (paramId) { + if (paramId === 0) { + return Yanfly.Param.ActorMaxHp; + } else if (paramId === 1) { + return Yanfly.Param.ActorMaxMp; + } else { + return Yanfly.Param.ActorParam; + } +}; + +Yanfly.Core.Game_Actor_paramBase = Game_Actor.prototype.paramBase; +Game_Actor.prototype.paramBase = function (paramId) { + if (this.level > 99) { + var i = this.currentClass().params[paramId][99]; + var j = this.currentClass().params[paramId][98]; + i += (i - j) * (this.level - 99); + return i; + } + return Yanfly.Core.Game_Actor_paramBase.call(this, paramId); +}; + +Game_Actor.prototype.changeClass = function (classId, keepExp) { + if (keepExp) { + this._exp[classId] = this._exp[this._classId]; + } + this._classId = classId; + this.changeExp(this._exp[this._classId] || 0, false); + this.refresh(); +}; + +Game_Actor.prototype.learnSkill = function (skillId) { + if (!this._skills.contains(skillId)) { + this._skills.push(skillId); + this._skills.sort(function (a, b) { + return a - b; + }); + } +}; + +if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.3.4') { + + Game_Actor.prototype.meetsUsableItemConditions = function (item) { + if ($gameParty.inBattle() && !BattleManager.canEscape() && + this.testEscape(item)) { + return false; + } + return Game_BattlerBase.prototype.meetsUsableItemConditions.call(this, item); + }; + +}; // Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.3.4' + +//============================================================================= +// Game_Party +//============================================================================= + +Game_Party.prototype.maxGold = function () { + return eval(Yanfly.Param.MaxGold); +}; + +Game_Party.prototype.maxItems = function (item) { + if (!item) return 1; + return item.maxItem; +}; + +Game_Party.prototype.onPlayerWalk = function () { + var group = this.members(); + var length = group.length; + for (var i = 0; i < length; ++i) { + var actor = group[i]; + if (actor) actor.onPlayerWalk(); + } +}; + +//============================================================================= +// Game_Map +//============================================================================= + +Yanfly.isPreventScreenJittering = function () { + if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.3.4') return false; + return true; +}; + +if (Yanfly.isPreventScreenJittering()) { + + Game_Map.prototype.displayX = function () { + return parseFloat(Math.floor(this._displayX * + this.tileWidth())) / this.tileWidth(); + }; + + Game_Map.prototype.displayY = function () { + return parseFloat(Math.floor(this._displayY * + this.tileHeight())) / this.tileHeight(); + }; + +}; // Yanfly.isPreventScreenJittering + +Game_Map.prototype.adjustX = function (x) { + if (this.isLoopHorizontal() && x < this.displayX() - + (this.width() - this.screenTileX()) / 2) { + return x - this.displayX() + $dataMap.width; + } else { + return x - this.displayX(); + } +}; + +Game_Map.prototype.adjustY = function (y) { + if (this.isLoopVertical() && y < this.displayY() - + (this.height() - this.screenTileY()) / 2) { + return y - this.displayY() + $dataMap.height; + } else { + return y - this.displayY(); + } +}; + +Game_Map.prototype.updateEvents = function () { + var group = this.events(); + var length = group.length; + for (var i = 0; i < length; ++i) { + var ev = group[i]; + if (ev) ev.update(); + } + var group = this._commonEvents; + var length = group.length; + for (var i = 0; i < length; ++i) { + var ev = group[i]; + if (ev) ev.update(); + } +}; + +Game_Map.prototype.updateVehicles = function () { + var group = this._vehicles; + var length = group.length; + for (var i = 0; i < length; ++i) { + var vehicle = group[i]; + if (vehicle) vehicle.update(); + } +}; + +//============================================================================= +// Game_Character +//============================================================================= + +Game_Character.prototype.queueMoveRoute = function (moveRoute) { + this._originalMoveRoute = moveRoute; + this._originalMoveRouteIndex = 0; +}; + +Yanfly.Core.Game_Event_setMoveRoute = + Game_Event.prototype.setMoveRoute; +Game_Character.prototype.setMoveRoute = function (moveRoute) { + if (!this._moveRouteForcing) { + Yanfly.Core.Game_Event_setMoveRoute.call(this, moveRoute); + } else { + this.queueMoveRoute(moveRoute); + } +}; + +Yanfly.Core.Game_Character_processMoveCommand = + Game_Character.prototype.processMoveCommand; +Game_Character.prototype.processMoveCommand = function (command) { + var gc = Game_Character; + var params = command.parameters; + switch (command.code) { + case gc.ROUTE_SCRIPT: + try { + eval(params[0]); + } catch (e) { + Yanfly.Util.displayError(e, params[0], 'MOVE ROUTE SCRIPT ERROR'); + } + return; + break; + } + return Yanfly.Core.Game_Character_processMoveCommand.call(this, command); +}; + +//============================================================================= +// Game_Event +//============================================================================= + +Game_Event.prototype.isCollidedWithEvents = function (x, y) { + var events = $gameMap.eventsXyNt(x, y).filter(function (ev) { + return ev.isNormalPriority(); + }); + if (events.length <= 0) return false; + return this.isNormalPriority(); +}; + +//============================================================================= +// Game_Screen +//============================================================================= + +Game_Screen.prototype.updatePictures = function () { + var group = this._pictures; + var length = group.length; + for (var i = 0; i < length; ++i) { + var picture = group[i]; + if (picture) picture.update(); + } +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Yanfly.Core.Game_Action_testItemEffect = Game_Action.prototype.testItemEffect; +Game_Action.prototype.testItemEffect = function (target, effect) { + switch (effect.code) { + case Game_Action.EFFECT_LEARN_SKILL: + return target.isActor() && !target._skills.contains(effect.dataId); + default: + return Yanfly.Core.Game_Action_testItemEffect.call(this, target, effect); + } +}; + +Game_Action.prototype.evalDamageFormula = function (target) { + var item = this.item(); + var a = this.subject(); + var b = target; + var v = $gameVariables._data; + var sign = ([3, 4].contains(item.damage.type) ? -1 : 1); + try { + var value = Math.max(eval(item.damage.formula), 0) * sign; + if (isNaN(value)) value = 0; + return value; + } catch (e) { + Yanfly.Util.displayError(e, item.damage.formula, 'DAMAGE FORMULA ERROR'); + return 0; + } +}; + +//============================================================================= +// Game_Interpreter +//============================================================================= + +// Conditional Branch +Yanfly.Core.Game_Interpreter_command111 = + Game_Interpreter.prototype.command111; +Game_Interpreter.prototype.command111 = function () { + var result = false; + switch (this._params[0]) { + case 0: // Switch + if (this._params[2] === 0) { + result = $gameSwitches.value(this._params[1]); + } else { + result = !$gameSwitches.value(this._params[1]); + } + this._branch[this._indent] = result; + if (this._branch[this._indent] === false) this.skipBranch(); + return true + break; + case 2: // Self Switch + if (this._eventId > 0) { + var key = [this._mapId, this._eventId, this._params[1]]; + if (this._params[2] === 0) { + result = $gameSelfSwitches.value(key); + } else { + result = !$gameSelfSwitches.value(key); + } + } + this._branch[this._indent] = result; + if (this._branch[this._indent] === false) this.skipBranch(); + return true + break; + case 12: // Script + var code = this._params[1]; + try { + result = !!eval(code); + } catch (e) { + result = false; + Yanfly.Util.displayError(e, code, 'CONDITIONAL BRANCH SCRIPT ERROR'); + } + this._branch[this._indent] = result; + if (this._branch[this._indent] === false) this.skipBranch(); + return true + break; + } + return Yanfly.Core.Game_Interpreter_command111.call(this); +}; + +// Control Variables +Yanfly.Core.Game_Interpreter_command122 = + Game_Interpreter.prototype.command122; +Game_Interpreter.prototype.command122 = function () { + switch (this._params[3]) { + case 4: // Script + var value = 0; + var code = this._params[4]; + try { + value = eval(code); + } catch (e) { + Yanfly.Util.displayError(e, code, 'CONTROL VARIABLE SCRIPT ERROR'); + } + for (var i = this._params[0]; i <= this._params[1]; i++) { + this.operateVariable(i, this._params[2], value); + } + return true; + break; + } + return Yanfly.Core.Game_Interpreter_command122.call(this); +}; + +// Script +Game_Interpreter.prototype.command355 = function () { + var script = this.currentCommand().parameters[0] + '\n'; + while (this.nextEventCode() === 655) { + this._index++; + script += this.currentCommand().parameters[0] + '\n'; + } + try { + eval(script); + } catch (e) { + Yanfly.Util.displayError(e, script, 'SCRIPT CALL ERROR'); + } + return true; +}; + +Yanfly.Core.Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function (command, args) { + Yanfly.Core.Game_Interpreter_pluginCommand.call(this, command, args); + if (command === 'GainGold') { + $gameParty.gainGold(parseInt(args[0])); + } + if (command === 'LoseGold') { + $gameParty.loseGold(parseInt(args[0])); + } +}; + +//============================================================================= +// Scene_Base +//============================================================================= + +Scene_Base.prototype.clearChildren = function () { + while (this.children.length > 0) { + this.removeChild(this.children[0]); + } +}; + +if (Yanfly.Param.CollectionClear) { + + Yanfly.Core.Scene_Base_terminate = Scene_Base.prototype.terminate; + Scene_Base.prototype.terminate = function () { + Yanfly.Core.Scene_Base_terminate.call(this); + if (this._bypassFirstClear) return; + this.clearChildren(); + }; + + Yanfly.Core.Scene_Title_terminate = Scene_Title.prototype.terminate; + Scene_Title.prototype.terminate = function () { + this._bypassFirstClear = true; + Yanfly.Core.Scene_Title_terminate.call(this); + this.clearChildren(); + }; + + Yanfly.Core.Scene_Map_terminate = Scene_Map.prototype.terminate; + Scene_Map.prototype.terminate = function () { + this._bypassFirstClear = true; + Yanfly.Core.Scene_Map_terminate.call(this); + this.clearChildren(); + }; + + Yanfly.Core.Scene_Battle_terminate = Scene_Battle.prototype.terminate; + Scene_Battle.prototype.terminate = function () { + this._bypassFirstClear = true; + Yanfly.Core.Scene_Battle_terminate.call(this); + this.clearChildren(); + }; + + Yanfly.Core.Scene_Options_terminate = Scene_Options.prototype.terminate; + Scene_Options.prototype.terminate = function () { + this._bypassFirstClear = true; + Yanfly.Core.Scene_Options_terminate.call(this); + this.clearChildren(); + }; + + Yanfly.Core.Scene_Load_terminate = Scene_Load.prototype.terminate; + Scene_Load.prototype.terminate = function () { + this._bypassFirstClear = true; + Yanfly.Core.Scene_Load_terminate.call(this); + this.clearChildren(); + }; + + Yanfly.Core.Scene_Gameover_terminate = Scene_Gameover.prototype.terminate; + Scene_Gameover.prototype.terminate = function () { + this._bypassFirstClear = true; + Yanfly.Core.Scene_Gameover_terminate.call(this); + this.clearChildren(); + }; + +}; // Yanfly.Param.CollectionClear + +//============================================================================= +// Scene_Boot +//============================================================================= + +Scene_Boot.prototype.isGameFontLoaded = function () { + if (Graphics.isFontLoaded('GameFont')) { + return true; + } else if (Yanfly.Param.GameFontTimer <= 0) { + return false; + } else { + var elapsed = Date.now() - this._startDate; + if (elapsed >= Yanfly.Param.GameFontTimer) { + throw new Error('Failed to load GameFont'); + } else { + return false; + } + } +}; + +//============================================================================= +// Scene_Item +//============================================================================= + +if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= "1.6.0") { + + Scene_Item.prototype.update = function () { + Scene_ItemBase.prototype.update.call(this); + }; + +}; // Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= "1.6.0" + +//============================================================================= +// Scene_Title +//============================================================================= + +Yanfly.Core.Scene_Title_start = Scene_Title.prototype.start; +Scene_Title.prototype.start = function () { + Yanfly.Core.Scene_Title_start.call(this); + if (Yanfly.Param.ScaleTitle) this.rescaleTitle(); +}; + +Scene_Title.prototype.rescaleTitle = function () { + this.rescaleTitleSprite(this._backSprite1); + this.rescaleTitleSprite(this._backSprite2); +}; + +Scene_Title.prototype.rescaleTitleSprite = function (sprite) { + if (sprite.bitmap.width <= 0 || sprite.bitmap <= 0) { + return setTimeout(this.rescaleTitleSprite.bind(this, sprite), 5); + } + var width = Graphics.boxWidth; + var height = Graphics.boxHeight; + var ratioX = width / sprite.bitmap.width; + var ratioY = height / sprite.bitmap.height; + if (ratioX > 1.0) sprite.scale.x = ratioX; + if (ratioY > 1.0) sprite.scale.y = ratioY; + this.centerSprite(sprite); +}; + +//============================================================================= +// Scene_Map +//============================================================================= + +if (Yanfly.Param.ShowEvTrans) { + + Scene_Map.prototype.startEncounterEffect = function () { + this._encounterEffectDuration = this.encounterEffectSpeed(); + }; + +}; // Yanfly.Param.ShowEvTrans + +Yanfly.Core.Scene_Map_snapForBattleBackground = + Scene_Map.prototype.snapForBattleBackground; +Scene_Map.prototype.snapForBattleBackground = function () { + if (!Yanfly.Param.ShowEvSnap) this._spriteset.hideCharacters(); + Yanfly.Core.Scene_Map_snapForBattleBackground.call(this); + if (Yanfly.Param.ShowEvTrans) this._spriteset.showCharacters(); +}; + +//============================================================================= +// Scene_Gameover +//============================================================================= + +Yanfly.Core.Scene_Gameover_start = Scene_Gameover.prototype.start; +Scene_Gameover.prototype.start = function () { + Yanfly.Core.Scene_Gameover_start.call(this); + if (Yanfly.Param.ScaleGameOver) this.rescaleBackground(); +}; + +Scene_Gameover.prototype.rescaleBackground = function () { + this.rescaleImageSprite(this._backSprite); +}; + +Scene_Gameover.prototype.rescaleImageSprite = function (sprite) { + if (sprite.bitmap.width <= 0 || sprite.bitmap <= 0) { + return setTimeout(this.rescaleImageSprite.bind(this, sprite), 5); + } + var width = Graphics.boxWidth; + var height = Graphics.boxHeight; + var ratioX = width / sprite.bitmap.width; + var ratioY = height / sprite.bitmap.height; + if (ratioX > 1.0) sprite.scale.x = ratioX; + if (ratioY > 1.0) sprite.scale.y = ratioY; + this.centerSprite(sprite); +}; + +Scene_Gameover.prototype.centerSprite = function (sprite) { + sprite.x = Graphics.width / 2; + sprite.y = Graphics.height / 2; + sprite.anchor.x = 0.5; + sprite.anchor.y = 0.5; +}; + +//============================================================================= +// Sprite_Animation +//============================================================================= + +Sprite_Animation.prototype.setupRate = function () { + this._rate = Yanfly.Param.AnimationRate; +}; + +//============================================================================= +// Sprite_Battler +//============================================================================= + +if (!Yanfly.Param.FlashTarget) { + + Yanfly.Core.Sprite_Battler_updateSelectionEffect = + Sprite_Battler.prototype.updateSelectionEffect; + Sprite_Battler.prototype.updateSelectionEffect = function () { + if (this._battler.isActor()) { + Yanfly.Core.Sprite_Battler_updateSelectionEffect.call(this); + } else { + if (this._battler.isSelected()) this.startEffect('whiten'); + } + }; + +}; // Yanfly.Param.FlashTarget + +//============================================================================= +// Sprite_Actor +//============================================================================= + +if (Yanfly.Param.ReposBattlers) { + Yanfly.Core.Sprite_Actor_setActorHome = Sprite_Actor.prototype.setActorHome; + Sprite_Actor.prototype.setActorHome = function (index) { + Yanfly.Core.Sprite_Actor_setActorHome.call(this, index); + this._homeX += Graphics.boxWidth - 816; + this._homeY += Graphics.boxHeight - 624; + }; +}; + +Sprite_Actor.prototype.retreat = function () { + this.startMove(1200, 0, 120); +}; + +//============================================================================= +// Sprite_Enemy +//============================================================================= + +if (Yanfly.Param.ReposBattlers) { + + Yanfly.Core.Sprite_Enemy_setBattler = Sprite_Enemy.prototype.setBattler; + Sprite_Enemy.prototype.setBattler = function (battler) { + Yanfly.Core.Sprite_Enemy_setBattler.call(this, battler); + if (!this._enemy._alteredScreenY) { + this._homeY += Math.floor((Graphics.boxHeight - 624) / 2); + this._enemy._screenY = this._homeY; + this._enemy._alteredScreenY = true; + } + if ($gameSystem.isSideView()) return; + if (!this._enemy._alteredScreenX) { + this._homeX += (Graphics.boxWidth - 816) / 2; + this._enemy._screenX = this._homeX; + this._enemy._alteredScreenX = true; + } + }; + +}; // Yanfly.Param.ReposBattlers + +//============================================================================= +// Sprite_StateIcon +//============================================================================= + +Sprite_StateIcon._iconWidth = Yanfly.Param.IconWidth; +Sprite_StateIcon._iconHeight = Yanfly.Param.IconHeight; + +//============================================================================= +// Sprite_Button +//============================================================================= + +Sprite_Button.prototype.isButtonTouched = function () { + var x = this.canvasToLocalX(TouchInput.x) + (this.anchor.x * this.width); + var y = this.canvasToLocalY(TouchInput.y) + (this.anchor.y * this.height); + return x >= 0 && y >= 0 && x < this.width && y < this.height; +}; + +//============================================================================= +// Sprite_Battleback +//============================================================================= + +function Sprite_Battleback() { + this.initialize.apply(this, arguments); +} + +Sprite_Battleback.prototype = Object.create(Sprite.prototype); +Sprite_Battleback.prototype.constructor = Sprite_Battleback; + +Sprite_Battleback.prototype.initialize = function (bitmapName, type) { + Sprite.prototype.initialize.call(this); + this._bitmapName = bitmapName; + this._battlebackType = type; + this.createBitmap(); +}; + +Sprite_Battleback.prototype.createBitmap = function () { + if (this._bitmapName === '') { + this.bitmap = new Bitmap(Graphics.boxWidth, Graphics.boxHeight); + } else { + if (this._battlebackType === 1) { + this.bitmap = ImageManager.loadBattleback1(this._bitmapName); + } else { + this.bitmap = ImageManager.loadBattleback2(this._bitmapName); + } + this.scaleSprite(); + } +}; + +Sprite_Battleback.prototype.scaleSprite = function () { + if (this.bitmap.width <= 0) return setTimeout(this.scaleSprite.bind(this), 5); + var width = Graphics.boxWidth; + var height = Graphics.boxHeight; + if (this.bitmap.width < width) { + this.scale.x = width / this.bitmap.width; + } + if (this.bitmap.height < height) { + this.scale.y = height / this.bitmap.height; + } + this.anchor.x = 0.5; + this.x = Graphics.boxWidth / 2; + if ($gameSystem.isSideView()) { + this.anchor.y = 1; + this.y = Graphics.boxHeight; + } else { + this.anchor.y = 0.5; + this.y = Graphics.boxHeight / 2; + } +}; + +//============================================================================= +// Sprite_Character +//============================================================================= + +Yanfly.Core.Sprite_Character_updateHalfBodySprites = + Sprite_Character.prototype.updateHalfBodySprites; +Sprite_Character.prototype.updateHalfBodySprites = function () { + Yanfly.Core.Sprite_Character_updateHalfBodySprites.call(this); + if (this._bushDepth > 0) { + this._upperBody.blendMode = this.blendMode; + this._lowerBody.blendMode = this.blendMode; + } +}; + +//============================================================================= +// Spriteset_Map +//============================================================================= + +Spriteset_Map.prototype.hideCharacters = function () { + for (var i = 0; i < this._characterSprites.length; i++) { + var sprite = this._characterSprites[i]; + if (!sprite.isTile()) sprite.hide(); + } +}; + +Spriteset_Map.prototype.showCharacters = function () { + for (var i = 0; i < this._characterSprites.length; i++) { + var sprite = this._characterSprites[i]; + if (!sprite.isTile()) sprite.show(); + } +}; + +//============================================================================= +// Spriteset_Battle +//============================================================================= + +if (Yanfly.Param.ScaleBattleback) { + + if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.3.2') { + + // Rewriting the battlebacks + Spriteset_Battle.prototype.createBattleback = function () { + this._back1Sprite = new Sprite_Battleback(this.battleback1Name(), 1); + this._back2Sprite = new Sprite_Battleback(this.battleback2Name(), 2); + this._battleField.addChild(this._back1Sprite); + this._battleField.addChild(this._back2Sprite); + }; + + // No more updateBattleback + Spriteset_Battle.prototype.updateBattleback = function () { + }; + + } else { // Version 1.3.0 and below + + Yanfly.Core.Spriteset_Battle_locateBattleback = + Spriteset_Battle.prototype.locateBattleback; + Spriteset_Battle.prototype.locateBattleback = function () { + var sprite1 = this._back1Sprite; + var sprite2 = this._back2Sprite; + if (sprite1.bitmap.width <= 0) return; + if (sprite2.bitmap.width <= 0) return; + if (this._rescaledBattlebackSprite) return; + this._rescaledBattlebackSprite = true; + Yanfly.Core.Spriteset_Battle_locateBattleback.call(this); + var height = this._battleField.height; + sprite1.origin.y = sprite1.x + sprite1.bitmap.height - height; + sprite2.origin.y = sprite1.y + sprite2.bitmap.height - height; + this.rescaleBattlebacks(); + }; + + Spriteset_Battle.prototype.rescaleBattlebacks = function () { + this.rescaleBattlebackSprite(this._back1Sprite); + this.rescaleBattlebackSprite(this._back2Sprite); + }; + + Spriteset_Battle.prototype.rescaleBattlebackSprite = function (sprite) { + if (sprite.bitmap.width <= 0 || sprite.bitmap <= 0) return; + var width = Graphics.boxWidth; + var height = Graphics.boxHeight; + var ratioX = width / sprite.bitmap.width; + var ratioY = height / sprite.bitmap.height; + if (ratioX > 1.0) { + sprite.scale.x = ratioX; + sprite.anchor.x = 0.5; + sprite.x = width / 2; + } + if (ratioY > 1.0) { + sprite.scale.y = ratioY; + sprite.origin.y = 0; + sprite.y = 0; + } + }; + + } // Version 1.3.0 and below + +} // Yanfly.Param.ScaleBattleback + +//============================================================================= +// Window_Base +//============================================================================= + +Window_Base._iconWidth = Yanfly.Param.IconWidth; +Window_Base._iconHeight = Yanfly.Param.IconHeight; +Window_Base._faceWidth = Yanfly.Param.FaceWidth; +Window_Base._faceHeight = Yanfly.Param.FaceHeight; + +Window_Base.prototype.lineHeight = function () { + return Yanfly.Param.LineHeight; +}; + +Window_Base.prototype.drawTextEx = function (text, x, y) { + if (text) { + this.resetFontSettings(); + var textState = { index: 0, x: x, y: y, left: x }; + textState.text = this.convertEscapeCharacters(text); + textState.height = this.calcTextHeight(textState, false); + while (textState.index < textState.text.length) { + this.processCharacter(textState); + } + return textState.x - x; + } else { + return 0; + } +}; + +Window_Base.prototype.textWidthEx = function (text) { + return this.drawTextEx(text, 0, this.contents.height + this.lineHeight()); +}; + +Window_Base.prototype.standardFontFace = function () { + if ($gameSystem.isChinese()) { + return Yanfly.Param.ChineseFont; + } else if ($gameSystem.isKorean()) { + return Yanfly.Param.KoreanFont; + } else { + return Yanfly.Param.DefaultFont; + } +}; + +Window_Base.prototype.standardFontSize = function () { + return Yanfly.Param.FontSize; +}; + +Window_Base.prototype.standardPadding = function () { + return Yanfly.Param.WindowPadding; +}; + +Window_Base.prototype.textPadding = function () { + return Yanfly.Param.TextPadding; +}; + +Window_Base.prototype.standardBackOpacity = function () { + return Yanfly.Param.WindowOpacity; +}; + +Window_Base.prototype.normalColor = function () { + return this.textColor(Yanfly.Param.ColorNormal); +}; +Window_Base.prototype.systemColor = function () { + return this.textColor(Yanfly.Param.ColorSystem); +}; + +Window_Base.prototype.crisisColor = function () { + return this.textColor(Yanfly.Param.ColorCrisis); +}; + +Window_Base.prototype.deathColor = function () { + return this.textColor(Yanfly.Param.ColorDeath); +}; + +Window_Base.prototype.gaugeBackColor = function () { + return this.textColor(Yanfly.Param.ColorGaugeBack); +}; + +Window_Base.prototype.hpGaugeColor1 = function () { + return this.textColor(Yanfly.Param.ColorHpGauge1); +}; + +Window_Base.prototype.hpGaugeColor2 = function () { + return this.textColor(Yanfly.Param.ColorHpGauge2); +}; + +Window_Base.prototype.mpGaugeColor1 = function () { + return this.textColor(Yanfly.Param.ColorMpGauge1); +}; + +Window_Base.prototype.mpGaugeColor2 = function () { + return this.textColor(Yanfly.Param.ColorMpGauge2); +}; + +Window_Base.prototype.mpCostColor = function () { + return this.textColor(Yanfly.Param.ColorMpCost); +}; + +Window_Base.prototype.powerUpColor = function () { + return this.textColor(Yanfly.Param.ColorPowerUp); +}; + +Window_Base.prototype.powerDownColor = function () { + return this.textColor(Yanfly.Param.ColorPowerDown); +}; + +Window_Base.prototype.tpGaugeColor1 = function () { + return this.textColor(Yanfly.Param.ColorTpGauge1); +}; + +Window_Base.prototype.tpGaugeColor2 = function () { + return this.textColor(Yanfly.Param.ColorTpGauge2); +}; + +Window_Base.prototype.tpCostColor = function () { + return this.textColor(Yanfly.Param.ColorTpCost); +}; + +Window_Base.prototype.drawGauge = function (dx, dy, dw, rate, color1, color2) { + var color3 = this.gaugeBackColor(); + var fillW = Math.floor(dw * rate).clamp(0, dw); + var gaugeH = this.gaugeHeight(); + var gaugeY = dy + this.lineHeight() - gaugeH - 2; + if (Yanfly.Param.GaugeOutline) { + color3.paintOpacity = this.translucentOpacity(); + this.contents.fillRect(dx, gaugeY - 1, dw, gaugeH, color3); + fillW = Math.max(fillW - 2, 0); + gaugeH -= 2; + dx += 1; + } else { + var fillW = Math.floor(dw * rate); + var gaugeY = dy + this.lineHeight() - gaugeH - 2; + this.contents.fillRect(dx, gaugeY, dw, gaugeH, color3); + } + this.contents.gradientFillRect(dx, gaugeY, fillW, gaugeH, color1, color2); +}; + +Window_Base.prototype.gaugeHeight = function () { + return Yanfly.Param.GaugeHeight; +}; + +Window_Base.prototype.drawActorLevel = function (actor, x, y) { + this.changeTextColor(this.systemColor()); + var dw1 = this.textWidth(TextManager.levelA); + this.drawText(TextManager.levelA, x, y, dw1); + this.resetTextColor(); + var level = Yanfly.Util.toGroup(actor.level); + var dw2 = this.textWidth(Yanfly.Util.toGroup(actor.maxLevel())); + this.drawText(level, x + dw1, y, dw2, 'right'); +}; + +Window_Base.prototype.drawCurrentAndMax = function (current, max, x, y, + width, color1, color2) { + var labelWidth = this.textWidth('HP'); + var valueWidth = this.textWidth(Yanfly.Util.toGroup(max)); + var slashWidth = this.textWidth('/'); + var x1 = x + width - valueWidth; + var x2 = x1 - slashWidth; + var x3 = x2 - valueWidth; + if (x3 >= x + labelWidth) { + this.changeTextColor(color1); + this.drawText(Yanfly.Util.toGroup(current), x3, y, valueWidth, + 'right'); + this.changeTextColor(color2); + this.drawText('/', x2, y, slashWidth, 'right'); + this.drawText(Yanfly.Util.toGroup(max), x1, y, valueWidth, 'right'); + } else { + this.changeTextColor(color1); + this.drawText(Yanfly.Util.toGroup(current), x1, y, valueWidth, + 'right'); + } +}; + +Window_Base.prototype.drawActorTp = function (actor, x, y, width) { + width = width || 96; + var color1 = this.tpGaugeColor1(); + var color2 = this.tpGaugeColor2(); + this.drawGauge(x, y, width, actor.tpRate(), color1, color2); + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.tpA, x, y, 44); + this.changeTextColor(this.tpColor(actor)); + this.drawText(Yanfly.Util.toGroup(actor.tp), x + width - 64, y, 64, + 'right'); +}; + +Window_Base.prototype.drawActorSimpleStatus = function (actor, x, y, width) { + var lineHeight = this.lineHeight(); + var xpad = Window_Base._faceWidth + (2 * Yanfly.Param.TextPadding); + var x2 = x + xpad; + var width2 = Math.max(180, width - xpad - this.textPadding()); + this.drawActorName(actor, x, y); + this.drawActorLevel(actor, x, y + lineHeight * 1); + this.drawActorIcons(actor, x, y + lineHeight * 2); + this.drawActorClass(actor, x2, y, width2); + this.drawActorHp(actor, x2, y + lineHeight * 1, width2); + this.drawActorMp(actor, x2, y + lineHeight * 2, width2); + if (Yanfly.Param.MenuTpGauge) { + this.drawActorTp(actor, x2, y + lineHeight * 3, width2); + } +}; + +Window_Base.prototype.drawCurrencyValue = function (value, unit, wx, wy, ww) { + this.resetTextColor(); + this.contents.fontSize = Yanfly.Param.GoldFontSize; + if (this.usingGoldIcon(unit)) { + var cx = Window_Base._iconWidth; + } else { + var cx = this.textWidth(unit); + } + var text = Yanfly.Util.toGroup(value); + if (this.textWidth(text) > ww - cx) { + text = Yanfly.Param.GoldOverlap; + } + this.drawText(text, wx, wy, ww - cx - 4, 'right'); + if (this.usingGoldIcon(unit)) { + this.drawIcon(Yanfly.Icon.Gold, wx + ww - Window_Base._iconWidth, wy + 2); + } else { + this.changeTextColor(this.systemColor()); + this.drawText(unit, wx, wy, ww, 'right'); + } + this.resetFontSettings(); +}; + +Window_Base.prototype.usingGoldIcon = function (unit) { + if (unit !== TextManager.currencyUnit) return false; + return Yanfly.Icon.Gold > 0; +}; + +//============================================================================= +// Window_Command +//============================================================================= + +Window_Command.prototype.itemTextAlign = function () { + return Yanfly.Param.TextAlign; +}; + +//============================================================================= +// Window_MenuStatus +//============================================================================= + +Window_MenuStatus.prototype.drawItemImage = function (index) { + var actor = $gameParty.members()[index]; + var rect = this.itemRect(index); + this.changePaintOpacity(actor.isBattleMember()); + var fw = Window_Base._faceWidth; + this.drawActorFace(actor, rect.x + 1, rect.y + 1, fw, rect.height - 2); + this.changePaintOpacity(true); +}; + +Window_MenuStatus.prototype.drawItemStatus = function (index) { + var actor = $gameParty.members()[index]; + var rect = this.itemRect(index); + var xpad = Yanfly.Param.WindowPadding + Window_Base._faceWidth; + var x = rect.x + xpad; + if (!Yanfly.Param.MenuTpGauge) { + var y = Math.floor(rect.y + rect.height / 2 - this.lineHeight() * 1.5); + } else { + var y = Math.floor(rect.y); + } + var width = rect.width - x - this.textPadding(); + this.drawActorSimpleStatus(actor, x, y, width); +}; + +//============================================================================= +// Window_ItemList +//============================================================================= + +Window_ItemList.prototype.numberWidth = function () { + return this.textWidth('\u00d70,000'); +}; + +Window_ItemList.prototype.drawItemNumber = function (item, x, y, width) { + if (!this.needsNumber()) return; + var numItems = Yanfly.Util.toGroup($gameParty.numItems(item)); + this.contents.fontSize = Yanfly.Param.ItemQuantitySize; + this.drawText('\u00d7' + numItems, x, y, width, 'right'); + this.resetFontSettings(); +}; + +//============================================================================= +// Window_SkillStatus +//============================================================================= + +Window_SkillStatus.prototype.refresh = function () { + this.contents.clear(); + if (this._actor) { + var w = this.width - this.padding * 2; + var h = this.height - this.padding * 2; + if (!Yanfly.Param.MenuTpGauge) { + var y = h / 2 - this.lineHeight() * 1.5; + } else { + var y = 0; + } + var xpad = Yanfly.Param.WindowPadding + Window_Base._faceWidth; + var width = w - xpad - this.textPadding(); + this.drawActorFace(this._actor, 0, 0, Window_Base._faceWidth, h); + this.drawActorSimpleStatus(this._actor, xpad, y, width); + } +}; + +Window_SkillList.prototype.drawSkillCost = function (skill, x, y, width) { + if (this._actor.skillTpCost(skill) > 0) { + this.changeTextColor(this.tpCostColor()); + var skillcost = Yanfly.Util.toGroup(this._actor.skillTpCost(skill)); + this.drawText(skillcost, x, y, width, 'right'); + } else if (this._actor.skillMpCost(skill) > 0) { + this.changeTextColor(this.mpCostColor()); + var skillcost = Yanfly.Util.toGroup(this._actor.skillMpCost(skill)); + this.drawText(skillcost, x, y, width, 'right'); + } +}; + +//============================================================================= +// Window_EquipStatus +//============================================================================= + +Window_EquipStatus.prototype.drawCurrentParam = function (x, y, paramId) { + this.resetTextColor(); + var actorparam = Yanfly.Util.toGroup(this._actor.param(paramId)); + this.drawText(actorparam, x, y, 48, 'right'); +}; + +Window_EquipStatus.prototype.drawNewParam = function (x, y, paramId) { + var newValue = this._tempActor.param(paramId); + var diffvalue = newValue - this._actor.param(paramId); + var actorparam = Yanfly.Util.toGroup(newValue); + this.changeTextColor(this.paramchangeTextColor(diffvalue)); + this.drawText(actorparam, x, y, 48, 'right'); +}; + +//============================================================================= +// Window_SkillType +//============================================================================= + +Window_SkillType.prototype.makeCommandList = function () { + if (this._actor) { + var skillTypes = this._actor.addedSkillTypes(); + skillTypes.sort(function (a, b) { return a - b }); + skillTypes.forEach(function (stypeId) { + var name = $dataSystem.skillTypes[stypeId]; + this.addCommand(name, 'skill', true, stypeId); + }, this); + } +}; + +//============================================================================= +// Window_ActorCommand +//============================================================================= + +Window_ActorCommand.prototype.addSkillCommands = function () { + var skillTypes = this._actor.addedSkillTypes(); + skillTypes.sort(function (a, b) { return a - b }); + skillTypes.forEach(function (stypeId) { + var name = $dataSystem.skillTypes[stypeId]; + this.addCommand(name, 'skill', true, stypeId); + }, this); +}; + +//============================================================================= +// Window_Status +//============================================================================= + +Window_Status.prototype.drawParameters = function (x, y) { + var lineHeight = this.lineHeight(); + for (var i = 0; i < 6; i++) { + var paramId = i + 2; + var y2 = y + lineHeight * i; + this.changeTextColor(this.systemColor()); + this.drawText(TextManager.param(paramId), x, y2, 160); + this.resetTextColor(); + var actorParam = Yanfly.Util.toGroup(this._actor.param(paramId)); + var dw = this.textWidth(Yanfly.Util.toGroup(this._actor.paramMax(i + 2))); + this.drawText(actorParam, x + 160, y2, dw, 'right'); + } +}; + +Window_Status.prototype.drawExpInfo = function (x, y) { + var lineHeight = this.lineHeight(); + var expTotal = TextManager.expTotal.format(TextManager.exp); + var expNext = TextManager.expNext.format(TextManager.level); + var value1 = this._actor.currentExp(); + var value2 = this._actor.nextRequiredExp(); + if (this._actor.isMaxLevel()) { + value1 = '-------'; + value2 = '-------'; + } else { + value1 = Yanfly.Util.toGroup(value1); + value2 = Yanfly.Util.toGroup(value2); + } + this.changeTextColor(this.systemColor()); + this.drawText(expTotal, x, y + lineHeight * 0, 270); + this.drawText(expNext, x, y + lineHeight * 2, 270); + this.resetTextColor(); + this.drawText(value1, x, y + lineHeight * 1, 270, 'right'); + this.drawText(value2, x, y + lineHeight * 3, 270, 'right'); +}; + +//============================================================================= +// Window_ShopBuy +//============================================================================= + +Window_ShopBuy.prototype.drawItem = function (index) { + var item = this._data[index]; + var rect = this.itemRect(index); + rect.width -= this.textPadding(); + this.changePaintOpacity(this.isEnabled(item)); + this.drawItemName(item, rect.x, rect.y, rect.width); + this.contents.fontSize = Yanfly.Param.GoldFontSize; + var itemPrice = Yanfly.Util.toGroup(this.price(item)); + this.drawText(itemPrice, rect.x, rect.y, rect.width, 'right'); + this.changePaintOpacity(true); + this.resetFontSettings(); +}; + +//============================================================================= +// Window_ShopNumber +//============================================================================= + +Window_ShopNumber.prototype.drawNumber = function () { + var x = this.cursorX(); + var y = this.itemY(); + var width = this.cursorWidth() - this.textPadding(); + this.resetTextColor(); + var itemNumber = Yanfly.Util.toGroup(this._number); + this.drawText(itemNumber, x, y, width, 'right'); +}; + +//============================================================================= +// Window_NameEdit +//============================================================================= + +Window_NameEdit.prototype.faceWidth = function () { + return Window_Base._faceWidth; +}; + +//============================================================================= +// Window_BattleStatus +//============================================================================= + +Window_BattleStatus.prototype.gaugeAreaWidth = function () { + return this.width / 2 + this.standardPadding(); +}; + +Window_BattleStatus.prototype.drawBasicArea = function (rect, actor) { + var minIconArea = Window_Base._iconWidth * 2; + var nameLength = this.textWidth('0') * 16 + 6; + var iconWidth = Math.max(rect.width - nameLength, minIconArea); + var nameWidth = rect.width - iconWidth; + this.drawActorName(actor, rect.x + 0, rect.y, nameWidth); + this.drawActorIcons(actor, rect.x + nameWidth, rect.y, iconWidth); +}; + +Window_BattleStatus.prototype.drawGaugeAreaWithTp = function (rect, actor) { + var totalArea = this.gaugeAreaWidth() - 30; + var hpW = Math.floor(parseInt(totalArea * 108 / 300)); + var otW = Math.floor(parseInt(totalArea * 96 / 300)); + this.drawActorHp(actor, rect.x + 0, rect.y, hpW); + this.drawActorMp(actor, rect.x + hpW + 15, rect.y, otW); + this.drawActorTp(actor, rect.x + hpW + otW + 30, rect.y, otW); +}; + +Window_BattleStatus.prototype.drawGaugeAreaWithoutTp = function (rect, actor) { + var totalArea = this.gaugeAreaWidth() - 15; + var hpW = Math.floor(parseInt(totalArea * 201 / 315)); + var otW = Math.floor(parseInt(totalArea * 114 / 315)); + this.drawActorHp(actor, rect.x + 0, rect.y, hpW); + this.drawActorMp(actor, rect.x + hpW + 15, rect.y, otW); +}; + +//============================================================================= +// Window_BattleLog +//============================================================================= + +Window_BattleLog.prototype.showNormalAnimation = function (targets, + animationId, mirror) { + var animation = $dataAnimations[animationId]; + if (animation) { + if (animation.position === 3) { + targets.forEach(function (target) { + target.startAnimation(animationId, mirror, 0); + }); + } else { + var delay = this.animationBaseDelay(); + var nextDelay = this.animationNextDelay(); + targets.forEach(function (target) { + target.startAnimation(animationId, mirror, delay); + delay += nextDelay; + }); + } + } +}; + +//============================================================================= +// New Function +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.5.0') { + + Yanfly.Util.toGroup = function (inVal) { + if (typeof inVal === 'string') return inVal; + if (!Yanfly.Param.DigitGroup) return inVal; + return inVal.toLocaleString('en'); + return inVal.replace(/(^|[^\w.])(\d{4,})/g, function ($0, $1, $2) { + return $1 + $2.replace(/\d(?=(?:\d\d\d)+(?!\d))/g, "$&,"); + }); + }; + +} else { + + Yanfly.Util.toGroup = function (inVal) { + if (typeof inVal !== 'string') { inVal = String(inVal); } + if (!Yanfly.Param.DigitGroup) return inVal; + return inVal.toLocaleString('en'); + return inVal.replace(/(^|[^\w.])(\d{4,})/g, function ($0, $1, $2) { + return $1 + $2.replace(/\d(?=(?:\d\d\d)+(?!\d))/g, "$&,"); + }); + }; + +} // Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= '1.5.0' + + + +Yanfly.Util.displayError = function (e, code, message) { + console.log(message); + console.log(code || 'NON-EXISTENT'); + console.error(e); + if (Utils.RPGMAKER_VERSION && Utils.RPGMAKER_VERSION >= "1.6.0") return; + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + if (!require('nw.gui').Window.get().isDevToolsOpen()) { + require('nw.gui').Window.get().showDevTools(); + } + } +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_DamageCore.js b/js/plugins/YEP_DamageCore.js new file mode 100644 index 0000000..72fb33b --- /dev/null +++ b/js/plugins/YEP_DamageCore.js @@ -0,0 +1,1413 @@ +//============================================================================= +// Yanfly Engine Plugins - Damage Core +// YEP_DamageCore.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_DamageCore = true; + +var Yanfly = Yanfly || {}; +Yanfly.DMG = Yanfly.DMG || {}; +Yanfly.DMG.version = 1.06; + +//============================================================================= + /*: + * @plugindesc v1.06 伤害核心☁️ + * @author Yanfly Engine Plugins + * + * @param ---破环上限--- + * @default + * + * @param Enable Cap + * @text 启用上限 + * @desc Do you wish to put a cap on your damage? + * NO - false YES - true Default: false + * @default true + * + * @param Maximum Damage + * @text 伤害上限 + * @desc If enabled, what is the default maximum damage? + * @default 9999 + * + * @param Maximum Healing + * @text 治疗上限 + * @desc If enabled, what is the default maximum healing? + * @default 9999 + * + * @param ---破坏步骤--- + * @default + * + * @param Damage Step 1 + * @text 破坏步骤1 + * @desc 这是计算完基值后的步骤。 + * 上一行:baseDamage=this.evalDamageFormula(目标); + * @default baseDamage = this.modifyBaseDamage(value, baseDamage, target); + * + * @param Damage Step 2 + * @text 破坏步骤2 + * @desc 这是伤害步骤的下一步。 + * @default baseDamage *= this.calcElementRate(target); + * + * @param Damage Step 3 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 4 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 5 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 6 + * @desc This is the next step in the damage flow. + * @default critical = this.modifyCritical(critical, baseDamage, target); + * + * @param Damage Step 7 + * @desc This is the next step in the damage flow. + * @default target.result().critical = critical; + * + * @param Damage Step 8 + * @desc This is the next step in the damage flow. + * @default value = baseDamage; + * + * @param Damage Step 9 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 10 + * @desc This is the next step in the damage flow. + * @default if (baseDamage > 0) { + * + * @param Damage Step 11 + * @desc This is the next step in the damage flow. + * @default value = this.applyDamageRate(value, baseDamage, target); + * + * @param Damage Step 12 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 13 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 14 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 15 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 16 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 17 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 18 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 19 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 20 + * @desc This is the next step in the damage flow. + * @default if (baseDamage < 0) { + * + * @param Damage Step 21 + * @desc This is the next step in the damage flow. + * @default value = this.applyHealRate(value, baseDamage, target); + * + * @param Damage Step 22 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 23 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 24 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 25 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 26 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 27 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 28 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 29 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 30 + * @desc This is the next step in the damage flow. + * @default if (critical) { + * + * @param Damage Step 31 + * @desc This is the next step in the damage flow. + * @default value = this.applyCriticalRate(value, baseDamage, target); + * + * @param Damage Step 32 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 33 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 34 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 35 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 36 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 37 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 38 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 39 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 40 + * @desc This is the next step in the damage flow. + * @default if (this.isPhysical()) { + * + * @param Damage Step 41 + * @desc This is the next step in the damage flow. + * @default value = this.applyPhysicalRate(value, baseDamage, target); + * + * @param Damage Step 42 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 43 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 44 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 45 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 46 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 47 + * @desc This is the next step in the damage flow. + * @default value = this.applyFlatPhysical(value, baseDamage, target); + * + * @param Damage Step 48 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 49 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 50 + * @desc This is the next step in the damage flow. + * @default if (this.isMagical()) { + * + * @param Damage Step 51 + * @desc This is the next step in the damage flow. + * @default value = this.applyMagicalRate(value, baseDamage, target); + * + * @param Damage Step 52 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 53 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 54 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 55 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 56 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 57 + * @desc This is the next step in the damage flow. + * @default value = this.applyFlatMagical(value, baseDamage, target); + * + * @param Damage Step 58 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 59 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 60 + * @desc This is the next step in the damage flow. + * @default if (baseDamage > 0) { + * + * @param Damage Step 61 + * @desc This is the next step in the damage flow. + * @default value = this.applyFlatDamage(value, baseDamage, target); + * + * @param Damage Step 62 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 63 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 64 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 65 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 66 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 67 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 68 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 69 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 70 + * @desc This is the next step in the damage flow. + * @default if (baseDamage < 0) { + * + * @param Damage Step 71 + * @desc This is the next step in the damage flow. + * @default value = this.applyFlatHeal(value, baseDamage, target); + * + * @param Damage Step 72 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 73 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 74 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 75 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 76 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 77 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 78 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 79 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 80 + * @desc This is the next step in the damage flow. + * @default if (critical) { + * + * @param Damage Step 81 + * @desc This is the next step in the damage flow. + * @default value = this.applyFlatCritical(value, baseDamage, target); + * + * @param Damage Step 82 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 83 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 84 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 85 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 86 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 87 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 88 + * @desc This is the next step in the damage flow. + * @default } + * + * @param Damage Step 89 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 90 + * @desc This is the next step in the damage flow. + * @default value = this.applyVariance(value, item.damage.variance); + * + * @param Damage Step 91 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 92 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 93 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 94 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 95 + * @desc This is the next step in the damage flow. + * @default value = this.applyGuard(value, target); + * + * @param Damage Step 96 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 97 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 98 + * @desc This is the next step in the damage flow. + * @default + * + * @param Damage Step 99 + * @desc This is the next step in the damage flow. + * @default value = this.applyFlatGlobal(value, baseDamage, target); + * + * @param Damage Step 100 + * @desc This is the final step in the damage flow. + * Following line: return Math.round(value); + * @default value = this.applyMinimumDamage(value, baseDamage, target); + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * 游戏中可以设置关于造成伤害的公式,但是并没有与计算伤害公式后的相关设置 + * 。利用这个插件,你可以插入你自己的调整进入伤害公式。 + * + * 如果你使用了YEP_BattleEngineCore.js,把它放在YEP_BattleEngineCore.js下面 + * + * ============================================================================ + * Notetags + * ============================================================================ + * + * 下面的标签你可以用来调整 + * + * Skill and Item Notetag: + * + * This causes the skill/item to ignore the damage cap and go with the + * regular value of the calculated damage. This will cancel out any damage + * cap effects otherwise. This will take priority over any damage cap + * breaking effects.忽略伤害限制 + * + * Actor, Class, Enemy, Weapon, Armor, and State Notetags: + * 忽略伤害限制 + * This will cause the related battler to bypass any damage capping effects + * and its skills/items will go with the uncapped calculated value. + * + * + * + * This will set the skill to have a damage/healing cap of x. This will + * cancel out any damage cap bypassers. If a battler has more than one + * damage cap, it will go with the highest value. This means if an actor that + * has a weapon that brings the damage cap to 99,999 and an accessory that + * brings the damage cap to 999,999, then the battler's damage cap will be + * the highest value of 999,999.设置伤害限制和治疗限制 + * + * ============================================================================ + * Plugin Commands + * ============================================================================ + * + * 你可以用下面的插件命令来设置伤害限制规则。请注意,装备特性,技能特性将 + * 不会受影响 + * + * Plugin Command: + * SetDamageCap 9999 伤害上限为9999 + * SetHealingCap 9999 治疗上限为9999 + * EnableDamageCap 开启伤害上限 + * DisableDamageCap 关闭伤害上限 + * + * ============================================================================ + * Lunatic Mode - Damage Formula + * ============================================================================ + * + * For those who think the damage formula box is too small and would like to + * use the notebox instead to declare the damage formula, you can use the + * notetags below: + * + * Skill and Item Notetags: + * + * value = 500; + * value += 2500; + * + * This will overwrite the damage formula found at the top and use the + * strings in the middle as the formula instead. Keep in mind that using + * comments here will cancel out anything following after. New variables can + * be used, too, to make damage calculations a bit easier. + * + * value - Refers to the amount that will become the base damage value. + * user - Refers to the actor/enemy using the skill/item. + * subject - Refers to the actor/enemy using the skill/item. + * target - Refers to the target actor/enemy on the receiving end of + * the skill/item. + * + * ============================================================================ + * Lunatic Mode - Damage Steps + * ============================================================================ + * + * The damage formula isn't all there is to calculating the damage that appears + * at the very end. In this plugin's parameters towards the bottom, you'll see + * a large list of Damage Steps. Each one of these steps is a line of code that + * the damage count will run through in order to calculate and finalize the + * damage output. + * + * The purpose of those parameters is to allow you ease of access on where you + * want to insert code that is your own or custom code provided by another + * plugin. Here's a quick reference on how the original damage flow looked like: + * + * Game_Action.prototype.makeDamageValue = function(target, critical) { + * var item = this.item(); + * var baseDamage = this.evalDamageFormula(target); + * var value = baseDamage * this.calcElementRate(target); + * if (this.isPhysical()) { + * value *= target.pdr; + * } + * if (this.isMagical()) { + * value *= target.mdr; + * } + * if (baseDamage < 0) { + * value *= target.rec; + * } + * if (critical) { + * value = this.applyCritical(value); + * } + * value = this.applyVariance(value, item.damage.variance); + * value = this.applyGuard(value, target); + * value = Math.round(value); + * return value; + * }; + * + * In the vein of keeping everything organized, the following lines have been + * incorporated into new functions: + * + * Formula New Function + * value *= target.pdr value = this.applyPhysicalRate + * value *= target.mdr value = this.applyMagicalRate + * value *= target.rec value = this.applyHealRate + * value = this.applyCritical(value) value = this.applyCriticalRate + * + * ============================================================================ + * Yanfly Engine Plugins - Battle Engine Extension - Action Sequence Commands + * ============================================================================ + * + * If you have YEP_BattleEngineCore.js installed with this plugin located + * underneath it in the Plugin Manager, you can make use of these extra + * damage related action sequences. + * + *============================================================================= + * BYPASS DAMAGE CAP + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This will override all damage caps. This is applied to healing, too. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: bypass damage cap + *============================================================================= + * + *============================================================================= + * DAMAGE CAP: x + * HEALING CAP: x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This sets the action's damage cap to x, overriding all over damage caps in + * play except its own. This will also apply to healing, too. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: damage cap: 999 + * healing cap: 999999 + *============================================================================= + * + *============================================================================= + * DAMAGE RATE: x% + * DAMAGE RATE: x.y + * DAMAGE RATE: VARIABLE x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This changes the damage rate across all types of damage (physical, magical, + * and certain hit). The damage rate is reset at the end of each action + * sequence. If you use a variable, it is treated as a percentage. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: damage rate: 50% + * damage rate: 8.667 + * damage rate: variable 3 + *============================================================================= + * + *============================================================================= + * FLAT DAMAGE: +x + * FLAT DAMAGE: -x + * FLAT DAMAGE: VARIABLE x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This adds a flat damage across all types of damage (physical, magical, and + * certain hit). The flat damage is reset at the end of each action sequence. + * If you use a variable, it is added onto the damage. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: flat damage: +100 + * flat damage: -250 + * flat damage: variable 3 + *============================================================================= + * + *============================================================================= + * FLAT GLOBAL: +x + * FLAT GLOBAL: -x + * FLAT GLOBAL: VARIABLE x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This adds a flat global damage and heal across all types of damage + * (physical, magical, and certain hit). The flat damage and heal is reset at + * the end of each action sequence. If you use a variable, it is added onto the + * damage and heal. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: flat global: +100 + * flat global: -250 + * flat global: variable 3 + *============================================================================= + * + *============================================================================= + * FLAT HEAL: +x + * FLAT HEAL: -x + * FLAT HEAL: VARIABLE x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This adds a flat heal across all types of damage (physical, magical, and + * certain hit). The flat heal is reset at the end of each action sequence. + * If you use a variable, it is added onto the heal. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: flat heal: +100 + * flat heal: -250 + * flat heal: variable 3 + *============================================================================= + * + *============================================================================= + * GLOBAL RATE: x% + * GLOBAL RATE: x.y + * GLOBAL RATE: VARIABLE x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This changes the damage and healing rates across all types of damage + * (physical, magical, and certain hit). The damage and healing rates are reset + * at the end of each action sequence. If you use a variable, it is treated as + * a percentage. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: global rate: 50% + * global rate: 8.667 + * global rate: variable 3 + *============================================================================= + * + *============================================================================= + * HEAL RATE: x% + * HEAL RATE: x.y + * HEAL RATE: VARIABLE x + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This changes the healing rate across all types of damage (physical, magical, + * and certain hit). The healing rate is reset at the end of each action + * sequence. If you use a variable, it is treated as a percentage. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: heal rate: 50% + * heal rate: 8.667 + * heal rate: variable 3 + *============================================================================= + * + *============================================================================= + * RESET DAMAGE CAP + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This will reset the damage cap implemented by the Damage Cap action + * sequence. This will also reset the effects of the Bypass Damage Cap + * action sequence. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: reset damage cap + *============================================================================= + * + *============================================================================= + * RESET DAMAGE MODIFIERS + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * This will cause all damage and healing modifiers caused by action sequences + * to reset. While they normally reset at the end of each action sequence, this + * will allow you to do it manually. + *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + * Usage Example: reset damage modifiers + *============================================================================= + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.06: + * - Lunatic Mode fail safes added. + * + * Version 1.05: + * - Added failsafe for damage cap check in case Lunatic Mode effects of other + * plugins would push the damage past the capped amount. + * + * Version 1.04: + * - Rewored Damage Steps 1 through 8. If you're updating from an old version, + * please update the these manually: + * Step 1: baseDamage = this.modifyBaseDamage(value, baseDamage, target); + * Step 2: baseDamage *= this.calcElementRate(target); + * Steps 3 through 5: (empty) + * Step 6: critical = this.modifyCritical(critical, baseDamage, target); + * Step 7: target.result().critical = critical; + * Step 8: value = baseDamage; + * - This change was made to Element Absorb and Disperse Damage better. This + * damage step change is also more efficient in calculating damage effects that + * alters the baseDamage. + * + * Version 1.03: + * - Changed default parameter in Damage Step 4 from + * 'baseDamage = this.modifyBaseDamage(value, baseDamage, target);' to + * 'value = this.modifyBaseDamage(value, baseDamage, target);' + * Be sure to manually change this yourself if you want to get things like the + * Selection Control's Disperse Damage mechanic to work. + * + * Version 1.02: + * - Updated for RPG Maker MV version 1.1.0. + * - notetag now supports comments. + * + * Version 1.01: + * - Fixed a bug with not recording custom formulas correctly. + * + * Version 1.00: + * - Finished plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_DamageCore'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.DMGEnableCap = eval(String(Yanfly.Parameters['Enable Cap'])); +Yanfly.Param.DMGMaxDamage = Number(Yanfly.Parameters['Maximum Damage']); +Yanfly.Param.DMGMaxHealing = Number(Yanfly.Parameters['Maximum Healing']); + +Yanfly.SetupParameters = function() { + Yanfly.DMG.DamageFlow = ''; + for (var i = 1; i <= 100; ++i) { + var param = 'Damage Step ' + i; + Yanfly.DMG.DamageFlow += String(Yanfly.Parameters[param]) + '\n'; + } +}; +Yanfly.SetupParameters(); + +//============================================================================= +// DataManager +//============================================================================= + +Yanfly.DMG.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; +DataManager.isDatabaseLoaded = function() { + if (!Yanfly.DMG.DataManager_isDatabaseLoaded.call(this)) return false; + if (!Yanfly._loaded_YEP_DamageCore) { + this.processDMGNotetags1($dataSkills); + this.processDMGNotetags1($dataItems); + this.processDMGNotetags2($dataActors); + this.processDMGNotetags2($dataClasses); + this.processDMGNotetags2($dataEnemies); + this.processDMGNotetags2($dataWeapons); + this.processDMGNotetags2($dataArmors); + this.processDMGNotetags2($dataStates); + Yanfly._loaded_YEP_DamageCore = true; + } + return true; +}; + +DataManager.processDMGNotetags1 = function(group) { + var noteD1 = /<(?:DAMAGE CAP|HEAL CAP|HEALING CAP):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + var damageFormulaMode = false; + obj.damage.custom = false; + obj.breakDamageCap = false; + obj.damageCap = undefined; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(/<(?:BREAK DAMAGE CAP|BYPASS DAMAGE CAP)>/i)) { + obj.breakDamageCap = true; + obj.damageCap = undefined; + } else if (line.match(noteD1)) { + obj.damageCap = parseInt(RegExp.$1); + obj.breakDamageCap = false; + } else if (line.match(/<(?:DAMAGE FORMULA)>/i)) { + damageFormulaMode = true; + obj.damage.formula = ''; + obj.damage.custom = true; + } else if (line.match(/<\/(?:DAMAGE FORMULA)>/i)) { + damageFormulaMode = false; + } else if (damageFormulaMode) { + obj.damage.formula = obj.damage.formula + line + '\n'; + } + } + } +}; + +DataManager.processDMGNotetags2 = function(group) { + var noteD1 = /<(?:BREAK DAMAGE CAP|BYPASS DAMAGE CAP)>/i; + var noteD2 = /<(?:DAMAGE CAP):[ ](\d+)>/i; + var noteD3 = /<(?:HEAL CAP|HEALING CAP):[ ](\d+)>/i; + for (var n = 1; n < group.length; n++) { + var obj = group[n]; + var notedata = obj.note.split(/[\r\n]+/); + + obj.breakDamageCap = undefined; + obj.damageCap = undefined; + obj.healCap = undefined; + + for (var i = 0; i < notedata.length; i++) { + var line = notedata[i]; + if (line.match(noteD1)) { + obj.breakDamageCap = true; + obj.damageCap = undefined; + obj.healCap = undefined; + } else if (line.match(noteD2)) { + obj.damageCap = parseInt(RegExp.$1); + obj.breakDamageCap = undefined; + } else if (line.match(noteD3)) { + obj.healCap = parseInt(RegExp.$1) * -1; + obj.breakDamageCap = undefined; + } + } + } +}; + +//============================================================================= +// BattleManager +//============================================================================= + +if (Imported.YEP_BattleEngineCore) { +Yanfly.DMG.BattleManager_processActionSequence = + BattleManager.processActionSequence; + BattleManager.processActionSequence = function(actionName, actionArgs) { + // BYPASS DAMAGE CAP + if (actionName === 'BYPASS DAMAGE CAP') { + return this.actionBypassDamageCap(); + } + // DAMAGE CAP, HEALING CAP + if (actionName === 'DAMAGE CAP' || actionName === 'HEALING CAP') { + return this.actionDamageCap(actionArgs); + } + // DAMAGE RATE + if (actionName === 'DAMAGE RATE') { + return this.actionDamageRate(actionArgs); + } + // FLAT DAMAGE + if (actionName === 'FLAT DAMAGE') { + return this.actionFlatDamage(actionArgs); + } + // FLAT GLOBAL + if (actionName === 'FLAT GLOBAL') { + return this.actionFlatGlobal(actionArgs); + } + // FLAT HEAL + if (actionName === 'FLAT HEAL') { + return this.actionFlatHeal(actionArgs); + } + // GLOBAL RATE + if (actionName === 'GLOBAL RATE') { + return this.actionGlobalRate(actionArgs); + } + // HEAL RATE + if (actionName === 'HEAL RATE') { + return this.actionHealRate(actionArgs); + } + // RESET DAMAGE CAP + if (actionName === 'RESET DAMAGE CAP') { + return this.actionResetDamageCap(); + } + // RESET DAMAGE MODIFIERS + if (actionName === 'RESET DAMAGE MODIFIERS') { + return this.actionResetDamageModifiers(); + } + return Yanfly.DMG.BattleManager_processActionSequence.call(this, + actionName, actionArgs); + }; +}; + +BattleManager.actionBypassDamageCap = function() { + $gameSystem.actSeqBypassDamageCap(); + return true; +}; + +BattleManager.actionDamageCap = function(actionArgs) { + if (!actionArgs) return; + if (actionArgs[0]) { + var value = parseInt(actionArgs[0]); + $gameSystem.setActSeqDamageCap(value); + } + return true; +}; + +BattleManager.actionDamageRate = function(actionArgs) { + if (actionArgs[0].match(/(?:VARIABLE|VAR)[ ](\d+)/i)) { + var value = parseFloat($gameVariables.value(parseInt(RegExp.$1)) * 0.01); + } else if (actionArgs[0].match(/(\d+)([%%])/i)) { + var value = parseFloat(RegExp.$1 * 0.01); + } else if (actionArgs[0].match(/(\d+).(\d+)/i)) { + var value = parseFloat(String(RegExp.$1) + '.' + String(RegExp.$1)); + } else { + return true; + } + $gameSystem._damageRate = value; + return true; +}; + +BattleManager.actionFlatDamage = function(actionArgs) { + if (actionArgs[0].match(/(?:VARIABLE|VAR)[ ](\d+)/i)) { + var value = parseInt($gameVariables.value(parseInt(RegExp.$1))); + } else if (actionArgs[0].match(/([\+\-]\d+)/i)) { + var value = parseInt(RegExp.$1); + } else if (actionArgs[0].match(/(\d+)/i)) { + var value = parseInt(RegExp.$1); + } else { + return true; + } + $gameSystem._flatDamage = value; + return true; +}; + +BattleManager.actionFlatGlobal = function(actionArgs) { + if (actionArgs[0].match(/(?:VARIABLE|VAR)[ ](\d+)/i)) { + var value = parseInt($gameVariables.value(parseInt(RegExp.$1))); + } else if (actionArgs[0].match(/([\+\-]\d+)/i)) { + var value = parseInt(RegExp.$1); + } else if (actionArgs[0].match(/(\d+)/i)) { + var value = parseInt(RegExp.$1); + } else { + return true; + } + $gameSystem._flatDamage = value; + $gameSystem._flatHeal = value; + return true; +}; + +BattleManager.actionFlatHeal = function(actionArgs) { + if (actionArgs[0].match(/(?:VARIABLE|VAR)[ ](\d+)/i)) { + var value = parseInt($gameVariables.value(parseInt(RegExp.$1))); + } else if (actionArgs[0].match(/([\+\-]\d+)/i)) { + var value = parseInt(RegExp.$1); + } else if (actionArgs[0].match(/(\d+)/i)) { + var value = parseInt(RegExp.$1); + } else { + return true; + } + $gameSystem._flatHeal = value; + return true; +}; + +BattleManager.actionGlobalRate = function(actionArgs) { + if (actionArgs[0].match(/(?:VARIABLE|VAR)[ ](\d+)/i)) { + var value = parseFloat($gameVariables.value(parseInt(RegExp.$1)) * 0.01); + } else if (actionArgs[0].match(/(\d+)([%%])/i)) { + var value = parseFloat(RegExp.$1 * 0.01); + } else if (actionArgs[0].match(/(\d+).(\d+)/i)) { + var value = parseFloat(String(RegExp.$1) + '.' + String(RegExp.$1)); + } else { + return true; + } + $gameSystem._damageRate = value; + $gameSystem._healRate = value; + return true; +}; + +BattleManager.actionHealRate = function(actionArgs) { + if (actionArgs[0].match(/(?:VARIABLE|VAR)[ ](\d+)/i)) { + var value = parseFloat($gameVariables.value(parseInt(RegExp.$1)) * 0.01); + } else if (actionArgs[0].match(/(\d+)([%%])/i)) { + var value = parseFloat(RegExp.$1 * 0.01); + } else if (actionArgs[0].match(/(\d+).(\d+)/i)) { + var value = parseFloat(String(RegExp.$1) + '.' + String(RegExp.$1)); + } else { + return true; + } + $gameSystem._healRate = value; + return true; +}; + +BattleManager.actionResetDamageCap = function() { + $gameSystem.resetActSeqDamageCap(); + return true; +}; + +BattleManager.actionResetDamageModifiers = function() { + $gameSystem.resetDamageSettings(); + return true; +}; + +//============================================================================= +// Game_System +//============================================================================= + +Yanfly.DMG.Game_System_initialize = Game_System.prototype.initialize; +Game_System.prototype.initialize = function() { + Yanfly.DMG.Game_System_initialize.call(this); + this.resetActSeqDamageCap(); + this.resetDamageSettings(); +}; + +Game_System.prototype.resetActSeqDamageCap = function() { + this._actSeqBypassDamageCap = false; + this._actSeqDamageCap = undefined; +}; + +Game_System.prototype.actSeqBypassDamageCap = function() { + this._actSeqBypassDamageCap = true; +}; + +Game_System.prototype.getActSeqBypassDamageCap = function() { + return this._actSeqBypassDamageCap; +}; + +Game_System.prototype.setActSeqDamageCap = function(value) { + this._actSeqDamageCap = value; +}; + +Game_System.prototype.getActSeqDamageCap = function() { + return this._actSeqDamageCap; +}; + +Game_System.prototype.resetDamageSettings = function() { + this._damageRate = 1.0; + this._flatDamage = 0; + this._healRate = 1.0; + this._flatHeal = 0; + this._defaultDamageCap = Yanfly.Param.DMGEnableCap; +}; + +Game_System.prototype.damageRate = function() { + if (this._damageRate === undefined) this.resetDamageSettings(); + return this._damageRate; +}; + +Game_System.prototype.flatDamage = function() { + if (this._flatDamage === undefined) this.resetDamageSettings(); + return this._flatDamage; +}; + +Game_System.prototype.healRate = function() { + if (this._healRate === undefined) this.resetDamageSettings(); + return this._healRate; +}; + +Game_System.prototype.flatHeal = function() { + if (this._flatHeal === undefined) this.resetDamageSettings(); + return this._flatHeal; +}; + +Game_System.prototype.isDamageCapped = function() { + return this._defaultDamageCap; +}; + +Game_System.prototype.maximumDamage = function() { + if (this._newDamageCap !== undefined) return this._newDamageCap; + return Yanfly.Param.DMGMaxDamage; +}; + +Game_System.prototype.maximumHealing = function() { + if (this._newHealingCap !== undefined) return this._newHealingCap; + return Yanfly.Param.DMGMaxHealing * -1; +}; + +Game_System.prototype.setNewDamageCap = function(value, damage) { + if (damage) { + this._newDamageCap = value; + } else { + this._newHealingCap = value * -1; + } +}; + +//============================================================================= +// Game_BattlerBase +//============================================================================= + +Yanfly.DMG.Game_BattlerBase_refresh = Game_BattlerBase.prototype.refresh; +Game_BattlerBase.prototype.refresh = function() { + Yanfly.DMG.Game_BattlerBase_refresh.call(this); + this.resetDMGTempValues(); +}; + +Game_BattlerBase.prototype.resetDMGTempValues = function() { + this._isDMGCapped = undefined; + this._maximumDamage = undefined; + this._maximumHealing = undefined; +}; + +//============================================================================= +// Game_Battler +//============================================================================= + +Yanfly.DMG.Game_Battler_performActionEnd = + Game_Battler.prototype.performActionEnd; +Game_Battler.prototype.performActionEnd = function() { + Yanfly.DMG.Game_Battler_performActionEnd.call(this); + $gameSystem.resetDamageSettings(); +}; + +Game_Battler.prototype.isDamageCapped = function() { + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state && state.breakDamageCap) return this._isDMGCapped = false; + } + return this._isDMGCapped = $gameSystem.isDamageCapped(); +}; + +Game_Battler.prototype.maximumDamage = function() { + var value = $gameSystem.maximumDamage(); + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state && state.damageCap) value = Math.max(value, state.damageCap); + } + return value; +}; + +Game_Battler.prototype.maximumHealing = function() { + var value = $gameSystem.maximumHealing(); + for (var i = 0; i < this.states().length; ++i) { + var state = this.states()[i]; + if (state && state.healCap) value = Math.min(value, state.healCap); + } + return value; +}; + +//============================================================================= +// Game_Actor +//============================================================================= + +Game_Actor.prototype.isDamageCapped = function() { + if (this._isDMGCapped !== undefined) return this._isDMGCapped; + if (this.actor().breakDamageCap) return this._isDMGCapped = false; + if (this.currentClass().breakDamageCap) return this._isDMGCapped = false; + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.breakDamageCap) return this._isDMGCapped = false; + } + return Game_Battler.prototype.isDamageCapped.call(this); +}; + +Game_Actor.prototype.maximumDamage = function() { + if (this._maximumDamage !== undefined) return this._maximumDamage; + var value = Game_Battler.prototype.maximumDamage.call(this); + if (this.actor().damageCap) { + value = Math.max(value, this.actor().damageCap); + } + if (this.currentClass().damageCap) { + value = Math.max(value, this.currentClass().damageCap); + } + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.damageCap) value = Math.max(value, equip.damageCap); + } + return this._maximumDamage = value; +}; + +Game_Actor.prototype.maximumHealing = function() { + if (this._maximumHealing !== undefined) return this._maximumHealing; + var value = Game_Battler.prototype.maximumHealing.call(this); + if (this.actor().healCap) { + value = Math.min(value, this.actor().healCap); + } + if (this.currentClass().healCap) { + value = Math.min(value, this.currentClass().healCap); + } + for (var i = 0; i < this.equips().length; ++i) { + var equip = this.equips()[i]; + if (equip && equip.healCap) value = Math.min(value, equip.healCap); + } + return this._maximumHealing = value; +}; + +//============================================================================= +// Game_Enemy +//============================================================================= + +Game_Enemy.prototype.isDamageCapped = function() { + if (this._isDMGCapped !== undefined) return this._isDMGCapped; + if (this.enemy().breakDamageCap) return this._isDMGCapped = false; + return Game_Battler.prototype.isDamageCapped.call(this); +}; + +Game_Enemy.prototype.maximumDamage = function() { + if (this._maximumDamage !== undefined) return this._maximumDamage; + var value = Game_Battler.prototype.maximumDamage.call(this); + if (this.enemy().damageCap) { + value = Math.max(value, this.enemy().damageCap); + } + return this._maximumDamage = value; +}; + +Game_Enemy.prototype.maximumHealing = function() { + if (this._maximumHealing !== undefined) return this._maximumHealing; + var value = Game_Battler.prototype.maximumHealing.call(this); + if (this.enemy().healCap) { + value = Math.min(value, this.enemy().healCap); + } + return this._maximumHealing = value; +}; + +//============================================================================= +// Game_Action +//============================================================================= + +Game_Action.prototype.makeDamageValue = function(target, critical) { + var item = this.item(); + var a = this.subject(); + var b = target; + var user = this.subject(); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var baseDamage = this.evalDamageFormula(target); + var value = baseDamage; + try { + eval(Yanfly.DMG.DamageFlow); + } catch (e) { + Yanfly.Util.displayError(e, Yanfly.DMG.DamageFlow, 'DAMAGE FLOW ERROR'); + } + return Math.round(value); +}; + +Game_Action.prototype.evalDamageFormula = function(target) { + try { + var item = this.item(); + var a = this.subject(); + var b = target; + var user = this.subject(); + var subject = this.subject(); + var s = $gameSwitches._data; + var v = $gameVariables._data; + var sign = ([3, 4].contains(item.damage.type) ? -1 : 1); + var value = 0; + if (item.damage.custom) { + eval(item.damage.formula); + value = Math.max(value, 0) * sign; + } else { + value = Math.max(eval(item.damage.formula), 0) * sign; + } + return value; + } catch (e) { + if (item.damage.custom) { + Yanfly.Util.displayError(e, item.damage.custom, 'DAMAGE FORMULA ERROR'); + } else { + Yanfly.Util.displayError(e, item.damage.formula, 'DAMAGE FORMULA ERROR'); + } + return 0; + } +}; + +Game_Action.prototype.modifyCritical = function(critical, baseDamage, target) { + return critical; +}; + +Game_Action.prototype.modifyBaseDamage = function(value, baseDamage, target) { + return baseDamage; +}; + +Game_Action.prototype.applyDamageRate = function(value, baseDamage, target) { + value *= $gameSystem.damageRate(); + value = Math.max(0, value); + return value; +}; + +Game_Action.prototype.applyHealRate = function(value, baseDamage, target) { + value *= $gameSystem.healRate(); + value *= target.rec; + value = Math.min(0, value); + return value; +}; + +Game_Action.prototype.applyCriticalRate = function(value, baseDamage, target) { + value = this.applyCritical(value); + return value; +}; + +Game_Action.prototype.applyPhysicalRate = function(value, baseDamage, target) { + value *= target.pdr; + return value; +}; + +Game_Action.prototype.applyFlatPhysical = function(value, baseDamage, target) { + return value; +}; + +Game_Action.prototype.applyMagicalRate = function(value, baseDamage, target) { + value *= target.mdr; + return value; +}; + +Game_Action.prototype.applyFlatMagical = function(value, baseDamage, target) { + return value; +}; + +Game_Action.prototype.applyFlatDamage = function(value, baseDamage, target) { + value += $gameSystem.flatDamage(); + return value; +}; + +Game_Action.prototype.applyFlatHeal = function(value, baseDamage, target) { + value -= $gameSystem.flatHeal(); + return value; +}; + +Game_Action.prototype.applyFlatCritical = function(value, baseDamage, target) { + return value; +}; + +Game_Action.prototype.applyFlatGlobal = function(value, baseDamage, target) { + return value; +}; + +Game_Action.prototype.applyMinimumDamage = function(value, baseDamage, target) { + if (baseDamage > 0) { + value = Math.max(0, value); + } else if (baseDamage < 0) { + value = Math.min(0, value); + } + if (this.isDamageCapped()) { + if ($gameSystem.getActSeqDamageCap() !== undefined) { + var min = $gameSystem.getActSeqDamageCap() * -1; + var max = $gameSystem.getActSeqDamageCap(); + } else if (this.item().damageCap) { + var min = this.item().damageCap * -1; + var max = this.item().damageCap; + } else { + var min = this.subject().maximumHealing(); + var max = this.subject().maximumDamage(); + } + value = value.clamp(min, max); + } + return value; +}; + +Game_Action.prototype.isDamageCapped = function() { + var item = this.item(); + if ($gameSystem.getActSeqBypassDamageCap()) return false; + if ($gameSystem.getActSeqDamageCap() !== undefined) return true; + if (item.damageCap !== undefined) return true; + if (item.breakDamageCap) return false; + return this.subject().isDamageCapped(); +}; + +Yanfly.DMG.Game_Action_executeHpDamage = Game_Action.prototype.executeHpDamage; +Game_Action.prototype.executeHpDamage = function(target, value) { + value = this.applyMinimumDamage(value, value, target); + Yanfly.DMG.Game_Action_executeHpDamage.call(this, target, value); +}; + +Yanfly.DMG.Game_Action_executeMpDamage = Game_Action.prototype.executeMpDamage; +Game_Action.prototype.executeMpDamage = function(target, value) { + value = this.applyMinimumDamage(value, value, target); + Yanfly.DMG.Game_Action_executeMpDamage.call(this, target, value); +}; + +//============================================================================= +// Game_Interpreter +//============================================================================= + +Yanfly.DMG.Game_Interpreter_pluginCommand = + Game_Interpreter.prototype.pluginCommand; +Game_Interpreter.prototype.pluginCommand = function(command, args) { + Yanfly.DMG.Game_Interpreter_pluginCommand.call(this, command, args) + if (command === 'SetDamageCap') this.setDamageCap(args); + if (command === 'SetHealingCap') this.setHealingCap(args); + if (command === 'EnableDamageCap') this.setDefaultDamageCap(true); + if (command === 'DisableDamageCap') this.setDefaultDamageCap(false); +}; + +Game_Interpreter.prototype.setDamageCap = function(args) { + $gameSystem.setNewDamageCap(parseInt(args[0]), true); +}; + +Game_Interpreter.prototype.setHealingCap = function(args) { + $gameSystem.setNewDamageCap(parseInt(args[0]), false); +}; + +Game_Interpreter.prototype.setDefaultDamageCap = function(value) { + $gameSystem._defaultDamageCap = value; +}; + +//============================================================================= +// Utilities +//============================================================================= + +Yanfly.Util = Yanfly.Util || {}; + +Yanfly.Util.displayError = function(e, code, message) { + console.log(message); + console.log(code || 'NON-EXISTENT'); + console.error(e); + if (Utils.isNwjs() && Utils.isOptionValid('test')) { + if (!require('nw.gui').Window.get().isDevToolsOpen()) { + require('nw.gui').Window.get().showDevTools(); + } + } +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_EventChasePlayer.js b/js/plugins/YEP_EventChasePlayer.js new file mode 100644 index 0000000..d3f2e50 --- /dev/null +++ b/js/plugins/YEP_EventChasePlayer.js @@ -0,0 +1,405 @@ +//============================================================================= +// Yanfly Engine Plugins - Event Chase Player +// YEP_EventChasePlayer.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_EventChasePlayer = true; + +var Yanfly = Yanfly || {}; +Yanfly.ECP = Yanfly.ECP || {}; +Yanfly.ECP.version = 1.05; + +//============================================================================= + /*: + * @plugindesc v1.05 事件追逐☁️ + * @author Yanfly Engine Plugins + * + * @param Sight Lock + * @text 瞄准器 + * @desc This is the number of frames for how long an event chases + * the player if 'this._seePlayer = true' is used. + * @default 300 + * + * @param See Player + * @text 见玩家 + * @desc Does the event have to be able to see the player by default? + * NO - false YES - true + * @default true + * + * @param Alert Timer + * @text 警报计时器 + * @desc This is the number of frames that must occur before the + * alert balloon will show up on the same event. + * @default 120 + * + * @param Alert Balloon + * @text 警示气球 + * @desc This is the default balloon used when the player is seen. + * Refer to balloon ID's. + * @default 1 + * + * @param Alert Sound + * @text 警报声 + * @desc This is the default sound played when the player is seen. + * @default Attack1 + * + * @param Alert Common Event + * @text 警报常见事件 + * @desc The default common event played when the player is seen. + * Use 0 if you do not wish to use a Common Event. + * @default 0 + * + * @param Return After + * @text 之后返回 + * @desc After chasing/fleeing from a player, the event returns + * to its original spot. NO - false YES - true + * @default true + * + * @param Return Wait + * @text 返回等待 + * @desc The frames to wait after finishing a chase/flee. + * @default 180 + * + * @help + * ============================================================================ + * Introduction + * ============================================================================ + * + * 目前事件只拥有传统乏味的移动行为。他们站在一个地方,追寻你,远离你,随 + * 机移动,或者在一个设定路径行走。这个插件让你的事件可以迅速切换靠近角色 + * 和远离角色. + * 在你靠近事件范围或者事件看到角色时,这个插件可以让你的事件追寻或者逃离 + * 角色。 + * + * ============================================================================ + * How to Use + * ============================================================================ + * + * 把下面这些脚本语句插入事件移动路线里,让其生效。 + * + * Note: This doesn’t work with players.注意:这些对角色不生效。 + * + * Script Call lines + * this._chaseRange = x 如果角色距离事件x,事件追逐角色。 + * this._fleeRange = x 如果角色距离事件x,事件逃离角色。 + * this._chaseSpeed = x 事件追逐速度 + * this._fleeSpeed = x 事件逃离速度 + * this._sightLock = x 事件追逐或者逃离角色时间 + * this._seePlayer = true 需要事件能够看到角色 + * this._seePlayer = false 不需要事件能够看到角色 + * this._alertBalloon = x 当看到角色时弹出对白框 + * this._alertSound = x 当看到角色时播放音乐 + * this._alertSoundVol = x 当看到角色时播放音乐的音量 + * this._alertSoundPitch = x The pitch used by the alert sound. + * this._alertSoundPan = x The pan used by the alert sound. + * this._alertCommonEvent = x 当看到角色时执行公共事件 + * this._returnAfter = true Returns the event back to its original spot. + * this._returnAfter = false Event stays where it is when finished chasing. + * this._returnWait = x How long event waits after finishing chase/flee. + * + * 这个最适合用来自定义移动路线的速度。记住这个效果需要事件被设置为移动 + * 这意味着载入地图时,如果事件没有被载入命令,这个事件永远不会追逐角色。 + * + * ============================================================================ + * Changelog + * ============================================================================ + * + * Version 1.05: + * - Optimization update. + * + * Version 1.04: + * - Fixed a bug with this._seePlayer causing them to see stealthed players. + * + * Version 1.03: + * - Improved pathfinding for chasing events. They will get stuck less by walls + * and/or events that may be blocking the event. + * - Added random factor for fleeing events. Fleeing events won't simply just + * run away 180 degrees away from the player. They will sometimes move in a + * random direction. + * + * Version 1.02: + * - Added 'Return After' parameter where events will return to their original + * spot after chasing/fleeing from a player. + * - Added 'Return Wait' parameter to determine how long an event will wait in + * place before returning after a finished chase/flee. + * - Added 'this._returnAfter' and 'this._returnWait' to the list of available + * movement route script calls. + * + * Version 1.01: + * - Added 'this._alertSoundPitch' 'this._alertSoundVol' 'this._alertSoundPan' + * to the settings you can alter to adjust the alert sound. + * + * Version 1.00: + * - Finished Plugin! + */ +//============================================================================= + +//============================================================================= +// Parameter Variables +//============================================================================= + +Yanfly.Parameters = PluginManager.parameters('YEP_EventChasePlayer'); +Yanfly.Param = Yanfly.Param || {}; + +Yanfly.Param.ECPSightLock = Number(Yanfly.Parameters['Sight Lock']); +Yanfly.Param.ECPSeePlayer = String(Yanfly.Parameters['See Player']); +Yanfly.Param.ECPSeePlayer = eval(Yanfly.Param.ECPSeePlayer); +Yanfly.Param.ECPAlertTimer = Number(Yanfly.Parameters['Alert Timer']); +Yanfly.Param.ECPAlertBalloon = Number(Yanfly.Parameters['Alert Balloon']); +Yanfly.Param.ECPAlertSound = String(Yanfly.Parameters['Alert Sound']); +Yanfly.Param.ECPAlertEvent = Number(Yanfly.Parameters['Alert Common Event']); +Yanfly.Param.ECPReturn = eval(String(Yanfly.Parameters['Return After'])); +Yanfly.Param.ECPReturnWait = Number(Yanfly.Parameters['Return Wait']); + +//============================================================================= +// Main Code +//============================================================================= + +Yanfly.ECP.Game_Event_setupPage = Game_Event.prototype.setupPage; +Game_Event.prototype.setupPage = function() { + Yanfly.ECP.Game_Event_setupPage.call(this); + this.clearChaseSettings(); +}; + +Game_Event.prototype.clearChaseSettings = function() { + this._alertBalloon = Yanfly.Param.ECPAlertBalloon; + this._alertCommonEvent = Yanfly.Param.ECPAlertEvent; + this._alertLock = 0; + this._alertPlayer = false; + this._alertSound = Yanfly.Param.ECPAlertSound; + this._alertSoundVol = 100; + this._alertSoundPitch = 100; + this._alertSoundPan = 0; + this._alertTimer = 0; + this._chasePlayer = false; + this._chaseRange = 0; + this._chaseSpeed = this._moveSpeed; + this._defaultSpeed = this._moveSpeed; + this._fleePlayer = false; + this._fleeRange = 0; + this._fleeSpeed = this._moveSpeed; + this._seePlayer = Yanfly.Param.ECPSeePlayer; + this._sightLock = Yanfly.Param.ECPSightLock; + this._returnAfter = Yanfly.Param.ECPReturn; + this._returnWait = Yanfly.Param.ECPReturnWait; + this._returnPhase = false; + this._returnFrames = 0; + this._startLocationX = this.x; + this._startLocationY = this.y; + this._startLocationDir = this._direction; +}; + +Yanfly.ECP.Game_Event_updateSelfMovement = + Game_Event.prototype.updateSelfMovement; +Game_Event.prototype.updateSelfMovement = function() { + if (Imported.YEP_StopAllMove && $gameSystem.isEventMoveStopped()) return; + this.updateChaseDistance(); + this.updateFleeDistance(); + this.updateChaseMovement(); +}; + +Yanfly.ECP.Game_Event_update = Game_Event.prototype.update; +Game_Event.prototype.update = function() { + Yanfly.ECP.Game_Event_update.call(this); + this.updateAlert(); + this.updateReturnPhase(); +}; + +Game_Event.prototype.canSeePlayer = function() { + if (!this._seePlayer) return false; + var sx = this.deltaXFrom($gamePlayer.x); + var sy = this.deltaYFrom($gamePlayer.y); + if (Math.abs(sx) > Math.abs(sy)) { + var direction = (sx > 0) ? 4 : 6; + } else { + var direction = (sy > 0) ? 8 : 2; + } + if (direction === this.direction()) { + this._alertLock = this._sightLock; + return true; + } + return false; +}; + +Game_Event.prototype.updateChaseDistance = function() { + if (this._erased) return; + if (this._chaseRange <= 0) return; + var dis = Math.abs(this.deltaXFrom($gamePlayer.x)); + dis += Math.abs(this.deltaYFrom($gamePlayer.y)); + if (this.chaseConditions(dis)) { + this.startEventChase(); + } else if (this._chasePlayer) { + this.endEventChase(); + } +}; + +Game_Event.prototype.chaseConditions = function(dis) { + if (dis <= this._chaseRange && this.nonSeePlayer()) { + this._alertLock = this._sightLock; + return true; + } + if (this._alertLock > 0) return true; + if (dis <= this._chaseRange && this.canSeePlayer()) return true; + return false; +}; + +Game_Event.prototype.nonSeePlayer = function() { + if (Imported.YEP_X_EventChaseStealth) { + if (this.meetStealthModeConditions()) { + this.stealthClearChaseSettings(); + this._stopCount = 0; + return false; + } + } + return !this._seePlayer; +}; + +Game_Event.prototype.startEventChase = function() { + this._chasePlayer = true; + this.setMoveSpeed(this._chaseSpeed); +}; + +Game_Event.prototype.endEventChase = function() { + this._chasePlayer = false; + this.setMoveSpeed(this._defaultSpeed); + if (this._alertTimer <= 0) this._alertPlayer = false; + this.startReturnPhase(); +}; + +Game_Event.prototype.updateFleeDistance = function() { + if (this._erased) return; + if (this._fleeRange <= 0) return; + var dis = Math.abs(this.deltaXFrom($gamePlayer.x)); + dis += Math.abs(this.deltaYFrom($gamePlayer.y)); + if (this.fleeConditions(dis)) { + this.startEventFlee(); + } else if (this._fleePlayer) { + this.endEventFlee(); + } +}; + +Game_Event.prototype.fleeConditions = function(dis) { + if (this._alertLock > 0) return true; + if (dis <= this._fleeRange && this.canSeePlayer()) return true; + if (dis <= this._fleeRange && !this._seePlayer) { + this._alertLock = this._sightLock; + return true; + } + return false; +}; + +Game_Event.prototype.startEventFlee = function() { + this._fleePlayer = true; + this.setMoveSpeed(this._fleeSpeed); +}; + +Game_Event.prototype.endEventFlee = function() { + this._fleePlayer = false; + this.setMoveSpeed(this._defaultSpeed); + if (this._alertTimer <= 0) this._alertPlayer = false; + this.startReturnPhase(); +}; + +Game_Event.prototype.updateChaseMovement = function() { + if (this._stopCount > 0 && this._chasePlayer) { + var direction = this.findDirectionTo($gamePlayer.x, $gamePlayer.y); + if (direction > 0) this.moveStraight(direction); + } else if (this._stopCount > 0 && this._fleePlayer) { + this.updateFleeMovement(); + } else if (this._returnPhase) { + this.updateMoveReturnAfter(); + } else { + Yanfly.ECP.Game_Event_updateSelfMovement.call(this); + } +}; + +Game_Event.prototype.updateFleeMovement = function() { + switch (Math.randomInt(6)) { + case 0: case 1: case 2: case 3: case 4: + this.moveAwayFromPlayer(); + break; + case 5: + this.moveRandom(); + break; + } +}; + +Game_Event.prototype.updateAlert = function() { + if (this._erased) return; + this._alertLock--; + if (this.alertConditions()) this.activateAlert(); + if (this._alertPlayer) this._alertTimer--; +}; + +Game_Event.prototype.alertConditions = function() { + return (this._chasePlayer || this._fleePlayer) && !this._alertPlayer; +}; + +Game_Event.prototype.activateAlert = function() { + if (this._alertBalloon >= 0) this.requestBalloon(this._alertBalloon); + this._alertPlayer = true; + this._alertTimer = Yanfly.Param.ECPAlertTimer; + this.playAlertSound(); + this.playAlertCommonEvent(); +}; + +Game_Event.prototype.playAlertSound = function() { + if (this._alertSound === '') return; + var sound = { + name: this._alertSound, + volume: this._alertSoundVol, + pitch: this._alertSoundPitch, + pan: this._alertSoundPan + }; + AudioManager.playSe(sound); +}; + +Game_Event.prototype.playAlertCommonEvent = function() { + if (this._alertCommonEvent <= 0) return; + $gameTemp.reserveCommonEvent(this._alertCommonEvent); +}; + +Game_Event.prototype.startReturnPhase = function() { + if (!this._returnAfter) return; + this._returnPhase = true; + this._returnFrames = this._returnWait; +}; + +Game_Event.prototype.updateReturnPhase = function() { + if (this._returnPhase) this._returnFrames--; +}; + +Game_Event.prototype.updateMoveReturnAfter = function() { + if (this._returnFrames > 0) return; + var sx = this.deltaXFrom(this._startLocationX); + var sy = this.deltaYFrom(this._startLocationY); + if (Math.abs(sx) > Math.abs(sy)) { + if (Math.randomInt(6) <= 4) { + this.moveStraight(sx > 0 ? 4 : 6); + if (!this.isMovementSucceeded() && sy !== 0) { + this.moveStraight(sy > 0 ? 8 : 2); + } + } else { + this.moveRandom(); + } + } else if (sy !== 0) { + if (Math.randomInt(6) <= 4) { + this.moveStraight(sy > 0 ? 8 : 2); + if (!this.isMovementSucceeded() && sx !== 0) { + this.moveStraight(sx > 0 ? 4 : 6); + } + } else { + this.moveRandom(); + } + } + if (sx === 0 && sy === 0) { + this._returnPhase = false; + this._returnFrames = 0; + this._direction = this._startLocationDir; + } +}; + +//============================================================================= +// End of File +//============================================================================= diff --git a/js/plugins/YEP_OptionsCore.js b/js/plugins/YEP_OptionsCore.js new file mode 100644 index 0000000..377f7ce --- /dev/null +++ b/js/plugins/YEP_OptionsCore.js @@ -0,0 +1,922 @@ +//============================================================================= +// Yanfly Engine Plugins - Options Core +// YEP_OptionsCore.js +//============================================================================= + +var Imported = Imported || {}; +Imported.YEP_OptionsCore = true; + +var Yanfly = Yanfly || {}; +Yanfly.Options = Yanfly.Options || {}; +Yanfly.Options.version = 1.01; + +//============================================================================= +/*: +* @plugindesc v1.01 选项核心☁️ +* @author Yanfly Engine Plugins +* +* @help +* ============================================================================ +* Introduction +* ============================================================================ +* +* 警告:此插件将与RPG Maker MV 1.5.0或更高版本一起使用! +* 这是因为MV 1.5.0+编辑器允许以有序和高效的方式制作插件。 +* 请确保您的RPG Maker MV软件在使用此插件前是最新的。 +* +* 选项菜单可以改变玩家在游戏中的设置。在选项菜单中,玩家可以根据自己 +* 的喜好改变任何设置以适应他们的游戏风格。 +* 默认情况下,RPG Maker MV中包含“Always Dash”和“Command Remember”等设置, +* 为MV制作的其他插件也可能会将更新的选项添加到列表中。 +* 但是,菜单本身总是有点不便,无法便捷查看或调整。 +* 这个插件可以设置选项菜单的选项以适应游戏! +* +* 这个插件支持以下插件: +* - GamepadConfig.js +* - YEP_AnimateTilesOption.js +* - YEP_BattleAniSpeedOpt.js +* - YEP_FpsSynchOption.js +* - YEP_KeyboardConfig.js +* - YEP_X_ActSeqPack3.js +* - YEP_X_BattleSysATB.js +* - YEP_X_DifficultySlider.js +* +* 请将它们更新到最新版本,以便与Options Core具有兼容性。 +* +* ============================================================================ +* 说明-选项类别插件参数 +* ============================================================================ +* +* 该插件将“选项类别”添加到选项菜单中。除了“全部”和“退出”类别之外, +* 所有类别都自定义显示。 +* +* 以下是每个参数的介绍: +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* Name: +* - 名称:- 确定显示的类别名称。按照您认为合适的名称重命名类别。 +* 您可以使用此参数的文本代码,允许您添加图标(\ i [x])或更改类别 +* 文本颜色(\ c [x])。 +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* Help Description: +* - 帮助说明:- 这是帮助中显示在选项菜单的顶部。 +* 用它来描述此类别中将出现哪些选项以及它们将如何影响游戏。 +* 您也可以使用此参数的文本代码。 +* +* Options List: +* - 选项列表:- 这是显示出现在选项菜单右侧的选项列表。 +* 您可以添加,编辑,移动或删除此列表中的选项。 +* 有关选项列表的插件参数如何工作的详细信息,请参阅下面的下一部分: +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* ============================================================================ +* 说明-选项列表插件参数 +* ============================================================================ +* +* 本节介绍Options List的插件参数以及它们如何交互。 +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* Name: +* - 名称:- 确定选项名称的显示名称。请重命名该选项。这不会默认 +* 使用其他插件提供的命令名称。您可以使用此参数的文本代码, +* 允许您添加图标(\ i [x])或更改选项的文本颜色(\ c [x])。 +* +* 如果您将此名称命名为'EVAL:code'而不带'引号',则此选项的 +* 名称将为代码输出的任何字符串。 +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* Help Description: +* - 帮助说明:- 这是帮助中显示的在选项菜单的顶部文字,用它来描述 +* 这个选项在游戏中的变化。 +* +* --- +* +* Symbol: +* - 符号:- 这是选项的标识符。每个选项都应该有一个唯一的符号, +* 以免在选项设置中导致冲突。但是,只要您选择时执行相同的功能,您就 +* 可以使用共享符号。 +* +* --- +* +* Show/Hide: +* - 显示/隐藏:- 这是用于确定此选项是否可见。 +* +* 确保它始终显示,请使用以下代码: +* show = true; +* +* --- +* +* Enable: +* - 启用:- 这是用于确定是否启用此选项的代码。 +* 建议您将所有选项保留为启用状态。 +* +* 要确保它始终处于启用状态,请使用以下代码: +* enabled = true; +* +* --- +* +* Ext: +* - 分机:- 代表分机。 +* 这是该选项的第二个符号,它几乎可以用于任何事情。 +* 它对选项没有直接的影响。 +* +* To leave it alone the following code: +* ext = 0; +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* 如果您不熟悉编程,以下部分最好不要触动任何JS代码,这是因为 +* 所有与选项有关的行为都可以从这里控制,而错误会导致游戏崩溃。 +* +* Make Command Code: +* - 制作命令代码:- 这是用于将选项命令添加到选项列表的代码。 +* 使用它来修改名称,符号(如果已启用),或在最终将其添加到 +* 列表之前更改ext值。 +* +* The default code: +* this.addCommand(name, symbol, enabled, ext); +* +* --- +* +* Draw Option Code: +* - 绘制选项代码:- 这是如何将选项“绘制”到“选项”窗口 +* 并由玩家看到的。这里的一切都控制着选项从命名方式到文本位置的方式。 +* 为了方便起见,将定义在默认代码开始处的大部分变量放在那里。 +* +* The default code: +* var rect = this.itemRectForText(index); +* var statusWidth = this.statusWidth(); +* var titleWidth = rect.width - statusWidth; +* this.resetTextColor(); +* this.changePaintOpacity(this.isCommandEnabled(index)); +* this.drawOptionsName(index); +* this.drawOptionsOnOff(index); +* +* --- +* +* Process OK Code: +* - 处理OK代码:- 这是当玩家在此选项上按下任何种类的确认按钮 +* (Z,Enter,Left Click)时运行的代码。对于大多数选项, +* 这将在ON / OFF选项之间切换,或者循环选项。 +* +* The default code: +* +* The default code: +* var index = this.index(); +* var symbol = this.commandSymbol(index); +* var value = this.getConfigValue(symbol); +* this.changeValue(symbol, !value); +* +* --- +* +* Cursor Right Code: +* - 光标右代码:- 这是当玩家按下右键按钮时运行的代码。 +* 通常情况下,这会将大部分选项移至ON位置,或者选择上一个。 +* +* The default code: +* var index = this.index(); +* var symbol = this.commandSymbol(index); +* var value = this.getConfigValue(symbol); +* this.changeValue(symbol, true); +* +* --- +* +* Cursor Left Code: +* - 光标左代码:- 这是当玩家按下左键时运行的代码。 +* 通常情况下,这会将大多数选项移至OFF位置,选择下一个。 +* +* The default code: +* var index = this.index(); +* var symbol = this.commandSymbol(index); +* var value = this.getConfigValue(symbol); +* this.changeValue(symbol, false); +* +* --- +* +* Default Config Code: +* - 默认配置代码:- 创建新选项时,这决定了选项的默认值。 +* 对于大多数选项来说,这从OFF位置开始,通常由“假”布尔值表示。 +* +* The default code: +* ConfigManager[symbol] = false; +* +* --- +* +* Save Config Code: +* - This 保存配置代码:- 这决定了如何通过代码保存选项设置。 +* 通常情况下,它的值与ConfigManager相同。 +* +* The default code: +* config[symbol] = ConfigManager[symbol]; +* +* --- +* +* Load Config Code: +* - 加载配置代码:- 这决定了ConfigManager在加载游戏时如何加载保存 +* 的选项设置。通常情况下,这会采用配置 +* 文件中存储的任何设置,并直接将其直接植入ConfigManager中。 +* +* The default code: +* ConfigManager[symbol] = !!config[symbol]; +* +* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +* +* ============================================================================ +* Changelog +* ============================================================================ +* +* Version 1.01: +* - Updated for Message Speed Options. +* +* Version 1.00: +* - Finished Plugin! +* +* ============================================================================ +* End of Helpfile +* ============================================================================ +* +* @param ---Categories--- +* @default +* +* @param OptionsCategories +* @text 选项类别 +* @parent ---Categories--- +* @type struct[] +* @desc 在"选项"场景中找到的类别。 +* @default ["{\"Name\":\"\\\\i[87]General\",\"---Settings---\":\"\",\"HelpDesc\":\"\\\"General settings that alter the way the game behaves.\\\"\",\"OptionsList\":\"[\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Always Dash\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Player walks when OFF. Player dashes when ON.\\\\\\\\\\\\\\\\nHolding SHIFT switches between walking and dashing.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"alwaysDash\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = config[symbol];\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Command Remember\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Game remembers the last command selected during battle.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"commandRemember\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = config[symbol];\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]ATB Speed\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Determines how fast the ATB Gauge fills up during battle.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"atbSpeed\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"if (Imported.YEP_X_BattleSysATB) {\\\\\\\\\\\\\\\\n show = $gameSystem.getBattleSystem() === 'atb';\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / 10;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(13);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(5);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\nif (value > 10) value = 1;\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\nif (value > 10) value = 1;\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\nif (value < 1) value = 10;\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Enemy Difficulty\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Determines the level strength of enemies.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"difficultySlider\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"if (Imported.YEP_X_DifficultySlider) {\\\\\\\\\\\\\\\\n show = $gameSystem.showDifficultySlider();\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / Yanfly.Param.DSliderMaxDif;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(28);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(29);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += Yanfly.Param.DSliderChange;\\\\\\\\\\\\\\\\nif (value > Yanfly.Param.DSliderMaxDif) value = Yanfly.Param.DSliderMinDif;\\\\\\\\\\\\\\\\nvalue = value.clamp(Yanfly.Param.DSliderMinDif, Yanfly.Param.DSliderMaxDif);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += Yanfly.Param.DSliderChange;\\\\\\\\\\\\\\\\nvalue = value.clamp(Yanfly.Param.DSliderMinDif, Yanfly.Param.DSliderMaxDif);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= Yanfly.Param.DSliderChange;\\\\\\\\\\\\\\\\nvalue = value.clamp(Yanfly.Param.DSliderMinDif,\\\\\\\\\\\\\\\\nYanfly.Param.DSliderMaxDif);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Message Speed\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Changes the speed text is displayed during messages.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"messageSpeed\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = Imported.YEP_X_MessageSpeedOpt;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = ((value) / 10).clamp(0, 1);\\\\\\\\\\\\\\\\nif (value > 10) {\\\\\\\\\\\\\\\\n var gaugeColor1 = this.textColor(14);\\\\\\\\\\\\\\\\n var gaugeColor2 = this.textColor(6);\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n var gaugeColor1 = this.textColor(20);\\\\\\\\\\\\\\\\n var gaugeColor2 = this.textColor(21);\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\nif (value > 11) value = 0;\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 11);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 11);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 11);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[87]Quest Window\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Show a window displaying the currently active\\\\\\\\\\\\\\\\nquest on the screen while exploring.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"mapQuestWindow\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = Imported.YEP_X_MapQuestWindow;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\" \\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"none\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}","{\"Name\":\"\\\\i[80]Audio\",\"---Settings---\":\"\",\"HelpDesc\":\"\\\"Adjust the audio settings for the game.\\\"\",\"OptionsList\":\"[\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[80]Master Volume\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Adjusts the overall volume of the game.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"masterVolume\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(22);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(23);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[80]BGM Volume\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Adjusts the volume of the background music.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"bgmVolume\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[80]BGS Volume\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Adjusts the volume of the background sound effects.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"bgsVolume\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[80]ME Volume\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Adjusts the volume of the melody effects\\\\\\\\\\\\\\\\nsuch as fanfares.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"meVolume\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[80]SE Volume\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Adjusts the volume of the sound effects.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"seVolume\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvar rate = value / 100;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(30);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(31);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nif (value > 100) {\\\\\\\\\\\\\\\\n value = 0;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= this.volumeOffset();\\\\\\\\\\\\\\\\nvalue = value.clamp(0, 100);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var value = config[symbol];\\\\\\\\\\\\\\\\nif (value !== undefined) {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = Number(value).clamp(0, 100);\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n ConfigManager[symbol] = 100;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\" \\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"none\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}","{\"Name\":\"\\\\i[302]Visual\",\"---Settings---\":\"\",\"HelpDesc\":\"\\\"Settings that adjust the visual properties of the game.\\\"\",\"OptionsList\":\"[\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[309]Window Tone: Red\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Changes the window tone's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[2]red\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] value.\\\\\\\\\\\\\\\\nHold SHIFT while pressing LEFT/RIGHT to adjust more.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"windowToneRed\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[0];\\\\\\\\\\\\\\\\nvar rate = (value + 255) / 510;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(2);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(10);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(value, titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $dataSystem.windowTone[0];\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'red');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[0];\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\nvalue += offset;\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'red');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[0];\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\nvalue -= offset;\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'red');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = !!config[symbol];\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[311]Window Tone: Green\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Changes the window tone's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[3]green\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] value.\\\\\\\\\\\\\\\\nHold SHIFT while pressing LEFT/RIGHT to adjust more.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"windowToneGreen\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[1];\\\\\\\\\\\\\\\\nvar rate = (value + 255) / 510;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(3);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(11);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(value, titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $dataSystem.windowTone[1];\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'green');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[1];\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\nvalue += offset;\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'green');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[1];\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\nvalue -= offset;\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'green');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = !!config[symbol];\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[312]Window Tone: Blue\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Changes the window tone's \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[1]blue\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\c[0] value.\\\\\\\\\\\\\\\\nHold SHIFT while pressing LEFT/RIGHT to adjust more.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"windowToneBlue\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[2];\\\\\\\\\\\\\\\\nvar rate = (value + 255) / 510;\\\\\\\\\\\\\\\\nvar gaugeColor1 = this.textColor(1);\\\\\\\\\\\\\\\\nvar gaugeColor2 = this.textColor(9);\\\\\\\\\\\\\\\\nthis.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2);\\\\\\\\\\\\\\\\nthis.drawText(value, titleWidth, rect.y, statusWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $dataSystem.windowTone[2];\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'blue');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[2];\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\nvalue += offset;\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'blue');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = $gameSystem.windowTone()[2];\\\\\\\\\\\\\\\\nvar offset = this.windowToneOffset();\\\\\\\\\\\\\\\\nif (Input.isPressed('shift')) offset *= 10;\\\\\\\\\\\\\\\\nvalue -= offset;\\\\\\\\\\\\\\\\nthis.changeWindowTone(symbol, value, 'blue');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = false;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"config[symbol] = ConfigManager[symbol];\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ConfigManager[symbol] = !!config[symbol];\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\" \\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"none\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"if (Imported.YEP_StaticTilesOption) {\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\n} else if (Imported.YEP_BattleAniSpeedOpt) {\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\n} else if (Imported.YEP_X_ActSeqPack3) {\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\n} else if (Imported.YEP_SynchFpsOption) {\\\\\\\\\\\\\\\\n show = true;\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[302]Animated Tiles\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Turns animated tiles ON or OFF.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"animateTiles\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = Imported.YEP_StaticTilesOption;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[302]Battle Animation Speed\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Changes the speed of battle animations.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"battleAniSpeed\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = Imported.YEP_BattleAniSpeedOpt;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar quarterWidth = statusWidth / 4;\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 4);\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(4);\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 0, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 3);\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(3);\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 1, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 2);\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(2);\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 2, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\\nthis.changePaintOpacity(value === 1);\\\\\\\\\\\\\\\\nvar text = this.battleAnimationSpeedText(1);\\\\\\\\\\\\\\\\nthis.drawText(text, titleWidth + quarterWidth * 3, rect.y, quarterWidth, 'center');\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\nif (value <= 0) value = 4;\\\\\\\\\\\\\\\\nvalue = value.clamp(1, 4);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue -= 1;\\\\\\\\\\\\\\\\nvalue = value.clamp(1, 4);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nvalue += 1;\\\\\\\\\\\\\\\\nvalue = value.clamp(1, 4);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[302]Battle Camera\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"If ON, the camera in battle will move around.\\\\\\\\\\\\\\\\nIf OFF, the camera in battle will be locked in place.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"battleCamera\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = Imported.YEP_X_ActSeqPack3;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[302]Synch Monitor FPS\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Turn this ON if your monitor runs above 60 FPS\\\\\\\\\\\\\\\\nto synchronize the game to run at 60 FPS.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"synchFps\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = Imported.YEP_SynchFpsOption;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\\nthis.drawOptionsOnOff(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, !value);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, true);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var index = this.index();\\\\\\\\\\\\\\\\nvar symbol = this.commandSymbol(index);\\\\\\\\\\\\\\\\nvar value = this.getConfigValue(symbol);\\\\\\\\\\\\\\\\nthis.changeValue(symbol, false);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\" \\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"none\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}","{\"Name\":\"\\\\i[83]Controls\",\"---Settings---\":\"\",\"HelpDesc\":\"\\\"Change the way you can control the game.\\\"\",\"OptionsList\":\"[\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[83]Gamepad Config\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Configure the game's gamepad settings.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"gamepadConfig\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"if (Imported.GamepadConfig && Input.isControllerConnected()) {\\\\\\\\\\\\\\\\n show = !Utils.isMobileDevice();\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.playOkSound();\\\\\\\\\\\\\\\\nSceneManager.push(Scene_GamepadConfig);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\\i[83]Keyboard Config\\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"Configure the game's keyboard settings.\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"keyConfig\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"if (Imported.YEP_KeyboardConfig) {\\\\\\\\\\\\\\\\n show = !Utils.isMobileDevice();\\\\\\\\\\\\\\\\n} else {\\\\\\\\\\\\\\\\n show = false;\\\\\\\\\\\\\\\\n}\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"var rect = this.itemRectForText(index);\\\\\\\\\\\\\\\\nvar statusWidth = this.statusWidth();\\\\\\\\\\\\\\\\nvar titleWidth = rect.width - statusWidth;\\\\\\\\\\\\\\\\nthis.resetTextColor();\\\\\\\\\\\\\\\\nthis.changePaintOpacity(this.isCommandEnabled(index));\\\\\\\\\\\\\\\\nthis.drawOptionsName(index);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.playOkSound();\\\\\\\\\\\\\\\\nSceneManager.push(Scene_KeyConfig);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\",\\\"{\\\\\\\"Name\\\\\\\":\\\\\\\" \\\\\\\",\\\\\\\"---Settings---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"HelpDesc\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\" \\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Symbol\\\\\\\":\\\\\\\"none\\\\\\\",\\\\\\\"ShowHide\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"show = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Enable\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"enabled = true;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"Ext\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"ext = 0;\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"---Functions---\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"MakeCommandCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"this.addCommand(name, symbol, enabled, ext);\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DrawItemCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"ProcessOkCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorRightCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"CursorLeftCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"DefaultConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"SaveConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\",\\\\\\\"LoadConfigCode\\\\\\\":\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"}\\\"]\"}"] +* +* @param ---Options Menu--- +* @text ---选项菜单--- +* @default +* +* @param AllCommand +* @text 所有命令 +* @parent ---Options Menu--- +* @desc 用于 'All' 命令的字符串. +* 如果您不想使用此命令,请将此选项留空。 +* @default \i[160]All +* +* @param AllHelpDesc +* @text 所有帮助说明 +* @parent AllCommand +* @type note +* @desc 选择 'All' 时的帮助描述。 +* 您可以为此参数使用文本代码。 +* @default "游戏所有设置的列表。" +* +* @param ExitCommand +* @text 退出命令 +* @parent ---Options Menu--- +* @desc 用于 'Exit' 命令的字符串。 +* 如果您不想使用此命令,请将此选项留空。 +* @default \i[16]Exit +* +* @param ExitHelpDesc +* @text 退出帮助说明 +* @parent ExitCommand +* @type note +* @desc 选择 'Exit' 时的帮助描述。 +* 您可以为此参数使用文本代码。 +* @default "退出“选项”菜单。" +* +* @param ---Options Settings--- +* @text ---选项设置--- +* @default +* +* @param CategoryWidth +* @text 类别窗口宽度 +* @parent ---Options Settings--- +* @type number +* @min 1 +* @desc 选项菜单屏幕左侧的类别窗口的宽度。 +* @default 240 +* +* @param StatusWidth +* @text 状态宽度 +* @parent ---Options Settings--- +* @type number +* @min 1 +* @desc 用于选项状态宽度的空间量。 +* @default 400 +* +* @param VolumeOffset +* @text 体积偏移量 +* @parent ---Options Settings--- +* @type number +* @min 1 +* @max 100 +* @desc 调整音量时的变化量。. +* 默认: 20 +* @default 10 +* +* @param WindowToneOffset +* @text 窗口色调偏移 +* @parent ---Options Settings--- +* @type number +* @min 1 +* @max 255 +* @desc 调整窗口色调时的变化量。 +* @default 5 +* +*/ +/* ---------------------------------------------------------------------------- + * Categories Parameter Structure + * ---------------------------------------------------------------------------- + */ +/*~struct~Categories: + * @param Name + * @desc The name of this category as seen in the Category Window. + * You can use text codes for this parameter. + * @default 类别名称 + * + * @param ---Settings--- + * + * @param HelpDesc + * @text 帮助说明 + * @parent ---Settings--- + * @type note + * @desc The help description of this category when selected. + * You can use text codes for this parameter. + * @default "\n" + * + * @param OptionsList + * @text 选项列表 + * @parent ---Settings--- + * @type struct[] + * @desc The options used for this category. + * @default ["{\"Name\":\"Option 1\",\"---Settings---\":\"\",\"HelpDesc\":\"\\\"\\\\n