Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Add dungeon SP data
Browse files Browse the repository at this point in the history
Add new skill descriptions
  • Loading branch information
MalitsPlus committed Mar 8, 2022
1 parent 04821fd commit 50a087a
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Enemy>
)
) {
val modeText: String by lazy {
if (mode == 0) {
""
} else {
"MODE$mode"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ enum IfType{
poisonOrVenom(512),
Break(710),
polymorph(1400),
fear(1600);
fear(1600),
magicDefDecreased(1700);

private int value;
IfType(int value){
Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,6 +30,7 @@ public Dungeon getDungeon(){
dungeon_area_id,
wave_group_id,
enemy_id_1,
mode,
dungeon_name,
description,
enemyList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/layout/list_item_dungeon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="mode"
android:textSize="12sp"
app:layout_constraintStart_toEndOf="@+id/period_date"
app:layout_constraintTop_toTopOf="@+id/period_date" />

<ImageView
android:id="@+id/clan_b1_icon"
android:layout_width="50dp"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -689,4 +689,5 @@
<string name="Implement_some_visual_effects_to_s1">对%s付与一些特殊的视觉效果。</string>
<string name="This_damage_type_is_judged_by_the_lower_defence_value_of_targeted_enemy">本伤害的类型会切换为目标的较低数值的防御类型进行计算。</string>
<string name="feared">恐慌状态中</string>
<string name="magic_defence_decreased">魔法防御力降低状态中</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -754,4 +754,5 @@
<string name="feared">恐慌状態中</string>
<string name="Implement_some_visual_effects_to_s1">%sに特別なビジュアル効果を付与する。</string>
<string name="This_damage_type_is_judged_by_the_lower_defence_value_of_targeted_enemy">このスキルのダメージタイプは目標の低いほうの防御タイプによって決められる。</string>
<string name="magic_defence_decreased">魔法防御力ダウン状態中</string>
</resources>

0 comments on commit 50a087a

Please sign in to comment.