Add Reflex and Initiative sub characteristic
This commit is contained in:
parent
51e63202e3
commit
cded2e9d86
10 changed files with 155 additions and 12 deletions
|
|
@ -10,6 +10,7 @@ import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.Characterist
|
|||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.GHP
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.HEI
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.HP
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.INITIATIVE
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.INT
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.LB
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.LVL
|
||||
|
|
@ -17,6 +18,7 @@ import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.Characterist
|
|||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.PORTRAIT
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.POW
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.PP
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.REFLEX
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.STR
|
||||
import com.pixelized.shared.lwa.model.characterSheet.CharacterSheet.CharacteristicId.THUMBNAIL
|
||||
import com.pixelized.shared.lwa.parser.expression.Expression
|
||||
|
|
@ -86,12 +88,6 @@ class AlteredCharacterSheet(
|
|||
val charisma: Int
|
||||
get() = sheet.charisma + fieldAlterations[CHA].sum()
|
||||
|
||||
val movement: Int
|
||||
get() = sheetUseCase.movement() + fieldAlterations[MOV].sum()
|
||||
|
||||
val armor: Int
|
||||
get() = sheetUseCase.armor() + fieldAlterations[ARMOR].sum()
|
||||
|
||||
val maxHp: Int
|
||||
get() = sheetUseCase.maxHp(
|
||||
constitution = constitution,
|
||||
|
|
@ -116,6 +112,22 @@ class AlteredCharacterSheet(
|
|||
val alterations: List<String>
|
||||
get() = sheet.alterations
|
||||
|
||||
val movement: Int
|
||||
get() = sheetUseCase.movement() + fieldAlterations[MOV].sum()
|
||||
|
||||
val armor: Int
|
||||
get() = sheetUseCase.armor() + fieldAlterations[ARMOR].sum()
|
||||
|
||||
val reflex: Int
|
||||
get() = sheetUseCase.reflex(
|
||||
strength = strength,
|
||||
dexterity = dexterity,
|
||||
intelligence = intelligence,
|
||||
) + fieldAlterations[REFLEX].sum()
|
||||
|
||||
val initiative: Int
|
||||
get() = sheetUseCase.initiative(dexterity = dexterity) + fieldAlterations[INITIATIVE].sum()
|
||||
|
||||
val damageBonus: String
|
||||
get() {
|
||||
val initial = sheetUseCase.meleeBonusDamage(
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ data class CharacterSheet(
|
|||
const val PP = "PP"
|
||||
const val DMG = "DMG"
|
||||
const val ARMOR = "ARMOR"
|
||||
const val REFLEX = "REFLEX"
|
||||
const val INITIATIVE = "INITIATIVE"
|
||||
const val LB = "LEARNING"
|
||||
const val GHP = "HP_GROW"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,20 @@ class CharacterSheetUseCase {
|
|||
|
||||
fun movement(): Int = 10
|
||||
|
||||
fun reflex(
|
||||
strength: Int,
|
||||
dexterity: Int,
|
||||
intelligence: Int,
|
||||
): Int {
|
||||
return (strength + dexterity + intelligence) / 3
|
||||
}
|
||||
|
||||
fun initiative(
|
||||
dexterity: Int,
|
||||
): Int {
|
||||
return dexterity
|
||||
}
|
||||
|
||||
fun maxHp(
|
||||
constitution: Int,
|
||||
height: Int,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue