[v2.03b] The Most Insignificant of Mysteries

When you run into a bug, you can post it here. Yes. -When-.
Please make sure you read the sticky!
Kameron8
Posted to Death
Posted to Death
Posts: 759
Joined: Fri Apr 03, 2015 12:59 am

[v2.03b] The Most Insignificant of Mysteries

Post by Kameron8 » Sat May 11, 2019 11:44 pm

When using any skill that performs a basic attack, attacks seem to do one less damage (up to 2 less damage if crit % damage is taken into account) than an otherwise identical basic attack action. An example is shown below, where a Prinny is hit with a basic attack and then Pinball Strike from identical positions with the same weapon:

Comparison:
Critical Hit! Hirota Nobuhisa attacks Prinny with Electrified Shiv and hits them!
Prinny takes 265 Pierce physical damage. (Electrified Shiv)

...

Hirota Nobuhisa's turn.
Critical Hit! Hirota Nobuhisa attacks Prinny with Electrified Shiv and hits them!
Prinny takes 263 Pierce physical damage. (Electrified Shiv)
The following debug log supports the idea that they're using the same numbers:

Debug Log of previous example:
Debug: Attack type: /obj/skill/fe_attack
Debug: Basic Attack - Weapon Electrified Shiv; 0
Debug: Total Power for Electrified Shiv / Electrified Shiv was 129.
Debug: Critical Multiplier for this attack is: 204.16%

Debug: no_armor was in flags
Debug: magic was in flags
Debug: no_armor was in flags
Debug: magic was in flags
Debug: 0&&1
Debug: Maintenance Information: new_maint_self, am , max 75
Debug: Maintenance Information: newtal_maint_apply, am 1, max 75, Electrified Shiv, Electrified Shank
Debug: Maintenance Information: newtal_maint_apply, max_dura 34, res 0.700001
Debug: Maintenance Information: newtal_maint_apply, max_dura 30, res -21
Debug: Custom music debug: 0, 0, 1
Debug: 0
// --------------------- End of Basic Attack ----------------------------
Debug: Pinball Strike - /obj/skill/pinball_strike
Debug: Checking cost negation effects.
Debug: Basic Attack - Weapon Electrified Shiv; 0
Debug: Total Power for Electrified Shiv / Electrified Shiv was 129.
Debug: Critical Multiplier for this attack is: 204.16%

Debug: no_armor was in flags
Debug: magic was in flags
Debug: no_armor was in flags
Debug: magic was in flags
Debug: Maintenance Information: new_maint_self, am , max 75
Debug: Maintenance Information: newtal_maint_apply, am 1, max 75, Electrified Shiv, Electrified Shank
Debug: Maintenance Information: newtal_maint_apply, max_dura 34, res 0
Debug: Maintenance Information: newtal_maint_apply, max_dura 30, res -21
This was tested with multiple weapons:

Different character and weapon used with Pinball Strike:
Dauntless Woman attacks Prinny with Salamander Sword and hits them!
Prinny takes 42 Slash physical damage. (Salamander Sword)
Dauntless Woman's turn.
Prinny's turn.
Prinny's turn.
Prinny attacks Dauntless Woman with Bare Fists and misses them!
--- ROUND 3 ---
Dauntless Woman recovered 2 HP.
Dauntless Woman recovered 9 FP.
Dauntless Woman's turn.
Dauntless Woman attacks Prinny with Salamander Sword and hits them!
Prinny takes 43 Slash physical damage. (Salamander Sword)
Dauntless Woman's turn.
And multiple skills. Of note, L'au-Dela, Repel, Sidecut, Warp Strike, and Cutthroat all exhibited this behavior of dealing 1 less damage than a standard 'Attack' action. In addition to this, the Heat of Battle talent was not taken by the character in the first example.

The damage differential here is utterly insignificant, but I can't for the life of me figure out why this is happening. A difference in number rounding between Skills and Basic attack?