Skip to content

Commit

Permalink
Fix empty Ch 13 endeavour reward list (#804)
Browse files Browse the repository at this point in the history
Closes #766

It is not actually possible to have the game not show this pop-up, even
if you send the list as `null`, so I dug a bit deeper and it turns out
that there are rewards meant to be shown here. Source is Gigz's entire
campaign recording:

https://youtu.be/S4V_Luy-ZnY?t=977

Screencap:

<img
src="https://github.com/SapiensAnatis/Dawnshard/assets/5047192/0e3d48b1-09e8-4f46-ad2b-a5af9caad477"
width="40%"/>


Implement these rewards + some fixes to BonusService I needed to enable
cheats while testing
  • Loading branch information
SapiensAnatis authored May 19, 2024
1 parent 2bd54ad commit 565229b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,28 @@
},
{
"_Id": 3,
"_Rewards": []
"_Rewards": [
{
"_Type": "Material",
"_Id": 104001043,
"_Quantity": 8
},
{
"_Type": "Material",
"_Id": 103001003,
"_Quantity": 60
},
{
"_Type": "HustleHammer",
"_Id": 0,
"_Quantity": 4
},
{
"_Type": "Rupies",
"_Id": 0,
"_Quantity": 1000000
}
]
},
{
"_Id": 8,
Expand Down
22 changes: 11 additions & 11 deletions DragaliaAPI/DragaliaAPI/Services/Game/BonusService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ await fortRepository
DragonTimeBonus = new()
{
#if CHEATING
dragon_time_bonus = 20
DragonTimeBonus = 20
#endif
},
AllBonus = new()
{
#if CHEATING
attack = 100,
hp = 100
Attack = 100,
Hp = 100
#endif
},
};
Expand Down Expand Up @@ -118,7 +118,7 @@ private static IEnumerable<AtgenElementBonus> GetFortElementBonus(IEnumerable<in
result[(UnitElement)d.EffType1].Hp += d.EffArgs1;
result[(UnitElement)d.EffType1].Attack += d.EffArgs2;
#if CHEATING
result[(UnitElement)d.EffType1].attack += 100;
result[(UnitElement)d.EffType1].Attack += 100;
#endif

if (d.EffType2 != 0)
Expand All @@ -127,7 +127,7 @@ private static IEnumerable<AtgenElementBonus> GetFortElementBonus(IEnumerable<in
result[(UnitElement)d.EffType2].Attack += d.EffArgs2;

#if CHEATING
result[(UnitElement)d.EffType2].attack += 100;
result[(UnitElement)d.EffType2].Attack += 100;
#endif
}
}
Expand Down Expand Up @@ -156,15 +156,15 @@ private static IEnumerable<AtgenParamBonus> GetFortParamBonus(IEnumerable<int> b
result[(WeaponTypes)d.EffType1].Hp += d.EffArgs1;
result[(WeaponTypes)d.EffType1].Attack += d.EffArgs2;
#if CHEATING
result[(WeaponTypes)d.EffType1].attack += 100;
result[(WeaponTypes)d.EffType1].Attack += 100;
#endif

if (d.EffType2 != 0)
{
result[(WeaponTypes)d.EffType2].Hp += d.EffArgs1;
result[(WeaponTypes)d.EffType2].Attack += d.EffArgs2;
#if CHEATING
result[(WeaponTypes)d.EffType2].attack += 100;
result[(WeaponTypes)d.EffType2].Attack += 100;
#endif
}
}
Expand Down Expand Up @@ -193,23 +193,23 @@ private static IEnumerable<AtgenDragonBonus> GetFortDragonBonus(IEnumerable<int>
result[(UnitElement)d.EffType1].Hp += d.EffArgs1;
result[(UnitElement)d.EffType1].Attack += d.EffArgs2;
#if CHEATING
result[(UnitElement)d.EffType1].attack += 100;
result[(UnitElement)d.EffType1].Attack += 100;
#endif

if (d.EffType2 != 0)
{
result[(UnitElement)d.EffType2].Hp += d.EffArgs1;
result[(UnitElement)d.EffType2].Attack += d.EffArgs2;
#if CHEATING
result[(UnitElement)d.EffType2].attack += 100;
result[(UnitElement)d.EffType2].Attack += 100;
#endif
}
}
else if (d.EffectId == FortEffectTypes.DragonDamage)
{
result[(UnitElement)d.EffType1].DragonBonus += d.EffArgs1;
#if CHEATING
result[(UnitElement)d.EffType1].dragon_bonus += 100;
result[(UnitElement)d.EffType1].DragonBonus += 100;
#endif
// No facility gives dragon bonus to two elemental types
}
Expand Down Expand Up @@ -238,7 +238,7 @@ IEnumerable<WeaponBodies> weaponBodyIds
result[w.WeaponType].Hp += w.WeaponPassiveEffHp;
result[w.WeaponType].Attack += w.WeaponPassiveEffAtk;
#if CHEATING
result[w.WeaponType].attack += 100;
result[w.WeaponType].Attack += 100;
#endif
}

Expand Down

0 comments on commit 565229b

Please sign in to comment.