Elin Decompiled Documentation EA 23.240 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 }
 
enum  Variation {
  Normal , Bitch , Succubus , NTR ,
  Bloodsuck
}
 
- Public Types inherited from AIAct
enum  Status { Running , Fail , Success }
 
- Public Types inherited from Act
enum  CostType { None , MP , SP }
 

Public Member Functions

override bool ShouldAllyAttack (Chara tg)
 
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 long GetSourceValue (long 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

Variation variation
 
Chara target
 
bool sell
 
bool succubus
 
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.

◆ Variation

Enumerator
Normal 
Bitch 
Succubus 
NTR 
Bloodsuck 

Definition at line 12 of file AI_Fuck.cs.

Member Function Documentation

◆ Finish()

void AI_Fuck.Finish ( )
inline

Definition at line 206 of file AI_Fuck.cs.

207 {
208 Chara chara = (sell ? target : owner);
209 Chara chara2 = (sell ? owner : target);
210 if (chara.isDead || chara2.isDead)
211 {
212 return;
213 }
214 bool flag = EClass.rnd(2) == 0;
215 switch (Type)
216 {
217 case FuckType.fuck:
218 {
219 if (variation == Variation.Bloodsuck)
220 {
221 if (EClass.rnd(2) == 0)
222 {
223 chara2.AddCondition<ConConfuse>(500);
224 }
225 if (EClass.rnd(2) == 0)
226 {
227 chara2.AddCondition<ConDim>(500);
228 }
229 if (EClass.rnd(2) == 0)
230 {
231 chara2.AddCondition<ConParalyze>(500);
232 }
233 if (EClass.rnd(10) == 0)
234 {
235 chara2.AddCondition<ConInsane>(100 + EClass.rnd(100));
236 }
237 }
238 else
239 {
240 for (int i = 0; i < 2; i++)
241 {
242 Chara chara3 = ((i == 0) ? chara : chara2);
243 chara3.RemoveCondition<ConDrunk>();
244 if (EClass.rnd(15) == 0 && !chara3.HasElement(1216))
245 {
246 chara3.AddCondition<ConDisease>(200);
247 }
248 chara3.ModExp(77, 250);
249 chara3.ModExp(71, 250);
250 chara3.ModExp(75, 250);
251 }
252 if (!chara2.HasElement(1216))
253 {
254 if (EClass.rnd(5) == 0)
255 {
256 chara2.AddCondition<ConParalyze>(500);
257 }
258 if (EClass.rnd(3) == 0)
259 {
260 chara2.AddCondition<ConInsane>(100 + EClass.rnd(100));
261 }
262 }
263 }
264 chara.Talk("tail_after");
265 bool flag3 = false;
266 if (variation == Variation.Succubus)
267 {
268 chara.ShowEmo(Emo.love);
269 chara2.ShowEmo(Emo.love);
270 EClass.player.forceTalk = true;
271 chara2.Talk("seduced");
272 }
273 else if (variation != Variation.NTR && variation != Variation.Bloodsuck && chara != EClass.pc)
274 {
275 int num3 = CalcMoney.Whore(chara2, chara);
276 Chara chara4 = chara;
277 Chara chara5 = chara2;
278 if (variation == Variation.Bitch)
279 {
280 chara = chara5;
281 chara2 = chara4;
282 }
283 Debug.Log("buyer:" + chara.Name + " seller:" + chara2.Name + " money:" + num3);
284 if (!chara.IsPC)
285 {
286 chara.ModCurrency(EClass.rndHalf(num3));
287 }
288 if (!chara2.IsPC && chara.GetCurrency() < num3 && EClass.rnd(2) == 0)
289 {
290 num3 = chara.GetCurrency();
291 }
292 Debug.Log("money:" + num3 + " buyer:" + chara.GetCurrency());
293 if (chara.GetCurrency() >= num3)
294 {
295 chara.Talk("tail_pay");
296 }
297 else
298 {
299 chara.Talk("tail_nomoney");
300 num3 = chara.GetCurrency();
301 chara2.Say("angry", chara2);
302 chara2.Talk("angry");
303 flag = (sell ? true : false);
304 if (EClass.rnd(chara.IsPC ? 2 : 20) == 0)
305 {
306 flag3 = true;
307 }
308 }
309 chara.ModCurrency(-num3);
310 if (chara2 == EClass.pc)
311 {
312 if (num3 > 0)
313 {
316 }
317 }
318 else
319 {
320 int num4 = (chara2.CHA * 10 + 100) / ((chara2.IsPCFaction && chara2.memberType == FactionMemberType.Default) ? 1 : 10);
321 if (chara2.GetCurrency() - num4 > 0)
322 {
323 chara2.c_allowance += num3;
324 }
325 else
326 {
327 chara2.ModCurrency(num3);
328 }
329 }
330 chara = chara4;
331 chara2 = chara5;
332 }
333 if (flag3)
334 {
335 chara2.DoHostileAction(chara);
336 }
337 if (variation == Variation.Bloodsuck)
338 {
339 int value = chara.hunger.value;
340 Thing food = CraftUtil.MakeBloodMeal(chara, chara2);
341 FoodEffect.Proc(chara, food, consume: false);
342 chara2.AddCondition<ConBleed>(EClass.rndHalf(value * 10));
343 }
344 else
345 {
346 if (chara.IsPCParty || chara2.IsPCParty)
347 {
348 chara.stamina.Mod(-5 - EClass.rnd(chara.stamina.max / 10 + ((variation == Variation.Succubus) ? StaminaCost(chara2, chara) : 0) + 1));
349 chara2.stamina.Mod(-5 - EClass.rnd(chara2.stamina.max / 20 + ((variation == Variation.Succubus) ? StaminaCost(chara, chara2) : 0) + 1));
350 }
351 SuccubusExp(chara, chara2);
352 SuccubusExp(chara2, chara);
353 }
354 chara2.ModAffinity(chara, flag ? 10 : (-5));
355 if (chara == EClass.pc || chara2 == EClass.pc)
356 {
358 }
359 if (variation == Variation.NTR)
360 {
361 Thing thing = chara2.things.Find<TraitDreamBug>();
362 if (thing != null)
363 {
364 thing.ModNum(-1);
365 if (chara.IsPC)
366 {
367 Msg.Say("dream_spell", EClass.sources.elements.map[9156].GetName().ToLowerInvariant());
368 EClass.pc.GainAbility(9156, EClass.rnd(2) + 1);
369 }
370 }
371 if (chara.HasElement(1239) && !chara2.HasElement(1216))
372 {
373 if (chara2.HasElement(758))
374 {
375 if (chara.ExistsOnMap)
376 {
377 chara.stamina.Mod(-1000000);
378 }
379 }
380 else if (chara2.ExistsOnMap)
381 {
382 chara2.stamina.Mod((!chara2.IsPCFaction) ? (-10000) : (chara2.IsPC ? (-25) : (-50)));
383 }
384 }
385 }
386 if (variation == Variation.Bloodsuck && chara2.HasElement(758) && chara.ExistsOnMap)
387 {
388 chara.stamina.Mod(-1000000);
389 }
390 break;
391 }
392 case FuckType.tame:
393 {
394 int num = ((!chara2.IsPCFaction) ? (chara2.IsHuman ? 10 : 5) : (chara2.IsHuman ? 5 : 0));
395 Msg.Say("tame_end", target);
396 target.PlaySound("groomed");
397 target.PlayEffect("heal_tick");
398 target.hygiene.Mod(15);
399 if (chara == EClass.pc)
400 {
402 }
403 if (target == owner)
404 {
405 break;
406 }
407 if (totalAffinity > 0)
408 {
409 chara.Say("brush_success", target, owner);
410 }
411 else
412 {
413 chara.Say("brush_fail", target, owner);
414 num *= 5;
415 }
417 bool flag2 = num2 && chara2.affinity.CanInvite() && chara2.GetBestAttribute() < EClass.pc.CHA;
418 if (num2)
419 {
420 if (flag2)
421 {
422 chara.Say("tame_success", owner, target);
423 chara2.MakeAlly();
424 }
425 else
426 {
427 chara.Say("tame_fail", chara, chara2);
428 }
429 }
430 if (fails > 0 && num > EClass.rnd(100))
431 {
432 chara2.DoHostileAction(chara);
433 chara2.calmCheckTurn *= 3;
434 }
435 break;
436 }
437 }
438 static int StaminaCost(Chara c1, Chara c2)
439 {
440 return (int)Mathf.Max(10f * (float)c1.END / (float)Mathf.Max(c2.END, 1), 0f);
441 }
442 static void SuccubusExp(Chara c, Chara tg)
443 {
444 if (!c.HasElement(1216))
445 {
446 return;
447 }
448 foreach (Element item in tg.elements.ListBestAttributes())
449 {
450 if (c.elements.ValueWithoutLink(item.id) < item.ValueWithoutLink)
451 {
452 c.elements.ModTempPotential(item.id, 1 + EClass.rnd(item.ValueWithoutLink - c.elements.ValueWithoutLink(item.id) / 5 + 1));
453 c.Say("succubus_exp", c, item.Name.ToLower());
454 break;
455 }
456 }
457 }
458 }
Emo
Definition: Emo.cs:2
FactionMemberType
new Chara owner
Definition: AIAct.cs:14
bool sell
Definition: AI_Fuck.cs:25
int totalAffinity
Definition: AI_Fuck.cs:35
Variation
Definition: AI_Fuck.cs:13
int fails
Definition: AI_Fuck.cs:33
Chara target
Definition: AI_Fuck.cs:23
Variation variation
Definition: AI_Fuck.cs:21
FuckType
Definition: AI_Fuck.cs:7
virtual FuckType Type
Definition: AI_Fuck.cs:37
static int Whore(Chara seller, Chara buyer)
Definition: CalcMoney.cs:55
virtual Chara Chara
Definition: Card.cs:2070
ElementContainerCard elements
Definition: Card.cs:41
int END
Definition: Card.cs:2337
bool HasElement(int ele, int req=1)
Definition: Card.cs:5897
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6129
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6684
string Name
Definition: Card.cs:2137
int CHA
Definition: Card.cs:2347
bool ExistsOnMap
Definition: Card.cs:2085
Thing SetNum(int a)
Definition: Card.cs:3492
int GetCurrency(string id="money")
Definition: Card.cs:3972
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6163
void ShowEmo(Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
Definition: Card.cs:6097
void ModCurrency(int a, string id="money")
Definition: Card.cs:3958
ThingContainer things
Definition: Card.cs:38
void ModExp(string alias, int a)
Definition: Card.cs:2648
void ModNum(int a, bool notify=true)
Definition: Card.cs:3512
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6781
Definition: Chara.cs:10
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9146
override bool IsPC
Definition: Chara.cs:612
override bool IsPCParty
Definition: Chara.cs:615
Stats hygiene
Definition: Chara.cs:1152
Stats hunger
Definition: Chara.cs:1142
void GainAbility(int ele, int mtp=100, Thing origin=null)
Definition: Chara.cs:9972
Stats stamina
Definition: Chara.cs:1146
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6276
bool isDead
Definition: Chara.cs:389
Definition: ConDim.cs:2
static Thing MakeBloodMeal(Chara sucker, Chara feeder, bool msg=true)
Definition: CraftUtil.cs:141
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
static int rndHalf(int a)
Definition: EClass.cs:88
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
Element ModTempPotential(int ele, int v, int threshMsg=0)
int ValueWithoutLink(int ele)
List< Element > ListBestAttributes()
static void Proc(Chara c, Thing food, bool consume=true)
Definition: FoodEffect.cs:11
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:172
long kimo
Definition: Player.cs:148
void ModKarma(int a)
Definition: Player.cs:2511
Stats stats
Definition: Player.cs:1016
Thing DropReward(Thing t, bool silent=false)
Definition: Player.cs:2542
SourceElement elements
virtual void Mod(int a)
Definition: Stats.cs:135
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
Thing Find(int uid)
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
static bool IsTamePossible(Chara c)

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

Referenced by Run().

◆ Run()

override IEnumerable< Status > AI_Fuck.Run ( )
inlinevirtual

Reimplemented from AIAct.

Definition at line 68 of file AI_Fuck.cs.

69 {
70 if (target == null)
71 {
72 foreach (Chara chara in EClass._map.charas)
73 {
74 if (!chara.IsHomeMember() && !chara.IsDeadOrSleeping && chara.Dist(owner) <= 5)
75 {
76 target = chara;
77 break;
78 }
79 }
80 }
81 if (target == null)
82 {
83 yield return Cancel();
84 }
85 Chara cc = (sell ? target : owner);
86 Chara tc = (sell ? owner : target);
87 int destDist = ((Type == FuckType.fuck) ? 1 : 1);
88 yield return DoGoto(target.pos, destDist);
89 cc.Say((variation == Variation.Bloodsuck) ? "suck_start" : (Type.ToString() + "_start"), cc, tc);
90 isFail = () => !tc.IsAliveInCurrentZone || tc.Dist(owner) > 3;
91 if (Type == FuckType.tame)
92 {
93 cc.SetTempHand(1104, -1);
94 }
95 maxProgress = ((variation == Variation.NTR || variation == Variation.Bloodsuck) ? 10 : 25);
96 if (variation == Variation.Succubus)
97 {
98 cc.Talk("seduce");
99 }
100 if (variation == Variation.Bloodsuck)
101 {
102 cc.PlaySound("bloodsuck");
103 }
104 for (int i = 0; i < maxProgress; i++)
105 {
106 progress = i;
107 yield return DoGoto(target.pos, destDist);
108 switch (Type)
109 {
110 case FuckType.fuck:
111 if (variation == Variation.NTR)
112 {
113 cc.Say("ntr", cc, tc);
114 }
115 cc.LookAt(tc);
116 tc.LookAt(cc);
117 switch (i % 4)
118 {
119 case 0:
120 cc.renderer.PlayAnime(AnimeID.Attack, tc);
121 if (EClass.rnd(3) == 0 || sell)
122 {
123 cc.Talk("tail");
124 }
125 break;
126 case 2:
127 tc.renderer.PlayAnime(AnimeID.Shiver);
128 if (EClass.rnd(3) == 0)
129 {
130 tc.Talk("tailed");
131 }
132 break;
133 }
134 if (EClass.rnd(3) == 0 || sell)
135 {
136 target.AddCondition<ConWait>(50, force: true);
137 }
138 if (variation == Variation.Bloodsuck)
139 {
140 owner.pos.TryWitnessCrime(cc, tc, 4, (Chara c) => EClass.rnd(cc.HasCondition<ConTransmuteBat>() ? 50 : 20) == 0);
141 }
142 break;
143 case FuckType.tame:
144 {
145 int num = 100;
146 if (!tc.IsAnimal)
147 {
148 num += 50;
149 }
150 if (tc.IsHuman)
151 {
152 num += 50;
153 }
154 if (tc.IsInCombat)
155 {
156 num += 100;
157 }
158 if (tc == cc)
159 {
160 num = 50;
161 }
162 else if (tc.affinity.CurrentStage < Affinity.Stage.Intimate && EClass.rnd(6 * num / 100) == 0)
163 {
164 tc.AddCondition<ConFear>(60);
165 }
166 tc.interest -= (tc.IsPCFaction ? 20 : (2 * num / 100));
167 if (i == 0 || i == 10)
168 {
169 cc.Talk("goodBoy");
170 }
171 if (i % 5 == 0)
172 {
173 tc.PlaySound("brushing");
174 int num2 = cc.CHA / 2 + cc.Evalue(237) - tc.CHA * 2;
175 int num3;
176 if (EClass.rnd(cc.CHA / 2 + cc.Evalue(237)) > EClass.rnd(tc.CHA * num / 100))
177 {
178 num3 = 5 + Mathf.Clamp(num2 / 20, 0, 20);
179 }
180 else
181 {
182 num3 = -5 + ((!tc.IsPCFaction) ? Mathf.Clamp(num2 / 10, -30, 0) : 0);
183 fails++;
184 }
185 int num4 = 20;
187 {
188 num3 = ((EClass.rnd(3) == 0) ? 4 : 0);
189 num4 = 10;
190 }
191 totalAffinity += num3;
192 tc.ModAffinity(EClass.pc, num3, show: true, showOnlyEmo: true);
193 cc.elements.ModExp(237, num4);
194 if (EClass.rnd(4) == 0)
195 {
196 cc.stamina.Mod(-1);
197 }
198 }
199 break;
200 }
201 }
202 }
203 Finish();
204 }
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:206
int progress
Definition: AI_Fuck.cs:31
int maxProgress
Definition: AI_Fuck.cs:29
Stage CurrentStage
Definition: Affinity.cs:32
void PlayAnime(AnimeID id, bool force)
bool IsPCFactionOrMinion
Definition: Card.cs:2272
Point pos
Definition: Card.cs:59
int Evalue(int ele)
Definition: Card.cs:2571
int Dist(Card c)
Definition: Card.cs:7630
CardRenderer renderer
Definition: Card.cs:61
override bool IsAliveInCurrentZone
Definition: Chara.cs:561
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7833
bool IsInCombat
Definition: Chara.cs:864
bool HasCondition(string alias)
Definition: Chara.cs:9303
bool IsHuman
Definition: Chara.cs:879
bool IsAnimal
Definition: Chara.cs:867
override bool IsPCFaction
Definition: Chara.cs:671
override bool IsDeadOrSleeping
Definition: Chara.cs:573
void SetTempHand(int right=0, int left=0)
Definition: Chara.cs:6630
bool IsHomeMember()
Definition: Chara.cs:6515
Affinity affinity
Definition: Chara.cs:314
override void LookAt(Card c)
Definition: Chara.cs:3519
static Map _map
Definition: EClass.cs:19
void ModExp(int ele, float a, bool chain=false)
List< Chara > charas
Definition: Map.cs:81
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Definition: Point.cs:873

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.HasCondition(), 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(), AIAct.owner, EClass.pc, CardRenderer.PlayAnime(), Card.PlaySound(), Card.pos, progress, Card.renderer, EClass.rnd(), Card.Say(), sell, Chara.SetTempHand(), Chara.stamina, Card.Talk(), target, totalAffinity, Point.TryWitnessCrime(), Type, and variation.

◆ ShouldAllyAttack()

override bool AI_Fuck.ShouldAllyAttack ( Chara  tg)
inlinevirtual

Reimplemented from AIAct.

Definition at line 63 of file AI_Fuck.cs.

64 {
65 return tg != target;
66 }

References target.

Member Data Documentation

◆ fails

int AI_Fuck.fails

Definition at line 33 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ maxProgress

int AI_Fuck.maxProgress

Definition at line 29 of file AI_Fuck.cs.

Referenced by Run().

◆ progress

int AI_Fuck.progress

Definition at line 31 of file AI_Fuck.cs.

Referenced by Run().

◆ sell

bool AI_Fuck.sell

Definition at line 25 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ succubus

bool AI_Fuck.succubus

Definition at line 27 of file AI_Fuck.cs.

◆ target

Chara AI_Fuck.target

Definition at line 23 of file AI_Fuck.cs.

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

◆ totalAffinity

int AI_Fuck.totalAffinity

Definition at line 35 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

◆ variation

Variation AI_Fuck.variation

Definition at line 21 of file AI_Fuck.cs.

Referenced by Finish(), and Run().

Property Documentation

◆ CancelOnAggro

override bool AI_Fuck.CancelOnAggro
get

Definition at line 49 of file AI_Fuck.cs.

50 {
51 get
52 {
53 if (variation != Variation.NTR)
54 {
55 return variation != Variation.Bloodsuck;
56 }
57 return false;
58 }
59 }

◆ CancelWhenDamaged

override bool AI_Fuck.CancelWhenDamaged
get

Definition at line 61 of file AI_Fuck.cs.

◆ CurrentProgress

override int AI_Fuck.CurrentProgress
get

Definition at line 47 of file AI_Fuck.cs.

◆ IsAutoTurn

override bool AI_Fuck.IsAutoTurn
get

Definition at line 41 of file AI_Fuck.cs.

◆ MaxProgress

override int AI_Fuck.MaxProgress
get

Definition at line 45 of file AI_Fuck.cs.

◆ PushChara

override bool AI_Fuck.PushChara
get

Definition at line 39 of file AI_Fuck.cs.

◆ TargetType

override TargetType AI_Fuck.TargetType
get

Definition at line 43 of file AI_Fuck.cs.

◆ Type

virtual FuckType AI_Fuck.Type
get

Definition at line 37 of file AI_Fuck.cs.

Referenced by Finish(), and Run().


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