Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
rebalance
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmical committed Jul 17, 2021
1 parent 53c240c commit 42de3ca
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions RogueLibsCore.Test/Tests/Traits/Stinky.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using UnityEngine;

namespace RogueLibsCore.Test
Expand All @@ -15,8 +13,8 @@ public static void Setup()
.WithDescription(new CustomNameInfo("You smell really bad for some reason"))
.WithUnlock(new TraitUnlock { CharacterCreationCost = -5 });

RogueLibs.CreateCustomName("StinkReaction1", "Dialogue", new CustomNameInfo("Ew! You stink!"));
RogueLibs.CreateCustomName("StinkReaction2", "Dialogue", new CustomNameInfo("Ew! You smell really bad!"));
RogueLibs.CreateCustomName("StinkReaction1", "Dialogue", new CustomNameInfo("Ew!"));
RogueLibs.CreateCustomName("StinkReaction2", "Dialogue", new CustomNameInfo("Ew! You stink!"));
RogueLibs.CreateCustomName("StinkReaction3", "Dialogue", new CustomNameInfo("ARGHH! Get away from me!"));
}

Expand All @@ -26,19 +24,15 @@ public override void OnRemoved() { }
private const float stinkRange = 1f;
public void OnUpdated(TraitUpdatedArgs e)
{
e.UpdateDelay = 1f;
e.UpdateDelay = 2f;
foreach (Agent agent in gc.agentList.Where(a => Vector2.Distance(a.curPosition, Owner.curPosition) <= stinkRange))
{
if (agent == Owner) continue;
agent.relationships.AddStrikes(Owner, 1);
agent.SayDialogue($"StinkReaction{new System.Random().Next(3) + 1}");
gc.spawnerMain.SpawnDanger(agent, "Targeted", "AnnoyedAgent", Owner);
try { gc.spawnerMain.SpawnDanger(Owner, "Targeted", "AnnoyedAgent", agent); }
catch { }
}
}

public class Smeller
{
public Agent Agent;
public int Duration;
}
}
}

0 comments on commit 42de3ca

Please sign in to comment.