Start of turn events for KTM point runs

A big part of obtaining the largest amount of points in Sengoku Rance is making good use of start of turn events (SOTE). After all, if you were able to freely decide which SOTE will play, it would functionally be as if you had one extra fan each turn.

Unfortunately freely deciding which SOTE will play is not in the realm of possibilities. What we can do however, is limit the amount of unnecessary SOTE that will play.

How does this work? The game has a function called  織田ＴＯＰ強制 which is essentially just a long list of if statements. The event that shows up first in that list while you fulfill the if condition will play as the next SOTE.

A (mostly machine-)translated version of this function can be found here: https://pastebin.com/7KHFWbr7

We don't want to go through 2000 lines of code, so we will split this function into 13 parts in descending order of priority. Since we are only interested in KTM point runs, events in (2), (3) and (10) will not happen. Also we are going to be too quick to trigger (5) and don't care about (14) at all. Curiously, Nanjou Ran won't run away in KTM routes and since we aren't interested in Senhime who can't have End Game Points, (8) is irrelevant as well.
 * 1) Initial Events
 * 2) Nobunaga at Honnouji events
 * 3) Non-KTM Route Events
 * 4) KTM Route Events
 * 5) War preparations events (second game)
 * 6) Character join events
 * 7) Ashikaga war events
 * 8) Runaway events (Najou Ran, Senhime)
 * 9) Full House events (good medicine)
 * 10) Route heroine events
 * 11) Special Commander events
 * 12) Miscellaneous events
 * 13) Generic Commander affection up
 * 14) More Miscellaneous events.

If we could have it our way, only certain events in (5), (10), (11) and (12) would happen, so our first focus is eliminating events in
 * 1. Initial Events
 * 4. KTM Route Events
 * 7. Ashikaga war events
 * 8. Full House events (good medicine)
 * 11 Miscellaneous Events

"Turn 1 event"

 * prerequisites: # turns = 1
 * preventable: no

"Battle for the first time"

 * prerequisites: none
 * preventable: no

"Sill H event"

 * prerequisites: none
 * preventable: yes, manually activate it before it triggers.

"Suzume introduction"

 * prerequisites: # turns > 5 OR  Ashikaga conquered/vassalled
 * preventable: no

"Declaration of war explanation"

 * prerequisites: # turns = 7 AND haven't declared any wars yet
 * preventable: yes, declare wars beforehand

"Suzume joins"

 * prerequisites: "Suzume introduction" seen
 * preventable: no

"Cherry Blossom viewing"

 * prerequisites: Suzume AND ( # turns > 11 OR  Ashikaga or Iga conquered/vassalled )
 * preventable: no

"Nobunaga's daily life 1"

 * prerequisites: none
 * preventable: no

"Nobunaga's daily life 2"

 * prerequisites: none
 * preventable: no

"Nobunaga's daily life 2"

 * prerequisites: none
 * preventable: no

"Shimazu brothers at Kouhime's teahouse"

 * prerequisites: "Toshihisa has sex with Agireda"
 * preventable: MORE RESEARCH NEEDED (Event name: 島津／香姫かどわかし )

"Rance finds out that a female commander defected"

 * prerequisites: "Suzume warns about Shimazu brothers" has been seen AND Shimazu brothers haven't surrendered
 * preventable: yes. The way the defection works is that a random commander is selected from your roster. If the commander is either male, important or cleared, the event fails and another one is selected.

The random commander selection function is not really random in the sense that reloading won't change the outcome. So how do we change it? Random commander selection is dependent on a global variable, that is also used to determine the success of assassination attempts. This means that whenever you try to assassinate a unit in battle, this variable will be changed.

tl;dr: If you get this event, try reloading to the last save and use / (don't use if you already did) assassinate in your next battle or fight less battles at the end of your turn and you might get a different event.

"Rance is mad about Shimazu"

 * prerequisites: "Rance hears report about defection"
 * preventable: yes, don't let a female commander defect, see above.

"Shimazu brothers surrender"

 * prerequisites: Kurohime has been kidnapped
 * preventable: yes, don't kidnap Kurohime.

"Ashikaga conquers smaller countries"

 * prerequisites: at war with Ashikaga
 * preventable: yes, defeat Ashikaga before this event is triggered 

"Gossip about Ashikaga Choushin"
Note: Due to the amount of unskippable initial SOTE, these can only trigger at turn 9 (10 if you haven't H'd Sill manually), so you have to defeat Ashikaga before turn 8 is over.
 * prerequisites: at war with Ashikaga
 * preventable: yes, defeat Ashikaga before this event is triggered

Full House Events
These events always happen, when you've hired all important commanders of a certain house and you will get a "good medicine" item.

The following events exist:
 * Takuga (Sakamoto Ryouma, Gon, Kawanoe Mine, Kawanoe Yuzuru)

They are preventable by not having certain characters.
 * Uesugi (Uesugi Kenshin, Naoe Ai)
 * Ashikaga (Ashikaga Choushin, Ikkyu)
 * Asai-Asakura (Asakura Yoshikage, Yukihime)
 * Tanegashima (Yuzuhara Yuzumi, Tanegashima Shigehiko)
 * Tenshiism (Seigan, Genri)
 * One eyed House (Dokuganryu Masamune, Omachi, Nogiku, Orime, Noir)
 * Tokugawa (Tokugawa Ieyasu, Sill, Sakai Tadatsugu, Honda Tadakatsu, Sakakibara Yasumasa, Ii Naomasa, Hattori Hanzou)
 * Shimazu (Shimazu Yoshihisa, Shimazu Kazuhisa, Shimazu Iehisa, Shimazu Toshihisa)
 * Zeth (Rizna, Magic, Uruza)
 * Leazas (Leila, Maria, Kentou Kanami)
 * It is very convenient that both Mouri and Takeda don't have these events, since they are always chosen as 2nd game house bonuses and we don't want to kick their commanders early in the game.
 * If we decide to get Zeth reinforcements, we need to kick Rizna immediately after getting Magic to prevent Zeth's Full House event from happening on the next turn.
 * The Leazas event is not be a problem either, since we don't want to get Leila. Her arrival comes way too late and you have to keep Kenshin around until you clear her.
 * Preventing the Uesugi Full House event is more tricky. It is highly likely that it will trigger immediately after the turn in which Naoe Ai joins. Since she just joined, we can't kick her though, because her unit is exhausted. The Chinese players have found a workaround in the 323 point run. They reactivate Naoe Ai with a motivational paper, go on a quick botan hunt in Sado and kick her and Kenshin before the turn ends.

"Fans of Daidouji Komatsu demand her release"

 * prerequisites: Daidouji Komatsu is in your prison
 * preventable: yes, release her. Alternatively you can keep her for the SAT, but this SOTE will usually trigger after you've already gotten four fans and then it's useless.

"Yuzuhara talks about the Akashita Dog"

 * prerequisites: Yuzuhara Yuzumi in your roster, Akashita Dog hasn't been found (even if you have the item, the search event will still be untriggered), her number of affection points > 0
 * preventable: Technically yes. Not recruiting Yuzuhara would be a start. The problem is that she's fantastic for the 160 SAT grind, so we don't really want to go without her. Chinese players claim that they managed to push this SOTE out, but I see many generic commander affection up SOTE between her joining and the end of the game, which should have lower priority. Just keeping her affection points at 0 also isn't a possibility since you are going to use +3 SAT affection bonuses.

THIS NEEDS MORE RESEARCH

Special Commander Events we don't want to happen
-- This part is not yet completed. ---

"Sill turn 11 event"

 * prerequisites: # turns > 10
 * preventable: no

"Sill turn 21 event"

 * prerequisites: # turns > 20
 * preventable: no

"Sill turn 31 event"

 * prerequisites: # turns > 30
 * preventable: no

"Sill turn 41 event"

 * prerequisites: # turns > 40
 * preventable: no

"Kouhime Event #1"

 * prerequisites: none
 * preventable: yes, activate manually

"Kouhime Event #2"

 * prerequisites: none
 * preventable: yes, activate manually

"Kouhime Event #3"

 * prerequisites: Shibata Katsui
 * preventable: yes, activate manually or kick Shibata Katsui before it triggers (better)

"Kouhime Event #4"

 * prerequisites: none
 * preventable: yes, activate manually

"Inukai trains Suzume"

 * prerequisites: Inukai in roster
 * preventable: Technically yes. Just get him very late in the game just before you finish and there won't be time for the event to trigger. This is done in the 323 point run.

"Inukai trains Kanami"

 * prerequisites: Inukai & Kanami in roster
 * preventable: yes, don't get Kanami. If you do want to get her, the above applies as well.