
//==============================================================================
//		MESSAGE ALERTS
//==============================================================================

// I forgot that A_Log prints to all players anyway
// I guess I'll keep them around commented out in case I change the message to something cooler

ACTOR RLMessageSender : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_Jump(256, "SendMessages")
	Goto SendMessages
  SendMessages:
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER8)*/
    Stop
  Disabled:
	TNT1 A 0
    Stop
  }
}

//------------------------------------------------------------------------------
//		ITEM MESSAGES

ACTOR RLUniqueItemSpawnMessageSender : RLMessageSender
{
  States
  {
  SendMessages:
	TNT1 A 0 A_JumpIfInventory("RLUniqueItemSpawnMessageLimiter", 1, "Disabled", AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageLimiter", 1, AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessage", 1, AAPTR_PLAYER8)*/
    Stop
  }
}

ACTOR RLUniqueItemSpawnMessage : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3,4,5)
    TNT1 A 0 A_Log("You feel there is something really valuable here...")
    Stop
    TNT1 A 0 A_Log("You've got a good feeling about this place...")
    Stop
    TNT1 A 0 A_Log("Better search the area, might find something nice...")
    Stop
    TNT1 A 0 A_Log("It seems like this place was used to guard something powerful...")
    Stop
    TNT1 A 0 A_Log("The enemy seems determined to keep you from something...")
    Stop
  }
}

ACTOR RLDemonicItemSpawnMessageSender : RLMessageSender
{
  States
  {
  SendMessages:
	TNT1 A 0 A_JumpIfInventory("RLDemonicItemSpawnMessageLimiter", 1, "Disabled", AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessageLimiter", 1, AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLDemonicItemSpawnMessage", 1, AAPTR_PLAYER8)*/
    Stop
  }
}

ACTOR RLDemonicItemSpawnMessage : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3,4,5)
    TNT1 A 0 A_Log("You feel a vile, yet unthreatening prescence here...")
    Stop
    TNT1 A 0 A_Log("Strange whispers echo at the edges of your senses...")
    Stop
    TNT1 A 0 A_Log("A lust to kill permeates the area, but without direction...")
    Stop
    TNT1 A 0 A_Log("You feel like something strange is watching you...")
    Stop
    TNT1 A 0 A_Log("The enemy seem obsessed with this place...")
    Stop
  }
}

ACTOR RLLegendaryItemSpawnMessageSender : RLMessageSender
{
  States
  {
  SendMessages:
	TNT1 A 0 A_JumpIfInventory("RLLegendaryItemSpawnMessageLimiter", 1, "Disabled", AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessageLimiter", 1, AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLLegendaryItemSpawnMessage", 1, AAPTR_PLAYER8)*/
    Stop
  }
}

ACTOR RLLegendaryItemSpawnMessage : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3,4,5)
    TNT1 A 0 A_Log("You feel there is something amazing here...")
    Stop
    TNT1 A 0 A_Log("You have an overwhelming desire to search the area...")
    Stop
    TNT1 A 0 A_Log("You feel safer, as though something was protecting you...")
    Stop
    TNT1 A 0 A_Log("You feel as though you are being guided towards something...")
    Stop
    TNT1 A 0 A_Log("The enemy seems terrified of something, sounds interesting...")
    Stop
  }
}

ACTOR RLMasterItemSpawnMessageSender : RLMessageSender
{
  States
  {
  SendMessages:
	TNT1 A 0 A_JumpIfInventory("RLMasterItemSpawnMessageLimiter", 1, "Disabled", AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessageLimiter", 1, AAPTR_PLAYER1)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLMasterItemSpawnMessage", 1, AAPTR_PLAYER8)*/
    Stop
  }
}

ACTOR RLMasterItemSpawnMessage : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3,4,5)
    TNT1 A 0 A_Log("Your PDA is picking up a signal from some highly advanced tech...")
    Stop
    TNT1 A 0 A_Log("Seems like something here is really cool...")
    Stop
    TNT1 A 0 A_Log("This place was marked as containing prototype equipment...")
    Stop
    TNT1 A 0 A_Log("The last log from the engineers indicated something hi-tech was around here...")
    Stop
    TNT1 A 0 A_Log("If there is advanced equipment around here, you want it...")
    Stop
  }
}

//------------------------------------------------------------------------------
//		WARNING MESSAGES

actor RLNewBossMessageDelayer : RLNullActor
{
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A random(35,700)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLNewBossMessage", 1, AAPTR_PLAYER8)*/
    Stop
    }
}

ACTOR RLNewBossMessage : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3,4,5,6,7,8,9,10)
    TNT1 A 0 A_Log("It seems you've attracted the wrong kind of attention...")
    Stop
    TNT1 A 0 A_Log("Unseen eyes have witnessed your discovery...")
    Stop
    TNT1 A 0 A_Log("You feel the hairs on the back of your neck rise...")
    Stop
    TNT1 A 0 A_Log("You feel the icy grip of fear on your heart...")
    Stop
    TNT1 A 0 A_Log("You feel like you heard something, but not with your ears...")
    Stop
    TNT1 A 0 A_Log("An anxious feeling steals over you, but you can't work out why...")
    Stop
    TNT1 A 0 A_Log("It seems like the shadows around you are growing darker...")
    Stop
    TNT1 A 0 A_Log("Maybe you shouldn't have touched that...")
    Stop
    TNT1 A 0 A_Log("Something unspeakably vile seems to be lurking at the edge of your senses...")
    Stop
    TNT1 A 0 A_Log("Perhaps that item was left there for a reason...")
    Stop
  }
}

//------------------------------------------------------------------------------
//		DARK MARTY

ACTOR RLDarkMartyArrivalMessageSender : RLMessageSender
{
  States
  {
  SendMessages:
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage", 1, AAPTR_PLAYER8)*/
    Stop
  }
}

ACTOR RLDarkMartyArrivalMessageSender2 : RLMessageSender
{
  States
  {
  SendMessages:
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER1)
/*	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER2)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER3)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER4)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER5)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER6)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER7)
	TNT1 A 0 A_GiveInventory("RLDarkMartyArrivalMessage2", 1, AAPTR_PLAYER8)*/
    Stop
  }
}

ACTOR RLDarkMartyArrivalMessage : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3)
    TNT1 A 0 A_Log("It seems someone from the EdgeVerse has arrived to fight you...")
    Stop
    TNT1 A 0 A_Log("Herald of the Treepocalypse, Dark Marty is here...")
    Stop
    TNT1 A 0 A_Log("Looks like you're in trouble, but at least it's not double...")
    Stop
  }
}

ACTOR RLDarkMartyArrivalMessage2 : RLCustomFunction
{
  States
  {
  Pickup:
	TNT1 A 0 A_JumpIf(CallACS("DRLA_messagealerts"), 1)
    Stop
    TNT1 A 0 A_Jump(256, 1,2,3)
    TNT1 A 0 A_Log("Dark Marty is here to blast butts and grow trees, but he left his gardening tools at home...")
    Stop
    TNT1 A 0 A_Log("Time for a rematch against Dark Marty...")
    Stop
    TNT1 A 0 A_Log("You'd think he'd have learnt after the first fight...")
    Stop
  }
}
