Skip to content

Commit

Permalink
Added general stats for the characters / weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Feb 20, 2021
1 parent b9fbb04 commit ffd3bef
Show file tree
Hide file tree
Showing 31 changed files with 753 additions and 461 deletions.
2 changes: 2 additions & 0 deletions lib/application/character/character_bloc.dart
Expand Up @@ -121,6 +121,8 @@ class CharacterBloc extends Bloc<CharacterEvent, CharacterState> {
).toList(),
);
}).toList(),
subStatType: char.subStatType,
stats: char.stats,
);
}
}
2 changes: 2 additions & 0 deletions lib/application/character/character_state.dart
Expand Up @@ -22,5 +22,7 @@ abstract class CharacterState with _$CharacterState {
@required List<CharacterPassiveTalentModel> passives,
@required List<CharacterConstellationModel> constellations,
@required List<CharacterBuildCardModel> builds,
@required StatType subStatType,
@required List<CharacterFileStatModel> stats,
}) = _LoadedState;
}
1 change: 1 addition & 0 deletions lib/application/weapon/weapon_bloc.dart
Expand Up @@ -64,6 +64,7 @@ class WeaponBloc extends Bloc<WeaponEvent, WeaponState> {
},
).toList(),
charImages: charImgs,
stats: weapon.stats,
);
}
}
1 change: 1 addition & 0 deletions lib/application/weapon/weapon_state.dart
Expand Up @@ -16,5 +16,6 @@ abstract class WeaponState with _$WeaponState {
@required List<WeaponFileAscensionMaterial> ascensionMaterials,
@required List<WeaponFileRefinementModel> refinements,
@required List<String> charImages,
@required List<WeaponFileStatModel> stats,
}) = _LoadedState;
}
35 changes: 23 additions & 12 deletions lib/domain/models/db/characters/character_file_model.dart
Expand Up @@ -38,6 +38,7 @@ abstract class CharacterFileModel implements _$CharacterFileModel {
@required List<CharacterFileSkillModel> skills,
@required List<CharacterFilePassiveModel> passives,
@required List<CharacterFileConstellationModel> constellations,
@required StatType subStatType,
@required List<CharacterFileStatModel> stats,
}) = _CharacterFileModel;

Expand All @@ -56,8 +57,7 @@ abstract class CharacterFileAscensionMaterialModel implements _$CharacterFileAsc

const CharacterFileAscensionMaterialModel._();

factory CharacterFileAscensionMaterialModel.fromJson(Map<String, dynamic> json) =>
_$CharacterFileAscensionMaterialModelFromJson(json);
factory CharacterFileAscensionMaterialModel.fromJson(Map<String, dynamic> json) => _$CharacterFileAscensionMaterialModelFromJson(json);
}

@freezed
Expand All @@ -69,13 +69,11 @@ abstract class CharacterFileTalentAscensionMaterialModel implements _$CharacterF

const CharacterFileTalentAscensionMaterialModel._();

factory CharacterFileTalentAscensionMaterialModel.fromJson(Map<String, dynamic> json) =>
_$CharacterFileTalentAscensionMaterialModelFromJson(json);
factory CharacterFileTalentAscensionMaterialModel.fromJson(Map<String, dynamic> json) => _$CharacterFileTalentAscensionMaterialModelFromJson(json);
}

@freezed
abstract class CharacterFileMultiTalentAscensionMaterialModel
implements _$CharacterFileMultiTalentAscensionMaterialModel {
abstract class CharacterFileMultiTalentAscensionMaterialModel implements _$CharacterFileMultiTalentAscensionMaterialModel {
factory CharacterFileMultiTalentAscensionMaterialModel({
@required int number,
@required List<CharacterFileTalentAscensionMaterialModel> materials,
Expand Down Expand Up @@ -128,8 +126,7 @@ abstract class CharacterFileArtifactMultipleBuild implements _$CharacterFileArti

CharacterFileArtifactMultipleBuild._();

factory CharacterFileArtifactMultipleBuild.fromJson(Map<String, dynamic> json) =>
_$CharacterFileArtifactMultipleBuildFromJson(json);
factory CharacterFileArtifactMultipleBuild.fromJson(Map<String, dynamic> json) => _$CharacterFileArtifactMultipleBuildFromJson(json);
}

@freezed
Expand Down Expand Up @@ -158,8 +155,7 @@ abstract class CharacterFileSkillAbilityModel implements _$CharacterFileSkillAbi

CharacterFileSkillAbilityModel._();

factory CharacterFileSkillAbilityModel.fromJson(Map<String, dynamic> json) =>
_$CharacterFileSkillAbilityModelFromJson(json);
factory CharacterFileSkillAbilityModel.fromJson(Map<String, dynamic> json) => _$CharacterFileSkillAbilityModelFromJson(json);
}

@freezed
Expand Down Expand Up @@ -191,6 +187,21 @@ abstract class CharacterFileConstellationModel implements _$CharacterFileConstel

CharacterFileConstellationModel._();

factory CharacterFileConstellationModel.fromJson(Map<String, dynamic> json) =>
_$CharacterFileConstellationModelFromJson(json);
factory CharacterFileConstellationModel.fromJson(Map<String, dynamic> json) => _$CharacterFileConstellationModelFromJson(json);
}

@freezed
abstract class CharacterFileStatModel implements _$CharacterFileStatModel {
factory CharacterFileStatModel({
@required int level,
@required double baseHp,
@required double baseAtk,
@required double baseDef,
@required bool isAnAscension,
@required double specificValue,
}) = _CharacterFileStatModel;

const CharacterFileStatModel._();

factory CharacterFileStatModel.fromJson(Map<String, dynamic> json) => _$CharacterFileStatModelFromJson(json);
}
21 changes: 0 additions & 21 deletions lib/domain/models/db/characters/character_file_stat_model.dart

This file was deleted.

16 changes: 16 additions & 0 deletions lib/domain/models/db/weapons/weapon_file_model.dart
Expand Up @@ -23,8 +23,10 @@ abstract class WeaponFileModel implements _$WeaponFileModel {
@required StatType secondaryStat,
@required double secondaryStatValue,
@required ItemLocationType location,
@required bool isComingSoon,
@required List<WeaponFileAscensionMaterial> ascensionMaterials,
@required List<WeaponFileRefinement> refinements,
@required List<WeaponFileStatModel> stats,
}) = _WeaponFileModel;

WeaponFileModel._();
Expand Down Expand Up @@ -55,3 +57,17 @@ abstract class WeaponFileRefinement implements _$WeaponFileRefinement {

factory WeaponFileRefinement.fromJson(Map<String, dynamic> json) => _$WeaponFileRefinementFromJson(json);
}

@freezed
abstract class WeaponFileStatModel implements _$WeaponFileStatModel {
factory WeaponFileStatModel({
@required int level,
@required double baseAtk,
@required bool isAnAscension,
@required double specificValue,
}) = _WeaponFileStatModel;

const WeaponFileStatModel._();

factory WeaponFileStatModel.fromJson(Map<String, dynamic> json) => _$WeaponFileStatModelFromJson(json);
}
1 change: 0 additions & 1 deletion lib/domain/models/models.dart
Expand Up @@ -12,7 +12,6 @@ export 'characters/character_talent_ascension_model.dart';
export 'db/artifacts/artifact_file_model.dart';
export 'db/artifacts/artifacts_file.dart';
export 'db/characters/character_file_model.dart';
export 'db/characters/character_file_stat_model.dart';
export 'db/characters/characters_file.dart';
export 'db/elements/element_debuff_file_model.dart';
export 'db/elements/element_reaction_file_model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/domain/models/weapons/weapon_card_model.dart
Expand Up @@ -12,6 +12,7 @@ class WeaponCardModel {
final WeaponType type;
final StatType subStatType;
final double subStatValue;
final bool isComingSoon;

const WeaponCardModel({
@required this.key,
Expand All @@ -22,5 +23,6 @@ class WeaponCardModel {
@required this.type,
@required this.subStatType,
@required this.subStatValue,
@required this.isComingSoon,
});
}
72 changes: 38 additions & 34 deletions lib/generated/intl/messages_en.dart
Expand Up @@ -25,39 +25,41 @@ class MessageLookup extends MessageLookupByLibrary {

static m2(value) => "${value} ATK %";

static m3(value) => "Constellation ${value}";
static m3(value) => "Base ${value}";

static m4(value) => "${value} CRIT ATK";
static m4(value) => "Constellation ${value}";

static m5(value) => "${value} CRIT DMG %";
static m5(value) => "${value} CRIT ATK";

static m6(value) => "${value} CRIT Rate";
static m6(value) => "${value} CRIT DMG %";

static m7(value) => "${value} CRIT Rate %";
static m7(value) => "${value} CRIT Rate";

static m8(value) => "${value} DEF %";
static m8(value) => "${value} CRIT Rate %";

static m9(value) => "${value} Elementary Mastery";
static m9(value) => "${value} DEF %";

static m10(value) => "${value} Energy Recharge %";
static m10(value) => "${value} Elementary Mastery";

static m11(value) => "${value} Healing Bonus %";
static m11(value) => "${value} Energy Recharge %";

static m12(value) => "${value} HP";
static m12(value) => "${value} Healing Bonus %";

static m13(value) => "${value} HP %";
static m13(value) => "${value} HP";

static m14(value) => "${value} PHYS DMG Bonus";
static m14(value) => "${value} HP %";

static m15(value) => "${value} PHYS DMG %";
static m15(value) => "${value} PHYS DMG Bonus";

static m16(value) => "Talent Ascension ${value}";
static m16(value) => "${value} PHYS DMG %";

static m17(value) => "Unlocked at ascension level ${value}";
static m17(value) => "Talent Ascension ${value}";

static m18(value, x) => "${value} ${x} DMG Bonus %";
static m18(value) => "Unlocked at ascension level ${value}";

static m19(value) => "${value} Piece(s)";
static m19(value, x) => "${value} ${x} DMG Bonus %";

static m20(value) => "${value} Piece(s)";

final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) => <String, Function> {
Expand All @@ -81,6 +83,7 @@ class MessageLookup extends MessageLookupByLibrary {
"atk" : m1,
"atkPercentage" : m2,
"baseAtk" : MessageLookupByLibrary.simpleMessage("Base ATK"),
"baseX" : m3,
"birthday" : MessageLookupByLibrary.simpleMessage("Birthday"),
"bonus" : MessageLookupByLibrary.simpleMessage("Bonus"),
"boss" : MessageLookupByLibrary.simpleMessage("Boss"),
Expand All @@ -107,19 +110,19 @@ class MessageLookup extends MessageLookupByLibrary {
"comingSoon" : MessageLookupByLibrary.simpleMessage("Coming soon"),
"common" : MessageLookupByLibrary.simpleMessage("Common"),
"confirm" : MessageLookupByLibrary.simpleMessage("Confirm"),
"constellationX" : m3,
"constellationX" : m4,
"constellations" : MessageLookupByLibrary.simpleMessage("Constellations"),
"crafting" : MessageLookupByLibrary.simpleMessage("Crafting"),
"critAtk" : m4,
"critDmgPercentage" : m5,
"critRate" : m6,
"critRatePercentage" : m7,
"critAtk" : m5,
"critDmgPercentage" : m6,
"critRate" : m7,
"critRatePercentage" : m8,
"crown" : MessageLookupByLibrary.simpleMessage("Crown"),
"currency" : MessageLookupByLibrary.simpleMessage("Currency"),
"currentLevel" : MessageLookupByLibrary.simpleMessage("Current level"),
"dark" : MessageLookupByLibrary.simpleMessage("Dark"),
"day" : MessageLookupByLibrary.simpleMessage("Day"),
"defPercentage" : m8,
"defPercentage" : m9,
"deleteRow" : MessageLookupByLibrary.simpleMessage("Delete row"),
"desc" : MessageLookupByLibrary.simpleMessage("Descending"),
"description" : MessageLookupByLibrary.simpleMessage("Description"),
Expand All @@ -138,9 +141,9 @@ class MessageLookup extends MessageLookupByLibrary {
"elementalResonances" : MessageLookupByLibrary.simpleMessage("Elemental Resonances"),
"elementalResonancesExplained" : MessageLookupByLibrary.simpleMessage("Having these types of character in your party will give you the corresponding effect"),
"elementalSkill" : MessageLookupByLibrary.simpleMessage("Elemental Skill"),
"elementaryMastery" : m9,
"elementaryMastery" : m10,
"elements" : MessageLookupByLibrary.simpleMessage("Elements"),
"energyRechargePercentage" : m10,
"energyRechargePercentage" : m11,
"english" : MessageLookupByLibrary.simpleMessage("English"),
"female" : MessageLookupByLibrary.simpleMessage("Female"),
"filters" : MessageLookupByLibrary.simpleMessage("Filters"),
Expand All @@ -155,11 +158,11 @@ class MessageLookup extends MessageLookupByLibrary {
"goblet" : MessageLookupByLibrary.simpleMessage("Goblet"),
"happyBirthday" : MessageLookupByLibrary.simpleMessage("Happy Birthday!"),
"healingBonus" : MessageLookupByLibrary.simpleMessage("Healing Bonus"),
"healingBonusPercentage" : m11,
"healingBonusPercentage" : m12,
"hold" : MessageLookupByLibrary.simpleMessage("Hold"),
"home" : MessageLookupByLibrary.simpleMessage("Home"),
"hp" : m12,
"hpPercentage" : m13,
"hp" : m13,
"hpPercentage" : m14,
"imgSavedSuccessfully" : MessageLookupByLibrary.simpleMessage("Image was successfully saved to the gallery"),
"issues" : MessageLookupByLibrary.simpleMessage("Issues"),
"language" : MessageLookupByLibrary.simpleMessage("Language"),
Expand Down Expand Up @@ -188,8 +191,8 @@ class MessageLookup extends MessageLookupByLibrary {
"others" : MessageLookupByLibrary.simpleMessage("Others"),
"partial" : MessageLookupByLibrary.simpleMessage("Partial"),
"passives" : MessageLookupByLibrary.simpleMessage("Passives"),
"physDmgBonus" : m14,
"physDmgPercentage" : m15,
"physDmgBonus" : m15,
"physDmgPercentage" : m16,
"pickColor" : MessageLookupByLibrary.simpleMessage("Pick a color"),
"pieces" : MessageLookupByLibrary.simpleMessage("Pieces"),
"plume" : MessageLookupByLibrary.simpleMessage("Plume"),
Expand Down Expand Up @@ -230,14 +233,15 @@ class MessageLookup extends MessageLookupByLibrary {
"spanish" : MessageLookupByLibrary.simpleMessage("Spanish"),
"starglitterExchange" : MessageLookupByLibrary.simpleMessage("Starglitter Exchange"),
"startByAddingMsg" : MessageLookupByLibrary.simpleMessage("Start by adding some characters / weapons"),
"stats" : MessageLookupByLibrary.simpleMessage("Stats"),
"subStat" : MessageLookupByLibrary.simpleMessage("Sub. Stat"),
"summary" : MessageLookupByLibrary.simpleMessage("Summary"),
"sunday" : MessageLookupByLibrary.simpleMessage("Sunday"),
"support" : MessageLookupByLibrary.simpleMessage("Support"),
"supportDps" : MessageLookupByLibrary.simpleMessage("Support DPS"),
"supportMsg" : MessageLookupByLibrary.simpleMessage("I made this app in my free time and it is also open source. If you would like to help me, report an issue, have an idea, want a feature to be implemented, etc, please open an issue in my Github:"),
"sword" : MessageLookupByLibrary.simpleMessage("Sword"),
"talentAscensionX" : m16,
"talentAscensionX" : m17,
"talentsAscension" : MessageLookupByLibrary.simpleMessage("Talents Ascension"),
"theme" : MessageLookupByLibrary.simpleMessage("Theme"),
"thursday" : MessageLookupByLibrary.simpleMessage("Thursday"),
Expand All @@ -248,7 +252,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tuesday" : MessageLookupByLibrary.simpleMessage("Tuesday"),
"type" : MessageLookupByLibrary.simpleMessage("Type"),
"unknownError" : MessageLookupByLibrary.simpleMessage("Unknown error occurred"),
"unlockedAtAscensionLevelX" : m17,
"unlockedAtAscensionLevelX" : m18,
"unlockedAutomatically" : MessageLookupByLibrary.simpleMessage("Unlocked Automatically"),
"unreleased" : MessageLookupByLibrary.simpleMessage("Unreleased"),
"utility" : MessageLookupByLibrary.simpleMessage("Utility"),
Expand All @@ -257,8 +261,8 @@ class MessageLookup extends MessageLookupByLibrary {
"weapons" : MessageLookupByLibrary.simpleMessage("Weapons"),
"wednesday" : MessageLookupByLibrary.simpleMessage("Wednesday"),
"wishSimulator" : MessageLookupByLibrary.simpleMessage("Wish simulator"),
"xDmgBonusPercentage" : m18,
"xPieces" : m19,
"xDmgBonusPercentage" : m19,
"xPieces" : m20,
"youCanAlsoSendMeAnEmail" : MessageLookupByLibrary.simpleMessage("You can also send me an email")
};
}

0 comments on commit ffd3bef

Please sign in to comment.