Skip to content

Commit

Permalink
Included probabilty component
Browse files Browse the repository at this point in the history
  • Loading branch information
jalil49 committed Mar 23, 2021
1 parent 536b77a commit 67cd494
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Hooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,18 @@ static void Postfix(WaitPoint wp, NPC _npc)
//ThisOutfitData.heroine.isDresses = tempdress.ToArray();
//actCtrl.SetDesire(0, ThisOutfitData.heroine, 100);
//ExpandedOutfit.Logger.LogWarning($"{_npc.chaCtrl.fileParam.fullname} is heading to club room...probably");
ThisOutfitData.ChangeClubToKoi = true;
if (UnityEngine.Random.Range(1, 101) <= ExpandedOutfit.KoiChance.Value)
{
ThisOutfitData.ChangeClubToKoi = true;
}
}
else if (_npc.mapNo == 22 && wp.MapNo == 46)
{
ThisOutfitData.ChangeKoiToClub = true;
}
else if (_npc.mapNo == 22 && wp.MapNo != 22)
{
ThisOutfitData.ChangeClubToKoi = true;
ThisOutfitData.ChangeKoiToClub = true;
//var tempcoord = ThisOutfitData.heroine.coordinates.ToList();
//var tempdress = ThisOutfitData.heroine.isDresses.ToList();
//tempcoord.Add(4);
Expand Down Expand Up @@ -240,7 +243,7 @@ private static void NPCRestart(NPC __instance)
}
ThisOutfitData.ChangeKoiToClub = false;
ThisOutfitData.ChangeClubToKoi = false;
if (__instance.mapNo == 22)
if (__instance.mapNo == 22 && UnityEngine.Random.Range(1, 101) <= ExpandedOutfit.KoiChance.Value)
{
ThisOutfitData.PreviousPath = ThisOutfitData.outfitpath[4];
ThisOutfitData.outfitpath[4] = ThisOutfitData.Koipath;
Expand Down

0 comments on commit 67cd494

Please sign in to comment.