Elin Decompiled Documentation EA 23.197 Nightly Patch 1
Loading...
Searching...
No Matches
ActEffect Class Reference
Inheritance diagram for ActEffect:
EClass

Classes

class  WishItem
 

Static Public Member Functions

static void TryDelay (Action a)
 
static bool DamageEle (Card CC, EffectId id, int power, Element e, List< Point > points, ActRef actref, string lang=null)
 
static void ProcAt (EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
 
static void Proc (EffectId id, Card cc, Card tc=null, int power=100, ActRef actRef=default(ActRef))
 
static void Proc (EffectId id, int power, BlessedState state, Card cc, Card tc=null, ActRef actRef=default(ActRef))
 
static void Poison (Chara tc, Chara c, int power)
 
static void LoveMiracle (Chara tc, Chara c, int power, EffectId idEffect=EffectId.Love, BlessedState? state=null)
 
static void GeneMiracle (Chara tc, Chara c, DNA.Type type)
 
static Point GetTeleportPos (Point org, int radius=6)
 
static bool Wish (string s, string name, int power, BlessedState state)
 
static int Compare (string s, string t)
 
- 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

static int RapidCount
 
static float RapidDelay
 
static int angle = 20
 
- Static Public Attributes inherited from EClass
static Core core
 

Additional Inherited Members

- 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]
 

Detailed Description

Definition at line 6 of file ActEffect.cs.

Member Function Documentation

◆ Compare()

static int ActEffect.Compare ( string  s,
string  t 
)
inlinestatic

Definition at line 2631 of file ActEffect.cs.

2632 {
2633 if (s.IsEmpty())
2634 {
2635 return 0;
2636 }
2637 int num = 0;
2638 if (t == s)
2639 {
2640 num += 100;
2641 }
2642 if (t.Contains(s))
2643 {
2644 num += 100;
2645 }
2646 return num;
2647 }

◆ DamageEle()

static bool ActEffect.DamageEle ( Card  CC,
EffectId  id,
int  power,
Element  e,
List< Point points,
ActRef  actref,
string  lang = null 
)
inlinestatic

Definition at line 36 of file ActEffect.cs.

37 {
38 if (points.Count == 0)
39 {
41 return false;
42 }
44 {
45 Debug.Log(e.source.alias);
46 e = Element.Create(0, 1);
47 }
48 ElementRef elementRef = EClass.setting.elements[e.source.alias];
49 int num = actref.act?.ElementPowerMod ?? 50;
50 int num2 = 0;
51 Point point = CC.pos.Copy();
52 List<Card> list = new List<Card>();
53 bool flag = false;
54 if (id == EffectId.Explosive && actref.refThing != null)
55 {
56 power = power * actref.refThing.material.hardness / 10;
57 }
58 string text = id.ToString();
59 string text2 = (EClass.sources.calc.map.ContainsKey(text) ? text : (EClass.sources.calc.map.ContainsKey("Sp" + text) ? ("Sp" + text) : (text.ToLowerInvariant() + "_")));
60 foreach (Point p in points)
61 {
62 bool flag2 = true;
63 AttackSource attackSource = AttackSource.None;
64 switch (id)
65 {
66 case EffectId.Explosive:
67 text2 = "ball_";
68 flag = false;
69 break;
70 case EffectId.BallBubble:
71 text2 = "ball_";
72 break;
73 case EffectId.Earthquake:
74 text2 = "SpEarthquake";
75 flag2 = false;
76 flag = true;
77 break;
78 case EffectId.Meteor:
79 text2 = "SpMeteor";
80 break;
81 default:
82 if (CC.isChara && p.Equals(CC.pos) && points.Count >= 2)
83 {
84 continue;
85 }
86 break;
87 case EffectId.Suicide:
88 break;
89 }
90 Effect effect = null;
91 Effect effect2 = (flag2 ? Effect.Get("trail1") : null);
92 Point from = p;
93 switch (id)
94 {
95 case EffectId.Arrow:
96 case EffectId.MoonSpear:
97 {
98 effect = Effect.Get((id == EffectId.MoonSpear) ? "spell_moonspear" : "spell_arrow");
99 if (id == EffectId.Arrow)
100 {
101 effect.sr.color = elementRef.colorSprite;
102 }
103 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
104 Color startColor = (componentInChildren.endColor = elementRef.colorSprite);
105 componentInChildren.startColor = startColor;
106 from = CC.pos;
107 break;
108 }
109 case EffectId.Earthquake:
110 {
111 if (EClass.rnd(4) == 0 && p.IsSync)
112 {
113 effect = Effect.Get("smoke_earthquake");
114 }
115 float num3 = 0.06f * (float)CC.pos.Distance(p);
116 Point pos = p.Copy();
117 TweenUtil.Tween(num3, null, delegate
118 {
119 pos.Animate(AnimeID.Quake, animeBlock: true);
120 });
121 if (effect != null)
122 {
123 effect.SetStartDelay(num3);
124 }
125 break;
126 }
127 default:
128 {
129 effect = Effect.Get("Element/ball_" + ((e.id == 0) ? "Void" : e.source.alias.Remove(0, 3)));
130 if (effect == null)
131 {
132 effect = Effect.Get("Element/ball_Fire");
133 }
134 float startDelay = ((id == EffectId.Meteor) ? 0.1f : 0.04f) * (float)CC.pos.Distance(p);
135 effect.SetStartDelay(startDelay);
136 effect2.SetStartDelay(startDelay);
137 break;
138 }
139 }
140 if (effect2 != null)
141 {
142 effect2.SetParticleColor(elementRef.colorTrail, changeMaterial: true, "_TintColor").Play(from);
143 }
144 if (effect != null)
145 {
146 if (id == EffectId.Arrow || id == EffectId.MoonSpear)
147 {
148 TryDelay(delegate
149 {
150 effect.Play(CC.pos, 0f, p);
151 });
152 }
153 else
154 {
155 TryDelay(delegate
156 {
157 effect.Play(p).Flip(p.x > CC.pos.x);
158 });
159 }
160 }
161 bool flag3 = false;
162 if (CC.IsPCFactionOrMinion && (CC.HasElement(1651) || EClass.pc.Evalue(1651) >= 2))
163 {
164 bool flag4 = false;
165 foreach (Card item in p.ListCards())
166 {
167 if (item.isChara)
168 {
169 if (item.IsPCFactionOrMinion)
170 {
171 flag4 = true;
172 }
173 }
174 else if ((e.id != 910 && e.id != 911) || !item.IsFood || !item.category.IsChildOf("foodstuff"))
175 {
176 flag4 = true;
177 }
178 }
179 flag3 = flag4;
180 }
181 if (!flag3)
182 {
183 if (e.id == 910)
184 {
185 EClass._map.TryShatter(p, 910, power);
186 }
187 if (e.id == 911)
188 {
189 EClass._map.TryShatter(p, 911, power);
190 }
191 }
192 foreach (Card item2 in p.ListCards().ToList())
193 {
194 Card c = item2;
195 if ((!c.isChara && !c.trait.CanBeAttacked) || (c.IsMultisize && item2 == CC) || (c.isChara && (c.Chara.host == CC || c.Chara.parasite == CC || c.Chara.ride == CC)))
196 {
197 continue;
198 }
199 if ((uint)(id - 250) <= 1u || id == EffectId.Sword || id == EffectId.MoonSpear)
200 {
201 if (c.isChara && CC.isChara)
202 {
203 c.Chara.RequestProtection(CC.Chara, delegate(Chara a)
204 {
205 c = a;
206 });
207 }
208 if (id == EffectId.MoonSpear)
209 {
210 attackSource = AttackSource.MoonSpear;
211 }
212 }
213 switch (id)
214 {
215 case EffectId.Arrow:
216 attackSource = AttackSource.MagicArrow;
217 break;
218 case EffectId.Hand:
219 attackSource = AttackSource.MagicHand;
220 break;
221 case EffectId.Sword:
222 attackSource = AttackSource.MagicSword;
223 break;
224 }
225 long num4 = 0L;
226 bool isChara = CC.isChara;
227 if (id == EffectId.Suicide)
228 {
229 num4 = CC.MaxHP * 2;
230 num4 = num4 * 100 / (50 + point.Distance(p) * 75);
231 if ((c.HasCondition<ConBrightnessOfLife>() || c.HasTag(CTAG.suicide)) && !c.HasCondition<ConWet>() && !c.IsPowerful)
232 {
233 list.Add(c);
234 }
235 }
236 else
237 {
238 Dice dice = Dice.Create(text2, power, CC, (actref.refThing != null) ? null : actref.act);
239 if (dice == null)
240 {
241 Debug.Log(text2);
242 }
243 num4 = dice.Roll();
244 switch (id)
245 {
246 case EffectId.Earthquake:
247 if (c.HasCondition<ConGravity>())
248 {
249 num4 = dice.RollMax() * 2;
250 }
251 else if (c.isChara && c.Chara.IsLevitating)
252 {
253 num4 /= 2;
254 }
255 break;
256 case EffectId.Sword:
257 num4 = num4 * (int)Mathf.Min(70f + Mathf.Sqrt(CC.Evalue(101)) * 3f, 200f) / 100;
258 break;
259 }
260 if (id == EffectId.Ball || id == EffectId.BallBubble || id == EffectId.Explosive)
261 {
262 num4 = num4 * 100 / (90 + point.Distance(p) * 10);
263 }
264 }
265 if (id == EffectId.Sword)
266 {
267 c.PlaySound("ab_magicsword");
268 c.PlayEffect("hit_slash");
269 }
270 if ((actref.noFriendlyFire && !CC.Chara.IsHostile(c as Chara)) || (flag && c == CC))
271 {
272 continue;
273 }
274 if (isChara && points.Count > 1 && c != null && c.isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.Chara))
275 {
276 int num5 = CC.Evalue(302);
277 if (!CC.IsPC && CC.IsPCFactionOrMinion)
278 {
279 num5 += EClass.pc.Evalue(302);
280 }
281 if (CC.HasElement(1214))
282 {
283 num5 *= 2;
284 }
285 if (num5 > 0)
286 {
287 if (num5 * 10 > EClass.rnd(num4 + 1))
288 {
289 if (c == c.pos.FirstChara)
290 {
291 CC.ModExp(302, CC.IsPC ? 10 : 50);
292 }
293 continue;
294 }
295 num4 = EClass.rnd(num4 * 100 / (100 + num5 * 10 + 1));
296 if (c == c.pos.FirstChara)
297 {
298 CC.ModExp(302, CC.IsPC ? 20 : 100);
299 }
300 if (num4 == 0L)
301 {
302 continue;
303 }
304 }
305 if ((CC.HasElement(1214) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) && EClass.pc.HasElement(1214))) && EClass.rnd(5) != 0)
306 {
307 continue;
308 }
309 }
310 if (!lang.IsEmpty())
311 {
312 if (lang == "spell_hand")
313 {
314 string[] list2 = Lang.GetList("attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty("Touch") : "Touch"));
315 string @ref = "_elehand".lang(e.source.GetAltname(2), list2[4]);
316 CC.Say(c.IsPCParty ? "cast_hand_ally" : "cast_hand", CC, c, @ref, c.IsPCParty ? list2[1] : list2[2]);
317 }
318 else
319 {
320 CC.Say(lang + "_hit", CC, c, e.Name.ToLower());
321 }
322 }
323 Chara chara = (CC.isChara ? CC.Chara : ((actref.refThing != null) ? EClass._map.FindChara(actref.refThing.c_uidRefCard) : null));
324 if (c.IsMultisize)
325 {
326 switch (id)
327 {
328 case EffectId.Ball:
329 case EffectId.Explosive:
330 case EffectId.BallBubble:
331 case EffectId.Meteor:
332 case EffectId.Earthquake:
333 case EffectId.Suicide:
334 num4 /= 2;
335 break;
336 }
337 }
338 if (RapidCount > 0)
339 {
340 num4 = num4 * 100 / (100 + RapidCount * 50);
341 }
342 num4 = num4 * Act.powerMod / 100;
343 if (num4 > 9999999)
344 {
345 num4 = 9999999L;
346 }
347 c.DamageHP((int)num4, e.id, power * num / 100, attackSource, chara ?? CC);
348 if (c.IsAliveInCurrentZone && CC.IsAliveInCurrentZone && id == EffectId.DrainMana && c.isChara && CC.isChara && c.Chara.mana.value > 0)
349 {
350 long num6 = num4 * num / 100;
351 Debug.Log(num4 + " v:" + num6 + " evalue:" + e.Value + " power:" + power + " elepMod:" + num);
352 if (num6 > c.Chara.mana.value)
353 {
354 num6 = c.Chara.mana.value;
355 }
356 c.Chara.mana.Mod((int)(-num6));
357 CC.Chara.mana.Mod((int)num6);
358 }
359 if (id == EffectId.Explosive && CC.trait is TraitCookerMicrowave)
360 {
361 chara = EClass.pc;
362 }
363 if (chara != null && chara.IsAliveInCurrentZone)
364 {
365 chara.DoHostileAction(c);
366 }
367 num2++;
368 }
369 if ((id == EffectId.Explosive || id == EffectId.Suicide) && ((id != EffectId.Suicide && id != EffectId.Meteor) || !EClass._zone.IsPCFaction))
370 {
371 int num7 = id switch
372 {
373 EffectId.Suicide => CC.LV / 3 + 40,
374 EffectId.Meteor => 50 + power / 20,
375 _ => (actref.refThing != null) ? actref.refThing.material.hardness : (30 + power / 20),
376 };
377 bool flag5 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (id == EffectId.Explosive && actref.refThing == null)) && !(EClass._zone is Zone_Vernis);
378 if (p.HasObj && p.cell.matObj.hardness <= num7)
379 {
381 if (flag5)
382 {
384 }
385 }
386 if (!p.HasObj && p.HasBlock && p.matBlock.hardness <= num7)
387 {
389 if (flag5)
390 {
392 }
393 }
394 }
395 if (e.id == 910)
396 {
397 int num8 = 0;
398 if (id == EffectId.Meteor)
399 {
400 num8 = 2;
401 }
403 {
404 num8 = 0;
405 }
406 if (num8 > EClass.rnd(10))
407 {
408 p.ModFire(4 + EClass.rnd(10));
409 }
410 }
411 if (e.id == 911)
412 {
413 p.ModFire(-20, extinguish: true);
414 }
415 }
416 if (RapidCount == 0)
417 {
418 foreach (Card item3 in list)
419 {
420 if (item3.ExistsOnMap)
421 {
422 RapidCount += 2;
423 ProcAt(id, power, BlessedState.Normal, item3, null, item3.pos, isNeg: true, actref);
424 }
425 }
426 }
427 return num2 > 0;
428 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
BlessedState
Definition: BlessedState.cs:2
CTAG
Definition: CTAG.cs:2
EffectId
Definition: EffectId.cs:2
static int RapidCount
Definition: ActEffect.cs:17
static void TryDelay(Action a)
Definition: ActEffect.cs:23
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:430
virtual int ElementPowerMod
Definition: ACT.cs:111
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2234
virtual bool IsMultisize
Definition: Card.cs:2120
virtual Chara Chara
Definition: Card.cs:2032
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:3961
bool HasElement(int ele, int req=1)
Definition: Card.cs:5725
SourceMaterial.Row material
Definition: Card.cs:2013
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5939
virtual bool IsPCParty
Definition: Card.cs:2111
int c_uidRefCard
Definition: Card.cs:1098
bool ExistsOnMap
Definition: Card.cs:2047
bool HasTag(CTAG tag)
Definition: Card.cs:2557
Point pos
Definition: Card.cs:57
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5973
Trait trait
Definition: Card.cs:51
bool IsPowerful
Definition: Card.cs:2056
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2089
void SayNothingHappans()
Definition: Card.cs:6581
virtual bool IsPC
Definition: Card.cs:2105
virtual bool isChara
Definition: Card.cs:2045
int Evalue(int ele)
Definition: Card.cs:2533
virtual bool IsPCFactionMinion
Definition: Card.cs:2117
void ModExp(string alias, int a)
Definition: Card.cs:2610
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6586
SourceMaterial.Row matObj
Definition: Cell.cs:1036
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:559
bool IsLevitating
Definition: Chara.cs:595
Chara host
Definition: Chara.cs:33
bool RequestProtection(Chara attacker, Action< Chara > action)
Definition: Chara.cs:8051
bool IsFriendOrAbove()
Definition: Chara.cs:6360
Stats mana
Definition: Chara.cs:1136
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6095
bool IsHostile()
Definition: Chara.cs:6272
SourceRace.Row race
Definition: Chara.cs:462
Definition: ConWet.cs:2
Definition: Dice.cs:4
static int RollMax(int num, int sides, int bonus=0)
Definition: Dice.cs:46
static int Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:15
static Dice Create(Element ele, Card c)
Definition: Dice.cs:96
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static int rnd(long a)
Definition: EClass.cs:58
static SourceManager sources
Definition: EClass.cs:42
static Player player
Definition: EClass.cs:12
static Chara pc
Definition: EClass.cs:14
static GameSetting setting
Definition: EClass.cs:34
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:85
Effect SetStartDelay(float a)
Definition: Effect.cs:199
void Play(float delay, Point from, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:100
Effect SetParticleColor(Color c)
Definition: Effect.cs:289
Color colorSprite
Definition: ElementRef.cs:7
Color colorTrail
Definition: ElementRef.cs:9
int id
Definition: ELEMENT.cs:250
SourceElement.Row source
Definition: ELEMENT.cs:273
int Value
Definition: ELEMENT.cs:292
virtual string Name
Definition: ELEMENT.cs:304
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1100
bool HasItemProtection
UD_String_ElementRef elements
Definition: GameSetting.cs:315
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114
Chara FindChara(string id)
Definition: Map.cs:2568
void TryShatter(Point pos, int ele, int power)
Definition: Map.cs:1200
void MineObj(Point point, Task task=null, Chara c=null)
Definition: Map.cs:1840
void MineBlock(Point point, bool recoverBlock=false, Chara c=null, bool mineObj=true)
Definition: Map.cs:1668
void ModKarma(int a)
Definition: Player.cs:2432
Definition: Point.cs:9
SourceMaterial.Row matBlock
Definition: Point.cs:55
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1035
Point Copy()
Definition: Point.cs:479
int x
Definition: Point.cs:36
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:917
bool IsSync
Definition: Point.cs:332
bool Equals(int _x, int _z)
Definition: Point.cs:944
bool HasObj
Definition: Point.cs:137
int Distance(Point p)
Definition: Point.cs:973
Chara FirstChara
Definition: Point.cs:276
bool HasBlock
Definition: Point.cs:141
Cell cell
Definition: Point.cs:51
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1286
SourceCalc calc
virtual void Mod(int a)
Definition: Stats.cs:135
virtual int value
Definition: Stats.cs:56
virtual bool CanBeAttacked
Definition: Trait.cs:164
bool ContainsKey(TKey key)
Definition: UDictionary.cs:151
FactionBranch branch
Definition: Zone.cs:34
bool IsPCFaction
Definition: Zone.cs:468
Act act
Definition: ActRef.cs:3
bool noFriendlyFire
Definition: ActRef.cs:15
Thing refThing
Definition: ActRef.cs:9

References EClass._map, EClass._zone, ActRef.act, Point.Animate(), Zone.branch, SourceManager.calc, Trait.CanBeAttacked, Point.cell, Card.Chara, Color, UDictionary< TKey, TValue >.ContainsKey(), Point.Copy(), Dice.Create(), Element.Create(), Card.DamageHP(), Debug, Chara.DoHostileAction(), Act.ElementPowerMod, GameSetting.elements, Point.Equals(), Card.Evalue(), Card.ExistsOnMap, Map.FindChara(), Point.FirstChara, Effect.Get(), Lang.GetList(), Point.HasBlock, Card.HasElement(), FactionBranch.HasItemProtection, Point.HasObj, Card.HasTag(), Chara.host, Card.IsAliveInCurrentZone, Chara.IsAliveInCurrentZone, Card.isChara, Chara.IsLevitating, Card.IsMultisize, Zone.IsPCFaction, Card.IsPCParty, Card.IsPowerful, Point.IsSync, item, Point.ListCards(), Chara.mana, Point.matBlock, Cell.matObj, Map.MineBlock(), Map.MineObj(), Stats.Mod(), Point.ModFire(), Player.ModKarma(), Card.Name, Chara.parasite, EClass.pc, Effect.Play(), Card.PlayEffect(), EClass.player, Card.PlaySound(), Card.pos, ProcAt(), RapidCount, ActRef.refThing, Chara.RequestProtection(), Chara.ride, EClass.rnd(), Dice.Roll(), Dice.RollMax(), Card.SayNothingHappans(), Effect.SetParticleColor(), Effect.SetStartDelay(), EClass.setting, Element.source, EClass.sources, Card.trait, TryDelay(), Map.TryShatter(), Stats.value, and Point.x.

Referenced by ProcAt().

◆ GeneMiracle()

static void ActEffect.GeneMiracle ( Chara  tc,
Chara  c,
DNA::Type  type 
)
inlinestatic

Definition at line 2433 of file ActEffect.cs.

2434 {
2436 {
2438 return;
2439 }
2440 if (c == tc)
2441 {
2442 tc.Say("love_ground", tc);
2443 }
2444 else
2445 {
2446 tc.Say("love_chara", c, tc);
2447 }
2448 Thing t = tc.MakeGene(type);
2449 tc.GiveBirth(t, effect: true);
2450 }
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:5602
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:7826
Definition: Msg.cs:5
static string SayNothingHappen()
Definition: Msg.cs:96
Definition: Thing.cs:8
virtual bool IsUserZone
Definition: Zone.cs:266

References EClass._zone, Card.GiveBirth(), Card.IsPCFactionOrMinion, Zone.IsUserZone, Chara.MakeGene(), Card.Say(), and Msg.SayNothingHappen().

◆ GetTeleportPos()

static Point ActEffect.GetTeleportPos ( Point  org,
int  radius = 6 
)
inlinestatic

Definition at line 2452 of file ActEffect.cs.

2453 {
2454 Point point = new Point();
2455 for (int i = 0; i < 10000; i++)
2456 {
2457 point.Set(org);
2458 point.x += EClass.rnd(radius) - EClass.rnd(radius);
2459 point.z += EClass.rnd(radius) - EClass.rnd(radius);
2460 if (point.IsValid && point.IsInBounds && !point.cell.blocked && point.Distance(org) >= radius / 3 + 1 - i / 50 && !point.cell.HasZoneStairs())
2461 {
2462 return point;
2463 }
2464 }
2465 return org.GetRandomNeighbor().GetNearestPoint();
2466 }
bool HasZoneStairs(bool includeLocked=true)
Definition: Cell.cs:1717
Point Set(int _x, int _z)
Definition: Point.cs:491
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:607
bool IsValid
Definition: Point.cs:88
bool IsInBounds
Definition: Point.cs:104
Point GetRandomNeighbor()
Definition: Point.cs:747

References Algorithms.WeightCell.blocked, Point.cell, Point.Distance(), Point.GetNearestPoint(), Point.GetRandomNeighbor(), Cell.HasZoneStairs(), Point.IsInBounds, Point.IsValid, EClass.rnd(), and Point.Set().

Referenced by AI_PassTime.Run().

◆ LoveMiracle()

static void ActEffect.LoveMiracle ( Chara  tc,
Chara  c,
int  power,
EffectId  idEffect = EffectId::Love,
BlessedState state = null 
)
inlinestatic

Definition at line 2401 of file ActEffect.cs.

2402 {
2403 if (c == tc)
2404 {
2405 tc.Say("love_ground", tc);
2406 }
2407 else
2408 {
2409 tc.Say("love_chara", c, tc);
2410 }
2411 tc.ModAffinity(EClass.pc, power / 4);
2412 if ((idEffect != EffectId.Love || EClass.rnd(2) != 0) && (!EClass._zone.IsUserZone || tc.IsPCFaction || !EClass.game.principal.disableUsermapBenefit))
2413 {
2414 if (idEffect == EffectId.MoonSpear && EClass.rnd(EClass.debug.enable ? 2 : 20) == 0)
2415 {
2416 Thing thing = tc.MakeGene();
2417 tc.GiveBirth(thing, effect: true);
2418 tc.Say("item_drop", thing);
2419 }
2420 else if (idEffect != EffectId.LovePlus && EClass.rnd(2) == 0)
2421 {
2422 Thing c2 = tc.MakeMilk(effect: true, 1, addToZone: true, state);
2423 tc.Say("item_drop", c2);
2424 }
2425 else
2426 {
2427 Thing c3 = tc.MakeEgg(effect: true, 1, addToZone: true, (idEffect == EffectId.LovePlus) ? 3 : 20, state);
2428 tc.Say("item_drop", c3);
2429 }
2430 }
2431 }
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true, BlessedState? state=null)
Definition: Card.cs:5578
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true, int fertChance=20, BlessedState? state=null)
Definition: Card.cs:5562
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7614
override bool IsPCFaction
Definition: Chara.cs:669
bool enable
Definition: CoreDebug.cs:286
static Game game
Definition: EClass.cs:8
static CoreDebug debug
Definition: EClass.cs:48
bool disableUsermapBenefit
GamePrincipal principal
Definition: Game.cs:221

References EClass._zone, EClass.debug, GamePrincipal.disableUsermapBenefit, CoreDebug.enable, EClass.game, Card.GiveBirth(), Chara.IsPCFaction, Zone.IsUserZone, Card.MakeEgg(), Chara.MakeGene(), Card.MakeMilk(), Chara.ModAffinity(), EClass.pc, Game.principal, EClass.rnd(), and Card.Say().

Referenced by FoodEffect.Proc().

◆ Poison()

static void ActEffect.Poison ( Chara  tc,
Chara  c,
int  power 
)
inlinestatic

Definition at line 2385 of file ActEffect.cs.

2386 {
2387 tc.Say("eat_poison", tc);
2388 tc.Talk("scream");
2389 if (power > 100000000)
2390 {
2391 power = 100000000;
2392 }
2393 int num = (int)Mathf.Sqrt(power * 100);
2394 tc.DamageHP(num * 2 + EClass.rnd(num), 915, power);
2395 if (!tc.isDead && !tc.IsPC)
2396 {
2398 }
2399 }
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6489
override bool IsPC
Definition: Chara.cs:610
bool isDead
Definition: Chara.cs:387

References Card.DamageHP(), Chara.isDead, Chara.IsPC, Player.ModKarma(), EClass.player, EClass.rnd(), Card.Say(), and Card.Talk().

Referenced by FoodEffect.Proc().

◆ Proc() [1/2]

◆ Proc() [2/2]

static void ActEffect.Proc ( EffectId  id,
int  power,
BlessedState  state,
Card  cc,
Card  tc = null,
ActRef  actRef = default(ActRef) 
)
inlinestatic

Definition at line 907 of file ActEffect.cs.

908 {
909 if (tc == null)
910 {
911 tc = cc;
912 }
913 Chara TC = tc.Chara;
914 Chara CC = cc.Chara;
915 bool blessed = state >= BlessedState.Blessed;
916 bool flag = state <= BlessedState.Cursed;
917 int orgPower = power;
918 if (blessed || flag)
919 {
920 power *= 2;
921 }
922 switch (id)
923 {
924 case EffectId.Duplicate:
925 {
926 Point randomPoint = CC.pos.GetRandomPoint(2, requireLos: false, allowChara: false, allowBlocked: false, 200);
927 if (randomPoint == null || randomPoint.Equals(CC.pos) || !randomPoint.IsValid || EClass._zone.IsRegion || CC.HasCondition<ConPoison>() || CC.HasCondition<ConConfuse>() || CC.HasCondition<ConDim>() || CC.HasCondition<ConParalyze>() || CC.HasCondition<ConSleep>() || CC.HasCondition<ConBurning>() || CC.HasCondition<ConFreeze>() || CC.HasCondition<ConMiasma>() || CC.corruption >= 100)
928 {
929 CC.Say("split_fail", CC);
930 return;
931 }
932 Chara t2 = CC.Duplicate();
933 EClass._zone.AddCard(t2, randomPoint);
934 CC.Say("split", CC);
935 break;
936 }
937 case EffectId.Escape:
938 if (CC.IsPCFaction || (EClass._zone.Boss == CC && EClass.rnd(30) != 0))
939 {
940 return;
941 }
942 CC.Say("escape", CC);
943 CC.PlaySound("escape");
944 if (EClass._zone.Boss == CC)
945 {
946 CC.TryDropBossLoot();
947 }
948 CC.Destroy();
949 break;
950 case EffectId.Exterminate:
951 {
952 CC.PlaySound("clean_floor");
953 Msg.Say("exterminate");
954 List<Chara> list2 = EClass._map.charas.Where((Chara c) => c.isCopy && !c.IsPCFaction).ToList();
955 if (list2.Count == 0)
956 {
958 return;
959 }
960 foreach (Chara item in list2)
961 {
962 item.Say("split_fail", item);
963 item.PlayEffect("vanish");
964 item.Die();
965 }
966 break;
967 }
968 case EffectId.DropMine:
969 {
970 if (CC.pos.Installed != null || EClass._zone.IsPCFaction)
971 {
972 return;
973 }
974 Thing thing = ThingGen.Create("mine");
975 thing.c_idRefCard = "dog_mine";
976 Zone.ignoreSpawnAnime = true;
977 EClass._zone.AddCard(thing, CC.pos).Install();
978 break;
979 }
980 case EffectId.MagicMap:
981 if (!CC.IsPC)
982 {
984 break;
985 }
986 if (flag)
987 {
988 CC.Say("abMagicMap_curse", CC);
989 CC.PlaySound("curse3");
990 CC.PlayEffect("curse");
991 CC.AddCondition<ConConfuse>(200, force: true);
992 break;
993 }
994 CC.Say("abMagicMap", CC);
995 CC.PlayEffect("identify");
996 CC.PlaySound("identify");
997 if (blessed)
998 {
1000 }
1001 else
1002 {
1003 EClass._map.Reveal(CC.pos, power);
1004 }
1005 break;
1006 case EffectId.AbsorbMana:
1007 {
1008 if (CC == TC)
1009 {
1010 EClass.game.religions.Element.Talk("ability");
1011 }
1012 Dice dice = Dice.Create("ActManaAbsorb", power, CC, (actRef.refThing != null) ? null : actRef.act);
1013 TC.mana.Mod(dice.Roll());
1014 TC.PlaySound("heal");
1015 TC.PlayEffect("heal");
1016 if (TC == CC)
1017 {
1018 CC.Say("absorbMana", CC);
1019 }
1020 break;
1021 }
1022 case EffectId.ModPotential:
1023 {
1024 Element element = cc.elements.ListElements((Element e) => e.HasTag("primary")).RandomItem();
1025 cc.elements.ModTempPotential(element.id, power / 10);
1026 break;
1027 }
1028 case EffectId.ForgetItems:
1029 {
1030 TC.PlaySound("curse3");
1031 TC.PlayEffect("curse");
1032 TC.Say("forgetItems", TC);
1033 int num2 = power / 50 + 1 + EClass.rnd(3);
1034 List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
1035 for (int i = 0; i < num2; i++)
1036 {
1037 source.RandomItem().c_IDTState = 5;
1038 }
1039 break;
1040 }
1041 case EffectId.EnchantWeapon:
1042 case EffectId.EnchantArmor:
1043 case EffectId.EnchantWeaponGreat:
1044 case EffectId.EnchantArmorGreat:
1045 {
1046 bool armor = id == EffectId.EnchantArmor || id == EffectId.EnchantArmorGreat;
1047 bool flag4 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat;
1048 if (!tc.isThing)
1049 {
1050 LayerDragGrid.CreateEnchant(CC, armor, flag4, state);
1051 return;
1052 }
1053 cc.PlaySound("identify");
1054 cc.PlayEffect("identify");
1055 if (flag)
1056 {
1057 cc.Say("enc_curse", tc);
1058 tc.ModEncLv(-1);
1059 break;
1060 }
1061 int num5 = (flag4 ? 4 : 2) + (blessed ? 1 : 0);
1062 if (tc.encLV >= num5)
1063 {
1064 cc.Say("enc_resist", tc);
1065 break;
1066 }
1067 cc.Say("enc", tc);
1068 tc.ModEncLv(1);
1069 break;
1070 }
1071 case EffectId.Identify:
1072 case EffectId.GreaterIdentify:
1073 {
1074 bool flag5 = id == EffectId.GreaterIdentify;
1075 if (flag)
1076 {
1077 Redirect(EffectId.ForgetItems, flag5 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef));
1078 break;
1079 }
1080 if (!tc.isThing)
1081 {
1082 int count = ((!blessed) ? 1 : (flag5 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3))));
1083 LayerDragGrid.CreateIdentify(CC, flag5, state, 0, count);
1084 return;
1085 }
1086 cc.PlaySound("identify");
1087 cc.PlayEffect("identify");
1088 tc.Thing.Identify(cc.IsPCParty, (!flag5) ? IDTSource.Identify : IDTSource.SuperiorIdentify);
1089 break;
1090 }
1091 case EffectId.Uncurse:
1092 {
1093 if (!tc.isThing)
1094 {
1095 LayerDragGrid.CreateUncurse(CC, state);
1096 return;
1097 }
1098 Thing thing2 = tc.Thing;
1099 if (thing2.blessedState == BlessedState.Cursed)
1100 {
1101 thing2.SetBlessedState(BlessedState.Normal);
1102 }
1103 else if (thing2.blessedState == BlessedState.Doomed)
1104 {
1105 thing2.SetBlessedState(BlessedState.Normal);
1106 }
1107 thing2.GetRootCard()?.TryStack(thing2);
1108 LayerInventory.SetDirty(thing2);
1109 break;
1110 }
1111 case EffectId.Lighten:
1112 {
1113 if (!tc.isThing)
1114 {
1115 LayerDragGrid.CreateLighten(CC, state);
1116 return;
1117 }
1118 if (tc.Num > 1)
1119 {
1120 tc = tc.Split(1);
1121 }
1122 cc.PlaySound("offering");
1123 cc.PlayEffect("buff");
1124 int num = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight);
1125 tc.isWeightChanged = true;
1126 Element orCreateElement = tc.elements.GetOrCreateElement(64);
1127 Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
1128 Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
1129 Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
1130 bool flag2 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
1131 if (flag)
1132 {
1133 num = (int)(0.01f * (float)num * (float)power * 0.75f + 500f);
1134 if (num < 0 || num > 10000000)
1135 {
1136 num = 10000000;
1137 flag2 = false;
1138 }
1139 if (flag2)
1140 {
1141 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1142 {
1143 tc.elements.ModBase(67, Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1144 tc.elements.ModBase(66, -Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1145 }
1146 else
1147 {
1148 tc.elements.ModBase(65, Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1149 tc.elements.ModBase(64, -Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1150 }
1151 }
1152 cc.Say("lighten_curse", cc, tc);
1153 }
1154 else
1155 {
1156 num = num * (100 - power / 10) / 100;
1157 if (blessed)
1158 {
1159 power /= 4;
1160 }
1161 if (flag2)
1162 {
1163 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1164 {
1165 tc.elements.ModBase(67, -Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1166 tc.elements.ModBase(66, Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1167 }
1168 else
1169 {
1170 tc.elements.ModBase(65, -Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1171 tc.elements.ModBase(64, Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1172 }
1173 }
1174 cc.Say("lighten", cc, tc);
1175 }
1176 tc.c_weight = num;
1177 tc.SetDirtyWeight();
1178 if (tc.parent == null)
1179 {
1180 CC.Pick(tc.Thing, msg: false);
1181 }
1183 break;
1184 }
1185 case EffectId.Reconstruction:
1186 {
1187 if (!tc.isThing)
1188 {
1190 return;
1191 }
1192 if (tc.Num > 1)
1193 {
1194 tc = tc.Split(1);
1195 }
1196 cc.PlaySound("mutation");
1197 cc.PlayEffect("identify");
1198 cc.Say("reconstruct", cc, tc);
1199 EClass.game.cards.uidNext += EClass.rnd(30);
1200 Thing thing3 = ThingGen.Create(tc.id, -1, tc.LV * power / 100);
1201 thing3.SetBlessedState(state);
1202 tc.Destroy();
1203 CC.Pick(thing3, msg: false);
1204 if (!CC.IsPC)
1205 {
1206 CC.TryEquip(thing3);
1207 }
1208 break;
1209 }
1210 case EffectId.ChangeMaterialLesser:
1211 case EffectId.ChangeMaterial:
1212 case EffectId.ChangeMaterialGreater:
1213 {
1214 SourceMaterial.Row row = EClass.sources.materials.alias.TryGetValue(actRef.n1);
1215 if (!tc.isThing)
1216 {
1217 LayerDragGrid.CreateChangeMaterial(CC, actRef.refThing, row, id, state);
1218 return;
1219 }
1220 if (tc.Num > 1)
1221 {
1222 tc = tc.Split(1);
1223 }
1224 string name = tc.Name;
1225 if (row == null)
1226 {
1227 bool num3 = id == EffectId.ChangeMaterialGreater;
1228 bool flag3 = id == EffectId.ChangeMaterialLesser;
1229 string text2 = tc.Thing.source.tierGroup;
1230 Dictionary<string, SourceMaterial.TierList> tierMap = SourceMaterial.tierMap;
1231 int num4 = 1;
1232 if (flag)
1233 {
1234 num4 -= 2;
1235 }
1236 if (blessed)
1237 {
1238 num4++;
1239 }
1240 if (num3)
1241 {
1242 num4++;
1243 }
1244 if (flag3)
1245 {
1246 num4 -= 2;
1247 }
1248 num4 = Mathf.Clamp(num4 + EClass.rnd(2), 0, 4);
1249 if (EClass.rnd(10) == 0)
1250 {
1251 text2 = ((text2 == "metal") ? "leather" : "metal");
1252 }
1253 SourceMaterial.TierList tierList = (text2.IsEmpty() ? tierMap.RandomItem() : tierMap[text2]);
1254 for (int j = 0; j < 1000; j++)
1255 {
1256 row = tierList.tiers[num4].Select();
1257 if (row != tc.material)
1258 {
1259 break;
1260 }
1261 }
1262 }
1263 cc.PlaySound("offering");
1264 cc.PlayEffect("buff");
1265 if ((tc.id == "log" || tc.id == "branch") && tc.material.alias == "carbone")
1266 {
1267 foreach (Element item2 in tc.elements.dict.Values.ToList())
1268 {
1269 if (item2.IsTrait && item2.vBase != 0)
1270 {
1271 tc.elements.ModBase(item2.id, -item2.vBase);
1272 }
1273 }
1274 }
1275 tc.ChangeMaterial(row);
1276 if (tc.trait is TraitGene && tc.c_DNA != null)
1277 {
1278 DNA.Type type = DNA.GetType(tc.material.alias);
1279 tc.c_DNA.Generate(type);
1280 }
1281 cc.Say("materialChanged", name, row.GetName());
1282 if (CC != null)
1283 {
1284 if (tc.parent == null)
1285 {
1286 CC.Pick(tc.Thing, msg: false);
1287 }
1289 }
1290 break;
1291 }
1292 case EffectId.Return:
1293 case EffectId.Evac:
1294 if (!cc.IsPC)
1295 {
1296 Redirect(EffectId.Teleport, state, default(ActRef));
1297 return;
1298 }
1299 cc.PlaySound("return_cast");
1300 if (EClass.player.returnInfo == null)
1301 {
1302 if (id == EffectId.Evac)
1303 {
1304 EClass.player.returnInfo = new Player.ReturnInfo
1305 {
1306 turns = EClass.rnd(10) + 10,
1307 isEvac = true
1308 };
1309 }
1310 else
1311 {
1312 if (EClass.game.spatials.ListReturnLocations().Count == 0)
1313 {
1314 Msg.Say("returnNowhere");
1315 break;
1316 }
1317 EClass.player.returnInfo = new Player.ReturnInfo
1318 {
1319 turns = EClass.rnd(10) + 10,
1320 askDest = true
1321 };
1322 }
1323 Msg.Say("returnBegin");
1324 }
1325 else
1326 {
1327 EClass.player.returnInfo = null;
1328 Msg.Say("returnAbort");
1329 }
1330 break;
1331 case EffectId.Teleport:
1332 case EffectId.TeleportShort:
1333 case EffectId.Gate:
1334 if (!tc.HasHost)
1335 {
1336 if (!flag)
1337 {
1338 if (id == EffectId.TeleportShort)
1339 {
1340 tc.Teleport(GetTeleportPos(tc.pos));
1341 }
1342 else
1343 {
1345 }
1346 }
1347 if (id == EffectId.Gate && CC.IsPC)
1348 {
1349 foreach (Chara chara2 in EClass._map.charas)
1350 {
1351 if (!chara2.HasHost && chara2 != tc && (chara2.IsPCParty || chara2.IsPCPartyMinion))
1352 {
1353 chara2.Teleport(tc.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? tc.pos);
1354 }
1355 }
1356 }
1357 }
1358 if (flag)
1359 {
1360 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
1361 }
1362 if (blessed)
1363 {
1364 Redirect(EffectId.Levitate, BlessedState.Normal, default(ActRef));
1365 }
1366 break;
1367 }
1368 if (TC == null)
1369 {
1370 return;
1371 }
1372 switch (id)
1373 {
1374 case EffectId.ThrowPotion:
1375 if (!CC.pos.Equals(TC.pos))
1376 {
1377 Thing t3 = ThingGen.Create(new string[6] { "330", "331", "334", "335", "336", "1142" }.RandomItem());
1378 ActThrow.Throw(CC, TC.pos, t3, ThrowMethod.Punish, 0.7f);
1379 }
1380 break;
1381 case EffectId.ShutterHex:
1382 {
1383 if (!CC.IsHostile(TC))
1384 {
1385 break;
1386 }
1387 int hex2 = 0;
1388 foreach (Condition condition4 in TC.conditions)
1389 {
1390 if (condition4.Type == ConditionType.Debuff)
1391 {
1392 hex2++;
1393 }
1394 }
1395 if (hex2 == 0)
1396 {
1397 CC.SayNothingHappans();
1398 break;
1399 }
1400 TC.pos.PlayEffect("holyveil");
1401 TC.pos.PlaySound("holyveil");
1402 TC.pos.PlaySound("atk_eleSound");
1403 TC.conditions.ForeachReverse(delegate(Condition c)
1404 {
1405 if (c.Type == ConditionType.Debuff)
1406 {
1407 c.Kill();
1408 }
1409 });
1410 TC.Say("abShutterHex", TC);
1411 TC.pos.ForeachNeighbor(delegate(Point p)
1412 {
1413 foreach (Chara item3 in p.ListCharas())
1414 {
1415 if (!item3.IsFriendOrAbove(CC))
1416 {
1417 int num9 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
1418 item3.DamageHP(num9 * hex2, 919, power, AttackSource.None, CC);
1419 }
1420 }
1421 });
1422 break;
1423 }
1424 case EffectId.Draw:
1425 {
1426 if (CC.Dist(TC) <= 1 || (CC.IsPCFactionOrMinion && TC.IsPCFactionOrMinion && TC.isRestrained))
1427 {
1428 break;
1429 }
1430 Point point = CC.GetFirstStep(TC.pos, PathManager.MoveType.Combat);
1431 if (!point.IsValid)
1432 {
1433 point = CC.pos.GetRandomPoint(1)?.GetNearestPoint(allowBlock: false, allowChara: false);
1434 }
1435 if (point == null || !CC.CanSeeLos(point))
1436 {
1437 break;
1438 }
1439 CC.Say("abDraw", CC, TC);
1440 if (TC.HasCondition<ConGravity>())
1441 {
1442 CC.SayNothingHappans();
1443 break;
1444 }
1445 TC.MoveImmediate(point, !EClass.core.config.camera.smoothFollow);
1446 if (CC.id == "tentacle")
1447 {
1448 TC.AddCondition<ConEntangle>();
1449 }
1450 break;
1451 }
1452 case EffectId.CatSniff:
1453 {
1454 Chara nearbyCatToSniff = CC.GetNearbyCatToSniff();
1455 if (nearbyCatToSniff != null)
1456 {
1457 CC.Sniff(nearbyCatToSniff);
1458 }
1459 break;
1460 }
1461 case EffectId.Steal:
1462 {
1464 {
1465 break;
1466 }
1467 if (TC.Evalue(426) > 0)
1468 {
1469 TC.Say((actRef.n1 == "money") ? "abStealNegateMoney" : "abStealNegate", TC);
1470 break;
1471 }
1472 Thing thing4 = null;
1473 bool flag7 = actRef.n1 == "food";
1474 if (actRef.n1 == "money")
1475 {
1476 int currency = TC.GetCurrency();
1477 if (currency > 0)
1478 {
1479 currency = Mathf.Clamp(EClass.rnd(currency / 10), 1, 100 + EClass.rndHalf(CC.LV * 200));
1480 thing4 = ThingGen.Create("money").SetNum(currency);
1481 TC.ModCurrency(-currency);
1482 }
1483 }
1484 else
1485 {
1486 Func<Thing, bool> func = (Thing t) => true;
1487 if (flag7)
1488 {
1489 func = (Thing t) => t.IsFood;
1490 }
1491 List<Thing> list4 = TC.things.List(delegate(Thing t)
1492 {
1494 {
1495 return false;
1496 }
1497 return t.trait.CanBeDestroyed && t.things.Count == 0 && t.invY != 1 && t.trait.CanBeStolen && !t.trait.CanOnlyCarry && !t.IsUnique && !t.isEquipped && t.blessedState == BlessedState.Normal && func(t);
1498 }, onlyAccessible: true);
1499 if (list4.Count > 0)
1500 {
1501 thing4 = list4.RandomItem();
1502 if (thing4.Num > 1)
1503 {
1504 thing4 = thing4.Split(1);
1505 }
1506 }
1507 CC.AddCooldown(6640, 200);
1508 }
1509 if (thing4 == null)
1510 {
1511 CC.Say("abStealNothing", CC, TC);
1512 break;
1513 }
1514 thing4.SetInt(116, 1);
1515 TC.PlaySound(thing4.material.GetSoundDrop(thing4.sourceCard));
1516 CC.Pick(thing4, msg: false);
1517 CC.Say("abSteal", CC, TC, thing4.Name);
1518 if (actRef.n1 == "food")
1519 {
1520 if (CC.hunger.value != 0)
1521 {
1522 CC.InstantEat(thing4);
1523 }
1524 }
1525 else
1526 {
1527 CC.Say("abStealEscape", CC);
1528 CC.Teleport(GetTeleportPos(tc.pos, 30), silent: true);
1529 }
1530 break;
1531 }
1532 case EffectId.NeckHunt:
1533 CC.TryNeckHunt(TC, power);
1534 break;
1535 case EffectId.CurseEQ:
1536 {
1537 if (CC != null && CC != TC)
1538 {
1539 TC.Say("curse", CC, TC);
1540 }
1541 TC.PlaySound("curse3");
1542 TC.PlayEffect("curse");
1543 if (EClass.rnd(150 + TC.LUC * 5 + TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) || TC.TryNullifyCurse())
1544 {
1545 break;
1546 }
1547 List<Thing> list7 = TC.things.List(delegate(Thing t)
1548 {
1549 if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
1550 {
1551 return false;
1552 }
1553 return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
1554 });
1555 if (list7.Count == 0)
1556 {
1557 CC.SayNothingHappans();
1558 break;
1559 }
1560 Thing thing6 = list7.RandomItem();
1561 TC.Say("curse_hit", TC, thing6);
1562 thing6.SetBlessedState((thing6.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
1563 LayerInventory.SetDirty(thing6);
1564 break;
1565 }
1566 case EffectId.UncurseEQ:
1567 case EffectId.UncurseEQGreater:
1568 {
1569 TC.Say("uncurseEQ" + (blessed ? "_bless" : (flag ? "_curse" : "")), TC);
1570 TC.PlaySound("uncurse");
1571 TC.PlayEffect("uncurse");
1572 if (flag)
1573 {
1574 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
1575 break;
1576 }
1577 int success = 0;
1578 int fail = 0;
1579 List<Thing> list = new List<Thing>();
1580 TC.things.Foreach(delegate(Thing t)
1581 {
1582 int num10 = 0;
1583 if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
1584 {
1585 if (t.blessedState == BlessedState.Cursed)
1586 {
1587 num10 = EClass.rnd(200);
1588 }
1589 if (t.blessedState == BlessedState.Doomed)
1590 {
1591 num10 = EClass.rnd(1000);
1592 }
1593 if (blessed)
1594 {
1595 num10 /= 2;
1596 }
1597 if (id == EffectId.UncurseEQGreater)
1598 {
1599 num10 /= 10;
1600 }
1601 if (power >= num10)
1602 {
1603 TC.Say("uncurseEQ_success", t);
1604 t.SetBlessedState(BlessedState.Normal);
1605 if (t.isEquipped && t.HasElement(656))
1606 {
1607 TC.body.Unequip(t);
1608 }
1610 success++;
1611 list.Add(t);
1612 }
1613 else
1614 {
1615 fail++;
1616 }
1617 }
1618 });
1619 foreach (Thing item4 in list)
1620 {
1621 item4.GetRootCard()?.TryStack(item4);
1622 }
1623 if (success == 0 && fail == 0)
1624 {
1625 TC.SayNothingHappans();
1626 }
1627 else if (fail > 0)
1628 {
1629 TC.Say("uncurseEQ_fail");
1630 }
1631 break;
1632 }
1633 case EffectId.Buff:
1634 {
1635 string text3 = actRef.n1;
1636 string text4 = "";
1637 if (flag)
1638 {
1639 text4 = EClass.sources.stats.alias[text3].curse;
1640 if (!text4.IsEmpty())
1641 {
1642 text3 = text4;
1643 }
1644 }
1645 Condition condition2 = Condition.Create(text3, power, delegate(Condition con)
1646 {
1647 if (!actRef.aliasEle.IsEmpty())
1648 {
1649 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1650 }
1651 });
1652 condition2.isPerfume = TC.IsPC && actRef.isPerfume;
1653 Condition condition3 = TC.AddCondition(condition2);
1654 if (condition3 != null && condition3.isPerfume)
1655 {
1656 condition3.value = 3;
1657 Msg.Say("perfume", TC);
1658 }
1659 if (!text4.IsEmpty())
1660 {
1661 CC.DoHostileAction(TC);
1662 }
1663 break;
1664 }
1665 case EffectId.KizuamiTrick:
1666 {
1667 EClass.game.religions.Trickery.Talk("ability");
1668 bool hex = CC.IsHostile(TC);
1669 List<SourceStat.Row> list6 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
1670 int power2 = power;
1671 for (int l = 0; l < 4 + EClass.rnd(2); l++)
1672 {
1673 SourceStat.Row row2 = list6.RandomItem();
1674 list6.Remove(row2);
1675 Proc(hex ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
1676 {
1677 n1 = row2.alias
1678 });
1679 }
1681 {
1682 EClass.Wait(0.3f, TC);
1683 }
1684 break;
1685 }
1686 case EffectId.Debuff:
1687 case EffectId.DebuffKizuami:
1688 {
1689 CC.DoHostileAction(TC);
1690 bool isPowerful = TC.IsPowerful;
1691 string n = actRef.n1;
1692 if (n == "ConSuffocation")
1693 {
1694 power = power * 2 / 3;
1695 }
1696 int a2 = power;
1697 int num7 = TC.WIL * (isPowerful ? 20 : 5);
1698 ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
1699 if (condition != null)
1700 {
1701 num7 += condition.power * 5;
1702 }
1703 if (id != EffectId.DebuffKizuami && EClass.rnd(a2) < num7 / EClass.sources.stats.alias[n].hexPower && EClass.rnd(10) != 0)
1704 {
1705 TC.Say("debuff_resist", TC);
1706 CC.DoHostileAction(TC);
1707 break;
1708 }
1709 TC.AddCondition(Condition.Create(n, power, delegate(Condition con)
1710 {
1711 con.givenByPcParty = CC.IsPCParty;
1712 if (!actRef.aliasEle.IsEmpty())
1713 {
1714 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
1715 }
1716 }));
1717 if (n == "ConBane" && CC.HasElement(1416))
1718 {
1719 TC.AddCondition<ConExcommunication>(power);
1720 }
1721 CC.DoHostileAction(TC);
1723 {
1724 EClass.Wait(0.3f, TC);
1725 }
1726 break;
1727 }
1728 case EffectId.Mutation:
1729 TC.MutateRandom(1, 100, ether: false, state);
1731 {
1732 EClass.Wait(0.3f, TC);
1733 }
1734 break;
1735 case EffectId.CureMutation:
1736 TC.MutateRandom(-1, 100, ether: false, state);
1737 break;
1738 case EffectId.Ally:
1739 {
1740 Msg.Say("gainAlly");
1741 Chara chara = CharaGen.CreateFromFilter("chara", cc.LV);
1742 EClass._zone.AddCard(chara, cc.pos.GetNearestPoint(allowBlock: false, allowChara: false));
1743 if (cc.IsPCFactionOrMinion)
1744 {
1745 chara.MakeAlly(msg: false);
1746 }
1747 chara.PlaySound("identify");
1748 chara.PlayEffect("teleport");
1749 break;
1750 }
1751 case EffectId.Wish:
1752 if (!TC.IsPC)
1753 {
1754 break;
1755 }
1756 if (blessed || flag)
1757 {
1758 power /= 2;
1759 }
1760 Dialog.InputName("dialogWish", "q", delegate(bool cancel, string text)
1761 {
1762 if (!cancel)
1763 {
1764 Msg.Say("wish", TC, text);
1765 Wish(text, EClass.pc.NameTitled, power, state);
1766 }
1767 });
1768 break;
1769 case EffectId.Faith:
1770 {
1772 tc.PlayEffect("aura_heaven");
1773 tc.PlaySound("aura_heaven");
1774 tc.Say("faith", tc, faith.Name);
1775 if (flag)
1776 {
1777 tc.Say("faith_curse", tc, faith.Name);
1778 break;
1779 }
1780 if (blessed)
1781 {
1782 tc.Say("faith_bless", tc, faith.Name);
1783 }
1784 tc.ModExp(306, power * 10);
1785 tc.ModExp(85, power * 10);
1786 if (tc.elements.Base(85) >= tc.elements.Value(306))
1787 {
1788 tc.elements.SetBase(85, tc.elements.Value(306));
1789 }
1790 break;
1791 }
1792 case EffectId.TransGender:
1793 {
1794 tc.PlaySound("mutation");
1795 tc.PlayEffect("mutation");
1796 int gender = tc.bio.gender;
1797 int gender2 = gender switch
1798 {
1799 1 => 2,
1800 2 => 1,
1801 _ => (EClass.rnd(2) != 0) ? 1 : 2,
1802 };
1803 if (gender != 0 && EClass.rnd(10) == 0)
1804 {
1805 gender2 = 0;
1806 }
1807 tc.bio.SetGender(gender2);
1808 tc.Say("transGender", tc, Gender.Name(tc.bio.gender));
1809 tc.Talk("tail");
1810 int age = tc.bio.GetAge(tc.Chara);
1811 if (blessed && age > 1)
1812 {
1813 tc.Say("ageDown", tc);
1814 tc.bio.SetAge(tc.Chara, age - 1);
1815 }
1816 else if (flag)
1817 {
1818 tc.Say("ageUp", tc);
1819 tc.bio.SetAge(tc.Chara, age + 1);
1820 }
1821 break;
1822 }
1823 case EffectId.Youth:
1824 {
1825 tc.PlaySound("mutation");
1826 tc.PlayEffect("mutation");
1827 int age3 = tc.bio.GetAge(tc.Chara);
1828 if (!flag && age3 <= 0)
1829 {
1830 tc.SayNothingHappans();
1831 break;
1832 }
1833 age3 = Mathf.Max(0, age3 * 100 / (flag ? 75 : (blessed ? 400 : 200))) + (flag ? 1 : 0);
1834 tc.Say(flag ? "ageUp" : "ageDown", tc);
1835 tc.bio.SetAge(tc.Chara, age3);
1836 break;
1837 }
1838 case EffectId.EternalYouth:
1839 {
1840 tc.PlaySound("mutation");
1841 tc.PlayEffect("mutation");
1842 if (tc.IsUnique)
1843 {
1844 tc.SayNothingHappans();
1845 break;
1846 }
1847 int age2 = tc.bio.GetAge(tc.Chara);
1848 if (flag)
1849 {
1850 if (tc.c_lockedAge != 0)
1851 {
1852 tc.Say("eternalYouth2", tc);
1853 tc.c_lockedAge = 0;
1854 tc.elements.Remove(1243);
1855 tc.bio.SetAge(tc.Chara, age2);
1856 }
1857 Redirect(EffectId.Youth, BlessedState.Cursed, default(ActRef));
1858 }
1859 else if (tc.c_lockedAge != 0)
1860 {
1861 tc.SayNothingHappans();
1862 }
1863 else
1864 {
1865 tc.PlaySound("dropRewardXmas");
1866 tc.Say("eternalYouth1", tc);
1867 tc.c_lockedAge = age2 + 1;
1868 tc.elements.SetBase(1243, 1);
1869 if (blessed)
1870 {
1871 Redirect(EffectId.Youth, BlessedState.Blessed, default(ActRef));
1872 }
1873 }
1874 break;
1875 }
1876 case EffectId.BuffStats:
1877 case EffectId.DebuffStats:
1878 case EffectId.LulwyTrick:
1879 Debug.Log(power + "/" + id.ToString() + "/" + actRef.n1);
1880 if (id == EffectId.LulwyTrick)
1881 {
1882 EClass.game.religions.Wind.Talk("ability");
1883 }
1884 if (power < 0 || id == EffectId.DebuffStats)
1885 {
1886 power = Mathf.Abs(power);
1887 if (blessed)
1888 {
1889 power /= 4;
1890 }
1891 flag = true;
1892 }
1893 TC.AddCondition(Condition.Create(power, delegate(ConBuffStats con)
1894 {
1895 con.SetRefVal(Element.GetId(actRef.n1), (int)id);
1896 }));
1897 break;
1898 case EffectId.Revive:
1899 {
1900 List<KeyValuePair<int, Chara>> list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
1901 if (TC.IsPCFaction || TC.IsPCFactionMinion)
1902 {
1903 if (TC.IsPC && list3.Count == 0)
1904 {
1905 list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.CanRevive() && a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon).ToList();
1906 }
1907 if (list3.Count > 0)
1908 {
1909 list3.RandomItem().Value.Chara.GetRevived();
1910 break;
1911 }
1912 }
1913 TC.SayNothingHappans();
1914 break;
1915 }
1916 case EffectId.DamageBody:
1917 case EffectId.DamageMind:
1918 case EffectId.DamageBodyGreat:
1919 case EffectId.DamageMindGreat:
1920 case EffectId.Weaken:
1921 {
1922 bool flag8 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
1923 bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
1924 int num8 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
1925 if (id == EffectId.Weaken)
1926 {
1927 flag8 = EClass.rnd(2) == 0;
1928 mind = !flag8;
1929 num8 = 1;
1930 }
1931 else
1932 {
1933 TC.PlayEffect("debuff");
1934 TC.PlaySound("debuff");
1935 }
1936 TC.Say(flag8 ? "damageBody" : "damageMind", TC);
1937 for (int k = 0; k < num8; k++)
1938 {
1939 TC.DamageTempElements(power, flag8, mind, id != EffectId.Weaken);
1940 }
1941 if (TC.IsPC)
1942 {
1943 Tutorial.Play("healer");
1944 }
1945 break;
1946 }
1947 case EffectId.EnhanceBody:
1948 case EffectId.EnhanceMind:
1949 case EffectId.EnhanceBodyGreat:
1950 case EffectId.EnhanceMindGreat:
1951 {
1952 bool flag9 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
1953 bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
1954 if (id != EffectId.EnhanceBody && id != EffectId.EnhanceMind)
1955 {
1956 EClass.rnd(4);
1957 }
1958 TC.Say(flag9 ? "enhanceBody" : "enhanceMind", TC);
1959 TC.PlayEffect("buff");
1960 TC.PlaySound("buff");
1961 TC.EnhanceTempElements(power, flag9, mind2, onlyRenew: true);
1962 break;
1963 }
1964 case EffectId.RestoreBody:
1965 case EffectId.RestoreMind:
1966 {
1967 bool flag6 = id == EffectId.RestoreBody;
1968 if (flag)
1969 {
1970 Redirect(flag6 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef));
1971 break;
1972 }
1973 TC.Say(flag6 ? "restoreBody" : "restoreMind", TC);
1974 TC.PlaySound("heal");
1975 TC.PlayEffect("heal");
1976 TC.CureHost(flag6 ? CureType.CureBody : CureType.CureMind, power, state);
1977 if (blessed)
1978 {
1979 Redirect(flag6 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef));
1980 }
1981 break;
1982 }
1983 case EffectId.HealComplete:
1984 TC.HealHPHost(100000000, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
1985 TC.CureHost(CureType.HealComplete, power, state);
1986 TC.Say("heal_heavy", TC);
1987 break;
1988 case EffectId.Heal:
1989 case EffectId.JureHeal:
1990 {
1991 if (id == EffectId.JureHeal)
1992 {
1993 EClass.game.religions.Healing.Talk("ability");
1994 }
1995 if (actRef.act != null)
1996 {
1997 Debug.Log(actRef.act.id);
1998 }
1999 int num6 = Dice.Create((actRef.act != null && EClass.sources.calc.map.ContainsKey(actRef.act.ID)) ? actRef.act.ID : "SpHealLight", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
2000 if (actRef.refThing != null)
2001 {
2002 num6 = num6 * (100 + actRef.refThing.Evalue(7500)) / 100;
2003 }
2004 if (flag)
2005 {
2006 TC.DamageHP(num6 / 2, 919, power);
2007 break;
2008 }
2009 TC.HealHPHost(num6, (actRef.refThing == null && id != EffectId.JureHeal) ? HealSource.Magic : HealSource.Item);
2010 TC.CureHost(CureType.Heal, power, state);
2011 TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
2012 break;
2013 }
2014 case EffectId.RemedyJure:
2015 TC.HealHP(1000000, HealSource.Magic);
2016 TC.CureHost(CureType.Jure, power, state);
2017 TC.Say("heal_jure", TC);
2018 break;
2019 case EffectId.Headpat:
2020 CC.Cuddle(TC, headpat: true);
2021 break;
2022 case EffectId.RemoveHex:
2023 case EffectId.RemoveHexAll:
2024 if (flag)
2025 {
2026 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
2027 break;
2028 }
2029 foreach (Condition item5 in TC.conditions.Copy())
2030 {
2031 if (item5.Type == ConditionType.Debuff && !item5.IsKilled && EClass.rnd(power * 2) > EClass.rnd(item5.power))
2032 {
2033 CC.Say("removeHex", TC, item5.Name.ToLower());
2034 item5.Kill();
2035 if (id == EffectId.RemoveHex)
2036 {
2037 break;
2038 }
2039 }
2040 }
2041 TC.AddCondition<ConHolyVeil>(power / 2);
2042 break;
2043 case EffectId.CureCorruption:
2044 TC.PlaySound("heal");
2045 TC.PlayEffect("heal");
2046 if (flag)
2047 {
2048 TC.Say("cureCorruption_curse", TC);
2049 TC.mana.Mod(9999);
2050 TC.ModCorruption(power);
2051 }
2052 else
2053 {
2054 TC.Say("cureCorruption", TC);
2055 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
2056 }
2057 break;
2058 case EffectId.Drink:
2059 case EffectId.DrinkRamune:
2060 case EffectId.DrinkMilk:
2061 if (id == EffectId.DrinkRamune)
2062 {
2063 TC.Say("drinkRamune", TC);
2064 }
2065 if (TC.IsPC)
2066 {
2067 TC.Say("drinkGood", TC);
2068 }
2069 if (id == EffectId.DrinkMilk)
2070 {
2071 if (TC.IsPC)
2072 {
2073 TC.Say("drinkMilk", TC);
2074 }
2075 if (blessed)
2076 {
2077 TC.ModHeight(EClass.rnd(5) + 3);
2078 }
2079 else if (flag)
2080 {
2081 TC.ModHeight((EClass.rnd(5) + 3) * -1);
2082 }
2083 }
2084 break;
2085 case EffectId.DrinkWater:
2086 if (flag)
2087 {
2088 if (TC.IsPC)
2089 {
2090 TC.Say("drinkWater_dirty", TC);
2091 }
2093 }
2094 else if (TC.IsPC)
2095 {
2096 TC.Say("drinkWater_clear", TC);
2097 }
2098 break;
2099 case EffectId.DrinkWaterDirty:
2100 if (TC.IsPC)
2101 {
2102 TC.Say("drinkWater_dirty", TC);
2103 }
2104 if (TC.IsPCFaction)
2105 {
2106 TC.Vomit();
2107 }
2108 break;
2109 case EffectId.SaltWater:
2110 if (TC.HasElement(1211))
2111 {
2112 TC.Say("drinkSaltWater_snail", TC);
2113 int dmg = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000);
2114 TC.DamageHP(dmg, AttackSource.None, CC);
2115 }
2116 else if (TC.IsPC)
2117 {
2118 TC.Say("drinkSaltWater", TC);
2119 }
2120 break;
2121 case EffectId.Booze:
2122 TC.AddCondition<ConDrunk>(power);
2123 if (TC.HasElement(1215))
2124 {
2125 TC.Say("drunk_dwarf", TC);
2126 TC.AddCondition(Condition.Create(power + EClass.rnd(power), delegate(ConBuffStats con)
2127 {
2128 con.SetRefVal(Element.List_MainAttributes.RandomItem(), (int)id);
2129 }));
2130 }
2131 break;
2132 case EffectId.CatsEye:
2133 if (flag)
2134 {
2135 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2136 }
2137 else
2138 {
2139 TC.AddCondition<ConNightVision>(power);
2140 }
2141 break;
2142 case EffectId.Hero:
2143 if (flag)
2144 {
2145 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2146 }
2147 else
2148 {
2149 TC.AddCondition<ConHero>(power);
2150 }
2151 break;
2152 case EffectId.HolyVeil:
2153 if (flag)
2154 {
2155 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2156 }
2157 else
2158 {
2159 TC.AddCondition<ConHolyVeil>(power);
2160 }
2161 break;
2162 case EffectId.Levitate:
2163 if (flag)
2164 {
2165 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
2166 }
2167 else
2168 {
2169 TC.AddCondition<ConLevitate>(power);
2170 }
2171 break;
2172 case EffectId.Gravity:
2173 if (blessed)
2174 {
2175 power /= 4;
2176 }
2177 TC.AddCondition<ConGravity>(power);
2178 if (flag)
2179 {
2180 Redirect(EffectId.BuffStats, BlessedState.Cursed, new ActRef
2181 {
2182 aliasEle = "STR"
2183 });
2184 }
2185 break;
2186 case EffectId.Fear:
2187 if (blessed)
2188 {
2189 power /= 4;
2190 }
2191 TC.AddCondition<ConFear>(power);
2192 if (flag)
2193 {
2194 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2195 }
2196 break;
2197 case EffectId.Faint:
2198 if (blessed)
2199 {
2200 power /= 4;
2201 }
2202 TC.AddCondition<ConFaint>(power);
2203 if (flag)
2204 {
2205 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2206 }
2207 break;
2208 case EffectId.Paralyze:
2209 if (blessed)
2210 {
2211 power /= 4;
2212 }
2213 TC.AddCondition<ConParalyze>(power);
2214 if (flag)
2215 {
2216 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2217 }
2218 break;
2219 case EffectId.Poison:
2220 if (blessed)
2221 {
2222 power /= 4;
2223 }
2224 TC.AddCondition<ConPoison>(power);
2225 if (flag)
2226 {
2227 Redirect(EffectId.Paralyze, BlessedState.Normal, default(ActRef));
2228 }
2229 break;
2230 case EffectId.Sleep:
2231 if (blessed)
2232 {
2233 power /= 4;
2234 }
2235 TC.AddCondition<ConSleep>(power);
2236 if (flag)
2237 {
2238 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2239 }
2240 break;
2241 case EffectId.Confuse:
2242 if (blessed)
2243 {
2244 power /= 4;
2245 }
2246 TC.AddCondition<ConConfuse>(power);
2247 if (flag)
2248 {
2249 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2250 }
2251 break;
2252 case EffectId.Blind:
2253 if (blessed)
2254 {
2255 power /= 4;
2256 }
2257 TC.AddCondition<ConBlind>(power);
2258 if (flag)
2259 {
2260 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2261 }
2262 break;
2263 case EffectId.Disease:
2264 if (blessed)
2265 {
2266 power /= 4;
2267 }
2268 TC.AddCondition<ConDisease>(power);
2269 if (flag)
2270 {
2271 Redirect(EffectId.Poison, BlessedState.Normal, default(ActRef));
2272 }
2273 break;
2274 case EffectId.Acid:
2275 {
2276 if (blessed)
2277 {
2278 power /= 4;
2279 }
2280 List<Thing> list5 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
2281 if (list5.Count != 0)
2282 {
2283 Thing thing5 = list5.RandomItem();
2284 TC.Say("acid_hit", TC);
2285 if (thing5.isAcidproof)
2286 {
2287 TC.Say("acid_nullify", thing5);
2288 }
2289 else if (thing5.encLV > -5)
2290 {
2291 TC.Say("acid_rust", TC, thing5);
2292 thing5.ModEncLv(-1);
2293 LayerInventory.SetDirty(thing5);
2294 }
2295 if (TC.IsPCParty)
2296 {
2297 Tutorial.Reserve("rust");
2298 }
2299 }
2300 break;
2301 }
2302 case EffectId.PuddleEffect:
2303 TC.DamageHP(power / 5, actRef.idEle, power);
2304 break;
2305 case EffectId.Acidproof:
2306 if (blessed)
2307 {
2308 power /= 4;
2309 }
2310 if (TC.IsPC)
2311 {
2312 TC.Say("pc_pain");
2313 }
2314 TC.Say("drink_acid", TC);
2315 TC.DamageHP(power / 5, 923, power);
2316 break;
2317 case EffectId.LevelDown:
2318 Msg.Say("nothingHappens");
2319 break;
2320 case EffectId.Love:
2321 case EffectId.LovePlus:
2322 if (flag)
2323 {
2324 if (CC == TC)
2325 {
2326 TC.Say("love_curse_self", TC);
2327 }
2328 else
2329 {
2330 TC.Say("love_curse", CC, TC);
2331 TC.ModAffinity(CC, -power / 4, show: false);
2332 }
2333 TC.ShowEmo(Emo.angry);
2334 }
2335 else
2336 {
2337 LoveMiracle(TC, CC, power, id, state);
2338 }
2339 break;
2340 case EffectId.HairGrowth:
2341 if (flag)
2342 {
2343 if (TC.HasElement(1532))
2344 {
2345 TC.SetMutation(1532);
2346 }
2347 else
2348 {
2349 TC.SetMutation(1533, 1);
2350 }
2351 TC.c_fur = 0;
2352 break;
2353 }
2354 if (blessed)
2355 {
2356 if (TC.HasElement(1533))
2357 {
2358 TC.SetMutation(1533);
2359 }
2360 else
2361 {
2362 TC.SetMutation(1532, 1);
2363 }
2364 }
2365 TC.PlayEffect("aura_heaven");
2366 TC.PlaySound("godbless");
2367 if (!TC.HaveFur())
2368 {
2369 TC.Say("grow_hair_fail", TC);
2370 break;
2371 }
2372 TC.Say("grow_hair", TC);
2373 TC.c_fur = 100;
2374 break;
2375 case EffectId.Gene:
2376 GeneMiracle(TC, CC, blessed ? DNA.Type.Superior : (flag ? DNA.Type.Brain : DNA.Type.Default));
2377 break;
2378 }
2379 void Redirect(EffectId _id, BlessedState _state, ActRef _ref1)
2380 {
2381 Proc(_id, orgPower, _state, cc, tc, _ref1);
2382 }
2383 }
@ currency
ConditionType
Definition: ConditionType.cs:2
CureType
Definition: CureType.cs:2
Emo
Definition: Emo.cs:2
HealSource
Definition: HealSource.cs:2
IDTSource
Definition: IDTSource.cs:2
ThrowMethod
Definition: ThrowMethod.cs:2
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
static void LoveMiracle(Chara tc, Chara c, int power, EffectId idEffect=EffectId.Love, BlessedState? state=null)
Definition: ActEffect.cs:2401
static void GeneMiracle(Chara tc, Chara c, DNA.Type type)
Definition: ActEffect.cs:2433
static Point GetTeleportPos(Point org, int radius=6)
Definition: ActEffect.cs:2452
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
Definition: ActThrow.cs:93
virtual string ID
Definition: ACT.cs:99
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
void SetElement(int id)
virtual string Name
void SetRefVal(int a, int b)
virtual ConditionType Type
Definition: BaseStats.cs:19
void SetGender(int g)
Definition: Biography.cs:469
int GetAge(Chara c)
Definition: Biography.cs:276
void SetAge(Chara c, int a)
Definition: Biography.cs:293
int gender
Definition: Biography.cs:29
GlobalCharaList globalCharas
Definition: CardManager.cs:46
int c_lockedAge
Definition: Card.cs:1327
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:5664
virtual bool isThing
Definition: Card.cs:2043
bool IsAmmo
Definition: Card.cs:2209
Thing Split(int a)
Definition: Card.cs:3382
ElementContainerCard elements
Definition: Card.cs:39
string id
Definition: Card.cs:33
bool IsUnique
Definition: Card.cs:2053
bool IsThrownWeapon
Definition: Card.cs:2207
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:2994
bool isCopy
Definition: Card.cs:864
Biography bio
Definition: Card.cs:42
string Name
Definition: Card.cs:2099
bool IsRangedWeapon
Definition: Card.cs:2205
ICardParent parent
Definition: Card.cs:53
Thing SetNum(int a)
Definition: Card.cs:3393
bool IsFood
Definition: Card.cs:2137
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3793
bool isAcidproof
Definition: Card.cs:672
bool IsToolbelt
Definition: Card.cs:2131
void SetDirtyWeight()
Definition: Card.cs:2516
bool IsEquipmentOrRanged
Definition: Card.cs:2180
void TryStack(Thing t)
Definition: Card.cs:6745
int encLV
Definition: Card.cs:312
void ModEncLv(int a)
Definition: Card.cs:3744
void Destroy()
Definition: Card.cs:4931
virtual Thing Thing
Definition: Card.cs:2020
Card GetRootCard()
Definition: Card.cs:3324
int Dist(Card c)
Definition: Card.cs:7404
bool IsLightsource
Definition: Card.cs:2133
virtual bool HasHost
Definition: Card.cs:2385
BlessedState blessedState
Definition: Card.cs:264
Card Install()
Definition: Card.cs:3639
Card parentCard
Definition: Card.cs:101
DNA c_DNA
Definition: Card.cs:1855
int Num
Definition: Card.cs:156
bool IsWeapon
Definition: Card.cs:2168
int LV
Definition: Card.cs:372
void UnqeuipIfTooHeavy(Thing t)
Definition: CharaBody.cs:165
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
CharaBody body
Definition: Chara.cs:94
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:9233
void Cuddle(Chara c, bool headpat=false)
Definition: Chara.cs:6007
void InstantEat(Thing t=null, bool sound=true)
Definition: Chara.cs:7280
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8871
Faction faction
Definition: Chara.cs:425
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
Definition: Chara.cs:2518
Chara GetNearbyCatToSniff()
Definition: Chara.cs:7747
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1232
override bool IsPCParty
Definition: Chara.cs:613
int corruption
Definition: Chara.cs:375
bool HasCondition(string alias)
Definition: Chara.cs:9028
Stats hunger
Definition: Chara.cs:1124
override bool HasHost
Definition: Chara.cs:686
override bool IsPCPartyMinion
Definition: Chara.cs:637
Chara Duplicate()
Definition: Chara.cs:1740
void MakeAlly(bool msg=true)
Definition: Chara.cs:2232
void TryDropBossLoot()
Definition: Chara.cs:5422
string NameTitled
Definition: Chara.cs:514
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:8315
Religion faith
Definition: Chara.cs:437
bool TryEquip(Thing t, bool useFav=false)
Definition: Chara.cs:7404
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4204
void Sniff(Chara c)
Definition: Chara.cs:7759
Definition: ConDim.cs:2
virtual bool IsKilled
Definition: Condition.cs:7
void Kill(bool silent=false)
Definition: Condition.cs:91
static Condition Create(string alias, int power=100, Action< Condition > onCreate=null)
Definition: Condition.cs:46
new GameConfig game
Definition: CoreConfig.cs:604
CameraConfig camera
Definition: CoreConfig.cs:612
CoreConfig config
Definition: Core.cs:70
Definition: DNA.cs:8
Type
Definition: DNA.cs:10
static Type GetType(string idMat)
Definition: DNA.cs:498
void Generate(Type _type, Chara model=null)
Definition: DNA.cs:254
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:528
static Core core
Definition: EClass.cs:6
static void Wait(float a, Card c)
Definition: EClass.cs:102
static int rndHalf(int a)
Definition: EClass.cs:87
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
Dictionary< int, Element > dict
int Value(int ele)
Element ModTempPotential(int ele, int v, int threshMsg=0)
Element ModBase(int ele, int v)
Element SetBase(string alias, int v, int potential=0)
void Remove(int id)
Element GetOrCreateElement(Element ele)
int vBase
Definition: ELEMENT.cs:252
bool HasTag(string tag)
Definition: ELEMENT.cs:473
static int[] List_MainAttributes
Definition: ELEMENT.cs:240
static int GetId(string alias)
Definition: ELEMENT.cs:1119
bool IsTrait
Definition: ELEMENT.cs:362
ReligionManager religions
Definition: Game.cs:158
SpatialManager spatials
Definition: Game.cs:152
CardManager cards
Definition: Game.cs:155
Definition: Gender.cs:2
static string Name(int g)
Definition: Gender.cs:9
static LayerDragGrid CreateEnchant(Chara cc, bool armor, bool superior=false, BlessedState state=BlessedState.Normal, int count=1)
static LayerDragGrid CreateChangeMaterial(Chara cc, Thing consume, SourceMaterial.Row mat, EffectId idEffect, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateLighten(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateUncurse(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateReconstruction(Chara cc, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static LayerDragGrid CreateIdentify(Chara cc, bool superior=false, BlessedState state=BlessedState.Normal, int price=0, int count=1)
static void SetDirty(Thing t)
int Width
Definition: MapBounds.cs:26
void Reveal(Point center, int power=100)
Definition: Map.cs:918
List< Chara > charas
Definition: Map.cs:81
void RevealAll(bool reveal=true)
Definition: Map.cs:905
MapBounds bounds
Definition: Map.cs:52
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
ReturnInfo returnInfo
Definition: Player.cs:813
Thing Installed
Definition: Point.cs:315
List< Chara > ListCharas()
Definition: Point.cs:1155
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:757
ReligionWind Wind
ReligionTrickery Trickery
ReligionElement Element
ReligionHealing Healing
void Talk(string idTalk, Card c=null, Card agent=null)
Definition: Religion.cs:153
SourceMaterial materials
SourceStat stats
SourceElement elements
static Dictionary< string, TierList > tierMap
List< Zone > ListReturnLocations()
virtual bool IsRegion
Definition: Spatial.cs:503
Definition: TC.cs:4
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
SourceThing.Row source
Definition: Thing.cs:11
bool isEquipped
Definition: Thing.cs:17
override CardRow sourceCard
Definition: Thing.cs:47
Thing Identify(bool show=true, IDTSource idtSource=IDTSource.Identify)
Definition: Thing.cs:2048
static void BadEffect(Chara c)
Definition: TraitWell.cs:143
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
static void Play(string idStep)
Definition: Tutorial.cs:7
Chara Boss
Definition: Zone.cs:83
ZoneInstance instance
Definition: Zone.cs:52
Card AddCard(Card t, Point point)
Definition: Zone.cs:1935
Definition: ActRef.cs:2
string n1
Definition: ActRef.cs:7
int idEle
Definition: ActRef.cs:17
bool isPerfume
Definition: ActRef.cs:13
string aliasEle
Definition: ActRef.cs:5

References EClass._map, EClass._zone, Zone.AddCard(), Chara.AddCondition(), Chara.AddCooldown(), armor, Card.blessedState, Chara.body, Zone.Boss, Map.bounds, Card.c_DNA, CoreConfig.camera, Chara.CanSeeLos(), Card.ChangeMaterial(), Card.Chara, Map.charas, Core.config, EClass.core, Chara.corruption, Dice.Create(), ThingGen.Create(), LayerDragGrid.CreateChangeMaterial(), LayerDragGrid.CreateEnchant(), LayerDragGrid.CreateIdentify(), LayerDragGrid.CreateLighten(), LayerDragGrid.CreateReconstruction(), LayerDragGrid.CreateUncurse(), currency, Card.Destroy(), ElementContainer.dict, Card.Dist(), Chara.Duplicate(), ReligionManager.Element, Card.elements, Card.encLV, Point.Equals(), EClass.game, DNA.Generate(), Chara.GetFirstStep(), Chara.GetNearbyCatToSniff(), Point.GetNearestPoint(), ElementContainer.GetOrCreateElement(), Point.GetRandomPoint(), Card.GetRootCard(), DNA.GetType(), Chara.HasCondition(), Card.HasElement(), Card.HasHost, Chara.HasHost, Element.HasTag(), Chara.hunger, Card.id, Element.id, Thing.Identify(), if(), Card.Install(), Point.Installed, Zone.instance, Chara.InstantEat(), Card.IsAmmo, Card.isCopy, Thing.isEquipped, Chara.IsHostile(), Card.IsPC, Chara.IsPC, Chara.IsPCFaction, Zone.IsPCFaction, Card.IsPCFactionOrMinion, Card.IsPCParty, Chara.IsPCParty, Chara.IsPCPartyMinion, Card.IsRangedWeapon, Spatial.IsRegion, Card.isThing, Card.IsThrownWeapon, Card.IsToolbelt, Element.IsTrait, Point.IsValid, Card.IsWeapon, item, Point.ListCharas(), ElementContainer.ListElements(), SpatialManager.ListReturnLocations(), Card.LV, Card.material, SourceManager.materials, ElementContainer.ModBase(), Card.ModEncLv(), ElementContainer.ModTempPotential(), Card.Name, Card.Num, Card.parent, Card.parentCard, Chara.Pick(), Card.PlayEffect(), EClass.player, Card.PlaySound(), Card.pos, Game.religions, Player.returnInfo, Map.Reveal(), Map.RevealAll(), EClass.rnd(), EClass.rndHalf(), Dice.Roll(), Msg.Say(), Card.Say(), Card.SayNothingHappans(), Msg.SayNothingHappen(), SourceMaterial.Tier.Select(), Card.SetBlessedState(), LayerInventory.SetDirty(), Card.SetDirtyWeight(), BaseCard.SetInt(), Card.SetNum(), CoreConfig.CameraConfig.smoothFollow, Chara.Sniff(), Thing.source, Thing.sourceCard, EClass.sources, Game.spatials, Card.Split(), Religion.Talk(), Card.Teleport(), Card.Thing, ActThrow.Throw(), SourceMaterial.tierMap, SourceMaterial.TierList.tiers, Card.trait, Chara.TryDropBossLoot(), Chara.TryEquip(), Chara.TryNeckHunt(), Card.TryStack(), BaseStats.Type, CharaBody.UnqeuipIfTooHeavy(), Stats.value, Element.vBase, and MapBounds.Width.

◆ ProcAt()

static void ActEffect.ProcAt ( EffectId  id,
int  power,
BlessedState  state,
Card  cc,
Card  tc,
Point  tp,
bool  isNeg,
ActRef  actRef = default(ActRef) 
)
inlinestatic

Definition at line 430 of file ActEffect.cs.

431 {
432 Chara CC = cc.Chara;
433 bool flag = state <= BlessedState.Cursed;
434 bool flag2 = isNeg || flag;
435 Element element = Element.Create(actRef.aliasEle.IsEmpty("eleFire"), power / 10);
437 {
438 angle += 5;
439 if (angle > 100)
440 {
441 angle = 30;
442 }
443 Debug.Log(angle);
444 }
445 switch (id)
446 {
447 case EffectId.Earthquake:
448 {
449 List<Point> list3 = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
450 if (list3.Count == 0)
451 {
452 list3.Add(CC.pos.Copy());
453 }
454 CC.Say("spell_earthquake", CC, element.Name.ToLower());
455 TryDelay(delegate
456 {
457 CC.PlaySound("spell_earthquake");
458 });
459 if (CC.IsInMutterDistance())
460 {
461 Shaker.ShakeCam("ball");
462 }
463 EClass.Wait(1f, CC);
464 DamageEle(CC, id, power, element, list3, actRef, "spell_earthquake");
465 break;
466 }
467 case EffectId.Meteor:
468 {
469 EffectMeteor.Create(cc.pos, 6, 10, delegate
470 {
471 });
472 List<Point> list2 = EClass._map.ListPointsInCircle(CC.pos, 10f);
473 if (list2.Count == 0)
474 {
475 list2.Add(CC.pos.Copy());
476 }
477 CC.Say("spell_ball", CC, element.Name.ToLower());
478 TryDelay(delegate
479 {
480 CC.PlaySound("spell_ball");
481 });
482 if (CC.IsInMutterDistance())
483 {
484 Shaker.ShakeCam("ball");
485 }
486 EClass.Wait(1f, CC);
487 DamageEle(CC, id, power, element, list2, actRef, "spell_ball");
488 return;
489 }
490 case EffectId.Hand:
491 case EffectId.DrainBlood:
492 case EffectId.DrainMana:
493 case EffectId.Sword:
494 {
495 List<Point> list4 = new List<Point>();
496 list4.Add(tp.Copy());
497 EClass.Wait(0.3f, CC);
498 TryDelay(delegate
499 {
500 CC.PlaySound("spell_hand");
501 });
502 if (!DamageEle(CC, id, power, element, list4, actRef, (id == EffectId.DrainBlood || id == EffectId.DrainMana) ? "" : ((id == EffectId.Sword) ? "spell_sword" : "spell_hand")))
503 {
504 CC.Say("spell_hand_miss", CC, element.Name.ToLower());
505 }
506 return;
507 }
508 case EffectId.Arrow:
509 case EffectId.MoonSpear:
510 {
511 List<Point> list = new List<Point>();
512 list.Add(tp.Copy());
513 CC.Say((id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow", CC, element.Name.ToLower());
514 EClass.Wait(0.5f, CC);
515 TryDelay(delegate
516 {
517 CC.PlaySound((id == EffectId.MoonSpear) ? "spell_moonspear" : "spell_arrow");
518 });
519 DamageEle(CC, id, power, element, list, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
520 return;
521 }
522 case EffectId.Summon:
523 {
524 if (actRef.n1 == "special")
525 {
526 SE.Play("warhorn");
527 Msg.Say("warhorn");
528 }
529 CC.Say("summon_ally", CC);
530 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
531 {
532 CC.Say("summon_ally_fail", CC);
533 return;
534 }
535 string id3 = actRef.n1;
536 int num3 = 1;
537 int num4 = -1;
538 int radius = 3;
539 bool flag3 = false;
540 bool flag4 = actRef.n1 == "special";
541 int num5 = -1;
542 string text = "";
543 switch (actRef.n1)
544 {
545 case "shadow":
546 case "tsunami":
547 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ? EClass.rnd(2) : 0);
548 break;
549 case "monster":
550 case "fire":
551 case "animal":
552 num3 = 1 + EClass.rnd(2);
553 break;
554 case "special_force":
555 id3 = "army_palmia";
556 num3 = 4 + EClass.rnd(2);
557 num5 = EClass._zone.DangerLv;
558 break;
559 case "tentacle":
560 num4 = 20 + EClass.rnd(10);
561 radius = 1;
562 break;
563 case "special":
564 CC.SetInt(70, EClass.world.date.GetRaw() + 1440);
565 num3 = Mathf.Clamp(7 + CC.LV / 100, 4, 20);
566 num5 = CC.LV;
567 break;
568 }
569 num3 += CC.Evalue(1240);
570 for (int j = 0; j < num3; j++)
571 {
572 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon)
573 {
574 break;
575 }
576 Point point = tp.GetRandomPoint(radius)?.GetNearestPoint(allowBlock: false, allowChara: false);
577 if (point == null || !point.IsValid)
578 {
579 continue;
580 }
581 Chara chara = null;
583 if (num5 != -1)
584 {
585 CardBlueprint.current.lv = num5;
586 }
587 if (!text.IsEmpty())
588 {
589 CardBlueprint.current.idEle = text;
590 }
591 switch (actRef.n1)
592 {
593 case "special":
594 if (j == 0 && !CC.HasMinion("imolonac") && !CC.HasMinion("ygolonac"))
595 {
596 chara = CharaGen.Create((EClass.rnd(20) == 0) ? "imolonac" : "ygolonac");
597 break;
598 }
600 chara = CharaGen.Create("hound", CC.LV);
601 if (text.IsEmpty())
602 {
603 text = chara.MainElement.source.alias;
604 }
605 break;
606 case "yeek":
607 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_yeek", (SourceChara.Row r) => r.race == "yeek"), power / 10);
608 break;
609 case "orc":
610 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_orc", (SourceChara.Row r) => r.race == "orc"), power / 10);
611 break;
612 case "pawn":
613 chara = CharaGen.CreateFromFilter("c_pawn", power / 10);
614 break;
615 case "monster":
616 chara = CharaGen.CreateFromFilter("c_dungeon", power / 10);
617 break;
618 case "animal":
619 chara = CharaGen.CreateFromFilter("c_animal", power / 15);
620 break;
621 case "fire":
622 chara = CharaGen.CreateFromElement("Fire", power / 10);
623 break;
624 case "fish":
625 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_fish", (SourceChara.Row r) => r.ContainsTag("water") || r.model.Chara.race.tag.Contains("water")), power / 10);
626 break;
627 case "octopus":
628 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_octopus", (SourceChara.Row r) => r.race == "octopus"), power / 10);
629 break;
630 default:
631 chara = CharaGen.Create(id3, power / 10);
632 break;
633 }
634 if (chara == null)
635 {
636 continue;
637 }
638 if (chara.rarity >= Rarity.Legendary && !flag4)
639 {
640 j--;
641 continue;
642 }
643 int num6 = -1;
644 string n = actRef.n1;
645 if (!(n == "shadow"))
646 {
647 if (!(n == "special"))
648 {
649 num6 = chara.LV * (100 + power / 10) / 100 + power / 30;
650 }
651 }
652 else
653 {
654 num6 = power / 10 + 1;
655 }
656 if (chara.LV < num6)
657 {
658 chara.SetLv(num6);
659 }
660 chara.interest = 0;
661 if (chara.HaveFur())
662 {
663 chara.c_fur = -1;
664 }
665 n = actRef.n1;
666 if (!(n == "shadow"))
667 {
668 if (n == "special_force")
669 {
670 chara.homeZone = EClass._zone;
671 }
672 }
673 else
674 {
675 chara.hp = chara.MaxHP / 2;
676 }
677 EClass._zone.AddCard(chara, point);
678 if (flag)
679 {
680 Chara chara2 = chara;
681 Hostility hostility2 = (chara.c_originalHostility = Hostility.Enemy);
682 chara2.hostility = hostility2;
683 }
684 else if (!(actRef.n1 == "monster") || actRef.refThing == null)
685 {
686 chara.MakeMinion(CC);
687 }
688 if (num4 != -1)
689 {
690 chara.SetSummon(num4);
691 }
692 flag3 = true;
693 }
694 if (!flag3)
695 {
696 CC.Say("summon_ally_fail", CC);
697 }
698 return;
699 }
700 case EffectId.Funnel:
701 {
702 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
703 {
704 CC.Say("summon_ally_fail", CC);
705 return;
706 }
707 CC.Say("spell_funnel", CC, element.Name.ToLower());
708 CC.PlaySound("spell_funnel");
709 Chara chara3 = CharaGen.Create("bit");
710 chara3.SetMainElement(element.source.alias, element.Value, elemental: true);
711 chara3.SetSummon(20 + power / 20 + EClass.rnd(10));
712 chara3.SetLv(power / 15);
713 chara3.interest = 0;
714 EClass._zone.AddCard(chara3, tp.GetNearestPoint(allowBlock: false, allowChara: false));
715 chara3.PlayEffect("teleport");
716 chara3.MakeMinion(CC);
717 return;
718 }
719 case EffectId.Breathe:
720 {
721 List<Point> list5 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
722 if (list5.Count == 0)
723 {
724 list5.Add(CC.pos.Copy());
725 }
726 CC.Say("spell_breathe", CC, element.Name.ToLower());
727 EClass.Wait(0.8f, CC);
728 TryDelay(delegate
729 {
730 CC.PlaySound("spell_breathe");
731 });
733 {
734 Shaker.ShakeCam("breathe");
735 }
736 DamageEle(CC, id, power, element, list5, actRef, "spell_breathe");
737 return;
738 }
739 case EffectId.Scream:
740 CC.PlaySound("scream");
741 CC.PlayEffect("scream");
742 {
743 foreach (Point item in EClass._map.ListPointsInCircle(cc.pos, 6f, mustBeWalkable: false, los: false))
744 {
745 foreach (Chara chara4 in item.Charas)
746 {
747 if (chara4.ResistLv(957) <= 0)
748 {
749 chara4.AddCondition<ConParalyze>(power);
750 }
751 }
752 }
753 return;
754 }
755 case EffectId.Ball:
756 case EffectId.Explosive:
757 case EffectId.BallBubble:
758 case EffectId.Suicide:
759 {
760 float radius2 = ((id == EffectId.Suicide) ? 3.5f : ((float)((id == EffectId.BallBubble) ? 2 : 5)));
761 if (id == EffectId.Explosive && actRef.refThing != null)
762 {
763 radius2 = 2 + actRef.refThing.Evalue(666);
764 }
765 if (id == EffectId.Suicide)
766 {
767 if (CC.MainElement != Element.Void)
768 {
769 element = CC.MainElement;
770 }
772 {
773 element = Element.Create(919, 10);
774 }
775 if (CC.HasTag(CTAG.kamikaze))
776 {
777 radius2 = 1.5f;
778 }
779 }
780 bool flag5 = id == EffectId.Explosive || id == EffectId.Suicide;
781 List<Point> list7 = EClass._map.ListPointsInCircle(cc.pos, radius2, !flag5, !flag5);
782 if (list7.Count == 0)
783 {
784 list7.Add(cc.pos.Copy());
785 }
786 cc.Say((id == EffectId.Suicide) ? "abSuicide" : "spell_ball", cc, element.Name.ToLower());
787 EClass.Wait(0.8f, cc);
788 TryDelay(delegate
789 {
790 cc.PlaySound("spell_ball");
791 });
793 {
794 Shaker.ShakeCam("ball");
795 }
796 DamageEle(actRef.origin ?? cc, id, power, element, list7, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
797 if (id == EffectId.Suicide && CC.IsAliveInCurrentZone)
798 {
799 CC.Die();
800 }
801 return;
802 }
803 case EffectId.Bolt:
804 {
805 List<Point> list6 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
806 if (list6.Count == 0)
807 {
808 list6.Add(CC.pos.Copy());
809 }
810 CC.Say("spell_bolt", CC, element.Name.ToLower());
811 EClass.Wait(0.8f, CC);
812 TryDelay(delegate
813 {
814 CC.PlaySound("spell_bolt");
815 });
817 {
818 Shaker.ShakeCam("bolt");
819 }
820 DamageEle(CC, id, power, element, list6, actRef, "spell_bolt");
821 return;
822 }
823 case EffectId.Bubble:
824 case EffectId.Web:
825 case EffectId.MistOfDarkness:
826 case EffectId.Puddle:
827 {
828 if (LangGame.Has("ab" + id))
829 {
830 CC.Say("ab" + id, CC);
831 }
832 tp.PlaySound("vomit");
833 int num = 2 + EClass.rnd(3);
834 int id2 = ((id == EffectId.Puddle) ? 4 : ((id == EffectId.Bubble) ? 5 : ((id == EffectId.MistOfDarkness) ? 6 : 7)));
835 EffectId idEffect = ((id == EffectId.Bubble) ? EffectId.BallBubble : EffectId.PuddleEffect);
836 Color matColor = EClass.Colors.elementColors.TryGetValue(element.source.alias);
837 if (id == EffectId.Bubble && CC.id == "cancer")
838 {
839 idEffect = EffectId.Nothing;
840 num = 1 + EClass.rnd(3);
841 }
842 for (int i = 0; i < num; i++)
843 {
844 Point randomPoint = tp.GetRandomPoint(2);
845 if (randomPoint != null && !randomPoint.HasBlock && (id != EffectId.Puddle || !randomPoint.cell.IsTopWaterAndNoSnow))
846 {
847 int num2 = 4 + EClass.rnd(5);
848 if (id == EffectId.Web)
849 {
850 num2 *= 3;
851 }
852 EClass._map.SetEffect(randomPoint.x, randomPoint.z, new CellEffect
853 {
854 id = id2,
855 amount = num2,
856 idEffect = idEffect,
857 idEle = element.id,
858 power = power,
859 isHostileAct = CC.IsPCParty,
860 color = BaseTileMap.GetColorInt(ref matColor, 100)
861 });
862 }
863 }
864 return;
865 }
866 }
867 List<Card> list8 = tp.ListCards().ToList();
868 list8.Reverse();
869 if (list8.Contains(CC))
870 {
871 list8.Remove(CC);
872 list8.Insert(0, CC);
873 }
874 bool flag6 = true;
875 foreach (Card item2 in list8)
876 {
877 if (tc == null || item2 == tc)
878 {
879 Proc(id, power, state, CC, item2, actRef);
880 if (flag2 && item2.isChara && item2 != CC)
881 {
882 CC.DoHostileAction(item2);
883 }
884 if (actRef.refThing == null || !(actRef.refThing.trait is TraitRod))
885 {
886 return;
887 }
888 EffectId effectId = id;
889 if ((uint)(effectId - 200) <= 4u)
890 {
891 return;
892 }
893 flag6 = false;
894 }
895 }
896 if (flag6)
897 {
899 }
900 }
Hostility
Definition: Hostility.cs:2
Rarity
Definition: Rarity.cs:2
static int angle
Definition: ActEffect.cs:21
static bool DamageEle(Card CC, EffectId id, int power, Element e, List< Point > points, ActRef actref, string lang=null)
Definition: ActEffect.cs:36
static int GetColorInt(ref Color matColor, int p)
static void Set(CardBlueprint _bp)
static CardBlueprint current
int c_uidMaster
Definition: Card.cs:1423
Card SetLv(int a)
Definition: Card.cs:2858
Rarity rarity
Definition: Card.cs:300
bool IsInMutterDistance(int d=10)
Definition: Card.cs:7448
bool HaveFur()
Definition: Card.cs:7609
int ResistLv(int res)
Definition: Card.cs:5720
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712
static Chara CreateFromElement(string idEle, int lv=-1, string idFilter="chara")
Definition: CharaGen.cs:32
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Element MainElement
Definition: Chara.cs:715
void SetMainElement(string id, int v=0, bool elemental=false)
Definition: Chara.cs:2031
bool HasMinion(string id)
Definition: Chara.cs:2297
int MaxSummon
Definition: Chara.cs:712
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
Definition: Chara.cs:2286
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Chara.cs:5120
void SetSummon(int duration)
Definition: Chara.cs:2326
UD_String_Color elementColors
GraphicSetting graphic
Definition: CoreConfig.cs:602
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
static ColorProfile Colors
Definition: EClass.cs:38
static World world
Definition: EClass.cs:40
Definition: EInput.cs:8
static bool isShiftDown
Definition: EInput.cs:261
static void Create(Point center, int radius, int count, Action< int, Point > onComplete)
Definition: EffectMeteor.cs:33
static Element Void
Definition: ELEMENT.cs:238
static bool Has(string id)
Definition: LangGame.cs:46
List< Point > ListPointsInArc(Point center, Point to, int radius, float angle)
Definition: Map.cs:2309
List< Point > ListPointsInLine(Point center, Point to, int radius)
Definition: Map.cs:2326
void SetEffect(int x, int z, CellEffect effect=null)
Definition: Map.cs:1508
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2278
int z
Definition: Point.cs:39
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1237
Definition: Shaker.cs:5
static void ShakeCam(string id="default", float magnitude=1f)
Definition: Shaker.cs:25
static SpawnList Get(string id, Func< SourceChara.Row, bool > func)
bool TryGetValue(TKey key, out TValue value)
Definition: UDictionary.cs:178
GameDate date
Definition: World.cs:6
int CountMinions(Chara c)
Definition: Zone.cs:3573
override int DangerLv
Definition: Zone.cs:107
Chara origin
Definition: ActRef.cs:11

References EClass._map, EClass._zone, Zone.AddCard(), Chara.AddCondition(), angle, Card.c_uidMaster, Point.cell, Card.Chara, Color, EClass.Colors, Core.config, Point.Copy(), EClass.core, Zone.CountMinions(), Element.Create(), EffectMeteor.Create(), CharaGen.Create(), CharaGen.CreateFromElement(), CharaGen.CreateFromFilter(), CardBlueprint.current, DamageEle(), Zone.DangerLv, World.date, EClass.debug, Debug, Chara.Die(), CoreConfig.GraphicSetting.disableShake, ColorProfile.elementColors, CoreDebug.enable, Card.Evalue(), SpawnListChara.Get(), BaseTileMap.GetColorInt(), Point.GetNearestPoint(), Point.GetRandomPoint(), Date.GetRaw(), CoreConfig.graphic, LangGame.Has(), Point.HasBlock, Chara.HasCondition(), Chara.HasMinion(), Card.HasTag(), Card.HaveFur(), Card.id, Element.id, CardBlueprint.idEle, Chara.IsAliveInCurrentZone, Card.IsInMutterDistance(), Chara.IsPCParty, EInput.isShiftDown, Cell.IsTopWaterAndNoSnow, Point.IsValid, item, Map.ListPointsInArc(), Map.ListPointsInCircle(), Map.ListPointsInLine(), Card.LV, Chara.MainElement, Chara.MakeMinion(), Chara.MaxSummon, Element.Name, Card.PlayEffect(), Point.PlaySound(), Card.PlaySound(), Card.pos, Card.rarity, Card.ResistLv(), EClass.rnd(), Msg.Say(), Card.Say(), CardBlueprint.Set(), Map.SetEffect(), BaseCard.SetInt(), Card.SetLv(), Chara.SetMainElement(), Chara.SetSummon(), Shaker.ShakeCam(), Element.source, TryDelay(), UDictionary< TKey, TValue >.TryGetValue(), Element.Value, Element.Void, EClass.Wait(), EClass.world, Point.x, and Point.z.

Referenced by DamageEle(), Chara.Die(), Card.Explode(), ZoneEventDefenseGame.Horn_Ally(), TraitScrollStatic.OnRead(), Act.Perform(), ActZap.Perform(), AttackProcess.ProcAbility(), and AI_UseCrafter.Run().

◆ TryDelay()

static void ActEffect.TryDelay ( Action  a)
inlinestatic

Definition at line 23 of file ActEffect.cs.

24 {
25 if (RapidCount == 0)
26 {
27 a();
28 return;
29 }
30 TweenUtil.Delay((float)RapidCount * RapidDelay, delegate
31 {
32 a();
33 });
34 }
static float RapidDelay
Definition: ActEffect.cs:19

References RapidCount, and RapidDelay.

Referenced by DamageEle(), Card.DamageHP(), and ProcAt().

◆ Wish()

static bool ActEffect.Wish ( string  s,
string  name,
int  power,
BlessedState  state 
)
inlinestatic

Definition at line 2468 of file ActEffect.cs.

2469 {
2471 string netMsg = GameLang.Parse("wish".langGame(), thirdPerson: true, name, s);
2472 bool net = EClass.core.config.net.enable && EClass.core.config.net.sendEvent;
2473 List<WishItem> list = new List<WishItem>();
2474 int wishLv = 10 + power / 4;
2475 int wishValue = 5000 + power * 50;
2476 if (state >= BlessedState.Blessed)
2477 {
2478 wishLv = wishLv * 150 / 100;
2479 }
2480 else if (state <= BlessedState.Cursed)
2481 {
2482 wishLv = wishLv * 150 / 100;
2483 wishValue = 1;
2484 }
2485 Debug.Log(power + "/" + wishValue);
2486 string _s = s.ToLower();
2487 foreach (CardRow r in EClass.sources.cards.rows)
2488 {
2489 if (r.HasTag(CTAG.godArtifact))
2490 {
2491 bool flag = false;
2492 foreach (Religion item in EClass.game.religions.list)
2493 {
2494 if (item.IsValidArtifact(r.id))
2495 {
2496 flag = true;
2497 }
2498 }
2499 if (!flag)
2500 {
2501 continue;
2502 }
2503 }
2504 else if (r.quality >= 4 || r.HasTag(CTAG.noWish))
2505 {
2506 switch (r.id)
2507 {
2508 case "medal":
2509 case "plat":
2510 case "money":
2511 case "money2":
2512 break;
2513 default:
2514 continue;
2515 }
2516 }
2517 if (r.isChara)
2518 {
2519 continue;
2520 }
2521 string text = r.GetName().ToLower();
2522 int score = Compare(_s, text);
2523 if (score == 0)
2524 {
2525 continue;
2526 }
2527 list.Add(new WishItem
2528 {
2529 score = score,
2530 n = text,
2531 action = delegate
2532 {
2533 Debug.Log(r.id);
2534 SourceCategory.Row category = EClass.sources.cards.map[r.id].Category;
2535 if (category.IsChildOf("weapon") || category.IsChildOf("armor") || category.IsChildOf("ranged"))
2536 {
2537 CardBlueprint.SetRarity(Rarity.Legendary);
2538 }
2539 Thing thing = ThingGen.Create(r.id, -1, wishLv);
2540 int num = 1;
2541 int price = thing.GetPrice(CurrencyType.Money, sell: false, PriceType.Tourism);
2542 bool flag2 = thing.trait is TraitDeed || thing.rarity >= Rarity.Artifact || thing.source._origin == "artifact_summon";
2543 switch (thing.id)
2544 {
2545 case "rod_wish":
2546 thing.c_charges = 0;
2547 break;
2548 case "money":
2549 num = EClass.rndHalf(wishValue * 3);
2550 break;
2551 case "plat":
2552 num = EClass.rndHalf(wishValue / 500 + 4);
2553 break;
2554 case "money2":
2555 num = EClass.rndHalf(wishValue / 500 + 4);
2556 break;
2557 case "medal":
2558 num = EClass.rndHalf(wishValue / 2000 + 4);
2559 break;
2560 default:
2561 if (!flag2 && thing.trait.CanStack)
2562 {
2563 int num2 = wishValue;
2564 num2 -= price;
2565 for (int i = 1; i < 1000; i++)
2566 {
2567 int num3 = price + i * 2 * (price + 500);
2568 if (num3 > 0 && num2 > num3)
2569 {
2570 num++;
2571 num2 -= num3;
2572 }
2573 }
2574 }
2575 break;
2576 }
2577 if (price > 2500 && num > 3)
2578 {
2579 num = 3 + (int)Mathf.Sqrt(num - 3);
2580 }
2581 if (price > 5000 && num > 2)
2582 {
2583 num = 2 + (int)Mathf.Sqrt(num - 2) / 2;
2584 }
2585 if (price > 10000 && num > 1)
2586 {
2587 num = 1 + Mathf.Min((int)Mathf.Sqrt(num - 1) / 3, 2);
2588 }
2589 if (num < 1)
2590 {
2591 num = 1;
2592 }
2593 thing.SetNum(num);
2594 Debug.Log(_s + "/" + num + "/" + score);
2595 if (thing.HasTag(CTAG.godArtifact))
2596 {
2597 Religion.Reforge(thing.id);
2598 }
2599 else
2600 {
2601 EClass._zone.AddCard(thing, EClass.pc.pos);
2602 }
2603 netMsg = netMsg + Lang.space + GameLang.Parse("wishNet".langGame(), Msg.IsThirdPerson(thing), Msg.GetName(thing).ToTitleCase());
2604 if (net)
2605 {
2606 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2607 }
2608 Msg.Say("dropReward");
2609 }
2610 });
2611 }
2612 if (list.Count == 0)
2613 {
2614 netMsg = netMsg + Lang.space + "wishFail".langGame();
2615 if (net)
2616 {
2617 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
2618 }
2619 Msg.Say("wishFail");
2620 return false;
2621 }
2622 list.Sort((WishItem a, WishItem b) => b.score - a.score);
2623 foreach (WishItem item2 in list)
2624 {
2625 Debug.Log(item2.score + "/" + s + "/" + item2.n);
2626 }
2627 list[0].action();
2628 return true;
2629 }
ChatCategory
Definition: ChatCategory.cs:2
CurrencyType
Definition: CurrencyType.cs:2
PriceType
Definition: PriceType.cs:2
static int Compare(string s, string t)
Definition: ActEffect.cs:2631
virtual string GetName(int i)
Definition: CardRow.cs:95
int quality
Definition: CardRow.cs:19
bool isChara
Definition: CardRow.cs:55
string id
Definition: CardRow.cs:7
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:7038
NetSetting net
Definition: CoreConfig.cs:606
static string Parse(string text, bool thirdPerson, string val1, string val2=null, string val3=null, string val4=null)
Definition: GameLang.cs:125
static string langCode
Definition: Lang.cs:28
static bool IsThirdPerson(Card c)
Definition: Msg.cs:291
static ThirstPersonInfo thirdPerson1
Definition: Msg.cs:6
static string GetName(Card c)
Definition: Msg.cs:274
Definition: Net.cs:11
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
Definition: Net.cs:318
List< Religion > list
static Thing Reforge(string id, Point pos=null, bool first=true)
Definition: Religion.cs:279
bool HasTag(CTAG _tag)
Definition: RenderRow.cs:125
List< CardRow > rows
Definition: SourceCard.cs:6
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceCard cards
void Set(string n)
virtual SourceElement.Row source
Definition: TraitScroll.cs:5

References EClass._zone, Zone.AddCard(), SourceManager.cards, Core.config, EClass.core, ThingGen.Create(), Debug, EClass.game, Msg.GetName(), CardRow.GetName(), Card.GetPrice(), RenderRow.HasTag(), CardRow.id, if(), CardRow.isChara, Msg.IsThirdPerson(), item, Lang.langCode, ReligionManager.list, SourceCard.map, CoreConfig.net, GameLang.Parse(), EClass.pc, Card.pos, CardRow.quality, Religion.Reforge(), Game.religions, SourceCard.rows, Msg.Say(), Net.SendChat(), CoreConfig.NetSetting.sendEvent, ThirstPersonInfo.Set(), TraitScroll.source, EClass.sources, and Msg.thirdPerson1.

Member Data Documentation

◆ angle

int ActEffect.angle = 20
static

Definition at line 21 of file ActEffect.cs.

Referenced by ProcAt().

◆ RapidCount

int ActEffect.RapidCount
static

Definition at line 17 of file ActEffect.cs.

Referenced by DamageEle(), and TryDelay().

◆ RapidDelay

float ActEffect.RapidDelay
static

Definition at line 19 of file ActEffect.cs.

Referenced by TryDelay().


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