MalitsPlus / ShizuruNotes

An unofficial Android tool application for "Princess Connect Re:Dive"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A rounding rule in AilmentAction

HerDataSam opened this issue · comments

  1. A rounding rule of dot damages

SLIP_DAMAGE which comes from ailments should be rounded down. It is because the result value ends with the conversion (long), and this conversion drops the floating-point numbers in the CSharp. This issue is suggested by a Korean user who compared the values between in-game damage of Mitsuki's 'Curse Bloom+' and Aoi's 'Poison Arrow+', and Notes' calculated damage.

case dot:
switch ((Ailment.DotDetail)ailment.ailmentDetail.detail){
case poison:
return I18N.getString(R.string.Poison_s1_and_deal_s2_damage_per_second_for_s3_sec,
targetParameter.buildTargetClause(), buildExpression(level, RoundingMode.UP, property), buildExpression(level, durationValues, RoundingMode.HALF_UP, property));
case violentPoison:
return I18N.getString(R.string.Poison_s1_violently_and_deal_s2_damage_per_second_for_s3_sec,
targetParameter.buildTargetClause(), buildExpression(level, RoundingMode.UP, property), buildExpression(level, durationValues, RoundingMode.HALF_UP, property));
default:
return I18N.getString(R.string.s1_s2_and_deal_s3_damage_per_second_for_s4_sec,
ailment.description(), targetParameter.buildTargetClause(), buildExpression(level, RoundingMode.UP, property), buildExpression(level, durationValues, RoundingMode.HALF_UP, property));
}

If there are any client updates about this calculation, you can ignore it.

  1. A potential error

%s is missed at the second line of the code below, while zh version is fine.

<string name="s_highest_HP">HPが一番高い%s</string>
<string name="s_lowest_HP">HPが一番低い</string>

Thanks.

I've checked about this, the entire conversion is double→float→int→long, thus it seems that you are right, I'll fix it later. Thx a lot!