mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-20 02:24:45 +00:00
Scoring (#1202)
* cep from towers set to 10; reorganized an if...else * replacing maxBy with maxByOption and then resolving maxBy the long way with appropriate fallback value
This commit is contained in:
parent
2dd44142d2
commit
cacb9ad18a
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ object Support {
|
|||
individualThreatEstimates.filter(_._1 < 10)
|
||||
} else {
|
||||
individualThreatEstimates.filter(_._1 > 10)
|
||||
}).maxBy(_._2)._1,
|
||||
}).maxByOption(_._2).map(_._1).getOrElse(0),
|
||||
defaultValue
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue