cep from towers set to 10; reorganized an if...else

This commit is contained in:
Fate-JH 2024-05-12 00:37:00 -04:00
parent a3eb3a8a95
commit 02c238181e
2 changed files with 8 additions and 6 deletions

View file

@ -132,12 +132,12 @@ final case class TowerHackParticipation(building: Building) extends FacilityHack
overwhelmingOddsBonus = 30L
)
//6. calculate overall command experience points
val finalCep: Long = math.ceil(
val finalCep: Long = 10L /*math.ceil(
baseExperienceFromFacilityCapture *
populationModifier *
competitionMultiplier *
Config.app.game.experience.cep.rate + competitionBonus
).toLong
).toLong*/
//7. reward participants
//Classically, only players in the SOI are rewarded
//terminal hacker (always cep)

View file

@ -190,10 +190,12 @@ object KillAssists {
val victimUnique = victim.unique
val lastDeath = killer.progress.prior.flatMap(_.death)
val sameLastKiller = lastDeath.map(_.assailant.map(_.unique)).flatMap(_.headOption).contains(victimUnique)
if (revenge.defaultExperience != 0 && sameLastKiller) {
revenge.defaultExperience
} else if (sameLastKiller) {
math.min(revenge.maxExperience, (lastDeath.map(_.experienceEarned.toFloat).getOrElse(0f) * revenge.rate).toLong)
if (sameLastKiller) {
if (revenge.defaultExperience != 0) {
revenge.defaultExperience
} else {
math.min(revenge.maxExperience, (lastDeath.map(_.experienceEarned.toFloat).getOrElse(0f) * revenge.rate).toLong)
}
} else {
0L
}