From 50a087aab8fc1dfedcdf734281b1296ff9cc0593 Mon Sep 17 00:00:00 2001 From: MalitsPlus Date: Tue, 8 Mar 2022 13:23:32 +0800 Subject: [PATCH] Add dungeon SP data Add new skill descriptions --- app/build.gradle | 4 +-- .../malitsplus/shizurunotes/data/Dungeon.kt | 11 ++++++- .../data/action/IfForAllAction.java | 4 +-- .../data/action/IfForChildrenAction.java | 4 ++- .../malitsplus/shizurunotes/db/DBHelper.kt | 32 +++++++++++++++---- .../shizurunotes/db/RawDungeon.java | 2 ++ .../shizurunotes/ui/dungeon/DungeonAdapter.kt | 1 + app/src/main/res/layout/list_item_dungeon.xml | 10 ++++++ app/src/main/res/values-zh/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 10 files changed, 57 insertions(+), 13 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7a8e8d1d..33634c25 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.github.malitsplus.shizurunotes" minSdk 26 targetSdk 30 - versionCode 63 - versionName "1.11.4" + versionCode 64 + versionName "1.12.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/app/src/main/java/com/github/malitsplus/shizurunotes/data/Dungeon.kt b/app/src/main/java/com/github/malitsplus/shizurunotes/data/Dungeon.kt index 9a8d6e7c..4f1a1b6d 100644 --- a/app/src/main/java/com/github/malitsplus/shizurunotes/data/Dungeon.kt +++ b/app/src/main/java/com/github/malitsplus/shizurunotes/data/Dungeon.kt @@ -4,7 +4,16 @@ class Dungeon( val dungeonAreaId: Int, val waveGroupId: Int, val enemyId: Int, + val mode: Int, val dungeonName: String, val description: String, val dungeonBoss: List -) \ No newline at end of file +) { + val modeText: String by lazy { + if (mode == 0) { + "" + } else { + "MODE$mode" + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForAllAction.java b/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForAllAction.java index fa0fedb1..efe2dbfd 100644 --- a/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForAllAction.java +++ b/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForAllAction.java @@ -16,7 +16,7 @@ protected void childInit() { ifType = IfType.parse(actionDetail1); if (actionDetail2 != 0){ - if(actionDetail1 == 710 || actionDetail1 == 100){ + if(actionDetail1 == 710 || actionDetail1 == 100 || actionDetail1 == 1700){ IfType ifType = IfType.parse(actionDetail1); if (ifType != null) trueClause = I18N.getString(R.string.use_d1_to_s2_if_s3, @@ -69,7 +69,7 @@ protected void childInit() { } if (actionDetail3 != 0){ - if(actionDetail1 == 710){ + if(actionDetail1 == 710 || actionDetail1 == 100 || actionDetail1 == 1700){ IfType ifType = IfType.parse(actionDetail1); if (ifType != null) falseClause = I18N.getString(R.string.use_d1_to_s2_if_not_s3, diff --git a/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForChildrenAction.java b/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForChildrenAction.java index 791d2199..d36e13d3 100644 --- a/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForChildrenAction.java +++ b/app/src/main/java/com/github/malitsplus/shizurunotes/data/action/IfForChildrenAction.java @@ -106,7 +106,8 @@ enum IfType{ poisonOrVenom(512), Break(710), polymorph(1400), - fear(1600); + fear(1600), + magicDefDecreased(1700); private int value; IfType(int value){ @@ -141,6 +142,7 @@ public String description(){ case hex: return I18N.getString(R.string.hexed); case curseOrHex: return I18N.getString(R.string.cursed_or_hexed); case fear: return I18N.getString(R.string.feared); + case magicDefDecreased: return I18N.getString(R.string.magic_defence_decreased); default: return I18N.getString(R.string.unknown); } } diff --git a/app/src/main/java/com/github/malitsplus/shizurunotes/db/DBHelper.kt b/app/src/main/java/com/github/malitsplus/shizurunotes/db/DBHelper.kt index 87b68115..b527a3aa 100644 --- a/app/src/main/java/com/github/malitsplus/shizurunotes/db/DBHelper.kt +++ b/app/src/main/java/com/github/malitsplus/shizurunotes/db/DBHelper.kt @@ -1145,14 +1145,32 @@ class DBHelper private constructor( return getBeanListByRaw( """ SELECT - a.dungeon_area_id, - a.dungeon_name, - a.description, - b.* + a.dungeon_area_id 'dungeon_area_id', + a.dungeon_name 'dungeon_name', + a.description 'description', + sp.mode 'mode', + w.* FROM - dungeon_area_data AS a - JOIN wave_group_data AS b ON a.wave_group_id=b.wave_group_id - ORDER BY a.dungeon_area_id DESC + dungeon_area AS a + JOIN dungeon_quest_data AS b ON a.dungeon_area_id = b.dungeon_area_id + AND b.quest_type = 4 + JOIN dungeon_special_battle AS sp ON b.quest_id = sp.quest_id + JOIN wave_group_data AS w ON sp.wave_group_id = w.wave_group_id + UNION ALL + SELECT + a.dungeon_area_id, + a.dungeon_name, + a.description, + 0 AS 'mode', + w.* + FROM + dungeon_area AS a + JOIN dungeon_quest_data AS b ON a.dungeon_area_id = b.dungeon_area_id + AND b.quest_type = 3 + JOIN wave_group_data AS w ON b.wave_group_id = w.wave_group_id + ORDER BY + a.dungeon_area_id DESC, + sp.mode DESC """, RawDungeon::class.java ) diff --git a/app/src/main/java/com/github/malitsplus/shizurunotes/db/RawDungeon.java b/app/src/main/java/com/github/malitsplus/shizurunotes/db/RawDungeon.java index 3317762b..4029c524 100644 --- a/app/src/main/java/com/github/malitsplus/shizurunotes/db/RawDungeon.java +++ b/app/src/main/java/com/github/malitsplus/shizurunotes/db/RawDungeon.java @@ -11,6 +11,7 @@ public class RawDungeon { public int dungeon_area_id; public String dungeon_name; public String description; + public int mode; public int wave_group_id; public int enemy_id_1; public int enemy_id_2; @@ -29,6 +30,7 @@ public Dungeon getDungeon(){ dungeon_area_id, wave_group_id, enemy_id_1, + mode, dungeon_name, description, enemyList diff --git a/app/src/main/java/com/github/malitsplus/shizurunotes/ui/dungeon/DungeonAdapter.kt b/app/src/main/java/com/github/malitsplus/shizurunotes/ui/dungeon/DungeonAdapter.kt index 892037a7..6cf45c10 100644 --- a/app/src/main/java/com/github/malitsplus/shizurunotes/ui/dungeon/DungeonAdapter.kt +++ b/app/src/main/java/com/github/malitsplus/shizurunotes/ui/dungeon/DungeonAdapter.kt @@ -17,6 +17,7 @@ class DungeonAdapter( val thisDungeon = itemList[position] dungeon = thisDungeon textDungeonDescription.text = thisDungeon.description + mode.text = thisDungeon.modeText clickListener = View.OnClickListener { sharedClanBattle.mSetSelectedBoss(thisDungeon.dungeonBoss) it.findNavController().navigate( diff --git a/app/src/main/res/layout/list_item_dungeon.xml b/app/src/main/res/layout/list_item_dungeon.xml index 7104142c..14e10aac 100644 --- a/app/src/main/res/layout/list_item_dungeon.xml +++ b/app/src/main/res/layout/list_item_dungeon.xml @@ -31,6 +31,16 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + 对%s付与一些特殊的视觉效果。 本伤害的类型会切换为目标的较低数值的防御类型进行计算。 恐慌状态中 + 魔法防御力降低状态中 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b4e3adcc..d1a8c979 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -754,4 +754,5 @@ 恐慌状態中 %sに特別なビジュアル効果を付与する。 このスキルのダメージタイプは目標の低いほうの防御タイプによって決められる。 + 魔法防御力ダウン状態中 \ No newline at end of file