-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. 新增魔器英雄选项 3. 配合新出的魔器技能,现在选择技能时现在会进行检查,避免同时装备魔器技能和专有技能 4. 修复一些BUG
- Loading branch information
jay
committed
Oct 17, 2022
1 parent
0f5988a
commit a75a164
Showing
54 changed files
with
1,605 additions
and
735 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
android/app/src/main/res/drawable-night-v21/launch_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<bitmap android:gravity="fill" android:src="@drawable/background"/> | ||
</item> | ||
</layer-list> |
6 changes: 6 additions & 0 deletions
6
android/app/src/main/res/drawable-night/launch_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<bitmap android:gravity="fill" android:src="@drawable/background"/> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> | ||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
<item name="android:forceDarkAllowed">false</item> | ||
<item name="android:windowFullscreen">false</item> | ||
<item name="android:windowSplashScreenBackground">#000000</item> | ||
</style> | ||
<!-- Theme applied to the Android Window as soon as the process has started. | ||
This theme determines the color of the Android Window while your | ||
Flutter UI initializes, as well as behind your Flutter UI while its | ||
running. | ||
This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
<item name="android:windowBackground">?android:colorBackground</item> | ||
</style> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Fri Jun 23 08:50:38 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// ignore_for_file: public_member_api_docs, sort_constructors_first | ||
import 'package:feh_rebuilder/models/person/person.dart'; | ||
import 'package:feh_rebuilder/models/skill/skill.dart'; | ||
|
||
class CheckResult { | ||
bool result; | ||
String msg; | ||
CheckResult({ | ||
required this.result, | ||
this.msg = "", | ||
}); | ||
} | ||
|
||
abstract class BuilderCheckerPolicy { | ||
CheckResult check(Person person, List<Skill?> skills); | ||
} | ||
|
||
/// 传承英雄不能设置祝福 | ||
class BuilderChecker1 implements BuilderCheckerPolicy { | ||
@override | ||
CheckResult check(Person person, List<Skill?> skills) { | ||
if (person.legendary?.kind == 1 && | ||
(person.legendary?.element ?? 0) <= 4 && | ||
(person.legendary?.element ?? 0) >= 1) { | ||
if (skills.length >= 8 && skills[7] != null) { | ||
return CheckResult(result: false, msg: "传承英雄不能设置祝福"); | ||
} | ||
} | ||
return CheckResult(result: true); | ||
} | ||
} | ||
|
||
/// 非魔器英雄不能同时装备魔器技能和专有技能 | ||
class BuilderChecker2 implements BuilderCheckerPolicy { | ||
@override | ||
CheckResult check(Person person, List<Skill?> skills) { | ||
// 第九位技能是英雄的专有技能,部分追加专武的角色会因此造成问题,这里手动取前八位 | ||
var s = skills.sublist(0, 8); | ||
// 非魔器英雄 且 技能列表中存在魔器技能 | ||
if (person.legendary?.kind != 5 && | ||
s.any((skill) => skill?.arcaneWeapon == true)) { | ||
// 如果有除SID_歌う SID_踊る外的专有技能 | ||
if (s.any((skill) => | ||
(skill?.exclusive ?? false) && | ||
!["SID_歌う", "SID_踊る", "SID_奏でる"].contains(skill?.idTag))) { | ||
return CheckResult(result: false, msg: "非魔器英雄不能同时装备魔器技能和专有技能"); | ||
} | ||
} | ||
|
||
return CheckResult(result: true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.