SkeletonAmbushEvent.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using UnityEngine;
  2. /// <summary>
  3. /// Skeleton Ambush - Undead warriors rising from the earth
  4. /// Uses EnemyCharacterData for type-safe enemy references
  5. /// </summary>
  6. [CreateAssetMenu(fileName = "Skeleton Ambush", menuName = "RPG/Travel Events/Specific/Skeleton Ambush")]
  7. public class SkeletonAmbushEvent : CombatTravelEvent
  8. {
  9. void OnEnable()
  10. {
  11. eventName = "Skeleton Ambush";
  12. eventDescription = "Ancient skeletal warriors rise from the ground to attack your party!";
  13. eventType = EventType.Combat;
  14. rarity = EventRarity.Common;
  15. // Terrain preferences - high in dangerous/abandoned areas
  16. forestChance = 0.8f; // Common in dark forests
  17. mountainChance = 0.6f; // Moderate in mountains
  18. plainsChance = 0.3f; // Less common in open plains
  19. roadChance = 0.2f; // Much safer on roads
  20. townChance = 0.05f; // Very rare near civilization
  21. villageChance = 0.15f; // Uncommon near villages
  22. bridgeChance = 0.4f; // Moderate at crossings
  23. tunnelChance = 0.9f; // Very common in dark tunnels/caves
  24. // Combat settings
  25. minEnemies = 1;
  26. maxEnemies = 3;
  27. // NOTE: In the Inspector, drag your EnemyCharacterData assets here:
  28. // - SkeletonWarrior.asset
  29. // - Any other skeleton variants you create
  30. // This replaces the old string-based possibleEnemyTypes
  31. encounterDescriptions = new string[]
  32. {
  33. "Bones clatter as skeletal warriors emerge from the earth!",
  34. "Ancient skeletons wielding rusty weapons block your path!",
  35. "The ground splits open as undead skeletons rise to attack!",
  36. "Skeletal archers take aim from the shadows ahead!",
  37. "Weathered bones reassemble into hostile warriors!"
  38. };
  39. canOccurMultipleTimes = true;
  40. cooldownDays = 0.5f; // Can happen again after half a day
  41. }
  42. }