File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -521,9 +521,10 @@ export class GameLogicService {
521
521
variables : Partial < Record < Variable , number > > ,
522
522
jobs : JobDocument [ ] ,
523
523
) {
524
- const attack = variables [ `ships.${ ship . type } .damage .system` as Variable ] ?? variables [ `ships.${ ship . type } .damage .default` as Variable ] ?? 0 ;
524
+ const attack = variables [ `ships.${ ship . type } .attack .system` as Variable ] ?? variables [ `ships.${ ship . type } .attack .default` as Variable ] ?? 0 ;
525
525
// The damage is calculated using A.attack.system / system.defense + log(A.experience)
526
- const damage = Math . max ( attack / defense + Math . log ( ship . experience ) , 0 ) ;
526
+ const damage = Math . max ( attack / defense + Math . log1p ( ship . experience ) , 0 ) ;
527
+ ship . experience += damage ;
527
528
system . health -= damage ;
528
529
if ( system . health > 0 ) {
529
530
return ;
You can’t perform that action at this time.
0 commit comments