Elin Decompiled Documentation EA 23.189 Nightly
Loading...
Searching...
No Matches
AI_Fuck Class Reference
Inheritance diagram for AI_Fuck:
AIAct Act Element EClass AI_TendAnimal

Public Types

enum  FuckType { fuck , tame }
 
- Public Types inherited from AIAct
enum  Status { Running , Fail , Success }
 
- Public Types inherited from Act
enum  CostType { None , MP , SP }
 

Public Member Functions

override IEnumerable< StatusRun ()
 
void Finish ()
 
- Public Member Functions inherited from AIAct
override string ToString ()
 
override MultiSprite GetStateIcon ()
 
virtual bool ShouldAllyAttack (Chara tg)
 
virtual Point GetDestination ()
 
AIProgress GetProgress ()
 
string GetCurrentActionText ()
 
override bool IsToolValid ()
 
virtual void OnStart ()
 
void SetOwner (Chara c)
 
virtual void OnSetOwner ()
 
void SetChild (AIAct seq, Func< Status > _onChildFail=null)
 
void Start ()
 
override bool Perform ()
 
Status Restart ()
 
Status Success (Action action=null)
 
virtual void OnSuccess ()
 
bool TryCancel (Card c)
 
virtual Status Cancel ()
 
virtual void OnCancel ()
 
virtual void OnCancelOrSuccess ()
 
virtual bool CanManualCancel ()
 
Status KeepRunning ()
 
void Reset ()
 
virtual void OnReset ()
 
Status Tick ()
 
virtual IEnumerable< StatusRun ()
 
Status TickChild ()
 
Status Do (AIAct _seq, Func< Status > _onChildFail=null)
 
Status DoGotoInteraction (Point pos, Func< Status > _onChildFail=null)
 
Status DoGoto (Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
 
Status DoGoto (Card card, Func< Status > _onChildFail=null)
 
Status DoGoto (Card card, int dist, Func< Status > _onChildFail=null)
 
Status DoGotoSpot (Card card, Func< Status > _onChildFail=null)
 
Status DoGoto< T > (Func< Status > _onChildFail=null)
 
Status DoGotoSpot< T > (Func< Status > _onChildFail=null, bool ignoreAccessType=false)
 
Status DoGrab (Card card, int num=-1, bool pickHeld=false, Func< Status > _onChildFail=null)
 
Status DoGrab< T > ()
 
Status DoProgress ()
 
Status DoIdle (int repeat=3)
 
Status DoWait (int count=1)
 
virtual AIProgress CreateProgress ()
 
virtual void OnCreateProgress (Progress_Custom p)
 
virtual bool CanProgress ()
 
virtual void OnBeforeProgress ()
 
virtual void OnProgress ()
 
virtual void OnProgressComplete ()
 
void SimulateZone (int days)
 
virtual void OnSimulateZone (int days)
 
virtual void OnSimulatePosition ()
 
- Public Member Functions inherited from Act
virtual CursorInfo GetCursorIcon (Card c)
 
virtual MultiSprite GetStateIcon ()
 
override Sprite GetSprite ()
 
virtual bool ShowMouseHint (Card c)
 
virtual bool IsValidTC (Card c)
 
virtual string GetHintText (string str="")
 
virtual string GetText (string str="")
 
virtual string GetTextSmall (Card c)
 
bool IsTargetHostileParty ()
 
virtual Color GetActPlanColor ()
 
virtual bool Perform ()
 
virtual bool CanPerform ()
 
bool Perform (Chara _cc, Card _tc=null, Point _tp=null)
 
bool CanPerform (Chara _cc, Card _tc=null, Point _tp=null)
 
virtual bool IsToolValid ()
 
new void SetImage (Image image)
 
virtual void OnMarkMapHighlights ()
 
virtual bool ShouldMapHighlight (Point p)
 
- Public Member Functions inherited from Element
virtual SourceElement.Row GetSource ()
 
virtual int GetSourcePotential (int v)
 
virtual Sprite GetSprite ()
 
int GetMaterialSourceValue (Thing t, int v)
 
virtual int GetSourceValue (int v, int lv, SourceValueType type)
 
virtual Sprite GetIcon (string suffix="")
 
bool IsActive (Card c)
 
int SortVal (bool charaSheet=false)
 
virtual bool CanLink (ElementContainer owner)
 
bool HasTag (string tag)
 
void SetImage (Image i)
 
virtual string GetDetail ()
 
bool IsFactionElement (Chara c)
 
Element GetParent (Card c)
 
void WriteNote (UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
 
void WriteNoteWithRef (UINote n, ElementContainer owner, Action< UINote > onWriteNote, Element refEle)
 
void _WriteNote (UINote n, Chara c, Act act)
 
void AddHeaderAbility (UINote n)
 
void _WriteNote (UINote n, ElementContainer owner, Action< UINote > onWriteNote, bool isRef, bool addHeader=true)
 
void AddEncNote (UINote n, Card Card, ElementContainer.NoteMode mode=ElementContainer.NoteMode.Default, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
 
virtual void OnWriteNote (UINote n, ElementContainer owner)
 
virtual void OnChangeValue ()
 
void CheckLevelBonus (ElementContainer owner, UINote n=null)
 
int GetSortVal (UIList.SortMode m)
 
virtual Act.Cost GetCost (Chara c)
 
virtual int GetPower (Card c)
 
virtual void SetTextValue (UIText text)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Public Attributes

Chara target
 
bool sell
 
bool bitch
 
bool succubus
 
bool ntr
 
int maxProgress
 
int progress
 
int fails
 
int totalAffinity
 
- Public Attributes inherited from AIAct
new Chara owner
 
Status status
 
IEnumerator< StatusEnumerator
 
AIAct child
 
AIAct parent
 
byte restartCount
 
Func< StatusonChildFail
 
Func< bool > isFail
 
- Public Attributes inherited from Element
SourceElement.Row _source
 
int id
 
int vBase
 
int vExp
 
int vPotential
 
int vTempPotential
 
int vLink
 
int vSource
 
int vSourcePotential
 
ElementContainer owner
 

Properties

virtual FuckType Type [get]
 
override bool PushChara [get]
 
override bool IsAutoTurn [get]
 
override TargetType TargetType [get]
 
override int MaxProgress [get]
 
override int CurrentProgress [get]
 
override bool CancelOnAggro [get]
 
override bool CancelWhenDamaged [get]
 
- Properties inherited from AIAct
virtual bool IsRunning [get]
 
bool IsChildRunning [get]
 
bool IsMoveAI [get]
 
virtual int MaxRestart [get]
 
virtual new string Name [get]
 
virtual MultiSprite stateIcon [get]
 
virtual Sprite actionIcon [get]
 
virtual bool IsNoGoal [get]
 
virtual bool IsAutoTurn [get]
 
virtual bool IsIdle [get]
 
virtual bool CancelOnAggro [get]
 
virtual bool PushChara [get]
 
virtual int MaxProgress [get]
 
virtual bool ShowProgress [get]
 
virtual bool UseTurbo [get]
 
virtual int CurrentProgress [get]
 
virtual bool ShowCursor [get]
 
virtual bool CancelWhenDamaged [get]
 
virtual bool CancelWhenMoved [get]
 
virtual bool InformCancel [get]
 
virtual Thing RenderThing [get]
 
AIAct Current [get]
 
override bool IsAct [get]
 
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual bool HasProgress [get]
 
- Properties inherited from Act
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual CursorInfo CursorIcon [get]
 
virtual string ID [get]
 
virtual bool IsAct [get]
 
virtual bool WillEndTurn [get]
 
virtual bool CloseLayers [get]
 
virtual int LeftHand [get]
 
virtual int RightHand [get]
 
virtual int ElementPowerMod [get]
 
virtual bool ShowMapHighlight [get]
 
virtual bool ShowMapHighlightBlock [get]
 
virtual bool PickHeldOnStart [get]
 
virtual bool DropHeldOnStart [get]
 
virtual bool CanPressRepeat [get]
 
virtual bool CanAutofire [get]
 
virtual bool ResetAxis [get]
 
virtual bool RequireTool [get]
 
virtual bool IsHostileAct [get]
 
virtual bool HideRightInfo [get]
 
virtual bool HaveLongPressAction [get]
 
virtual float Radius [get]
 
virtual int PerformDistance [get]
 
virtual int MaxRadius [get]
 
virtual TargetType TargetType [get]
 
virtual bool LocalAct [get]
 
virtual bool CanRapidFire [get]
 
virtual float RapidDelay [get]
 
virtual bool ShowAuto [get]
 
virtual bool IsCrime [get]
 
- Properties inherited from Element
SourceElement.Row source [get]
 
virtual int DisplayValue [get]
 
virtual int MinValue [get]
 
int Value [get]
 
int ValueWithoutLink [get]
 
virtual int MinPotential [get]
 
int Potential [get]
 
virtual bool CanGainExp [get]
 
bool IsFlag [get]
 
virtual string Name [get]
 
virtual string FullName [get]
 
virtual int ExpToNext [get]
 
virtual bool UseExpMod [get]
 
virtual int CostTrain [get]
 
virtual int CostLearn [get]
 
virtual bool ShowXP [get]
 
virtual bool ShowMsgOnValueChanged [get]
 
virtual bool ShowValue [get]
 
virtual bool ShowPotential [get]
 
virtual bool UsePotential [get]
 
virtual bool PotentialAsStock [get]
 
virtual bool ShowRelativeAttribute [get]
 
virtual bool ShowBonuses [get]
 
virtual string ShortName [get]
 
bool IsGlobalElement [get]
 
bool IsFactionWideElement [get]
 
bool IsPartyWideElement [get]
 
virtual bool ShowEncNumber [get]
 
bool IsTrait [get]
 
bool IsFoodTrait [get]
 
bool IsFoodTraitMain [get]
 
bool IsMainAttribute [get]
 
Act act [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Act
static void SetReference (Chara _cc, Card _tc=null, Point _tp=null)
 
static void SetTool (Thing t)
 
- Static Public Member Functions inherited from Element
static string GetName (string alias)
 
static SourceElement.Row Get (int id)
 
static Dictionary< int, int > GetElementMap (int[] list)
 
static Dictionary< int, int > GetElementMap (int[] list, Dictionary< int, int > map)
 
static SourceElement.Row GetRandomElement (int lv=1, bool useWeight=true)
 
static Element Create (int id, int v=0)
 
static Element Create (string id, int v=1)
 
static int GetId (string alias)
 
static int GetResistLv (int v)
 
static int GetResistDamage (int dmg, int v, int power=0)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from Act
static Chara CC
 
static Card TC
 
static Point TP = new Point()
 
static Thing TOOL
 
static int powerMod = 100
 
static bool forcePt
 
static Act CurrentAct
 
- Static Public Attributes inherited from Element
const int Div = 5
 
static Element Void = new Element()
 
static int[] List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 }
 
static int[] List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 }
 
static int[] List_Body = new int[4] { 70, 72, 71, 77 }
 
static int[] List_Mind = new int[4] { 74, 75, 76, 73 }
 
static List< SourceElement.RowListElements = new List<SourceElement.Row>()
 
static List< SourceElement.RowListAttackElements = new List<SourceElement.Row>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 4 of file AI_Fuck.cs.

Member Enumeration Documentation

◆ FuckType

Enumerator
fuck 
tame 

Definition at line 6 of file AI_Fuck.cs.

Member Function Documentation

◆ Finish()

void AI_Fuck.Finish ( )
inline

Definition at line 176 of file AI_Fuck.cs.

177 {
178 Chara chara = (sell ? target : owner);
179 Chara chara2 = (sell ? owner : target);
180 if (chara.isDead || chara2.isDead)
181 {
182 return;
183 }
184 bool flag = EClass.rnd(2) == 0;
185 switch (Type)
186 {
187 case FuckType.fuck:
188 {
189 for (int i = 0; i < 2; i++)
190 {
191 Chara chara3 = ((i == 0) ? chara : chara2);
192 chara3.RemoveCondition<ConDrunk>();
193 if (EClass.rnd(15) == 0 && !chara3.HasElement(1216))
194 {
195 chara3.AddCondition<ConDisease>(200);
196 }
197 chara3.ModExp(77, 250);
198 chara3.ModExp(71, 250);
199 chara3.ModExp(75, 250);
200 }
201 if (!chara2.HasElement(1216))
202 {
203 if (EClass.rnd(5) == 0)
204 {
205 chara2.AddCondition<ConParalyze>(500);
206 }
207 if (EClass.rnd(3) == 0)
208 {
209 chara2.AddCondition<ConInsane>(100 + EClass.rnd(100));
210 }
211 }
212 int num3 = CalcMoney.Whore(chara2, chara);
213 chara.Talk("tail_after");
214 bool flag3 = false;
215 if (succubus)
216 {
217 chara.ShowEmo(Emo.love);
218 chara2.ShowEmo(Emo.love);
219 EClass.player.forceTalk = true;
220 chara2.Talk("seduced");
221 }
222 else if (chara != EClass.pc)
223 {
224 Chara chara4 = chara;
225 Chara chara5 = chara2;
226 if (bitch)
227 {
228 chara = chara5;
229 chara2 = chara4;
230 }
231 Debug.Log("buyer:" + chara.Name + " seller:" + chara2.Name + " money:" + num3);
232 if (!chara.IsPC)
233 {
234 chara.ModCurrency(EClass.rndHalf(num3));
235 }
236 if (!chara2.IsPC && chara.GetCurrency() < num3 && EClass.rnd(2) == 0)
237 {
238 num3 = chara.GetCurrency();
239 }
240 Debug.Log("money:" + num3 + " buyer:" + chara.GetCurrency());
241 if (chara.GetCurrency() >= num3)
242 {
243 chara.Talk("tail_pay");
244 }
245 else
246 {
247 chara.Talk("tail_nomoney");
248 num3 = chara.GetCurrency();
249 chara2.Say("angry", chara2);
250 chara2.Talk("angry");
251 flag = (sell ? true : false);
252 if (EClass.rnd(chara.IsPC ? 2 : 20) == 0)
253 {
254 flag3 = true;
255 }
256 }
257 chara.ModCurrency(-num3);
258 if (chara2 == EClass.pc)
259 {
260 if (num3 > 0)
261 {
264 }
265 }
266 else
267 {
268 int num4 = (chara2.CHA * 10 + 100) / ((chara2.IsPCFaction && chara2.memberType == FactionMemberType.Default) ? 1 : 10);
269 if (chara2.GetCurrency() - num4 > 0)
270 {
271 chara2.c_allowance += num3;
272 }
273 else
274 {
275 chara2.ModCurrency(num3);
276 }
277 }
278 chara = chara4;
279 chara2 = chara5;
280 }
281 if (flag3)
282 {
283 chara2.DoHostileAction(chara);
284 }
285 if (chara.IsPCParty || chara2.IsPCParty)
286 {
287 chara.stamina.Mod(-5 - EClass.rnd(chara.stamina.max / 10 + (succubus ? StaminaCost(chara2, chara) : 0) + 1));
288 chara2.stamina.Mod(-5 - EClass.rnd(chara2.stamina.max / 20 + (succubus ? StaminaCost(chara, chara2) : 0) + 1));
289 }
290 SuccubusExp(chara, chara2);
291 SuccubusExp(chara2, chara);
292 chara2.ModAffinity(chara, flag ? 10 : (-5));
293 if (chara == EClass.pc || chara2 == EClass.pc)
294 {
296 }
297 if (!ntr || !chara.HasElement(1239) || chara2.HasElement(1216))
298 {
299 break;
300 }
301 if (chara2.HasElement(758))
302 {
303 if (chara.ExistsOnMap)
304 {
305 chara.stamina.Mod(-1000000);
306 }
307 }
308 else if (chara2.ExistsOnMap)
309 {
310 chara2.stamina.Mod((!chara2.IsPCFaction) ? (-10000) : (chara2.IsPC ? (-25) : (-50)));
311 }
312 break;
313 }
314 case FuckType.tame:
315 {
316 int num = ((!chara2.IsPCFaction) ? (chara2.IsHuman ? 10 : 5) : (chara2.IsHuman ? 5 : 0));
317 Msg.Say("tame_end", target);
318 target.PlaySound("groomed");
319 target.PlayEffect("heal_tick");
320 target.hygiene.Mod(15);
321 if (chara == EClass.pc)
322 {
324 }
325 if (target == owner)
326 {
327 break;
328 }
329 if (totalAffinity > 0)
330 {
331 chara.Say("brush_success", target, owner);
332 }
333 else
334 {
335 chara.Say("brush_fail", target, owner);
336 num *= 5;
337 }
339 bool flag2 = num2 && chara2.affinity.CanInvite() && chara2.GetBestAttribute() < EClass.pc.CHA;
340 if (num2)
341 {
342 if (flag2)
343 {
344 chara.Say("tame_success", owner, target);
345 chara2.MakeAlly();
346 }
347 else
348 {
349 chara.Say("tame_fail", chara, chara2);
350 }
351 }
352 if (fails > 0 && num > EClass.rnd(100))
353 {
354 chara2.DoHostileAction(chara);
355 chara2.calmCheckTurn *= 3;
356 }
357 break;
358 }
359 }
360 static int StaminaCost(Chara c1, Chara c2)
361 {
362 return (int)Mathf.Max(10f * (float)c1.END / (float)Mathf.Max(c2.END, 1), 0f);
363 }
364 static void SuccubusExp(Chara c, Chara tg)
365 {
366 if (!c.HasElement(1216))
367 {
368 return;
369 }
370 foreach (Element item in tg.elements.ListBestAttributes())
371 {
372 if (c.elements.ValueWithoutLink(item.id) < item.ValueWithoutLink)
373 {
374 c.elements.ModTempPotential(item.id, 1 + EClass.rnd(item.ValueWithoutLink - c.elements.ValueWithoutLink(item.id) / 5 + 1));
375 c.Say("succubus_exp", c, item.Name.ToLower());
376 break;
377 }
378 }
379 }
380 }
Emo
Definition: Emo.cs:2
FactionMemberType
new Chara owner
Definition: AIAct.cs:14
bool sell
Definition: AI_Fuck.cs:14
int totalAffinity
Definition: AI_Fuck.cs:28
bool succubus
Definition: AI_Fuck.cs:18
bool ntr
Definition: AI_Fuck.cs:20
int fails
Definition: AI_Fuck.cs:26
Chara target
Definition: AI_Fuck.cs:12
FuckType
Definition: AI_Fuck.cs:7
virtual FuckType Type
Definition: AI_Fuck.cs:30
bool bitch
Definition: AI_Fuck.cs:16
static int Whore(Chara seller, Chara buyer)
Definition: CalcMoney.cs:55
virtual Chara Chara
Definition: Card.cs:2032
ElementContainerCard elements
Definition: Card.cs:39
int END
Definition: Card.cs:2299
bool HasElement(int ele, int req=1)
Definition: Card.cs:5638
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5852
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6402
string Name
Definition: Card.cs:2099
int CHA
Definition: Card.cs:2309
bool ExistsOnMap
Definition: Card.cs:2047
Thing SetNum(int a)
Definition: Card.cs:3393
int GetCurrency(string id="money")
Definition: Card.cs:3867
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5886
void ShowEmo(Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
Definition: Card.cs:5820
void ModCurrency(int a, string id="money")
Definition: Card.cs:3853
void ModExp(string alias, int a)
Definition: Card.cs:2610
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6499
Definition: Chara.cs:10
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8823
override bool IsPC
Definition: Chara.cs:610
override bool IsPCParty
Definition: Chara.cs:613
Stats hygiene
Definition: Chara.cs:1134
Stats stamina
Definition: Chara.cs:1128
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6052
bool isDead
Definition: Chara.cs:387
Definition: EClass.cs:5
static int rnd(long a)
Definition: EClass.cs:58
static int rndHalf(int a)
Definition: EClass.cs:87
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
Element ModTempPotential(int ele, int v, int threshMsg=0)
int ValueWithoutLink(int ele)
List< Element > ListBestAttributes()
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
long brush
Definition: Player.cs:163
long kimo
Definition: Player.cs:139
void ModKarma(int a)
Definition: Player.cs:2408
Stats stats
Definition: Player.cs:936
Thing DropReward(Thing t, bool silent=false)
Definition: Player.cs:2439
virtual void Mod(int a)
Definition: Stats.cs:135
virtual int max
Definition: Stats.cs:68
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
static bool IsTamePossible(Chara c)

References Chara.AddCondition(), Chara.affinity, bitch, Player.Stats.brush, Affinity.CanInvite(), Card.CHA, Card.Chara, ThingGen.Create(), Debug, Chara.DoHostileAction(), Player.DropReward(), Card.elements, Card.END, Card.ExistsOnMap, fails, Card.GetBestAttribute(), Card.GetCurrency(), Card.HasElement(), Chara.hygiene, Chara.isDead, Chara.IsHuman, Chara.IsPC, Chara.IsPCFaction, Chara.IsPCParty, TraitToolBrush.IsTamePossible(), item, Player.Stats.kimo, ElementContainer.ListBestAttributes(), Chara.MakeAlly(), Stats.max, Chara.memberType, Stats.Mod(), Chara.ModAffinity(), Card.ModCurrency(), Card.ModExp(), Player.ModKarma(), ElementContainer.ModTempPotential(), Card.Name, ntr, AIAct.owner, EClass.pc, Card.PlayEffect(), EClass.player, Card.PlaySound(), EClass.rnd(), EClass.rndHalf(), Msg.Say(), Card.Say(), sell, Card.SetNum(), Card.ShowEmo(), Chara.stamina, Player.stats, succubus, Card.Talk(), target, totalAffinity, Type, ElementContainer.ValueWithoutLink(), and CalcMoney.Whore().

Referenced by Run().

◆ Run()

override IEnumerable< Status > AI_Fuck.Run ( )
inlinevirtual

Reimplemented from AIAct.

Definition at line 46 of file AI_Fuck.cs.

47 {
48 if (target == null)
49 {
50 foreach (Chara chara in EClass._map.charas)
51 {
52 if (!chara.IsHomeMember() && !chara.IsDeadOrSleeping && chara.Dist(owner) <= 5)
53 {
54 target = chara;
55 break;
56 }
57 }
58 }
59 if (target == null)
60 {
61 yield return Cancel();
62 }
63 Chara cc = (sell ? target : owner);
64 Chara tc = (sell ? owner : target);
65 int destDist = ((Type == FuckType.fuck) ? 1 : 1);
66 yield return DoGoto(target.pos, destDist);
67 cc.Say(Type.ToString() + "_start", cc, tc);
68 isFail = () => !tc.IsAliveInCurrentZone || tc.Dist(owner) > 3;
69 if (Type == FuckType.tame)
70 {
71 cc.SetTempHand(1104, -1);
72 }
73 maxProgress = (ntr ? 10 : 25);
74 if (succubus)
75 {
76 cc.Talk("seduce");
77 }
78 for (int i = 0; i < maxProgress; i++)
79 {
80 progress = i;
81 yield return DoGoto(target.pos, destDist);
82 switch (Type)
83 {
84 case FuckType.fuck:
85 if (ntr)
86 {
87 cc.Say("ntr", cc, tc);
88 }
89 cc.LookAt(tc);
90 tc.LookAt(cc);
91 switch (i % 4)
92 {
93 case 0:
94 cc.renderer.PlayAnime(AnimeID.Attack, tc);
95 if (EClass.rnd(3) == 0 || sell)
96 {
97 cc.Talk("tail");
98 }
99 break;
100 case 2:
101 tc.renderer.PlayAnime(AnimeID.Shiver);
102 if (EClass.rnd(3) == 0)
103 {
104 tc.Talk("tailed");
105 }
106 break;
107 }
108 if (EClass.rnd(3) == 0 || sell)
109 {
110 target.AddCondition<ConWait>(50, force: true);
111 }
112 break;
113 case FuckType.tame:
114 {
115 int num = 100;
116 if (!tc.IsAnimal)
117 {
118 num += 50;
119 }
120 if (tc.IsHuman)
121 {
122 num += 50;
123 }
124 if (tc.IsInCombat)
125 {
126 num += 100;
127 }
128 if (tc == cc)
129 {
130 num = 50;
131 }
132 else if (tc.affinity.CurrentStage < Affinity.Stage.Intimate && EClass.rnd(6 * num / 100) == 0)
133 {
134 tc.AddCondition<ConFear>(60);
135 }
136 tc.interest -= (tc.IsPCFaction ? 20 : (2 * num / 100));
137 if (i == 0 || i == 10)
138 {
139 cc.Talk("goodBoy");
140 }
141 if (i % 5 == 0)
142 {
143 tc.PlaySound("brushing");
144 int num2 = cc.CHA / 2 + cc.Evalue(237) - tc.CHA * 2;
145 int num3;
146 if (EClass.rnd(cc.CHA / 2 + cc.Evalue(237)) > EClass.rnd(tc.CHA * num / 100))
147 {
148 num3 = 5 + Mathf.Clamp(num2 / 20, 0, 20);
149 }
150 else
151 {
152 num3 = -5 + ((!tc.IsPCFaction) ? Mathf.Clamp(num2 / 10, -30, 0) : 0);
153 fails++;
154 }
155 int num4 = 20;
157 {
158 num3 = ((EClass.rnd(3) == 0) ? 4 : 0);
159 num4 = 10;
160 }
161 totalAffinity += num3;
162 tc.ModAffinity(EClass.pc, num3, show: true, showOnlyEmo: true);
163 cc.elements.ModExp(237, num4);
164 if (EClass.rnd(4) == 0)
165 {
166 cc.stamina.Mod(-1);
167 }
168 }
169 break;
170 }
171 }
172 }
173 Finish();
174 }
AnimeID
Definition: AnimeID.cs:2
virtual Status Cancel()
Definition: AIAct.cs:291
Func< bool > isFail
Definition: AIAct.cs:28
Status DoGoto(Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
Definition: AIAct.cs:432
void Finish()
Definition: AI_Fuck.cs:176
int progress
Definition: AI_Fuck.cs:24
int maxProgress
Definition: AI_Fuck.cs:22
Stage CurrentStage
Definition: Affinity.cs:32
void PlayAnime(AnimeID id, bool force)
bool IsPCFactionOrMinion
Definition: Card.cs:2234
Point pos
Definition: Card.cs:57
int Evalue(int ele)
Definition: Card.cs:2533
int Dist(Card c)
Definition: Card.cs:7316
CardRenderer renderer
Definition: Card.cs:59
override bool IsAliveInCurrentZone
Definition: Chara.cs:559
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7571
bool IsInCombat
Definition: Chara.cs:862
bool IsHuman
Definition: Chara.cs:877
bool IsAnimal
Definition: Chara.cs:865
override bool IsPCFaction
Definition: Chara.cs:669
override bool IsDeadOrSleeping
Definition: Chara.cs:571
void SetTempHand(int right=0, int left=0)
Definition: Chara.cs:6402
bool IsHomeMember()
Definition: Chara.cs:6287
Affinity affinity
Definition: Chara.cs:312
override void LookAt(Card c)
Definition: Chara.cs:3465
static Map _map
Definition: EClass.cs:18
void ModExp(int ele, float a, bool chain=false)
List< Chara > charas
Definition: Map.cs:81

References EClass._map, Chara.AddCondition(), Chara.affinity, AIAct.Cancel(), Card.CHA, Map.charas, Affinity.CurrentStage, Card.Dist(), AIAct.DoGoto(), Card.elements, Card.Evalue(), fails, Finish(), Chara.IsAliveInCurrentZone, Chara.IsAnimal, Chara.IsDeadOrSleeping, AIAct.isFail, Chara.IsHomeMember(), Chara.IsHuman, Chara.IsInCombat, Chara.IsPCFaction, Card.IsPCFactionOrMinion, Chara.LookAt(), maxProgress, Stats.Mod(), Chara.ModAffinity(), ElementContainer.ModExp(), ntr, AIAct.owner, EClass.pc, CardRenderer.PlayAnime(), Card.PlaySound(), Card.pos, progress, Card.renderer, EClass.rnd(), Card.Say(), sell, Chara.SetTempHand(), Chara.stamina, succubus, Card.Talk(), target, totalAffinity, and Type.

Member Data Documentation

◆ bitch

bool AI_Fuck.bitch

Definition at line 16 of file AI_Fuck.cs.

Referenced by Finish().

◆ fails

int AI_Fuck.fails

Definition at line 26 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ maxProgress

int AI_Fuck.maxProgress

Definition at line 22 of file AI_Fuck.cs.

Referenced by Run().

◆ ntr

bool AI_Fuck.ntr

Definition at line 20 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ progress

int AI_Fuck.progress

Definition at line 24 of file AI_Fuck.cs.

Referenced by Run().

◆ sell

bool AI_Fuck.sell

Definition at line 14 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ succubus

bool AI_Fuck.succubus

Definition at line 18 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ target

Chara AI_Fuck.target

Definition at line 12 of file AI_Fuck.cs.

Referenced by Finish(), Run(), AI_TendAnimal.ShouldAllyAttack(), and ConSleep.SuccubusSleep().

◆ totalAffinity

int AI_Fuck.totalAffinity

Definition at line 28 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

Property Documentation

◆ CancelOnAggro

override bool AI_Fuck.CancelOnAggro
get

Definition at line 42 of file AI_Fuck.cs.

◆ CancelWhenDamaged

override bool AI_Fuck.CancelWhenDamaged
get

Definition at line 44 of file AI_Fuck.cs.

◆ CurrentProgress

override int AI_Fuck.CurrentProgress
get

Definition at line 40 of file AI_Fuck.cs.

◆ IsAutoTurn

override bool AI_Fuck.IsAutoTurn
get

Definition at line 34 of file AI_Fuck.cs.

◆ MaxProgress

override int AI_Fuck.MaxProgress
get

Definition at line 38 of file AI_Fuck.cs.

◆ PushChara

override bool AI_Fuck.PushChara
get

Definition at line 32 of file AI_Fuck.cs.

◆ TargetType

override TargetType AI_Fuck.TargetType
get

Definition at line 36 of file AI_Fuck.cs.

◆ Type

virtual FuckType AI_Fuck.Type
get

Definition at line 30 of file AI_Fuck.cs.

Referenced by Finish(), and Run().


The documentation for this class was generated from the following file: