Les events se déroule bien comme il faut. Les aventuriers sont bien repasser en IsAvailable = true quand une quête se termine.
This commit is contained in:
parent
838f91ede7
commit
3ba8dad4a2
16 changed files with 310 additions and 68 deletions
|
|
@ -74,7 +74,11 @@ namespace Quests.Runtime
|
|||
case TargetingType.AllHeroes:
|
||||
return assignedAdventurers;
|
||||
case TargetingType.RandomHero:
|
||||
return new List<AdventurerClass> { assignedAdventurers[UnityEngine.Random.Range(0, assignedAdventurers.Count)] };
|
||||
if (assignedAdventurers == null || assignedAdventurers.Count == 0)
|
||||
return new List<AdventurerClass>();
|
||||
int count = assignedAdventurers.Count;
|
||||
int idx = UnityEngine.Random.Range(0, count);
|
||||
return new List<AdventurerClass> { assignedAdventurers[idx] };
|
||||
case TargetingType.LowestHp:
|
||||
return assignedAdventurers
|
||||
.OrderBy(adventurer => adventurer.Health)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue