Add support for a second subclass.

This commit is contained in:
Andres Gomez, Thomas (ITDV RL) 2024-06-25 16:43:28 +02:00
parent f14370ca8a
commit 57aac23369
7 changed files with 11 additions and 1 deletions

View file

@ -32,6 +32,7 @@ import com.pixelized.rplexicon.utilitary.extentions.local.isSavageAttacks
import com.pixelized.rplexicon.utilitary.extentions.local.primary
import com.pixelized.rplexicon.utilitary.extentions.local.secondary
import com.pixelized.rplexicon.utilitary.extentions.local.sum
import com.pixelized.rplexicon.utilitary.extentions.local.tertiary
import com.pixelized.rplexicon.utilitary.extentions.local.toStatus
import com.pixelized.rplexicon.utilitary.extentions.masteryMultiplier
import com.pixelized.rplexicon.utilitary.extentions.modifier
@ -1020,6 +1021,7 @@ class DiceThrowUseCase @Inject constructor(
Property.LEVEL -> character.level.base
Property.LEVEL_PC -> character.level.primary
Property.LEVEL_SC -> character.level.secondary
Property.LEVEL_TC -> character.level.tertiary
else -> null
}?.let { value ->
val titleLabel = if (this == Property.PROFICIENCY) {
@ -1035,6 +1037,7 @@ class DiceThrowUseCase @Inject constructor(
Property.LEVEL -> context.getString(R.string.character_sheet_stat_level)
Property.LEVEL_PC -> context.getString(R.string.character_sheet_stat_level_pc)
Property.LEVEL_SC -> context.getString(R.string.character_sheet_stat_level_sc)
Property.LEVEL_TC -> context.getString(R.string.character_sheet_stat_level_tc)
else -> ""
}
context.getString(R.string.dice_roll_bonus_detail, label)

View file

@ -5,6 +5,7 @@ enum class Property(val key: String) {
LEVEL("Niveau"),
LEVEL_PC("NiveauPC"),
LEVEL_SC("NiveauCS"),
LEVEL_TC("NiveauCT"),
HIT_POINT("Point de vie"),
ARMOR_CLASS("Classe d'armure"),
SPEED("Vitesse"),

View file

@ -13,6 +13,7 @@ class ModifierParser @Inject constructor(
Property.PROFICIENCY,
Property.LEVEL_PC,
Property.LEVEL_SC,
Property.LEVEL_TC,
Property.LEVEL,
Property.STRENGTH,
Property.DEXTERITY,

View file

@ -10,6 +10,7 @@ import com.pixelized.rplexicon.utilitary.extentions.icon
import com.pixelized.rplexicon.utilitary.extentions.local.base
import com.pixelized.rplexicon.utilitary.extentions.local.primary
import com.pixelized.rplexicon.utilitary.extentions.local.secondary
import com.pixelized.rplexicon.utilitary.extentions.local.tertiary
import com.pixelized.rplexicon.utilitary.extentions.modifier
import com.pixelized.rplexicon.utilitary.extentions.string.skillIcon
import com.pixelized.rplexicon.utilitary.extentions.toLabel
@ -31,6 +32,7 @@ class SkillFactoryUioFactory @Inject constructor(
Property.LEVEL -> character?.level?.base ?: 0
Property.LEVEL_PC -> character?.level?.primary ?: 0
Property.LEVEL_SC -> character?.level?.secondary ?: 0
Property.LEVEL_TC -> character?.level?.tertiary ?: 0
Property.PROFICIENCY -> character?.proficiency ?: 0
Property.STRENGTH -> character?.strength?.modifier ?: 0
Property.DEXTERITY -> character?.dexterity?.modifier ?: 0

View file

@ -48,4 +48,5 @@ fun CharacterSheet.firstSpellSlot(): Int? {
val List<Int>.base: Int get() = sum()
val List<Int>.primary: Int get() = getOrNull(0) ?: 0
val List<Int>.secondary: Int get() = getOrNull(1) ?: 0
val List<Int>.secondary: Int get() = getOrNull(1) ?: 0
val List<Int>.tertiary: Int get() = getOrNull(2) ?: 0

View file

@ -143,6 +143,7 @@
<string name="character_sheet_stat_level">Niveau</string>
<string name="character_sheet_stat_level_pc">Niveau de classe primaire</string>
<string name="character_sheet_stat_level_sc">Niveau de sous classe</string>
<string name="character_sheet_stat_level_tc">Niveau de sous classe</string>
<string name="character_sheet_stat_strength">Force</string>
<string name="character_sheet_stat_strength_short">FOR</string>
<string name="character_sheet_stat_dexterity">Dextérité</string>

View file

@ -149,6 +149,7 @@
<string name="character_sheet_stat_level">Level</string>
<string name="character_sheet_stat_level_pc">Primary class level</string>
<string name="character_sheet_stat_level_sc">Secondary class level</string>
<string name="character_sheet_stat_level_tc">Tertiary class level</string>
<string name="character_sheet_stat_strength">Strength</string>
<string name="character_sheet_stat_strength_short">STR</string>
<string name="character_sheet_stat_dexterity">Dexterity</string>