# Infernal Affairs Agents
Infernal/Devil Affairs Agents (IAA/DAA, but to prevent confusion, it is DAA in this document) is a rework of Internal Affairs Agents (IAA) and Devils merged together, meant to make them more impactful in a round and make them more interesting for those participating in it.
LANGUAGE:
loop: The 'loop' is the list of all Devil Affair Agents who have to kill eachother, everyone is hunted and has to hunt someone else.
## Why the change
Negatives of IAA:
- Goes too fast
- Security has no reason to arrest Agents, they will just fight between eachother.
- Any Security who DOES arrest an IAA will instead slow the game down for whoever is hunting them, as they'll have to now deal with Security to get to their target.
Negatives of Devils:
- Only way to get ahead is through self antagging of others.
- Contracts do nothing but help encourage greytiding/self antagging.
- Devils require no actual skill and it's purely depending on the mood of other players on whether you will perform well or not.
## Goals
1. Make Internal Affairs a unique Antagonist separate from Tratior
2. Integrate the Antagonist with station jobs to make it more roleplay focused
3. Make them worth being arrested over by Security.
4. Make Devil something actually seen in-game without Admin intervention.
## Non-Goals
1. Add a "Security" antag, AKA one that Security will accept to help complete their objectives because it gets rid of other Antagonists.
2. Add a bunch of Antagonists that start strong then die off quickly, turning a round into a Greenshift.
## Lore (for boring folk)
Devil Affair Agents are Crewmembers that, for one reason or another, came in dire need of the Devil's help. In exchange for the help the Devil offered, these crewmembers entered a debt to him, for their soul.
When hearing about Space Station 13, the Devil had everyone apply for a position, to cause a battle royale between all of them for His own entertainment.
To help with this, he gave them each a Syndicate Uplink.
## Devil System
On roundstart, several people are chosen as the Devil Affair Agents, and one person is selected as the Devil. Devil agents are all put into the loop, while the Devil is given their default abilities.
### Devil Affair Agents
Agents are randomly selected on roundstart, barring Security and Command personnel. These people have to assassinate eachother and turn their bodies in to the Devil.
They start with 10 TC, rather than the default 20 TC.
When all other DAA agents are dead, they gain an objective to Hijack the Emergency shuttle, however at this point the Devil should have ascended, making this more of a 'fallback' roundending threat.
#### Tracking
Devil Agents will be able to track other Devil agents like Heretics can, through an action button that will give them the general direction of where their target is. This will replace their built-in tracker.
#### Uplink Items
Items purchased in the uplink should be deleted on the traitor's death. They were temporary items sold to them by the Devil, they should not be lootable off of them. This also plays into balance of Traitors getting TC for each kill, not items/open uplinks, as it would quickly devolve into experienced players rolling over newer ones.
#### Assassination & Touch Stone
When an Agent kills another, they will be able to, through their uplink, print out a touch stone. Using it on a body will allow you to mark it as your bounty. Devils can only redeem bodies if they have been marked, and it will grant a small number of TCs per kill.
If the Devil is dead, they will instead not get their TC reward, and will move onto the next person. At this point, their only reward is the Final objective, without any additional equipment along the way.
#### Lawyer Agents
Lawyers rolling Devil Affair Agents will instead trick the Devil, giving them the default 20 TC, but will not gain any for killing other Agents.
### Devil
The Devil is a single individual who spawns in a Human form. Their goal is to remain a secret, yet important, character that DAAs want to keep alive in order to redeem their targets.
They have two innate abilities:
- Summon Contract: This spawns a contract that will allow an individual to become a Devil Affair Agent, inserting them into the loop in exchange for an Uplink. This can be used on Security and Command personnel, but will not work on Lawyers, the Head of Personnel, and the Curator.
- Collect Soul: A spell used on dead Devil Affair Agents, will take the soul out of their body, making them unrevivable. This will advance the Devil's level, and allow the Agent who had them as a target to advance in their own assassination goals.
Devils will get some benefits while they collect souls, to make them not completely defenseless;
2 soul - Gets their Golden Violin
3 soul - Gets to spawn in their Pitchfork, a dual wielded weapon that sets players on fire and has a high block chance, but low damage. Meant primarily as a defensive tool.
4 souls - Gets their Ethereal Jaunt //intentionally skips one
8 souls - Ascends, granting them Devil form (Simple mob (or Basic mob if they are ported by then)) & Fireball
#### Death
When a Devil dies:
- They will slowly heal themselves and revive, unless gibbed.
When a Devil is gibbed, all Devil Affair Agents will no longer have to turn in objectives to them, instead it will update their objectives automatically on kills, but they will no longer get their TC reward, as the Devil is no longer there to pay it out. Their reward now is to go for the end-game 'last man alive' goal, they lose out on their extra TC due to not protecting their Devil.
#### Ascension
When a Devil recieves enough souls, they will Ascend and gain the ability to turn into their Demon form and back, at will, and give them their Fireball ability.
Additionally, they will lose their Contracts ability, as the 'loop' is finished once a Devil ascends.
The Devil can choose whether they go on a rampage after that, or just hang out and do whatever, but they are unable to remain stealthy after this point forward.
All Devil Affair Agents at this point will be able to continue their loop, and allow the last person standing to get their Hijack/DAGD objective, but they will no longer get additional gear as the Devil no longer has a use for them.
## HUDs
Affair Agents will be able to see the Antag HUD of the Devil, so they can immediately recognize them from anywhere.
The Devil can see ALL Agent HUDs, so they can immediately recognize someone trying to turn a body in.
## The Law
Security's job is to prevent Agents from turning in bodies to the Devil. They can do this by keeping away caught Agent's bodies from outsiders, or taking away the Devil's souls by killing them.
### The Lawyer
The Lawyer can take away people's status by reminding the person that their soul has already been sold to Nanotrasen. This will take them out of the loop and remove their uplink (and erase their memories of who the Devil is), however it will give the Devil a special objective to kill that person, granting the Devil a way of gaining souls outside of being turned in by other players.
This cannot be done on dead players, therefore cannot take away souls the Devil has already collected.
This ability is also an action that requires ~10-30 seconds to work, and will only work while in the Law Office, otherwise it is non-official and not effective, preventing the Lawyer from being able to "DAA check" people.
### The Curator
The Curator is someone who is already aware of the Devil's antiques. Outside of being unable to sign a contract to becom a DAA, they have the Codex, which could be used on Internal Affair agents to track down who the Devil is.
When scanning with the Codex:
1st DAA agent scanned: Gives the Department the Devil started in
2nd DAA agent scanned: Gives the Job the Devil started in
3rd DAA agent scanned: Gives the Devil's name
This is incredibly fast progression, but the point is that no Agent should ever leak to the Lawyer/Curator.
## Notes
1. Only Security and Command can't roll DAA roundstart. Lawyers and Curators can be roundstart agents.
2. Only the HoP/Lawyer/Curator can't be given DAA through Contracts
3. This means the HoP is the only person who can never be a DAA agent.
### Code Standards
This should be done using Signals and it's own Devils subsystem, that keeps track of all agents and the devil, who's soul was collected, etc.
We should essentially NEVER be processing anything here, it should run on signals such as 'Mob Death', 'Mob Revival', 'Devil Soul Collected', 'Contract Signed'.
Tying this system to `/datum/game_mode` or even Dynamic would be terrible as it would limit it to that one system that may or may not be around in the future. IAA is already terrible in Dynamic, lets not repeat the same problems here.
# Alternatives
The Devil does not need to be here for the gamemode to work, Devil can exist solely as a flavortext thing. Basically, it's inclusion is optional and redeeming bodies can be as simple as how contractors work (just podding it up), or taking their souls simply on death.
IAA burning out can also be solved by making it a Dynamic-only gamemode. It will work in tangent with other gamerules simultaneously, which could turn IAA into a side-show rather than the main events of a round.
###### tags: `Yogstation`