Elin Decompiled Documentation EA 23.331 Nightly
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, Point center=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 (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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 3185 of file ActEffect.cs.

3186 {
3187 if (s.IsEmpty())
3188 {
3189 return 0;
3190 }
3191 int num = 0;
3192 if (t == s)
3193 {
3194 num += 100 + EClass.rnd(30);
3195 }
3196 if (t.Contains(s))
3197 {
3198 num += 100 + EClass.rnd(30);
3199 }
3200 return num;
3201 }
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59

References EClass.rnd().

◆ DamageEle()

static bool ActEffect.DamageEle ( Card  CC,
EffectId  id,
int  power,
Element  e,
List< Point points,
ActRef  actref,
string  lang = null,
Point  center = 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 List<Card> list = new List<Card>();
52 bool flag = false;
53 if (center == null)
54 {
55 center = CC.pos.Copy();
56 }
57 if ((id == EffectId.Explosive || id == EffectId.Rocket || id == EffectId.GravityGun) && actref.refThing != null)
58 {
59 power = power * actref.refThing.material.hardness / 10;
60 }
61 string text = id.ToString();
62 string text2 = (EClass.sources.calc.map.ContainsKey(text) ? text : (EClass.sources.calc.map.ContainsKey("Sp" + text) ? ("Sp" + text) : (text.ToLowerInvariant() + "_")));
63 foreach (Point p in points)
64 {
65 bool flag2 = true;
66 AttackSource attackSource = AttackSource.None;
67 switch (id)
68 {
69 case EffectId.Explosive:
70 case EffectId.Rocket:
71 case EffectId.GravityGun:
72 text2 = "ball_";
73 flag = false;
74 break;
75 case EffectId.BallBubble:
76 text2 = "ball_";
77 break;
78 case EffectId.Earthquake:
79 text2 = "SpEarthquake";
80 flag2 = false;
81 flag = true;
82 break;
83 case EffectId.Meteor:
84 text2 = "SpMeteor";
85 break;
86 default:
87 if (CC.isChara && p.Equals(CC.pos) && points.Count >= 2)
88 {
89 continue;
90 }
91 break;
92 case EffectId.Suicide:
93 break;
94 }
95 Effect effect = null;
96 Effect effect2 = (flag2 ? Effect.Get("trail1") : null);
97 Point from = p;
98 switch (id)
99 {
100 case EffectId.Arrow:
101 case EffectId.MoonSpear:
102 case EffectId.MoonArrow:
103 {
104 effect = Effect.Get((id == EffectId.MoonSpear || id == EffectId.MoonArrow) ? "spell_moonspear" : "spell_arrow");
105 if (id == EffectId.Arrow)
106 {
107 effect.sr.color = elementRef.colorSprite;
108 }
109 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
110 Color startColor = (componentInChildren.endColor = elementRef.colorSprite);
111 componentInChildren.startColor = startColor;
112 from = CC.pos;
113 break;
114 }
115 case EffectId.Earthquake:
116 {
117 if (EClass.rnd(4) == 0 && p.IsSync)
118 {
119 effect = Effect.Get("smoke_earthquake");
120 }
121 float num3 = 0.06f * (float)CC.pos.Distance(p);
122 Point pos = p.Copy();
123 TweenUtil.Tween(num3, null, delegate
124 {
125 pos.Animate(AnimeID.Quake, animeBlock: true);
126 });
127 if (effect != null)
128 {
129 effect.SetStartDelay(num3);
130 }
131 break;
132 }
133 default:
134 {
135 effect = Effect.Get("Element/ball_" + ((e.id == 0) ? "Void" : ((id == EffectId.GravityGun) ? "Gravity" : e.source.alias.Remove(0, 3))));
136 if (effect == null)
137 {
138 effect = Effect.Get("Element/ball_Fire");
139 }
140 float startDelay = ((id == EffectId.Meteor || id == EffectId.Comet) ? 0.1f : 0.04f) * (float)center.Distance(p);
141 effect.SetStartDelay(startDelay);
142 effect2.SetStartDelay(startDelay);
143 if (id == EffectId.GravityGun)
144 {
145 float duration = 0.06f * (float)center.Distance(p);
146 Point pos2 = p.Copy();
147 TweenUtil.Tween(duration, null, delegate
148 {
149 pos2.Animate(AnimeID.Gravity, animeBlock: true);
150 });
151 }
152 break;
153 }
154 }
155 if (effect2 != null)
156 {
157 effect2.SetParticleColor(elementRef.colorTrail, changeMaterial: true, "_TintColor").Play(from);
158 }
159 if (effect != null)
160 {
161 if (id == EffectId.Arrow || id == EffectId.MoonSpear || id == EffectId.MoonArrow)
162 {
163 TryDelay(delegate
164 {
165 effect.Play(CC.pos, 0f, p);
166 });
167 }
168 else
169 {
170 TryDelay(delegate
171 {
172 effect.Play(p).Flip(p.x > center.x);
173 });
174 }
175 if (id == EffectId.Flare)
176 {
177 TryDelay(delegate
178 {
179 Effect.Get("flare2").Play(EClass.rndf(0.5f), p);
180 });
181 }
182 }
183 if (e.id == 910)
184 {
185 EClass._map.TryShatter(p, 910, power, CC);
186 }
187 if (e.id == 911)
188 {
189 EClass._map.TryShatter(p, 911, power, CC);
190 }
191 foreach (Card item in p.ListCards().ToList())
192 {
193 Card c = item;
194 if ((!c.isChara && !c.trait.CanBeAttacked) || (c.IsMultisize && item == CC) || (c.isChara && (c.Chara.host == CC || c.Chara.parasite == CC || c.Chara.ride == CC)))
195 {
196 continue;
197 }
198 switch (id)
199 {
200 case EffectId.Arrow:
201 case EffectId.Hand:
202 case EffectId.Sword:
203 case EffectId.MoonSpear:
204 case EffectId.MoonArrow:
205 if (c.isChara && CC.isChara)
206 {
207 c.Chara.RequestProtection(CC.Chara, delegate(Chara a)
208 {
209 c = a;
210 });
211 }
212 if (id == EffectId.MoonSpear || (id == EffectId.MoonArrow && EClass.rnd(5) == 0))
213 {
214 attackSource = AttackSource.MoonSpear;
215 }
216 break;
217 }
218 switch (id)
219 {
220 case EffectId.Arrow:
221 attackSource = AttackSource.MagicArrow;
222 break;
223 case EffectId.Hand:
224 attackSource = AttackSource.MagicHand;
225 break;
226 case EffectId.Sword:
227 attackSource = AttackSource.MagicSword;
228 break;
229 }
230 long num4 = 0L;
231 bool isChara = CC.isChara;
232 if (id == EffectId.Suicide)
233 {
234 num4 = CC.MaxHP * 2;
235 num4 = num4 * 100 / (50 + center.Distance(p) * 75);
236 if ((c.HasCondition<ConBrightnessOfLife>() || c.HasTag(CTAG.suicide)) && !c.HasCondition<ConWet>() && !c.IsPowerful)
237 {
238 list.Add(c);
239 }
240 }
241 else
242 {
243 Dice dice = Dice.Create(text2, power, CC, (actref.refThing != null) ? null : actref.act);
244 if (dice == null)
245 {
246 Debug.Log(text2);
247 }
248 num4 = dice.Roll();
249 Debug.Log(id.ToString() + "/" + text2 + "/" + power + "/" + actref.act?.ToString() + "/" + dice?.ToString() + "/" + num4);
250 switch (id)
251 {
252 case EffectId.Earthquake:
253 if (c.HasCondition<ConGravity>())
254 {
255 num4 = dice.RollMax() * 2;
256 }
257 else if (c.isChara && c.Chara.IsLevitating)
258 {
259 num4 /= 2;
260 }
261 break;
262 case EffectId.Sword:
263 num4 = num4 * (int)Mathf.Min(70f + Mathf.Sqrt(CC.Evalue(101)) * 3f, 200f) / 100;
264 break;
265 case EffectId.GravityGun:
266 num4 /= 5;
267 break;
268 }
269 if (id == EffectId.Ball || id == EffectId.BallBubble || id == EffectId.Explosive || id == EffectId.Rocket || id == EffectId.GravityGun)
270 {
271 num4 = num4 * 100 / (90 + center.Distance(p) * 10);
272 }
273 }
274 if (id == EffectId.Sword)
275 {
276 c.PlaySound("ab_magicsword");
277 c.PlayEffect("hit_slash");
278 }
279 if ((actref.noFriendlyFire && !CC.Chara.IsHostile(c as Chara)) || (flag && c == CC))
280 {
281 continue;
282 }
283 if (isChara && points.Count > 1 && c != null && c.isChara && CC.isChara && CC.Chara.IsFriendOrAbove(c.Chara))
284 {
285 int num5 = CC.Evalue(302);
286 if (!CC.IsPC && CC.IsPCFactionOrMinion)
287 {
288 num5 += EClass.pc.Evalue(302);
289 }
290 if (CC.HasElement(1214))
291 {
292 num5 *= 2;
293 }
294 if (num5 > 0)
295 {
296 if (num5 * 10 > EClass.rnd(num4 + 1))
297 {
298 if (c == c.pos.FirstChara)
299 {
300 CC.ModExp(302, CC.IsPC ? 10 : 50);
301 }
302 continue;
303 }
304 num4 = EClass.rnd(num4 * 100 / (100 + num5 * 10 + 1));
305 if (c == c.pos.FirstChara)
306 {
307 CC.ModExp(302, CC.IsPC ? 20 : 100);
308 }
309 if (num4 == 0L)
310 {
311 continue;
312 }
313 }
314 if ((CC.HasElement(1214) || (!CC.IsPC && (CC.IsPCFaction || CC.IsPCFactionMinion) && EClass.pc.HasElement(1214))) && EClass.rnd(5) != 0)
315 {
316 continue;
317 }
318 }
319 if (!lang.IsEmpty())
320 {
321 if (lang == "spell_hand")
322 {
323 string[] list2 = Lang.GetList("attack" + (CC.isChara ? CC.Chara.race.meleeStyle.IsEmpty("Touch") : "Touch"));
324 string @ref = "_elehand".lang(e.source.GetAltname(2), list2[4]);
325 CC.Say(c.IsPCParty ? "cast_hand_ally" : "cast_hand", CC, c, @ref, c.IsPCParty ? list2[1] : list2[2]);
326 }
327 else
328 {
329 CC.Say(lang + "_hit", CC, c, e.Name.ToLower());
330 }
331 }
332 Chara chara = (CC.isChara ? CC.Chara : ((actref.refThing != null) ? EClass._map.FindChara(actref.refThing.c_uidRefCard) : null));
333 if (c.IsMultisize)
334 {
335 switch (id)
336 {
337 case EffectId.Ball:
338 case EffectId.Explosive:
339 case EffectId.BallBubble:
340 case EffectId.Meteor:
341 case EffectId.Earthquake:
342 case EffectId.Suicide:
343 case EffectId.Rocket:
344 case EffectId.Flare:
345 case EffectId.GravityGun:
346 case EffectId.Comet:
347 num4 /= 2;
348 break;
349 }
350 }
351 if (RapidCount > 0)
352 {
353 num4 = num4 * 100 / (100 + RapidCount * 50);
354 }
355 num4 = num4 * Act.powerMod / 100;
356 if (num4 > 99999999)
357 {
358 num4 = 99999999L;
359 }
360 c.DamageHP(num4, e.id, power * num / 100, attackSource, chara ?? CC);
362 {
363 switch (id)
364 {
365 case EffectId.GravityGun:
366 if (c.isChara)
367 {
368 AddCon<ConGravity>(1, power);
369 AddCon<ConBlind>(4, power);
370 AddCon<ConDim>(5, power / 2);
371 AddCon<ConSupress>(3, power / 2);
372 if (actref.refThing != null && actref.refThing.id == "gun_gravity2")
373 {
374 AddCon<ConEntangle>(4, power / 3);
375 AddCon<ConSilence>(4, power / 3);
376 AddCon<ConWeakResEle>(4, power);
377 AddCon<ConNightmare>(4, power);
378 }
379 }
380 break;
381 case EffectId.DrainMana:
382 if (CC.IsAliveInCurrentZone && c.isChara && CC.isChara && c.Chara.mana.value > 0)
383 {
384 long num6 = num4 * num / 100;
385 Debug.Log(num4 + " v:" + num6 + " evalue:" + e.Value + " power:" + power + " elepMod:" + num);
386 if (num6 > c.Chara.mana.value)
387 {
388 num6 = c.Chara.mana.value;
389 }
390 c.Chara.mana.Mod((int)(-num6));
391 CC.Chara.mana.Mod((int)num6);
392 }
393 break;
394 }
395 }
396 if (id == EffectId.Explosive && CC.trait is TraitCookerMicrowave)
397 {
398 chara = EClass.pc;
399 }
400 if (chara != null && chara.IsAliveInCurrentZone)
401 {
402 chara.DoHostileAction(c);
403 }
404 num2++;
405 void AddCon<T>(int rate, int power) where T : Condition
406 {
407 if (EClass.rnd(1 + actref.refVal) == 0 && !c.Chara.HasCondition<T>() && EClass.rnd(rate) == 0)
408 {
409 c.Chara.AddCondition<T>(power);
410 }
411 }
412 }
413 if ((id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket) && (!EClass._zone.IsPCFaction || !EClass.Branch.HasItemProtection))
414 {
415 int num7;
416 switch (id)
417 {
418 default:
419 num7 = ((actref.refThing != null) ? actref.refThing.material.hardness : (30 + power / 20));
420 break;
421 case EffectId.Suicide:
422 num7 = CC.LV / 3 + 40;
423 break;
424 case EffectId.Meteor:
425 case EffectId.Comet:
426 num7 = 50 + power / 20;
427 break;
428 }
429 int num8 = num7;
430 bool flag3 = EClass._zone.HasLaw && !EClass._zone.IsPCFaction && (CC.IsPC || (id == EffectId.Explosive && actref.refThing == null)) && !(EClass._zone is Zone_Vernis);
431 if (p.HasObj && p.cell.matObj.hardness <= num8)
432 {
434 if (flag3)
435 {
437 }
438 }
439 if (!p.HasObj && p.HasBlock && p.matBlock.hardness <= num8)
440 {
442 if (flag3)
443 {
445 }
446 }
447 }
448 if (e.id == 910)
449 {
450 int num9 = 0;
451 if (id == EffectId.Meteor)
452 {
453 num9 = 2;
454 }
456 {
457 num9 = 0;
458 }
459 if (num9 > EClass.rnd(10))
460 {
461 p.ModFire(4 + EClass.rnd(10));
462 }
463 }
464 if (e.id == 911)
465 {
466 p.ModFire(-20, extinguish: true);
467 }
468 }
469 if (RapidCount == 0)
470 {
471 foreach (Card item2 in list)
472 {
473 if (item2.ExistsOnMap)
474 {
475 RapidCount += 2;
476 ProcAt(id, power, BlessedState.Normal, item2, null, item2.pos, isNeg: true, actref);
477 }
478 }
479 }
480 return num2 > 0;
481 }
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:483
virtual int ElementPowerMod
Definition: ACT.cs:111
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2342
virtual bool IsMultisize
Definition: Card.cs:2212
virtual Chara Chara
Definition: Card.cs:2122
string id
Definition: Card.cs:36
SourceMaterial.Row material
Definition: Card.cs:2103
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6613
virtual bool IsPCParty
Definition: Card.cs:2203
int c_uidRefCard
Definition: Card.cs:1151
bool ExistsOnMap
Definition: Card.cs:2137
bool HasTag(CTAG tag)
Definition: Card.cs:2728
Point pos
Definition: Card.cs:60
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6647
Trait trait
Definition: Card.cs:54
bool IsPowerful
Definition: Card.cs:2146
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2179
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4269
void SayNothingHappans()
Definition: Card.cs:7286
virtual bool IsPC
Definition: Card.cs:2197
virtual bool isChara
Definition: Card.cs:2135
int Evalue(int ele)
Definition: Card.cs:2704
virtual bool IsPCFactionMinion
Definition: Card.cs:2209
void ModExp(string alias, int a)
Definition: Card.cs:2781
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6351
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7291
SourceMaterial.Row matObj
Definition: Cell.cs:1046
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:567
bool IsLevitating
Definition: Chara.cs:603
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9773
Chara host
Definition: Chara.cs:33
bool RequestProtection(Chara attacker, Action< Chara > action)
Definition: Chara.cs:8859
bool HasCondition(string alias)
Definition: Chara.cs:9938
bool IsFriendOrAbove()
Definition: Chara.cs:6945
Stats mana
Definition: Chara.cs:1213
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6668
bool IsHostile()
Definition: Chara.cs:6849
SourceRace.Row race
Definition: Chara.cs:468
Definition: ConWet.cs:2
Definition: Dice.cs:5
static int RollMax(int num, int sides, int bonus=0)
Definition: Dice.cs:70
static int Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:48
override string ToString()
Definition: Dice.cs:115
static Dice Create(Element ele, Card c)
Definition: Dice.cs:120
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
static SourceManager sources
Definition: EClass.cs:43
static float rndf(float a)
Definition: EClass.cs:102
static FactionBranch Branch
Definition: EClass.cs:23
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static GameSetting setting
Definition: EClass.cs:35
Definition: Effect.cs:7
static Effect Get(Effect original)
Definition: Effect.cs:80
Effect SetStartDelay(float a)
Definition: Effect.cs:201
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:293
Color colorSprite
Definition: ElementRef.cs:7
Color colorTrail
Definition: ElementRef.cs:9
int id
Definition: ELEMENT.cs:259
SourceElement.Row source
Definition: ELEMENT.cs:282
int Value
Definition: ELEMENT.cs:301
virtual string Name
Definition: ELEMENT.cs:313
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1123
bool HasItemProtection
UD_String_ElementRef elements
Definition: GameSetting.cs:317
Definition: Lang.cs:7
static string[] GetList(string id)
Definition: Lang.cs:113
Chara FindChara(string id)
Definition: Map.cs:2647
void MineObj(Point point, Task task=null, Chara c=null)
Definition: Map.cs:1886
void MineBlock(Point point, bool recoverBlock=false, Chara c=null, bool mineObj=true)
Definition: Map.cs:1714
void TryShatter(Point pos, int ele, int power, Card CC=null)
Definition: Map.cs:1222
void ModKarma(int a)
Definition: Player.cs:2610
Definition: Point.cs:9
SourceMaterial.Row matBlock
Definition: Point.cs:55
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1057
Point Copy()
Definition: Point.cs:491
override string ToString()
Definition: Point.cs:524
int x
Definition: Point.cs:36
void ModFire(int value, bool extinguish=false)
Definition: Point.cs:939
bool IsSync
Definition: Point.cs:344
bool Equals(int _x, int _z)
Definition: Point.cs:966
bool HasObj
Definition: Point.cs:137
int Distance(Point p)
Definition: Point.cs:995
Chara FirstChara
Definition: Point.cs:288
bool HasBlock
Definition: Point.cs:141
Cell cell
Definition: Point.cs:51
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1308
SourceCalc calc
virtual void Mod(int a)
Definition: Stats.cs:135
virtual int value
Definition: Stats.cs:56
virtual bool CanBeAttacked
Definition: Trait.cs:177
bool ContainsKey(TKey key)
Definition: UDictionary.cs:151
FactionBranch branch
Definition: Zone.cs:34
bool IsPCFaction
Definition: Zone.cs:477
Act act
Definition: ActRef.cs:3
int refVal
Definition: ActRef.cs:17
bool noFriendlyFire
Definition: ActRef.cs:15
Thing refThing
Definition: ActRef.cs:9

References EClass._map, EClass._zone, ActRef.act, Chara.AddCondition(), Point.Animate(), EClass.Branch, 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, Chara.HasCondition(), 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(), EClass.rndf(), Dice.Roll(), Dice.RollMax(), Card.SayNothingHappans(), Effect.SetParticleColor(), Effect.SetStartDelay(), EClass.setting, Element.source, EClass.sources, Dice.ToString(), Point.ToString(), 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 2994 of file ActEffect.cs.

2995 {
2997 {
2999 return;
3000 }
3001 if (c == tc)
3002 {
3003 tc.Say("love_ground", tc);
3004 }
3005 else
3006 {
3007 tc.Say("love_chara", c, tc);
3008 }
3009 Thing t = tc.MakeGene(type);
3010 tc.GiveBirth(t, effect: true);
3011 }
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:6072
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8617
Definition: Msg.cs:5
static string SayNothingHappen()
Definition: Msg.cs:96
Definition: Thing.cs:8
virtual bool IsUserZone
Definition: Zone.cs:275

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 3013 of file ActEffect.cs.

3014 {
3015 Point point = new Point();
3016 for (int i = 0; i < 10000; i++)
3017 {
3018 point.Set(org);
3019 point.x += EClass.rnd(radius) - EClass.rnd(radius);
3020 point.z += EClass.rnd(radius) - EClass.rnd(radius);
3021 if (point.IsValid && point.IsInBounds && !point.cell.blocked && point.Distance(org) >= radius / 3 + 1 - i / 50 && !point.cell.HasZoneStairs())
3022 {
3023 return point;
3024 }
3025 }
3026 return org.GetRandomNeighbor().GetNearestPoint();
3027 }
bool HasZoneStairs(bool includeLocked=true)
Definition: Cell.cs:1759
Point Set(int _x, int _z)
Definition: Point.cs:503
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
bool IsValid
Definition: Point.cs:88
bool IsInBounds
Definition: Point.cs:104
Point GetRandomNeighbor()
Definition: Point.cs:764

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 2962 of file ActEffect.cs.

2963 {
2964 if (c == tc)
2965 {
2966 tc.Say("love_ground", tc);
2967 }
2968 else
2969 {
2970 tc.Say("love_chara", c, tc);
2971 }
2972 tc.ModAffinity(EClass.pc, power / 4);
2973 if ((idEffect != EffectId.Love || EClass.rnd(2) != 0) && (!EClass._zone.IsUserZone || tc.IsPCFaction || !EClass.game.principal.disableUsermapBenefit))
2974 {
2975 if (idEffect == EffectId.MoonSpear && EClass.rnd(EClass.debug.enable ? 2 : 20) == 0)
2976 {
2977 Thing thing = tc.MakeGene();
2978 tc.GiveBirth(thing, effect: true);
2979 tc.Say("item_drop", thing);
2980 }
2981 else if (idEffect != EffectId.LovePlus && EClass.rnd(2) == 0)
2982 {
2983 Thing c2 = tc.MakeMilk(effect: true, 1, addToZone: true, state);
2984 tc.Say("item_drop", c2);
2985 }
2986 else
2987 {
2988 Thing c3 = tc.MakeEgg(effect: true, 1, addToZone: true, (idEffect == EffectId.LovePlus) ? 3 : 20, state);
2989 tc.Say("item_drop", c3);
2990 }
2991 }
2992 }
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true, BlessedState? state=null)
Definition: Card.cs:6041
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true, int fertChance=20, BlessedState? state=null)
Definition: Card.cs:6018
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:8344
override bool IsPCFaction
Definition: Chara.cs:689
bool enable
Definition: CoreDebug.cs:301
static Game game
Definition: EClass.cs:9
static CoreDebug debug
Definition: EClass.cs:49
bool disableUsermapBenefit
GamePrincipal principal
Definition: Game.cs:225

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.ProcNutrition().

◆ Poison()

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

Definition at line 2946 of file ActEffect.cs.

2947 {
2948 tc.Say("eat_poison", tc);
2949 tc.Talk("scream");
2950 if (power > 100000000)
2951 {
2952 power = 100000000;
2953 }
2954 int num = (int)Mathf.Sqrt(power * 100);
2955 tc.DamageHP(num * 2 + EClass.rnd(num), 915, power);
2956 if (!tc.isDead && !tc.IsPC)
2957 {
2959 }
2960 }
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7173
override bool IsPC
Definition: Chara.cs:630
bool isDead
Definition: Chara.cs:393

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

Referenced by FoodEffect.ProcNutrition().

◆ 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 1058 of file ActEffect.cs.

1059 {
1060 if (tc == null)
1061 {
1062 tc = cc;
1063 }
1064 Chara TC = tc.Chara;
1065 Chara CC = cc.Chara;
1066 bool blessed = state >= BlessedState.Blessed;
1067 bool flag = state <= BlessedState.Cursed;
1068 int orgPower = power;
1069 if (blessed || flag)
1070 {
1071 power *= 2;
1072 }
1073 switch (id)
1074 {
1075 case EffectId.Duplicate:
1076 CC.TryDuplicate();
1077 break;
1078 case EffectId.Fuse:
1079 CC.TryFuse();
1080 break;
1081 case EffectId.Escape:
1082 if (CC.IsPCFaction || (EClass._zone.Boss == CC && EClass.rnd(30) != 0))
1083 {
1084 return;
1085 }
1086 CC.Say("escape", CC);
1087 CC.PlaySound("escape");
1088 if (EClass._zone.Boss == CC)
1089 {
1090 CC.TryDropBossLoot();
1091 }
1092 if (CC.id == "bell_silver")
1093 {
1096 {
1098 }
1099 }
1100 CC.Destroy();
1101 break;
1102 case EffectId.BurnMana:
1103 CC.PlaySound("fire");
1104 CC.PlayEffect("Element/eleFire");
1105 CC.Say("burn_mana", CC);
1106 CC.mana.Mod(-CC.mana.max / 3 - 1);
1107 break;
1108 case EffectId.Exterminate:
1109 {
1110 CC.PlaySound("clean_floor");
1111 Msg.Say("exterminate");
1112 List<Chara> list3 = EClass._map.charas.Where((Chara c) => (c.isCopy || c.isHatchling || c.id == "cocoon" || c.id == "cocoon_alien") && !c.IsPCFactionOrMinion).ToList();
1113 if (list3.Count == 0)
1114 {
1116 return;
1117 }
1118 foreach (Chara item in list3)
1119 {
1120 item.Say("split_fail", item);
1121 item.PlayEffect("vanish");
1122 item.Die();
1123 }
1124 break;
1125 }
1126 case EffectId.DropMine:
1127 {
1128 if (CC.pos.Installed != null || EClass._zone.IsPCFaction)
1129 {
1130 return;
1131 }
1132 Thing thing = ThingGen.Create("mine");
1133 thing.c_idRefCard = "dog_mine";
1134 Zone.ignoreSpawnAnime = true;
1135 EClass._zone.AddCard(thing, CC.pos).Install();
1136 break;
1137 }
1138 case EffectId.LittleSisterMigration:
1139 case EffectId.SilverCatMigration:
1140 {
1141 bool flag3 = id == EffectId.SilverCatMigration;
1142 if (!EClass.game.IsSurvival && ((flag3 && EClass._zone.id != "startVillage2") || (!flag3 && !(EClass._zone is Zone_LittleGarden))))
1143 {
1145 return;
1146 }
1147 List<Chara> list2 = new List<Chara>();
1148 bool flag4 = false;
1149 foreach (Chara chara3 in EClass._map.charas)
1150 {
1151 if (!chara3.IsPCFactionOrMinion && chara3.id == (flag3 ? "cat_silver" : "littleOne"))
1152 {
1153 if (flag4)
1154 {
1155 flag4 = false;
1156 continue;
1157 }
1158 list2.Add(chara3);
1159 flag4 = true;
1160 }
1161 }
1162 if (list2.Count == 0)
1163 {
1165 return;
1166 }
1167 EClass.pc.PlaySound("chime_angel");
1168 foreach (Chara item2 in list2)
1169 {
1170 item2.PlayEffect("revive");
1171 item2.Destroy();
1172 }
1173 Msg.Say(flag3 ? "cat_migration" : "little_migration", list2.Count.ToString() ?? "");
1174 EClass._zone.ModInfluence(list2.Count);
1175 if (flag3)
1176 {
1177 EClass.player.stats.catDepart += list2.Count;
1178 break;
1179 }
1180 EClass.player.stats.sistersDepart += list2.Count;
1182 break;
1183 }
1184 case EffectId.MagicMap:
1185 if (!CC.IsPC)
1186 {
1187 CC.SayNothingHappans();
1188 break;
1189 }
1190 if (flag)
1191 {
1192 CC.Say("abMagicMap_curse", CC);
1193 CC.PlaySound("curse3");
1194 CC.PlayEffect("curse");
1195 CC.AddCondition<ConConfuse>(200, force: true);
1196 break;
1197 }
1198 CC.Say("abMagicMap", CC);
1199 CC.PlayEffect("identify");
1200 CC.PlaySound("identify");
1201 if (blessed)
1202 {
1204 }
1205 else
1206 {
1207 EClass._map.Reveal(CC.pos, power);
1208 }
1209 break;
1210 case EffectId.AbsorbMana:
1211 {
1212 if (CC == TC)
1213 {
1214 EClass.game.religions.Element.Talk("ability");
1215 }
1216 Dice dice = Dice.Create("ActManaAbsorb", power, CC, (actRef.refThing != null) ? null : actRef.act);
1217 TC.mana.Mod(dice.Roll() + TC.mana.max / 5);
1218 TC.PlaySound("heal");
1219 TC.PlayEffect("heal");
1220 if (TC == CC)
1221 {
1222 CC.Say("absorbMana", CC);
1223 }
1224 break;
1225 }
1226 case EffectId.ModPotential:
1227 {
1228 Element element = cc.elements.ListElements((Element e) => e.HasTag("primary")).RandomItem();
1229 cc.elements.ModTempPotential(element.id, power / 10);
1230 break;
1231 }
1232 case EffectId.ForgetItems:
1233 {
1234 TC.PlaySound("curse3");
1235 TC.PlayEffect("curse");
1236 TC.Say("forgetItems", TC);
1237 int num3 = power / 50 + 1 + EClass.rnd(3);
1238 List<Thing> source = TC.things.List((Thing t) => t.c_IDTState == 0);
1239 for (int j = 0; j < num3; j++)
1240 {
1241 source.RandomItem().c_IDTState = 5;
1242 }
1243 break;
1244 }
1245 case EffectId.EnchantWeapon:
1246 case EffectId.EnchantArmor:
1247 case EffectId.EnchantWeaponGreat:
1248 case EffectId.EnchantArmorGreat:
1249 {
1250 bool armor = id == EffectId.EnchantArmor || id == EffectId.EnchantArmorGreat;
1251 bool flag6 = id == EffectId.EnchantWeaponGreat || id == EffectId.EnchantArmorGreat;
1252 if (!tc.isThing)
1253 {
1254 LayerDragGrid.CreateEnchant(CC, armor, flag6, state);
1255 return;
1256 }
1257 cc.PlaySound("identify");
1258 cc.PlayEffect("identify");
1259 if (flag)
1260 {
1261 cc.Say("enc_curse", tc);
1262 tc.ModEncLv(-1);
1263 break;
1264 }
1265 int num4 = (flag6 ? 4 : 2) + (blessed ? 1 : 0);
1266 if (tc.encLV >= num4)
1267 {
1268 cc.Say("enc_resist", tc);
1269 break;
1270 }
1271 cc.Say("enc", tc);
1272 tc.ModEncLv(1);
1273 break;
1274 }
1275 case EffectId.Identify:
1276 case EffectId.GreaterIdentify:
1277 {
1278 bool flag5 = id == EffectId.GreaterIdentify;
1279 if (flag)
1280 {
1281 Redirect(EffectId.ForgetItems, flag5 ? BlessedState.Cursed : BlessedState.Normal, default(ActRef));
1282 break;
1283 }
1284 if (!tc.isThing)
1285 {
1286 int count = ((!blessed) ? 1 : (flag5 ? (2 + EClass.rnd(2)) : (3 + EClass.rnd(3))));
1287 LayerDragGrid.CreateIdentify(CC, flag5, state, 0, count);
1288 return;
1289 }
1290 cc.PlaySound("identify");
1291 cc.PlayEffect("identify");
1292 tc.Thing.Identify(cc.IsPCParty, (!flag5) ? IDTSource.Identify : IDTSource.SuperiorIdentify);
1293 break;
1294 }
1295 case EffectId.Uncurse:
1296 {
1297 if (!tc.isThing)
1298 {
1299 LayerDragGrid.CreateUncurse(CC, state);
1300 return;
1301 }
1302 Thing thing2 = tc.Thing;
1303 if (thing2.blessedState == BlessedState.Cursed)
1304 {
1305 thing2.SetBlessedState(BlessedState.Normal);
1306 }
1307 else if (thing2.blessedState == BlessedState.Doomed)
1308 {
1309 thing2.SetBlessedState(BlessedState.Normal);
1310 }
1311 thing2.GetRootCard()?.TryStack(thing2);
1312 LayerInventory.SetDirty(thing2);
1313 break;
1314 }
1315 case EffectId.Lighten:
1316 {
1317 if (!tc.isThing)
1318 {
1319 LayerDragGrid.CreateLighten(CC, state);
1320 return;
1321 }
1322 if (tc.Num > 1)
1323 {
1324 tc = tc.Split(1);
1325 }
1326 cc.PlaySound("offering");
1327 cc.PlayEffect("buff");
1328 int num6 = (tc.isWeightChanged ? tc.c_weight : tc.Thing.source.weight);
1329 tc.isWeightChanged = true;
1330 Element orCreateElement = tc.elements.GetOrCreateElement(64);
1331 Element orCreateElement2 = tc.elements.GetOrCreateElement(65);
1332 Element orCreateElement3 = tc.elements.GetOrCreateElement(67);
1333 Element orCreateElement4 = tc.elements.GetOrCreateElement(66);
1334 bool flag7 = tc.IsEquipmentOrRangedOrAmmo || tc.IsThrownWeapon;
1335 if (flag)
1336 {
1337 num6 = (int)(0.01f * (float)num6 * (float)power * 0.75f + 500f);
1338 if (num6 < 0 || num6 > 10000000)
1339 {
1340 num6 = 10000000;
1341 flag7 = false;
1342 }
1343 if (flag7)
1344 {
1345 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1346 {
1347 tc.elements.ModBase(67, Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1348 tc.elements.ModBase(66, -Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1349 }
1350 else
1351 {
1352 tc.elements.ModBase(65, Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1353 tc.elements.ModBase(64, -Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1354 }
1355 }
1356 cc.Say("lighten_curse", tc);
1357 }
1358 else
1359 {
1360 num6 = num6 * (100 - power / 10) / 100;
1361 if (blessed)
1362 {
1363 power /= 4;
1364 }
1365 if (flag7)
1366 {
1367 if (tc.IsWeapon || tc.IsThrownWeapon || tc.IsAmmo)
1368 {
1369 tc.elements.ModBase(67, -Mathf.Clamp(orCreateElement3.vBase * power / 1000, 1, 5));
1370 tc.elements.ModBase(66, Mathf.Clamp(orCreateElement4.vBase * power / 1000, 1, 5));
1371 }
1372 else
1373 {
1374 tc.elements.ModBase(65, -Mathf.Clamp(orCreateElement2.vBase * power / 1000, 1, 5));
1375 tc.elements.ModBase(64, Mathf.Clamp(orCreateElement.vBase * power / 1000, 1, 5));
1376 }
1377 }
1378 cc.Say("lighten", tc);
1379 }
1380 tc.c_weight = num6;
1381 tc.SetDirtyWeight();
1382 if (tc.parent == null)
1383 {
1384 CC.Pick(tc.Thing, msg: false);
1385 }
1387 break;
1388 }
1389 case EffectId.Reconstruction:
1390 {
1391 if (!tc.isThing)
1392 {
1393 LayerDragGrid.CreateReconstruction(CC, state, power / ((!(blessed || flag)) ? 1 : 2));
1394 return;
1395 }
1396 if (tc.Num > 1)
1397 {
1398 tc = tc.Split(1);
1399 }
1400 cc.PlaySound("mutation");
1401 cc.PlayEffect("identify");
1402 cc.Say("reconstruct", tc);
1403 EClass.game.cards.uidNext += EClass.rnd(30);
1404 int num5 = Mathf.Max(tc.genLv, tc.LV, EClass.player.stats.deepest);
1406 {
1407 blesstedState = state
1408 });
1409 Thing thing3 = ThingGen.Create(tc.id, -1, (int)((long)num5 * (long)power / 400));
1410 thing3.genLv = num5;
1411 thing3.idSkin = tc.idSkin;
1412 if (tc.c_uidAttune != 0)
1413 {
1414 thing3.c_uidAttune = tc.c_uidAttune;
1415 if (thing3.id == "amulet_engagement" || thing3.id == "ring_engagement")
1416 {
1417 if (tc.c_uidAttune != EClass.pc.uid)
1418 {
1419 thing3.elements.ModBase(484, 3);
1420 }
1421 if (thing3.rarity < Rarity.Mythical)
1422 {
1423 thing3.rarity = Rarity.Mythical;
1424 }
1425 }
1426 }
1427 tc.Destroy();
1428 CC.Pick(thing3, msg: false);
1429 if (!CC.IsPC)
1430 {
1431 CC.TryEquip(thing3);
1432 }
1433 break;
1434 }
1435 case EffectId.ChangeMaterialLesser:
1436 case EffectId.ChangeMaterial:
1437 case EffectId.ChangeMaterialGreater:
1438 {
1439 SourceMaterial.Row row = EClass.sources.materials.alias.TryGetValue(actRef.n1);
1440 if (!tc.isThing)
1441 {
1442 LayerDragGrid.CreateChangeMaterial(CC, actRef.refThing, row, id, state);
1443 return;
1444 }
1445 if (tc.Num > 1)
1446 {
1447 tc = tc.Split(1);
1448 }
1449 string name = tc.Name;
1450 if (row == null)
1451 {
1452 bool num = id == EffectId.ChangeMaterialGreater;
1453 bool flag2 = id == EffectId.ChangeMaterialLesser;
1454 string text2 = tc.Thing.source.tierGroup;
1455 Dictionary<string, SourceMaterial.TierList> tierMap = SourceMaterial.tierMap;
1456 int num2 = 1;
1457 if (flag)
1458 {
1459 num2 -= 2;
1460 }
1461 if (blessed)
1462 {
1463 num2++;
1464 }
1465 if (num)
1466 {
1467 num2++;
1468 }
1469 if (flag2)
1470 {
1471 num2 -= 2;
1472 }
1473 num2 = Mathf.Clamp(num2 + EClass.rnd(2), 0, 4);
1474 if (EClass.rnd(10) == 0)
1475 {
1476 text2 = ((text2 == "metal") ? "leather" : "metal");
1477 }
1478 SourceMaterial.TierList tierList = (text2.IsEmpty() ? tierMap.RandomItem() : tierMap[text2]);
1479 for (int i = 0; i < 1000; i++)
1480 {
1481 row = tierList.tiers[num2].Select();
1482 if (row != tc.material)
1483 {
1484 break;
1485 }
1486 }
1487 }
1488 cc.PlaySound("offering");
1489 cc.PlayEffect("buff");
1490 if ((tc.id == "log" || tc.id == "branch") && tc.material.alias == "carbone")
1491 {
1492 foreach (Element item3 in tc.elements.dict.Values.ToList())
1493 {
1494 if (item3.IsTrait && item3.vBase != 0)
1495 {
1496 tc.elements.ModBase(item3.id, -item3.vBase);
1497 }
1498 }
1499 }
1500 tc.ChangeMaterial(row);
1501 if (tc.trait is TraitGene && tc.c_DNA != null)
1502 {
1503 DNA.Type type = DNA.GetType(tc.material.alias);
1504 tc.c_DNA.Generate(type);
1505 }
1506 cc.Say("materialChanged", name, row.GetName());
1507 if (CC != null)
1508 {
1509 if (tc.parent == null)
1510 {
1511 CC.Pick(tc.Thing, msg: false);
1512 }
1514 }
1515 break;
1516 }
1517 case EffectId.ChangeRarity:
1518 {
1519 EClass.sources.materials.alias.TryGetValue(actRef.n1);
1520 if (!tc.isThing)
1521 {
1522 LayerDragGrid.CreateChangeRarity(CC, actRef.refThing, id, state);
1523 return;
1524 }
1525 if (tc.Num > 1)
1526 {
1527 tc = tc.Split(1);
1528 }
1529 string name2 = tc.Name;
1530 cc.PlaySound("offering");
1531 cc.PlayEffect("buff");
1532 bool flag8 = tc.rarity == Rarity.Legendary;
1534 {
1535 rarity = (flag8 ? Rarity.Mythical : Rarity.Legendary),
1536 generation = CardBlueprint.Generation.GarokkHammer
1537 });
1538 Rand.SetBaseSeed(tc.uid + 1);
1539 Rand.SetSeed(tc.uid + 2);
1540 Thing thing4 = ThingGen.Create(tc.id, tc.idMaterial, tc.genLv);
1541 Rand.SetSeed();
1542 Rand.SetBaseSeed();
1543 thing4.SetEncLv(tc.encLV);
1544 thing4.SetBlessedState(tc.blessedState);
1545 int num7 = 0;
1546 foreach (Element item4 in thing4.elements.dict.Values.ToList().Shuffle())
1547 {
1548 int num8 = (tc.elements.Has(item4.id) ? tc.elements.GetElement(item4.id).vBase : 0);
1549 if (num8 != 0 && (Mathf.Abs(item4.vBase) <= Mathf.Abs(num8) || !MathEx.IsSameSign(item4.vBase, num8)))
1550 {
1551 continue;
1552 }
1553 int id2 = item4.id;
1554 if (id2 != 11)
1555 {
1556 if ((uint)(id2 - 64) > 3u)
1557 {
1558 num7++;
1559 }
1560 tc.elements.SetBase(item4.id, item4.vBase);
1561 Debug.Log(item4.Name + "/" + item4.vBase);
1562 if (flag8 && num7 >= 2)
1563 {
1564 break;
1565 }
1566 }
1567 }
1568 tc.isCrafted = false;
1569 tc.rarity = (flag8 ? Rarity.Mythical : Rarity.Legendary);
1570 EClass.pc.Say("reconstruct", name2);
1571 break;
1572 }
1573 case EffectId.ChangeAlias:
1574 {
1575 Chara c2 = CC;
1576 if (!c2.IsPC && !c2.trait.UseRandomAlias && blessed)
1577 {
1578 c2._alias = null;
1579 c2.Say("reconstruct", c2);
1580 SE.Change();
1581 c2.PlayEffect("mutation");
1582 break;
1583 }
1584 EClass.ui.AddLayer<LayerList>().SetStringList(delegate
1585 {
1586 List<string> list12 = new List<string>();
1587 for (int num21 = 0; num21 < 10; num21++)
1588 {
1589 list12.Add(AliasGen.GetRandomAlias());
1590 }
1591 return list12;
1592 }, delegate(int a, string b)
1593 {
1594 c2._alias = b;
1595 c2.Say("reconstruct", c2);
1596 SE.Change();
1597 c2.PlayEffect("mutation");
1598 }).SetSize()
1599 .EnableReroll()
1600 .SetTitles("wAlias");
1601 break;
1602 }
1603 case EffectId.ChangeBiography:
1604 CC.bio.RerollParents();
1605 CC.Say("reconstruct", CC);
1606 SE.Change();
1607 CC.PlayEffect("mutation");
1608 break;
1609 case EffectId.ReturnVoid:
1610 {
1612 if (EClass.game.IsSurvival || root == null || root.visitCount == 0 || EClass.player.stats.deepestVoid < 1 || (!EClass.debug.enable && EClass.player.CountKeyItem("license_void") == 0))
1613 {
1615 return;
1616 }
1617 int max = Mathf.Min(EClass.player.stats.deepestVoid, -root.MinLv);
1618 int destLv = 1;
1619 Dialog.InputName("dialogVoidReturn".lang(max.ToString() ?? ""), max.ToString() ?? "", delegate(bool cancel, string text)
1620 {
1621 if (!cancel)
1622 {
1623 destLv = Mathf.Abs(text.ToInt());
1624 destLv = Mathf.Clamp(destLv, 1, max) * -1;
1625 Zone zone = ((root.lv == destLv) ? root : (root.children.Find((Spatial t) => t.lv == destLv) as Zone));
1626 Debug.Log(destLv + "/" + zone);
1627 if (zone == null)
1628 {
1629 zone = SpatialGen.Create(root.GetNewZoneID(destLv), root, register: true) as Zone;
1630 zone.lv = destLv;
1631 }
1632 Msg.Say("returnComplete");
1633 EClass.player.uidLastTravelZone = 0;
1635 EClass.player.lastZonePos = null;
1636 EClass.player.returnInfo = null;
1637 }
1638 });
1639 break;
1640 }
1641 case EffectId.Return:
1642 case EffectId.Evac:
1643 if (!cc.IsPC)
1644 {
1645 Redirect(EffectId.Teleport, state, default(ActRef));
1646 return;
1647 }
1648 cc.PlaySound("return_cast");
1649 if (EClass.player.returnInfo == null)
1650 {
1651 if (id == EffectId.Evac)
1652 {
1653 EClass.player.returnInfo = new Player.ReturnInfo
1654 {
1655 turns = EClass.rnd(10) + 10,
1656 isEvac = true
1657 };
1658 }
1659 else
1660 {
1661 if (EClass.game.spatials.ListReturnLocations().Count == 0)
1662 {
1663 Msg.Say("returnNowhere");
1664 break;
1665 }
1666 EClass.player.returnInfo = new Player.ReturnInfo
1667 {
1668 turns = EClass.rnd(10) + 10,
1669 askDest = true
1670 };
1671 }
1672 Msg.Say("returnBegin");
1673 }
1674 else
1675 {
1676 EClass.player.returnInfo = null;
1677 Msg.Say("returnAbort");
1678 }
1679 break;
1680 case EffectId.Teleport:
1681 case EffectId.TeleportShort:
1682 case EffectId.Gate:
1683 if (!tc.HasHost)
1684 {
1685 if (!flag)
1686 {
1687 if (id == EffectId.TeleportShort)
1688 {
1689 tc.Teleport(GetTeleportPos(tc.pos));
1690 }
1691 else
1692 {
1694 }
1695 }
1696 if (id == EffectId.Gate && CC.IsPC)
1697 {
1698 foreach (Chara chara4 in EClass._map.charas)
1699 {
1700 if (!chara4.HasHost && chara4 != tc && (chara4.IsPCParty || chara4.IsPCPartyMinion))
1701 {
1702 chara4.Teleport(tc.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? tc.pos);
1703 }
1704 }
1705 }
1706 }
1707 if (tc.ExistsOnMap && tc.c_bossType == BossType.none && tc.id == "mush_quantum" && !tc.HasElement(400) && !tc.HasCondition<ConGravity>())
1708 {
1709 if (EClass.rnd(2) == 0)
1710 {
1711 if (tc.IsGlobal || EClass._zone.IsInstance)
1712 {
1713 tc.Die();
1714 }
1715 else
1716 {
1717 tc.Destroy();
1718 }
1719 break;
1720 }
1721 tc.Chara.TryDuplicate();
1722 }
1723 if (flag)
1724 {
1725 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
1726 }
1727 if (blessed)
1728 {
1729 Redirect(EffectId.Levitate, BlessedState.Normal, default(ActRef));
1730 }
1731 break;
1732 }
1733 if (TC == null)
1734 {
1735 return;
1736 }
1737 switch (id)
1738 {
1739 case EffectId.ThrowPotion:
1740 if (!CC.pos.Equals(TC.pos))
1741 {
1742 Thing t2 = ThingGen.Create(new string[6] { "330", "331", "334", "335", "336", "1142" }.RandomItem());
1743 ActThrow.Throw(CC, TC.pos, t2, ThrowMethod.Punish, 0.7f);
1744 }
1745 break;
1746 case EffectId.StripBlessing:
1747 {
1748 List<Condition> list6 = new List<Condition>();
1749 foreach (Condition condition4 in TC.conditions)
1750 {
1751 if (GetBlessingDifficulty(condition4) > 0 && EClass.rnd(GetBlessingDifficulty(condition4)) == 0)
1752 {
1753 list6.Add(condition4);
1754 }
1755 }
1756 if (list6.Count == 0)
1757 {
1758 CC.SayNothingHappans();
1759 break;
1760 }
1761 TC.pos.PlayEffect("holyveil");
1762 TC.pos.PlaySound("holyveil");
1763 TC.Say("unpolluted", TC);
1764 list6.Shuffle();
1765 {
1766 foreach (Condition item5 in list6)
1767 {
1768 item5.Kill();
1769 if (CC.IsHostile(TC))
1770 {
1771 break;
1772 }
1773 }
1774 break;
1775 }
1776 }
1777 case EffectId.ShutterHex:
1778 {
1779 if (!CC.IsHostile(TC))
1780 {
1781 break;
1782 }
1783 int num15 = 0;
1784 foreach (Condition condition5 in TC.conditions)
1785 {
1786 if (condition5.Type == ConditionType.Debuff)
1787 {
1788 num15++;
1789 }
1790 }
1791 if (num15 == 0)
1792 {
1793 CC.SayNothingHappans();
1794 break;
1795 }
1796 TC.pos.PlayEffect("holyveil");
1797 TC.pos.PlaySound("holyveil");
1798 TC.pos.PlaySound("atk_eleSound");
1799 TC.conditions.ForeachReverse(delegate(Condition c)
1800 {
1801 if (c.Type == ConditionType.Debuff && EClass.rnd(3) == 0)
1802 {
1803 c.Kill();
1804 }
1805 });
1806 TC.Say("abShutterHex", TC);
1807 Point center = CC.pos.Copy();
1808 List<Chara> list9 = TC.pos.ListCharasInRadius(TC, 4, (Chara c) => c == TC || c.IsHostile(CC));
1809 for (int m = 0; m < num15; m++)
1810 {
1811 TweenUtil.Delay((float)m * 0.1f, delegate
1812 {
1813 center.PlaySound("shutterhex");
1814 });
1815 foreach (Chara item6 in list9)
1816 {
1817 if (item6.ExistsOnMap)
1818 {
1819 Effect effect = Effect.Get("spell_moonspear");
1820 TrailRenderer componentInChildren = effect.GetComponentInChildren<TrailRenderer>();
1821 Color startColor = (componentInChildren.endColor = EClass.Colors.elementColors["eleHoly"]);
1822 componentInChildren.startColor = startColor;
1823 Point pos = item6.pos.Copy();
1824 TweenUtil.Delay((float)m * 0.1f, delegate
1825 {
1826 effect.Play(center, 0f, pos);
1827 });
1828 int num16 = Dice.Create("SpShutterHex", power, CC, (actRef.refThing != null) ? null : actRef.act).Roll();
1829 item6.DamageHP(num16, 919, power, AttackSource.None, CC, showEffect: false);
1830 }
1831 }
1832 }
1833 break;
1834 }
1835 case EffectId.Draw:
1836 {
1837 if (CC.Dist(TC) <= 1 || (CC.IsPCFactionOrMinion && TC.IsPCFactionOrMinion && TC.isRestrained))
1838 {
1839 break;
1840 }
1841 Point point = CC.GetFirstStep(TC.pos, PathManager.MoveType.Combat);
1842 if (!point.IsValid)
1843 {
1844 point = CC.pos.GetRandomPoint(1)?.GetNearestPoint(allowBlock: false, allowChara: false);
1845 }
1846 if (point == null || !CC.CanSeeLos(point))
1847 {
1848 break;
1849 }
1850 CC.Say("abDraw", CC, TC);
1851 CC.PlaySound("draw");
1852 if (TC.HasCondition<ConGravity>() || TC.HasElement(493))
1853 {
1854 CC.SayNothingHappans();
1855 break;
1856 }
1857 TC.MoveImmediate(point, !EClass.core.config.camera.smoothFollow);
1858 if (CC.id == "tentacle")
1859 {
1860 TC.AddCondition<ConEntangle>();
1861 }
1862 break;
1863 }
1864 case EffectId.CatSniff:
1865 {
1866 Chara nearbyCatToSniff = CC.GetNearbyCatToSniff();
1867 if (nearbyCatToSniff != null)
1868 {
1869 CC.Sniff(nearbyCatToSniff);
1870 }
1871 break;
1872 }
1873 case EffectId.Steal:
1874 {
1876 {
1877 break;
1878 }
1879 if (TC.Evalue(426) > 0)
1880 {
1881 TC.Say((actRef.n1 == "money") ? "abStealNegateMoney" : "abStealNegate", TC);
1882 break;
1883 }
1884 Thing thing5 = null;
1885 bool flag11 = actRef.n1 == "food";
1886 if (actRef.n1 == "money")
1887 {
1888 int currency = TC.GetCurrency();
1889 if (currency > 0)
1890 {
1891 currency = Mathf.Clamp(EClass.rnd(currency / 10), 1, 100 + EClass.rndHalf(Mathf.Min(CC.LV, 1000000) * 200));
1892 thing5 = ThingGen.Create("money").SetNum(currency);
1893 TC.ModCurrency(-currency);
1894 }
1895 }
1896 else
1897 {
1898 Func<Thing, bool> func = (Thing t) => true;
1899 if (flag11)
1900 {
1901 func = (Thing t) => t.IsFood;
1902 }
1903 List<Thing> list7 = TC.things.List(delegate(Thing t)
1904 {
1906 {
1907 return false;
1908 }
1909 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);
1910 }, onlyAccessible: true);
1911 if (list7.Count > 0)
1912 {
1913 thing5 = list7.RandomItem();
1914 if (thing5.Num > 1)
1915 {
1916 thing5 = thing5.Split(1);
1917 }
1918 }
1919 CC.AddCooldown(6640, 200);
1920 }
1921 if (thing5 == null)
1922 {
1923 CC.Say("abStealNothing", CC, TC);
1924 break;
1925 }
1926 thing5.SetInt(116, 1);
1927 TC.PlaySound(thing5.material.GetSoundDrop(thing5.sourceCard));
1928 CC.Pick(thing5, msg: false);
1929 CC.Say("abSteal", CC, TC, thing5.Name);
1930 if (actRef.n1 == "food")
1931 {
1932 if (CC.hunger.value != 0)
1933 {
1934 CC.InstantEat(thing5);
1935 }
1936 }
1937 else
1938 {
1939 CC.Say("abStealEscape", CC);
1940 CC.Teleport(GetTeleportPos(tc.pos, 30), silent: true);
1941 }
1942 break;
1943 }
1944 case EffectId.NeckHunt:
1945 CC.TryNeckHunt(TC, power);
1946 break;
1947 case EffectId.CurseEQ:
1948 {
1949 if (CC != null && CC != TC)
1950 {
1951 TC.Say("curse", CC, TC);
1952 }
1953 TC.PlaySound("curse3");
1954 TC.PlayEffect("curse");
1955 if (EClass.rnd(150 + TC.LUC * 5 + TC.Evalue(972) * 20) >= power + (flag ? 200 : 0) || TC.TryNullifyCurse())
1956 {
1957 break;
1958 }
1959 List<Thing> list11 = TC.things.List(delegate(Thing t)
1960 {
1961 if (!t.isEquipped || t.blessedState == BlessedState.Doomed || t.IsToolbelt)
1962 {
1963 return false;
1964 }
1965 return (t.blessedState < BlessedState.Blessed || EClass.rnd(10) == 0) ? true : false;
1966 });
1967 if (list11.Count == 0)
1968 {
1969 CC.SayNothingHappans();
1970 break;
1971 }
1972 Thing thing7 = list11.RandomItem();
1973 TC.Say("curse_hit", TC, thing7);
1974 thing7.SetBlessedState((thing7.blessedState == BlessedState.Cursed) ? BlessedState.Doomed : BlessedState.Cursed);
1975 LayerInventory.SetDirty(thing7);
1976 break;
1977 }
1978 case EffectId.UncurseEQ:
1979 case EffectId.UncurseEQGreater:
1980 {
1981 TC.Say("uncurseEQ" + (blessed ? "_bless" : (flag ? "_curse" : "")), TC);
1982 TC.PlaySound("uncurse");
1983 TC.PlayEffect("uncurse");
1984 if (flag)
1985 {
1986 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
1987 break;
1988 }
1989 int success = 0;
1990 int fail = 0;
1991 List<Thing> list = new List<Thing>();
1992 TC.things.Foreach(delegate(Thing t)
1993 {
1994 int num20 = 0;
1995 if ((t.isEquipped || t.IsRangedWeapon || blessed) && t.blessedState < BlessedState.Normal)
1996 {
1997 if (t.blessedState == BlessedState.Cursed)
1998 {
1999 num20 = EClass.rnd(200);
2000 }
2001 if (t.blessedState == BlessedState.Doomed)
2002 {
2003 num20 = EClass.rnd(1000);
2004 }
2005 if (blessed)
2006 {
2007 num20 /= 2;
2008 }
2009 if (id == EffectId.UncurseEQGreater)
2010 {
2011 num20 /= 10;
2012 }
2013 if (power >= num20)
2014 {
2015 TC.Say("uncurseEQ_success", t);
2016 t.SetBlessedState(BlessedState.Normal);
2017 if (t.isEquipped && t.HasElement(656))
2018 {
2019 TC.body.Unequip(t);
2020 }
2022 success++;
2023 list.Add(t);
2024 }
2025 else
2026 {
2027 fail++;
2028 }
2029 }
2030 });
2031 foreach (Thing item7 in list)
2032 {
2033 item7.GetRootCard()?.TryStack(item7);
2034 }
2035 if (success == 0 && fail == 0)
2036 {
2037 TC.SayNothingHappans();
2038 }
2039 else if (fail > 0)
2040 {
2041 TC.Say("uncurseEQ_fail");
2042 }
2043 break;
2044 }
2045 case EffectId.Buff:
2046 {
2047 string text3 = actRef.n1;
2048 string text4 = "";
2049 if (flag)
2050 {
2051 text4 = EClass.sources.stats.alias[text3].curse;
2052 if (!text4.IsEmpty())
2053 {
2054 text3 = text4;
2055 }
2056 }
2057 Condition condition2 = Condition.Create(text3, power, delegate(Condition con)
2058 {
2059 if (!actRef.aliasEle.IsEmpty())
2060 {
2061 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
2062 }
2063 });
2064 condition2.isPerfume = TC.IsPC && actRef.isPerfume;
2065 Condition condition3 = TC.AddCondition(condition2);
2066 if (condition3 != null && condition3.isPerfume)
2067 {
2068 condition3.value = 3;
2069 Msg.Say("perfume", TC);
2070 }
2071 if (!text4.IsEmpty())
2072 {
2073 CC.DoHostileAction(TC);
2074 }
2075 break;
2076 }
2077 case EffectId.KizuamiTrick:
2078 {
2079 EClass.game.religions.Trickery.Talk("ability");
2080 bool hex = CC.IsHostile(TC);
2081 List<SourceStat.Row> list8 = EClass.sources.stats.rows.Where((SourceStat.Row con) => con.tag.Contains("random") && con.group == (hex ? "Debuff" : "Buff")).ToList();
2082 int power2 = power;
2083 for (int l = 0; l < 4 + EClass.rnd(2); l++)
2084 {
2085 SourceStat.Row row2 = list8.RandomItem();
2086 list8.Remove(row2);
2087 Proc(hex ? EffectId.DebuffKizuami : EffectId.Buff, CC, TC, power2, new ActRef
2088 {
2089 n1 = row2.alias
2090 });
2091 }
2093 {
2094 EClass.Wait(0.3f, TC);
2095 }
2096 break;
2097 }
2098 case EffectId.Debuff:
2099 case EffectId.DebuffKizuami:
2100 {
2101 CC.DoHostileAction(TC);
2102 bool isPowerful = TC.IsPowerful;
2103 string n = actRef.n1;
2104 if (n == "ConSuffocation")
2105 {
2106 power = power * 2 / 3;
2107 }
2108 int num12 = TC.WIL * (isPowerful ? 20 : 5);
2109 ConHolyVeil condition = TC.GetCondition<ConHolyVeil>();
2110 if (condition != null)
2111 {
2112 num12 += condition.power * 5;
2113 }
2114 num12 /= EClass.sources.stats.alias[n].hexPower;
2115 if (id != EffectId.DebuffKizuami && EClass.rnd(power) < num12)
2116 {
2117 int num13 = 10;
2118 int num14 = (TC.IsPowerful ? 40 : 90);
2119 if (CC.IsPCFaction)
2120 {
2121 num13 += EClass.curve(CC.LER, 100, 50) / 10;
2122 }
2123 if (TC.IsPowerful)
2124 {
2125 num13 /= 2;
2126 }
2127 if (condition != null)
2128 {
2129 num13 /= 5;
2130 }
2131 if (num13 >= num14)
2132 {
2133 num13 = num14;
2134 }
2135 if (EClass.rnd(100) > num13)
2136 {
2137 TC.Say("debuff_resist", TC);
2138 CC.DoHostileAction(TC);
2139 break;
2140 }
2141 }
2142 TC.AddCondition(Condition.Create(n, power, delegate(Condition con)
2143 {
2144 con.givenByPcParty = CC.IsPCParty;
2145 (con as ConDeathSentense)?.SetChara(CC);
2146 if (!actRef.aliasEle.IsEmpty())
2147 {
2148 con.SetElement(EClass.sources.elements.alias[actRef.aliasEle].id);
2149 }
2150 (con as ConMiasma)?.SetResistPenetrationLevel(TC, CC);
2151 }));
2152 if (n == "ConBane" && CC.HasElement(1416))
2153 {
2154 TC.AddCondition<ConExcommunication>(power);
2155 }
2156 CC.DoHostileAction(TC);
2158 {
2159 EClass.Wait(0.3f, TC);
2160 }
2161 break;
2162 }
2163 case EffectId.Mutation:
2164 TC.MutateRandom(1, 100, ether: false, state);
2166 {
2167 EClass.Wait(0.3f, TC);
2168 }
2169 break;
2170 case EffectId.CureMutation:
2171 TC.MutateRandom(-1, 100, ether: false, state);
2172 break;
2173 case EffectId.Ally:
2174 {
2175 Msg.Say("gainAlly");
2176 Chara chara2 = CharaGen.CreateFromFilter("chara", cc.LV);
2177 EClass._zone.AddCard(chara2, cc.pos.GetNearestPoint(allowBlock: false, allowChara: false));
2178 if (cc.IsPCFactionOrMinion)
2179 {
2180 chara2.MakeAlly(msg: false);
2181 }
2182 chara2.PlaySound("identify");
2183 chara2.PlayEffect("teleport");
2184 break;
2185 }
2186 case EffectId.Wish:
2187 if (!TC.IsPC)
2188 {
2189 break;
2190 }
2191 if (blessed || flag)
2192 {
2193 power /= 2;
2194 }
2195 Dialog.InputName("dialogWish", "q", delegate(bool cancel, string text)
2196 {
2197 if (!cancel)
2198 {
2199 Msg.Say("wish", TC, text);
2200 Wish(text, EClass.pc.NameTitled, power, state);
2201 }
2202 });
2203 break;
2204 case EffectId.Faith:
2205 {
2207 tc.PlayEffect("aura_heaven");
2208 tc.PlaySound("aura_heaven");
2209 tc.Say("faith", tc, faith.Name);
2210 if (flag)
2211 {
2212 tc.Say("faith_curse", tc, faith.Name);
2213 break;
2214 }
2215 if (blessed)
2216 {
2217 tc.Say("faith_bless", tc, faith.Name);
2218 }
2219 tc.ModExp(306, power * 10);
2220 if (tc.elements.Base(85) < tc.elements.Value(306))
2221 {
2222 tc.ModExp(85, power * 10);
2223 }
2224 break;
2225 }
2226 case EffectId.TransGender:
2227 {
2228 tc.PlaySound("mutation");
2229 tc.PlayEffect("mutation");
2230 int gender = tc.bio.gender;
2231 int gender2 = gender switch
2232 {
2233 1 => 2,
2234 2 => 1,
2235 _ => (EClass.rnd(2) != 0) ? 1 : 2,
2236 };
2237 if (gender != 0 && EClass.rnd(10) == 0)
2238 {
2239 gender2 = 0;
2240 }
2241 tc.bio.SetGender(gender2);
2242 tc.Say("transGender", tc, Gender.Name(tc.bio.gender));
2243 tc.Talk("tail");
2244 int age3 = tc.bio.GetAge(tc.Chara);
2245 if (blessed && age3 > 1)
2246 {
2247 tc.Say("ageDown", tc);
2248 tc.bio.SetAge(tc.Chara, age3 - 1);
2249 }
2250 else if (flag)
2251 {
2252 tc.Say("ageUp", tc);
2253 tc.bio.SetAge(tc.Chara, age3 + 1);
2254 }
2255 break;
2256 }
2257 case EffectId.TransBlood:
2258 {
2259 tc.PlaySound("mutation");
2260 tc.PlayEffect("mutation");
2261 int num11 = ((actRef.refThing != null) ? actRef.refThing.GetInt(118) : actRef.refVal);
2262 if (num11 == 0)
2263 {
2264 num11 = tc.GetInt(118);
2265 if (num11 == 0)
2266 {
2267 num11 = EClass.game.seed + tc.uid;
2268 }
2269 num11++;
2270 }
2271 tc.Say("transBlood", tc);
2272 tc.Talk("tail");
2273 tc.c_bloodData = null;
2274 tc.SetInt(118, num11);
2275 break;
2276 }
2277 case EffectId.Youth:
2278 {
2279 tc.PlaySound("mutation");
2280 tc.PlayEffect("mutation");
2281 int age = tc.bio.GetAge(tc.Chara);
2282 if (!flag && age <= 0)
2283 {
2284 tc.SayNothingHappans();
2285 break;
2286 }
2287 age = Mathf.Max(0, age * 100 / (flag ? 75 : (blessed ? 400 : 200))) + (flag ? 1 : 0);
2288 tc.Say(flag ? "ageUp" : "ageDown", tc);
2289 tc.bio.SetAge(tc.Chara, age);
2290 break;
2291 }
2292 case EffectId.EternalYouth:
2293 {
2294 tc.PlaySound("mutation");
2295 tc.PlayEffect("mutation");
2296 if (tc.IsUnique)
2297 {
2298 tc.SayNothingHappans();
2299 break;
2300 }
2301 int age2 = tc.bio.GetAge(tc.Chara);
2302 if (flag)
2303 {
2304 if (tc.c_lockedAge != 0)
2305 {
2306 tc.Say("eternalYouth2", tc);
2307 tc.c_lockedAge = 0;
2308 tc.elements.Remove(1243);
2309 tc.bio.SetAge(tc.Chara, age2);
2310 }
2311 Redirect(EffectId.Youth, BlessedState.Cursed, default(ActRef));
2312 }
2313 else if (tc.c_lockedAge != 0)
2314 {
2315 tc.SayNothingHappans();
2316 }
2317 else
2318 {
2319 tc.PlaySound("dropRewardXmas");
2320 tc.Say("eternalYouth1", tc);
2321 tc.c_lockedAge = age2 + 1;
2322 tc.elements.SetBase(1243, 1);
2323 if (blessed)
2324 {
2325 Redirect(EffectId.Youth, BlessedState.Blessed, default(ActRef));
2326 }
2327 }
2328 break;
2329 }
2330 case EffectId.BuffStats:
2331 case EffectId.DebuffStats:
2332 case EffectId.LulwyTrick:
2333 Debug.Log(power + "/" + id.ToString() + "/" + actRef.n1);
2334 if (id == EffectId.LulwyTrick)
2335 {
2336 EClass.game.religions.Wind.Talk("ability");
2337 }
2338 if (flag)
2339 {
2340 if (id == EffectId.BuffStats)
2341 {
2342 id = EffectId.DebuffStats;
2343 }
2344 else if (id == EffectId.DebuffStats)
2345 {
2346 id = EffectId.BuffStats;
2347 }
2348 }
2349 if (power < 0 || id == EffectId.DebuffStats)
2350 {
2351 power = Mathf.Abs(power);
2352 if (blessed)
2353 {
2354 power /= 4;
2355 }
2356 flag = true;
2357 }
2358 TC.AddCondition(Condition.Create(power, delegate(ConBuffStats con)
2359 {
2360 con.SetRefVal(Element.GetId(actRef.n1), (int)id);
2361 }));
2362 break;
2363 case EffectId.Revive:
2364 {
2365 List<KeyValuePair<int, Chara>> list4 = 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();
2366 if (TC.IsPCFaction || TC.IsPCFactionMinion)
2367 {
2368 if (TC.IsPC && list4.Count == 0)
2369 {
2370 list4 = 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();
2371 }
2372 if (list4.Count > 0)
2373 {
2374 list4.RandomItem().Value.Chara.GetRevived();
2375 break;
2376 }
2377 }
2378 TC.SayNothingHappans();
2379 break;
2380 }
2381 case EffectId.DamageBody:
2382 case EffectId.DamageMind:
2383 case EffectId.DamageBodyGreat:
2384 case EffectId.DamageMindGreat:
2385 case EffectId.Weaken:
2386 {
2387 bool flag10 = id == EffectId.DamageBody || id == EffectId.DamageBodyGreat;
2388 bool mind = id == EffectId.DamageMind || id == EffectId.DamageMindGreat;
2389 int num9 = ((id == EffectId.DamageBody || id == EffectId.DamageMind) ? 1 : (4 + EClass.rnd(4)));
2390 if (id == EffectId.Weaken)
2391 {
2392 flag10 = EClass.rnd(2) == 0;
2393 mind = !flag10;
2394 num9 = 1;
2395 }
2396 else
2397 {
2398 TC.PlayEffect("debuff");
2399 TC.PlaySound("debuff");
2400 }
2401 TC.Say(flag10 ? "damageBody" : "damageMind", TC);
2402 for (int k = 0; k < num9; k++)
2403 {
2404 TC.DamageTempElements(power, flag10, mind, id != EffectId.Weaken);
2405 }
2406 if (TC.IsPC)
2407 {
2408 Tutorial.Play("healer");
2409 }
2410 break;
2411 }
2412 case EffectId.EnhanceBody:
2413 case EffectId.EnhanceMind:
2414 case EffectId.EnhanceBodyGreat:
2415 case EffectId.EnhanceMindGreat:
2416 {
2417 bool flag12 = id == EffectId.EnhanceBody || id == EffectId.EnhanceBodyGreat;
2418 bool mind2 = id == EffectId.EnhanceMind || id == EffectId.EnhanceMindGreat;
2419 if (id != EffectId.EnhanceBody && id != EffectId.EnhanceMind)
2420 {
2421 EClass.rnd(4);
2422 }
2423 TC.Say(flag12 ? "enhanceBody" : "enhanceMind", TC);
2424 TC.PlayEffect("buff");
2425 TC.PlaySound("buff");
2426 TC.EnhanceTempElements(power, flag12, mind2, onlyRenew: true);
2427 break;
2428 }
2429 case EffectId.RestoreBody:
2430 case EffectId.RestoreMind:
2431 {
2432 bool flag9 = id == EffectId.RestoreBody;
2433 if (flag)
2434 {
2435 Redirect(flag9 ? EffectId.DamageBodyGreat : EffectId.DamageMindGreat, BlessedState.Normal, default(ActRef));
2436 break;
2437 }
2438 TC.Say(flag9 ? "restoreBody" : "restoreMind", TC);
2439 TC.PlaySound("heal");
2440 TC.PlayEffect("heal");
2441 TC.CureHost(flag9 ? CureType.CureBody : CureType.CureMind, power, state);
2442 if (blessed)
2443 {
2444 Redirect(flag9 ? EffectId.EnhanceBodyGreat : EffectId.EnhanceMindGreat, BlessedState.Normal, default(ActRef));
2445 }
2446 break;
2447 }
2448 case EffectId.HealComplete:
2449 TC.HealHPHost(100000000L, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
2450 TC.CureHost(CureType.HealComplete, power, state);
2451 TC.Say("heal_heavy", TC);
2452 break;
2453 case EffectId.Heal:
2454 case EffectId.JureHeal:
2455 {
2456 long num10 = 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();
2457 if (actRef.refThing != null)
2458 {
2459 num10 = num10 * (100 + actRef.refThing.Evalue(750) * 10) / 100;
2460 }
2461 if (flag)
2462 {
2463 TC.DamageHP(num10 / 2, 919, power);
2464 break;
2465 }
2466 if (id == EffectId.JureHeal)
2467 {
2468 EClass.game.religions.Healing.Talk("ability");
2469 num10 += TC.MaxHP / 4;
2470 TC.AddCondition<ConInvulnerable>();
2471 TC.HealHP(num10, HealSource.Item);
2472 TC.Cure(CureType.Heal, power, state);
2473 }
2474 else
2475 {
2476 TC.HealHPHost(num10, (actRef.refThing == null) ? HealSource.Magic : HealSource.Item);
2477 TC.CureHost(CureType.Heal, power, state);
2478 }
2479 TC.Say((power >= 300) ? "heal_heavy" : "heal_light", TC);
2480 break;
2481 }
2482 case EffectId.RemedyJure:
2483 TC.HealHP(1000000L, HealSource.Magic);
2484 TC.CureHost(CureType.Jure, power, state);
2485 TC.Say("heal_jure", TC);
2486 break;
2487 case EffectId.Headpat:
2488 CC.PlaySound("headpat");
2489 CC.Cuddle(TC, headpat: true);
2490 break;
2491 case EffectId.RemoveHex:
2492 case EffectId.RemoveHexAll:
2493 {
2494 if (flag)
2495 {
2496 Redirect(EffectId.CurseEQ, BlessedState.Normal, default(ActRef));
2497 break;
2498 }
2499 IList<Condition> list5 = TC.conditions.Copy();
2500 list5.Shuffle();
2501 CC.PlaySound("remove_hex");
2502 CC.PlayEffect("remove_hex");
2503 foreach (Condition item8 in list5)
2504 {
2505 if (item8.Type != ConditionType.Debuff || item8.IsKilled)
2506 {
2507 continue;
2508 }
2509 if (EClass.rnd(power * (CC.IsPowerful ? 5 : 2)) > EClass.rnd(item8.power) || (id == EffectId.RemoveHex && EClass.rnd(2) == 0))
2510 {
2511 CC.Say("removeHex", TC, item8.Name.ToLower());
2512 item8.Kill();
2513 }
2514 else
2515 {
2516 if (id == EffectId.RemoveHexAll)
2517 {
2518 item8.power /= 2;
2519 }
2520 CC.Say("removeHex_fail", TC, item8.Name.ToLower());
2521 }
2522 if (id == EffectId.RemoveHex)
2523 {
2524 break;
2525 }
2526 }
2527 if (blessed)
2528 {
2529 TC.AddCondition<ConHolyVeil>(power / 2);
2530 }
2531 break;
2532 }
2533 case EffectId.CureCorruption:
2534 TC.PlaySound("heal");
2535 TC.PlayEffect("heal");
2536 if (flag)
2537 {
2538 TC.Say("cureCorruption_curse", TC);
2539 TC.mana.Mod(9999);
2540 TC.ModCorruption(power);
2541 }
2542 else
2543 {
2544 TC.Say("cureCorruption", TC);
2545 TC.ModCorruption(-power * (blessed ? 150 : 200) / 100);
2546 }
2547 break;
2548 case EffectId.Degenerate:
2549 {
2550 if (TC == null || TC.HasCondition<ConTransmuteHuman>())
2551 {
2552 CC.SayNothingHappans();
2553 break;
2554 }
2555 Chara chara = CharaGen.Create("baby");
2556 chara.c_altName = TC.c_altName ?? TC.source.GetName(TC);
2557 TC.AddCondition(Condition.Create(power, delegate(ConTransmuteHuman con)
2558 {
2559 con.chara = chara;
2560 }));
2561 break;
2562 }
2563 case EffectId.Drink:
2564 case EffectId.DrinkRamune:
2565 case EffectId.DrinkMilk:
2566 if (id == EffectId.DrinkRamune)
2567 {
2568 TC.Say("drinkRamune", TC);
2569 }
2570 if (TC.IsPC)
2571 {
2572 TC.Say("drinkGood", TC);
2573 }
2574 if (id == EffectId.DrinkMilk)
2575 {
2576 if (TC.IsPC)
2577 {
2578 TC.Say("drinkMilk", TC);
2579 }
2580 if (blessed)
2581 {
2582 TC.ModHeight(EClass.rnd(5) + 3);
2583 }
2584 else if (flag)
2585 {
2586 TC.ModHeight((EClass.rnd(5) + 3) * -1);
2587 }
2588 }
2589 break;
2590 case EffectId.DrinkWater:
2591 if (flag)
2592 {
2593 if (TC.IsPC)
2594 {
2595 TC.Say("drinkWater_dirty", TC);
2596 }
2598 }
2599 else if (TC.IsPC)
2600 {
2601 TC.Say("drinkWater_clear", TC);
2602 }
2603 break;
2604 case EffectId.DrinkWaterDirty:
2605 if (TC.IsPC)
2606 {
2607 TC.Say("drinkWater_dirty", TC);
2608 }
2609 if (TC.IsPCFaction)
2610 {
2611 TC.Vomit();
2612 }
2613 break;
2614 case EffectId.SaltWater:
2615 if (TC.HasElement(1211))
2616 {
2617 TC.Say("drinkSaltWater_snail", TC);
2618 int num19 = ((TC.hp > 10) ? (TC.hp - EClass.rnd(10)) : 10000);
2619 TC.DamageHP(num19, AttackSource.None, CC);
2620 }
2621 else if (TC.IsPC)
2622 {
2623 TC.Say("drinkSaltWater", TC);
2624 }
2625 break;
2626 case EffectId.Booze:
2627 TC.AddCondition<ConDrunk>(power);
2628 if (TC.HasElement(1215))
2629 {
2630 TC.Say("drunk_dwarf", TC);
2631 TC.AddCondition(Condition.Create(power + EClass.rnd(power), delegate(ConBuffStats con)
2632 {
2633 con.SetRefVal(Element.List_MainAttributes.RandomItem(), (int)id);
2634 }));
2635 }
2636 break;
2637 case EffectId.CatsEye:
2638 if (flag)
2639 {
2640 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2641 }
2642 else
2643 {
2644 TC.AddCondition<ConNightVision>(power);
2645 }
2646 break;
2647 case EffectId.Hero:
2648 if (flag)
2649 {
2650 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2651 }
2652 else
2653 {
2654 TC.AddCondition<ConHero>(power);
2655 }
2656 break;
2657 case EffectId.HolyVeil:
2658 if (flag)
2659 {
2660 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2661 }
2662 else
2663 {
2664 TC.AddCondition<ConHolyVeil>(power);
2665 }
2666 break;
2667 case EffectId.Levitate:
2668 if (flag)
2669 {
2670 Redirect(EffectId.Gravity, BlessedState.Normal, default(ActRef));
2671 }
2672 else
2673 {
2674 TC.AddCondition<ConLevitate>(power);
2675 }
2676 break;
2677 case EffectId.Gravity:
2678 if (blessed)
2679 {
2680 power /= 4;
2681 }
2682 TC.AddCondition<ConGravity>(power);
2683 if (flag)
2684 {
2685 Redirect(EffectId.BuffStats, BlessedState.Cursed, new ActRef
2686 {
2687 n1 = "STR"
2688 });
2689 }
2690 break;
2691 case EffectId.Fear:
2692 if (blessed)
2693 {
2694 power /= 4;
2695 }
2696 TC.AddCondition<ConFear>(power);
2697 if (flag)
2698 {
2699 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2700 }
2701 break;
2702 case EffectId.Faint:
2703 if (blessed)
2704 {
2705 power /= 4;
2706 }
2707 TC.AddCondition<ConFaint>(power);
2708 if (flag)
2709 {
2710 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2711 }
2712 break;
2713 case EffectId.Paralyze:
2714 if (blessed)
2715 {
2716 power /= 4;
2717 }
2718 TC.AddCondition<ConParalyze>(power);
2719 if (flag)
2720 {
2721 Redirect(EffectId.Blind, BlessedState.Normal, default(ActRef));
2722 }
2723 break;
2724 case EffectId.Poison:
2725 if (blessed)
2726 {
2727 power /= 4;
2728 }
2729 TC.AddCondition<ConPoison>(power);
2730 if (flag)
2731 {
2732 Redirect(EffectId.Paralyze, BlessedState.Normal, default(ActRef));
2733 }
2734 break;
2735 case EffectId.Sleep:
2736 case EffectId.BlueDrag:
2737 if (blessed)
2738 {
2739 power /= 4;
2740 }
2741 TC.AddCondition<ConSleep>(power);
2742 if (id == EffectId.BlueDrag)
2743 {
2744 TC.PlayEffect("buff");
2745 TC.PlaySound("offering");
2746 int num17 = TC.Evalue(1423);
2747 if (num17 > 0)
2748 {
2749 int num18 = 0;
2750 if (flag && num17 > 1)
2751 {
2752 num18 = -1;
2753 }
2754 else if (num17 < 15)
2755 {
2756 num18 = ((!blessed) ? 1 : 2);
2757 if (num18 + num17 > 15)
2758 {
2759 num18 = 1;
2760 }
2761 }
2762 if (num18 != 0)
2763 {
2764 TC.SetFeat(1423, num17 + num18, msg: true);
2765 TC.SetInt(134, TC.GetInt(134) + num18);
2766 }
2767 }
2768 }
2769 if (flag)
2770 {
2771 Redirect(EffectId.Disease, BlessedState.Normal, default(ActRef));
2772 }
2773 break;
2774 case EffectId.Confuse:
2775 if (blessed)
2776 {
2777 power /= 4;
2778 }
2779 TC.AddCondition<ConConfuse>(power);
2780 if (flag)
2781 {
2782 Redirect(EffectId.Fear, BlessedState.Normal, default(ActRef));
2783 }
2784 break;
2785 case EffectId.Blind:
2786 if (blessed)
2787 {
2788 power /= 4;
2789 }
2790 TC.AddCondition<ConBlind>(power);
2791 if (flag)
2792 {
2793 Redirect(EffectId.Confuse, BlessedState.Normal, default(ActRef));
2794 }
2795 break;
2796 case EffectId.Disease:
2797 if (blessed)
2798 {
2799 power /= 4;
2800 }
2801 TC.AddCondition<ConDisease>(power);
2802 if (flag)
2803 {
2804 Redirect(EffectId.Poison, BlessedState.Normal, default(ActRef));
2805 }
2806 break;
2807 case EffectId.Acid:
2808 {
2809 if (blessed)
2810 {
2811 power /= 4;
2812 }
2813 List<Thing> list10 = TC.things.List((Thing t) => (t.Num <= 1 && t.IsEquipmentOrRanged && !t.IsToolbelt && !t.IsLightsource && t.isEquipped) ? true : false);
2814 if (list10.Count != 0)
2815 {
2816 Thing thing6 = list10.RandomItem();
2817 TC.Say("acid_hit", TC);
2818 if (thing6.isAcidproof)
2819 {
2820 TC.Say("acid_nullify", thing6);
2821 }
2822 else if (thing6.encLV > -5)
2823 {
2824 TC.Say("acid_rust", TC, thing6);
2825 thing6.ModEncLv(-1);
2826 LayerInventory.SetDirty(thing6);
2827 }
2828 if (TC.IsPCParty)
2829 {
2830 Tutorial.Reserve("rust");
2831 }
2832 }
2833 break;
2834 }
2835 case EffectId.PuddleEffect:
2836 TC.DamageHP(power / 5, actRef.idEle, power);
2837 break;
2838 case EffectId.Acidproof:
2839 if (blessed)
2840 {
2841 power /= 4;
2842 }
2843 if (TC.IsPC)
2844 {
2845 TC.Say("pc_pain");
2846 }
2847 TC.Say("drink_acid", TC);
2848 TC.DamageHP(power / 5, 923, power);
2849 break;
2850 case EffectId.LevelDown:
2851 Msg.Say("nothingHappens");
2852 break;
2853 case EffectId.Love:
2854 case EffectId.LovePlus:
2855 if (flag)
2856 {
2857 if (CC == TC)
2858 {
2859 TC.Say("love_curse_self", TC);
2860 }
2861 else
2862 {
2863 TC.Say("love_curse", CC, TC);
2864 TC.ModAffinity(CC, -power / 4, show: false);
2865 }
2866 TC.ShowEmo(Emo.angry);
2867 }
2868 else
2869 {
2870 LoveMiracle(TC, CC, power, id, state);
2871 }
2872 break;
2873 case EffectId.HairGrowth:
2874 if (flag)
2875 {
2876 if (TC.HasElement(1532))
2877 {
2878 TC.SetMutation(1532);
2879 }
2880 else
2881 {
2882 TC.SetMutation(1533, 1);
2883 }
2884 TC.c_fur = 0;
2885 break;
2886 }
2887 if (blessed)
2888 {
2889 if (TC.HasElement(1533))
2890 {
2891 TC.SetMutation(1533);
2892 }
2893 else
2894 {
2895 TC.SetMutation(1532, 1);
2896 }
2897 }
2898 TC.PlayEffect("aura_heaven");
2899 TC.PlaySound("godbless");
2900 if (!TC.HaveFur())
2901 {
2902 TC.Say("grow_hair_fail", TC);
2903 break;
2904 }
2905 TC.Say("grow_hair", TC);
2906 TC.c_fur = 100;
2907 break;
2908 case EffectId.Gene:
2909 GeneMiracle(TC, CC, blessed ? DNA.Type.Superior : (flag ? DNA.Type.Brain : DNA.Type.Default));
2910 break;
2911 }
2912 int GetBlessingDifficulty(Condition c)
2913 {
2914 if (c.Type != ConditionType.Buff)
2915 {
2916 return 0;
2917 }
2918 if (c is ConTransmuteBat && TC.HasCooldown(8793))
2919 {
2920 return 0;
2921 }
2922 if (!CC.IsHostile(TC))
2923 {
2924 return 1;
2925 }
2926 if (c is ConBoost)
2927 {
2928 return 5;
2929 }
2930 if (c is ConRebirth)
2931 {
2932 return 10;
2933 }
2934 if (c is ConInvulnerable)
2935 {
2936 return 100;
2937 }
2938 return 2;
2939 }
2940 void Redirect(EffectId _id, BlessedState _state, ActRef _ref1)
2941 {
2942 Proc(_id, orgPower, _state, cc, tc, _ref1);
2943 }
2944 }
BossType
Definition: BossType.cs:2
@ currency
ConditionType
Definition: ConditionType.cs:2
CureType
Definition: CureType.cs:2
if(!match.Success)
Emo
Definition: Emo.cs:2
HealSource
Definition: HealSource.cs:2
IDTSource
Definition: IDTSource.cs:2
ID_Achievement
Rarity
Definition: Rarity.cs:2
ThrowMethod
Definition: ThrowMethod.cs:2
static void LoveMiracle(Chara tc, Chara c, int power, EffectId idEffect=EffectId.Love, BlessedState? state=null)
Definition: ActEffect.cs:2962
static void GeneMiracle(Chara tc, Chara c, DNA.Type type)
Definition: ActEffect.cs:2994
static Point GetTeleportPos(Point org, int radius=6)
Definition: ActEffect.cs:3013
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
Definition: ActThrow.cs:97
virtual string ID
Definition: ACT.cs:99
void SetElement(int id)
virtual string Name
void SetRefVal(int a, int b)
virtual ConditionType Type
Definition: BaseStats.cs:33
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:297
void RerollParents()
Definition: Biography.cs:402
int gender
Definition: Biography.cs:29
static void Set(CardBlueprint _bp=null)
GlobalCharaList globalCharas
Definition: CardManager.cs:46
int c_lockedAge
Definition: Card.cs:1393
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:6162
virtual bool isThing
Definition: Card.cs:2133
bool IsAmmo
Definition: Card.cs:2301
int idMaterial
Definition: Card.cs:137
Thing Split(int a)
Definition: Card.cs:3658
ElementContainerCard elements
Definition: Card.cs:42
bool IsUnique
Definition: Card.cs:2143
virtual void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Card.cs:5233
bool IsThrownWeapon
Definition: Card.cs:2299
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3210
bool isCopy
Definition: Card.cs:881
void SetInt(string id, int value=0)
Definition: Card.cs:2586
Biography bio
Definition: Card.cs:45
Rarity rarity
Definition: Card.cs:317
string Name
Definition: Card.cs:2191
bool IsRangedWeapon
Definition: Card.cs:2297
ICardParent parent
Definition: Card.cs:56
Thing SetNum(int a)
Definition: Card.cs:3669
int LER
Definition: Card.cs:2411
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:4069
bool isAcidproof
Definition: Card.cs:689
bool IsToolbelt
Definition: Card.cs:2223
void SetDirtyWeight()
Definition: Card.cs:2687
int uid
Definition: Card.cs:125
bool IsEquipmentOrRanged
Definition: Card.cs:2272
void TryStack(Thing t)
Definition: Card.cs:7451
int encLV
Definition: Card.cs:329
void ModEncLv(int a)
Definition: Card.cs:4020
void SetEncLv(int a)
Definition: Card.cs:4038
void Destroy()
Definition: Card.cs:5301
BossType c_bossType
Definition: Card.cs:1261
virtual Thing Thing
Definition: Card.cs:2110
Card GetRootCard()
Definition: Card.cs:3600
int Dist(Card c)
Definition: Card.cs:8172
int idSkin
Definition: Card.cs:365
bool IsLightsource
Definition: Card.cs:2225
virtual bool HasHost
Definition: Card.cs:2493
BlessedState blessedState
Definition: Card.cs:281
virtual bool IsGlobal
Definition: Card.cs:2353
bool isHatchling
Definition: Card.cs:941
Card Install()
Definition: Card.cs:3915
Card parentCard
Definition: Card.cs:106
DNA c_DNA
Definition: Card.cs:1933
int genLv
Definition: Card.cs:197
int Num
Definition: Card.cs:161
bool IsWeapon
Definition: Card.cs:2260
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2567
int LV
Definition: Card.cs:389
int c_uidAttune
Definition: Card.cs:1212
void UnqeuipIfTooHeavy(Thing t)
Definition: CharaBody.cs:177
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
new TraitChara trait
Definition: Chara.cs:509
CharaBody body
Definition: Chara.cs:94
Chara TryDuplicate(DuplicateCondition con=DuplicateCondition.Default, Point dest=null)
Definition: Chara.cs:1922
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:10178
void Cuddle(Chara c, bool headpat=false)
Definition: Chara.cs:6536
void InstantEat(Thing t=null, bool sound=true)
Definition: Chara.cs:7967
Faction faction
Definition: Chara.cs:431
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
Definition: Chara.cs:2789
Chara GetNearbyCatToSniff()
Definition: Chara.cs:8533
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1309
override bool IsPCParty
Definition: Chara.cs:633
Stats hunger
Definition: Chara.cs:1201
override bool HasHost
Definition: Chara.cs:706
override bool IsPCPartyMinion
Definition: Chara.cs:657
Chara Duplicate()
Definition: Chara.cs:1940
void MakeAlly(bool msg=true)
Definition: Chara.cs:2478
void TryDropBossLoot()
Definition: Chara.cs:5915
string NameTitled
Definition: Chara.cs:522
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:9174
Religion faith
Definition: Chara.cs:443
bool TryEquip(Thing t, bool useFav=false)
Definition: Chara.cs:8125
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4542
void Sniff(Chara c)
Definition: Chara.cs:8545
bool TryFuse(float chance=1f)
Definition: Chara.cs:1830
void MoveZone(string alias)
Definition: Chara.cs:3533
UD_String_Color elementColors
virtual bool IsKilled
Definition: Condition.cs:8
void Kill(bool silent=false)
Definition: Condition.cs:108
static Condition Create(string alias, int power=100, Action< Condition > onCreate=null)
Definition: Condition.cs:47
new GameConfig game
Definition: CoreConfig.cs:617
CameraConfig camera
Definition: CoreConfig.cs:625
CoreConfig config
Definition: Core.cs:70
Definition: DNA.cs:8
Type
Definition: DNA.cs:10
static Type GetType(string idMat)
Definition: DNA.cs:547
void Generate(Type _type, Chara model=null)
Definition: DNA.cs:301
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:536
static int curve(long _a, int start, int step, int rate=75)
Definition: EClass.cs:69
static ColorProfile Colors
Definition: EClass.cs:39
static Core core
Definition: EClass.cs:7
static void Wait(float a, Card c)
Definition: EClass.cs:112
static int rndHalf(int a)
Definition: EClass.cs:97
static UI ui
Definition: EClass.cs:17
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
Dictionary< int, Element > dict
bool Has(int ele)
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)
Element GetElement(string alias)
int vBase
Definition: ELEMENT.cs:261
bool HasTag(string tag)
Definition: ELEMENT.cs:482
static int[] List_MainAttributes
Definition: ELEMENT.cs:249
static int GetId(string alias)
Definition: ELEMENT.cs:1142
bool IsTrait
Definition: ELEMENT.cs:371
ReligionManager religions
Definition: Game.cs:159
SpatialManager spatials
Definition: Game.cs:153
CardManager cards
Definition: Game.cs:156
bool IsSurvival
Definition: Game.cs:276
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 CreateChangeRarity(Chara cc, Thing consume, EffectId idEffect, BlessedState state=BlessedState.Normal, int price=0, 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 power=100, 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)
LayerList EnableReroll()
Definition: LayerList.cs:259
Layer SetTitles(string langList, string idHeaderRow=null)
Definition: Layer.cs:688
int Width
Definition: MapBounds.cs:26
void Reveal(Point center, int power=100)
Definition: Map.cs:931
List< Chara > charas
Definition: Map.cs:81
void RevealAll(bool reveal=true)
Definition: Map.cs:918
MapBounds bounds
Definition: Map.cs:52
Definition: MathEx.cs:2
static bool IsSameSign(int a, int b)
Definition: MathEx.cs:12
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
int deepest
Definition: Player.cs:111
int deepestVoid
Definition: Player.cs:114
int escapeSilverBell
Definition: Player.cs:138
Stats stats
Definition: Player.cs:1083
int CountKeyItem(string alias)
Definition: Player.cs:2240
ReturnInfo returnInfo
Definition: Player.cs:933
Thing Installed
Definition: Point.cs:327
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1259
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:774
Definition: Rand.cs:4
static void SetBaseSeed(int a=-1)
Definition: Rand.cs:39
static void SetSeed(int a=-1)
Definition: Rand.cs:44
ReligionWind Wind
ReligionTrickery Trickery
ReligionElement Element
ReligionHealing Healing
virtual void Talk(string idTalk, Card c=null, Card agent=null)
Definition: Religion.cs:175
SourceMaterial materials
SourceStat stats
SourceElement elements
static Dictionary< string, TierList > tierMap
static Spatial Create(string id, Spatial parent, bool register, int x=-99999, int y=-99999, int icon=0)
Definition: SpatialGen.cs:16
Zone Find(string id)
List< Zone > ListReturnLocations()
int lv
Definition: Spatial.cs:142
string id
Definition: Spatial.cs:13
int visitCount
Definition: Spatial.cs:154
List< Spatial > children
Definition: Spatial.cs:37
virtual int max
Definition: Stats.cs:68
Definition: Steam.cs:10
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:51
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:2132
virtual bool UseRandomAlias
Definition: TraitChara.cs:132
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
Definition: Zone.cs:12
virtual string GetNewZoneID(int level)
Definition: Zone.cs:592
bool IsInstance
Definition: Zone.cs:493
Chara Boss
Definition: Zone.cs:88
void ModInfluence(int a)
Definition: Zone.cs:3796
virtual int MinLv
Definition: Zone.cs:285
ZoneInstance instance
Definition: Zone.cs:55
Card AddCard(Card t, Point point)
Definition: Zone.cs:2090
Definition: ActRef.cs:2
string n1
Definition: ActRef.cs:7
int idEle
Definition: ActRef.cs:19
bool isPerfume
Definition: ActRef.cs:13
string aliasEle
Definition: ActRef.cs:5

References EClass._map, EClass._zone, Zone.AddCard(), Chara.AddCondition(), Chara.AddCooldown(), armor, TraitWell.BadEffect(), ElementContainer.Base(), Card.bio, Card.blessedState, Chara.body, Zone.Boss, Map.bounds, Card.c_bossType, Card.c_DNA, Card.c_lockedAge, Card.c_uidAttune, SourceManager.calc, CoreConfig.camera, Chara.CanSeeLos(), Game.cards, Card.ChangeMaterial(), Card.Chara, Map.charas, Spatial.children, Color, EClass.Colors, Core.config, Point.Copy(), EClass.core, Player.CountKeyItem(), Dice.Create(), Condition.Create(), ThingGen.Create(), CharaGen.Create(), SpatialGen.Create(), LayerDragGrid.CreateChangeMaterial(), LayerDragGrid.CreateChangeRarity(), LayerDragGrid.CreateEnchant(), CharaGen.CreateFromFilter(), LayerDragGrid.CreateIdentify(), LayerDragGrid.CreateLighten(), LayerDragGrid.CreateReconstruction(), LayerDragGrid.CreateUncurse(), Chara.Cuddle(), currency, EClass.curve(), Card.DamageHP(), EClass.debug, Debug, Player.Stats.deepest, Player.Stats.deepestVoid, Card.Destroy(), ElementContainer.dict, Card.Die(), Card.Dist(), Chara.DoHostileAction(), Chara.Duplicate(), ReligionManager.Element, ColorProfile.elementColors, Card.elements, SourceManager.elements, CoreDebug.enable, LayerList.EnableReroll(), Card.encLV, Point.Equals(), Player.Stats.escapeSilverBell, Card.ExistsOnMap, Chara.faction, Chara.faith, faith, SpatialManager.Find(), CoreConfig.game, EClass.game, Biography.gender, DNA.Generate(), Card.genLv, Effect.Get(), Steam.GetAchievement(), Biography.GetAge(), ElementContainer.GetElement(), Chara.GetFirstStep(), Element.GetId(), Card.GetInt(), Chara.GetNearbyCatToSniff(), Point.GetNearestPoint(), Zone.GetNewZoneID(), ElementContainer.GetOrCreateElement(), Point.GetRandomPoint(), Card.GetRootCard(), DNA.GetType(), CardManager.globalCharas, ElementContainer.Has(), Card.HasElement(), Card.HasHost, Chara.HasHost, Element.HasTag(), ReligionManager.Healing, Chara.hunger, Card.id, Element.id, Spatial.id, Thing.Identify(), Card.idMaterial, Card.idSkin, if(), Dialog.InputName(), Card.Install(), Point.Installed, Zone.instance, Chara.InstantEat(), Card.isAcidproof, Card.IsAmmo, Card.isCopy, Card.IsEquipmentOrRanged, Thing.isEquipped, Card.IsGlobal, Card.isHatchling, Chara.IsHostile(), Zone.IsInstance, Condition.IsKilled, Card.IsLightsource, Card.IsPC, Chara.IsPC, Chara.IsPCFaction, Zone.IsPCFaction, Card.IsPCFactionOrMinion, Card.IsPCParty, Chara.IsPCParty, Chara.IsPCPartyMinion, BaseCondition.isPerfume, Card.IsPowerful, Card.IsRangedWeapon, MathEx.IsSameSign(), Game.IsSurvival, Card.isThing, Card.IsThrownWeapon, Card.IsToolbelt, Element.IsTrait, Card.IsUnique, Point.IsValid, Card.IsWeapon, item, Condition.Kill(), Card.LER, Element.List_MainAttributes, ElementContainer.ListElements(), SpatialManager.ListReturnLocations(), Card.LV, Spatial.lv, Chara.MakeAlly(), Chara.mana, Card.material, SourceManager.materials, Stats.max, Zone.MinLv, Stats.Mod(), ElementContainer.ModBase(), Card.ModEncLv(), Card.ModExp(), Zone.ModInfluence(), ElementContainer.ModTempPotential(), Chara.MoveZone(), BaseCondition.Name, Card.Name, Element.Name, Gender.Name(), Chara.NameTitled, Card.Num, Card.parent, Card.parentCard, EClass.pc, Chara.Pick(), Effect.Play(), Tutorial.Play(), Card.PlayEffect(), EClass.player, Point.PlaySound(), Card.PlaySound(), Card.pos, BaseCondition.power, Card.rarity, Game.religions, ElementContainer.Remove(), Biography.RerollParents(), Tutorial.Reserve(), Player.returnInfo, Map.Reveal(), Map.RevealAll(), EClass.rnd(), EClass.rndHalf(), Dice.Roll(), Msg.Say(), Card.Say(), Card.SayNothingHappans(), Msg.SayNothingHappen(), SourceMaterial.Tier.Select(), CardBlueprint.Set(), Biography.SetAge(), ElementContainer.SetBase(), Rand.SetBaseSeed(), Card.SetBlessedState(), LayerInventory.SetDirty(), Card.SetDirtyWeight(), BaseCondition.SetElement(), Card.SetEncLv(), Biography.SetGender(), Card.SetInt(), Card.SetNum(), BaseCondition.SetRefVal(), Rand.SetSeed(), Layer.SetTitles(), CoreConfig.CameraConfig.smoothFollow, Chara.Sniff(), Thing.source, Thing.sourceCard, EClass.sources, Game.spatials, Card.Split(), Player.stats, SourceManager.stats, Religion.Talk(), Card.Talk(), Card.Teleport(), Card.Thing, ActThrow.Throw(), SourceMaterial.tierMap, SourceMaterial.TierList.tiers, Card.trait, Chara.trait, ReligionManager.Trickery, Chara.TryDropBossLoot(), Chara.TryDuplicate(), Chara.TryEquip(), Chara.TryFuse(), Chara.TryNeckHunt(), Card.TryStack(), BaseStats.Type, EClass.ui, Card.uid, CharaBody.UnqeuipIfTooHeavy(), TraitChara.UseRandomAlias, ElementContainer.Value(), Stats.value, Element.vBase, Spatial.visitCount, EClass.Wait(), CoreConfig.GameConfig.waitOnDebuff, MapBounds.Width, ReligionManager.Wind, and Wish.

◆ 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 483 of file ActEffect.cs.

484 {
485 Chara CC = cc.Chara;
486 bool flag = state <= BlessedState.Cursed;
487 bool flag2 = isNeg || flag;
488 Element element = Element.Create(actRef.aliasEle.IsEmpty("eleFire"), power / 10);
489 Color matColor = EClass.Colors.elementColors.TryGetValue(element.source.alias);
491 {
492 angle += 5;
493 if (angle > 100)
494 {
495 angle = 30;
496 }
497 Debug.Log(angle);
498 }
499 switch (id)
500 {
501 case EffectId.Earthquake:
502 {
503 List<Point> list6 = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
504 if (list6.Count == 0)
505 {
506 list6.Add(CC.pos.Copy());
507 }
508 CC.Say("spell_earthquake", CC, element.Name.ToLower());
509 TryDelay(delegate
510 {
511 CC.PlaySound("spell_earthquake");
512 });
513 if (CC.IsInMutterDistance())
514 {
515 Shaker.ShakeCam("ball");
516 }
517 EClass.Wait(1f, CC);
518 DamageEle(CC, id, power, element, list6, actRef, "spell_earthquake");
519 break;
520 }
521 case EffectId.Meteor:
522 {
523 EffectMeteor.Create(cc.pos, 10, 10, delegate
524 {
525 });
526 List<Point> list = EClass._map.ListPointsInCircle(CC.pos, 10f);
527 if (list.Count == 0)
528 {
529 list.Add(CC.pos.Copy());
530 }
531 CC.Say("spell_ball", CC, element.Name.ToLower());
532 TryDelay(delegate
533 {
534 CC.PlaySound("spell_ball");
535 });
536 if (CC.IsInMutterDistance())
537 {
538 Shaker.ShakeCam("ball");
539 }
540 EClass.Wait(1f, CC);
541 DamageEle(CC, id, power, element, list, actRef, "spell_ball");
542 return;
543 }
544 case EffectId.Comet:
545 {
546 EffectMeteor.CreateComet(tp, delegate
547 {
548 }, matColor * 2f);
549 List<Point> list7 = EClass._map.ListPointsInCircle(tp, 7f);
550 if (list7.Count == 0)
551 {
552 list7.Add(tp.Copy());
553 }
554 CC.Say("spell_ball", CC, element.Name.ToLower());
555 TryDelay(delegate
556 {
557 CC.PlaySound("spell_ball");
558 });
559 if (CC.IsInMutterDistance())
560 {
561 Shaker.ShakeCam("ball");
562 }
563 EClass.Wait(1f, CC);
564 DamageEle(CC, id, power, element, list7, actRef, "spell_ball", tp);
565 return;
566 }
567 case EffectId.Hand:
568 case EffectId.DrainBlood:
569 case EffectId.DrainMana:
570 case EffectId.Sword:
571 {
572 List<Point> list2 = new List<Point>();
573 list2.Add(tp.Copy());
574 EClass.Wait(0.3f, CC);
575 TryDelay(delegate
576 {
577 CC.PlaySound("spell_hand");
578 });
579 if (!DamageEle(CC, id, power, element, list2, actRef, (id == EffectId.DrainBlood || id == EffectId.DrainMana) ? "" : ((id == EffectId.Sword) ? "spell_sword" : "spell_hand")))
580 {
581 CC.Say("spell_hand_miss", CC, element.Name.ToLower());
582 }
583 if (id == EffectId.Sword && CC.ExistsOnMap)
584 {
585 CC.ModExp(101, 50);
586 }
587 return;
588 }
589 case EffectId.Arrow:
590 case EffectId.MoonSpear:
591 case EffectId.MoonArrow:
592 {
593 List<Point> list4 = new List<Point>();
594 list4.Add(tp.Copy());
595 CC.Say((id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow", CC, element.Name.ToLower());
596 EClass.Wait(0.5f, CC);
597 TryDelay(delegate
598 {
599 CC.PlaySound((id == EffectId.MoonSpear) ? "spell_moonspear" : "spell_arrow");
600 });
601 DamageEle(CC, id, power, element, list4, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
602 return;
603 }
604 case EffectId.Summon:
605 {
606 string n = actRef.n1;
607 if (!(n == "special"))
608 {
609 if (n == "special2")
610 {
611 if (EClass._zone.HasField(10000))
612 {
613 foreach (Chara item in EClass._map.charas.Where((Chara _c) => _c.id == "cocoon").ToList())
614 {
615 if (!item.pos.IsSunLit)
616 {
617 item.pos.PlayEffect("darkwomb3");
618 item.HatchEgg();
619 }
620 }
621 }
622 CC.PlayEffect("darkwomb");
623 SE.Play("ab_womb");
624 }
625 else
626 {
627 CC.Say("summon_ally", CC);
628 }
629 }
630 else
631 {
632 SE.Play("warhorn");
633 Msg.Say("warhorn");
634 }
635 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
636 {
637 CC.Say("summon_ally_fail", CC);
638 return;
639 }
640 string id3 = actRef.n1;
641 int num3 = 1;
642 int num4 = -1;
643 int radius = 3;
644 bool flag3 = false;
645 bool flag4 = actRef.n1 == "special";
646 int num5 = -1;
647 string text = "";
648 switch (actRef.n1)
649 {
650 case "shadow":
651 case "tsunami":
652 num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ? EClass.rnd(2) : 0);
653 break;
654 case "monster":
655 case "fire":
656 case "animal":
657 num3 = 1 + EClass.rnd(2);
658 break;
659 case "special_force":
660 id3 = "army_palmia";
661 num3 = 4 + EClass.rnd(2);
662 num5 = EClass._zone.DangerLv;
663 break;
664 case "tentacle":
665 num4 = 20 + EClass.rnd(10);
666 radius = 1;
667 break;
668 case "special":
669 CC.SetInt(70, EClass.world.date.GetRaw() + 1440);
670 num3 = Mathf.Clamp(7 + CC.LV / 100, 4, 20);
671 num5 = CC.LV;
672 break;
673 case "special2":
674 num3 = 30;
675 num5 = CC.LV;
676 break;
677 }
678 num3 += CC.Evalue(1240);
679 for (int j = 0; j < num3; j++)
680 {
681 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon)
682 {
683 break;
684 }
685 Point point = null;
686 point = ((!(actRef.n1 == "special2")) ? tp.GetRandomPoint(radius)?.GetNearestPoint(allowBlock: false, allowChara: false) : EClass._map.GetRandomSurface(centered: false, walkable: true, allowWater: true)?.GetNearestPoint(allowBlock: false, allowChara: false));
687 if (point == null || !point.IsValid)
688 {
689 continue;
690 }
691 Chara chara = null;
693 if (num5 != -1)
694 {
695 CardBlueprint.current.lv = num5;
696 }
697 if (!text.IsEmpty())
698 {
699 CardBlueprint.current.idEle = text;
700 }
701 switch (actRef.n1)
702 {
703 case "special":
704 if (j == 0 && !CC.HasMinion("imolonac") && !CC.HasMinion("ygolonac"))
705 {
706 chara = CharaGen.Create((EClass.rnd(20) == 0) ? "imolonac" : "ygolonac");
707 break;
708 }
709 chara = CharaGen.Create("hound", CC.LV);
710 if (text.IsEmpty())
711 {
712 text = chara.MainElement.source.alias;
713 }
714 break;
715 case "special2":
716 chara = CharaGen.Create("cocoon");
717 break;
718 case "yeek":
719 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_yeek", (SourceChara.Row r) => r.race == "yeek"), power / 10);
720 break;
721 case "orc":
722 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_orc", (SourceChara.Row r) => r.race == "orc"), power / 10);
723 break;
724 case "dragon":
725 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_dragon", (SourceChara.Row r) => r.race == "dragon" || r.race == "drake" || r.race == "wyvern"), power / 5);
726 break;
727 case "undead":
728 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_undead", (SourceChara.Row r) => r.HasTag(CTAG.undead) || (EClass.sources.races.map.TryGetValue(r.race)?.IsUndead ?? false)), power / 5);
729 break;
730 case "pawn":
731 chara = CharaGen.CreateFromFilter("c_pawn", power / 10);
732 break;
733 case "machine":
734 chara = CharaGen.CreateFromFilter("c_machine", power / 10);
735 break;
736 case "monster":
737 chara = CharaGen.CreateFromFilter("c_dungeon", power / 10);
738 break;
739 case "animal":
740 chara = CharaGen.CreateFromFilter("c_animal", power / 15);
741 break;
742 case "fire":
743 chara = CharaGen.CreateFromElement("Fire", power / 10);
744 break;
745 case "fish":
746 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_fish", (SourceChara.Row r) => r.ContainsTag("water") || r.model.Chara.race.tag.Contains("water")), power / 10);
747 break;
748 case "octopus":
749 chara = CharaGen.CreateFromFilter(SpawnListChara.Get("summon_octopus", (SourceChara.Row r) => r.race == "octopus"), power / 10);
750 break;
751 default:
752 chara = CharaGen.Create(id3, power / 10);
753 break;
754 }
755 if (chara == null)
756 {
757 continue;
758 }
759 if (chara.rarity >= Rarity.Legendary && !flag4)
760 {
761 j--;
762 continue;
763 }
764 long num6 = -1L;
765 n = actRef.n1;
766 if (!(n == "shadow"))
767 {
768 if (n == "special2")
769 {
770 point.PlayEffect("darkwomb2");
771 }
772 else
773 {
774 int num7 = 1;
775 if (!CC.IsPC)
776 {
777 num7 = (CC.IsPCFactionOrMinion ? (CC.LV / 2) : (CC.LV / 3 * 2));
778 }
779 if (num5 == -1)
780 {
781 num6 = chara.LV * (100 + power / 10) / 100 + power / 30;
782 }
783 if (num6 < num7)
784 {
785 num6 = num7;
786 }
787 if (num6 > 99999999)
788 {
789 num6 = 99999999L;
790 }
791 }
792 }
793 else
794 {
795 num6 = power / 10 + 1;
796 }
797 if (chara.LV < num6)
798 {
799 chara.SetLv((int)num6);
800 }
801 chara.interest = 0;
802 if (chara.HaveFur())
803 {
804 chara.c_fur = -1;
805 }
806 n = actRef.n1;
807 if (!(n == "shadow"))
808 {
809 if (n == "special_force")
810 {
811 chara.homeZone = EClass._zone;
812 }
813 }
814 else
815 {
816 chara.hp = chara.MaxHP / 2;
817 }
818 EClass._zone.AddCard(chara, point);
819 if (flag)
820 {
821 Chara chara2 = chara;
822 Hostility hostility2 = (chara.c_originalHostility = Hostility.Enemy);
823 chara2.hostility = hostility2;
824 }
825 else if (!(chara.id == "cocoon") && (!(actRef.n1 == "monster") || actRef.refThing == null))
826 {
827 chara.MakeMinion(CC);
828 }
829 if (num4 != -1)
830 {
831 chara.SetSummon(num4);
832 }
833 flag3 = true;
834 }
835 if (!flag3)
836 {
837 CC.Say("summon_ally_fail", CC);
838 }
839 return;
840 }
841 case EffectId.Funnel:
842 case EffectId.Bit:
843 {
844 if (EClass._zone.CountMinions(CC) >= CC.MaxSummon || CC.c_uidMaster != 0)
845 {
846 CC.Say("summon_ally_fail", CC);
847 return;
848 }
849 CC.Say("spell_funnel", CC, element.Name.ToLower());
850 CC.PlaySound("spell_funnel");
851 Chara chara3 = CharaGen.Create((id == EffectId.Bit) ? "bit2" : "bit");
852 chara3.SetMainElement(element.source.alias, element.Value, elemental: true);
853 chara3.SetSummon(20 + power / 20 + EClass.rnd(10));
854 chara3.SetLv(Mathf.Abs(power) / 15);
855 chara3.interest = 0;
856 EClass._zone.AddCard(chara3, tp.GetNearestPoint(allowBlock: false, allowChara: false));
857 chara3.PlayEffect("teleport");
858 chara3.MakeMinion(CC);
859 return;
860 }
861 case EffectId.Breathe:
862 {
863 List<Point> list5 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
864 if (list5.Count == 0)
865 {
866 list5.Add(CC.pos.Copy());
867 }
868 CC.Say("spell_breathe", CC, element.Name.ToLower());
869 EClass.Wait(0.8f, CC);
870 TryDelay(delegate
871 {
872 CC.PlaySound("spell_breathe");
873 });
875 {
876 Shaker.ShakeCam("breathe");
877 }
878 DamageEle(CC, id, power, element, list5, actRef, "spell_breathe");
879 return;
880 }
881 case EffectId.Scream:
882 CC.PlaySound("scream");
883 CC.PlayEffect("scream");
884 {
885 foreach (Point item2 in EClass._map.ListPointsInCircle(cc.pos, 6f, mustBeWalkable: false, los: false))
886 {
887 foreach (Chara chara4 in item2.Charas)
888 {
889 if (chara4.ResistLv(957) <= 0)
890 {
891 chara4.AddCondition<ConParalyze>(power);
892 }
893 }
894 }
895 return;
896 }
897 case EffectId.Ball:
898 case EffectId.Explosive:
899 case EffectId.BallBubble:
900 case EffectId.Suicide:
901 case EffectId.Rocket:
902 case EffectId.Flare:
903 case EffectId.GravityGun:
904 {
905 float radius2 = ((id == EffectId.GravityGun) ? 4f : ((id == EffectId.Rocket) ? 2.8f : ((id == EffectId.Suicide) ? 3.5f : ((id == EffectId.Flare) ? 2.1f : ((float)((id == EffectId.BallBubble) ? 2 : 5))))));
906 if ((id == EffectId.Explosive || id == EffectId.Rocket) && actRef.refThing != null)
907 {
908 radius2 = 2 + actRef.refThing.Evalue(666);
909 }
910 if (id == EffectId.Suicide)
911 {
912 if (CC.MainElement != Element.Void)
913 {
914 element = CC.MainElement;
915 }
917 {
918 element = Element.Create(919, 10);
919 }
920 if (CC.HasTag(CTAG.kamikaze))
921 {
922 radius2 = 1.5f;
923 }
924 }
925 bool flag5 = id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket;
926 List<Point> list8 = EClass._map.ListPointsInCircle((id == EffectId.GravityGun || id == EffectId.Rocket || id == EffectId.Flare) ? tp : cc.pos, radius2, !flag5, !flag5);
927 if (list8.Count == 0)
928 {
929 list8.Add(cc.pos.Copy());
930 }
931 cc.Say((id == EffectId.Suicide) ? "abSuicide" : "spell_ball", cc, element.Name.ToLower());
932 EClass.Wait(0.8f, cc);
933 TryDelay(delegate
934 {
935 if (id == EffectId.Flare)
936 {
937 tp.PlayEffect("flare");
938 }
939 if (id != EffectId.GravityGun)
940 {
941 cc.PlaySound((id == EffectId.Flare) ? "spell_flare" : "spell_ball");
942 }
943 });
944 if (id != EffectId.GravityGun && cc.IsInMutterDistance() && !EClass.core.config.graphic.disableShake)
945 {
946 Shaker.ShakeCam("ball");
947 }
948 DamageEle(actRef.origin ?? cc, id, power, element, list8, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
949 if (id == EffectId.Suicide && CC.IsAliveInCurrentZone)
950 {
951 CC.Die();
952 }
953 return;
954 }
955 case EffectId.Bolt:
956 {
957 List<Point> list3 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
958 if (list3.Count == 0)
959 {
960 list3.Add(CC.pos.Copy());
961 }
962 CC.Say("spell_bolt", CC, element.Name.ToLower());
963 EClass.Wait(0.8f, CC);
964 TryDelay(delegate
965 {
966 CC.PlaySound("spell_bolt");
967 });
969 {
970 Shaker.ShakeCam("bolt");
971 }
972 DamageEle(CC, id, power, element, list3, actRef, "spell_bolt");
973 return;
974 }
975 case EffectId.Bubble:
976 case EffectId.Web:
977 case EffectId.MistOfDarkness:
978 case EffectId.Puddle:
979 {
980 if (LangGame.Has("ab" + id))
981 {
982 CC.Say("ab" + id, CC);
983 }
984 tp.PlaySound("vomit");
985 int num = 2 + EClass.rnd(3);
986 int id2 = ((id == EffectId.Puddle) ? 4 : ((id == EffectId.Bubble) ? 5 : ((id == EffectId.MistOfDarkness) ? 6 : 7)));
987 EffectId idEffect = ((id == EffectId.Bubble) ? EffectId.BallBubble : EffectId.PuddleEffect);
988 if (id == EffectId.Bubble && CC.id == "cancer")
989 {
990 idEffect = EffectId.Nothing;
991 num = 1 + EClass.rnd(3);
992 }
993 for (int i = 0; i < num; i++)
994 {
995 Point randomPoint = tp.GetRandomPoint(2);
996 if (randomPoint != null && !randomPoint.HasBlock && (id != EffectId.Puddle || !randomPoint.cell.IsTopWaterAndNoSnow))
997 {
998 int num2 = 4 + EClass.rnd(5);
999 if (id == EffectId.Web)
1000 {
1001 num2 *= 3;
1002 }
1003 EClass._map.SetEffect(randomPoint.x, randomPoint.z, new CellEffect
1004 {
1005 id = id2,
1006 amount = num2,
1007 idEffect = idEffect,
1008 idEle = element.id,
1009 power = power,
1010 isHostileAct = CC.IsPCParty,
1011 color = BaseTileMap.GetColorInt(ref matColor, 100)
1012 });
1013 }
1014 }
1015 return;
1016 }
1017 }
1018 List<Card> list9 = tp.ListCards().ToList();
1019 list9.Reverse();
1020 if (list9.Contains(CC))
1021 {
1022 list9.Remove(CC);
1023 list9.Insert(0, CC);
1024 }
1025 bool flag6 = true;
1026 foreach (Card item3 in list9)
1027 {
1028 if (tc == null || item3 == tc)
1029 {
1030 Proc(id, power, state, CC, item3, actRef);
1031 if (flag2 && item3.isChara && item3 != CC)
1032 {
1033 CC.DoHostileAction(item3);
1034 }
1035 if (actRef.refThing == null || !(actRef.refThing.trait is TraitRod))
1036 {
1037 return;
1038 }
1039 EffectId effectId = id;
1040 if ((uint)(effectId - 200) <= 4u)
1041 {
1042 return;
1043 }
1044 flag6 = false;
1045 }
1046 }
1047 if (flag6)
1048 {
1049 CC.SayNothingHappans();
1050 }
1051 }
Hostility
Definition: Hostility.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, Point center=null)
Definition: ActEffect.cs:36
static int GetColorInt(ref Color matColor, int p)
int c_uidMaster
Definition: Card.cs:1489
Card SetLv(int a)
Definition: Card.cs:3070
bool IsInMutterDistance(int d=10)
Definition: Card.cs:8216
bool HaveFur()
Definition: Card.cs:8382
int ResistLv(int res)
Definition: Card.cs:6346
bool IsTopWaterAndNoSnow
Definition: Cell.cs:720
static Chara CreateFromElement(string idEle, int lv=-1, string idFilter="chara")
Definition: CharaGen.cs:32
Element MainElement
Definition: Chara.cs:735
void SetMainElement(string id, int v=0, bool elemental=false)
Definition: Chara.cs:2256
bool HasMinion(string id)
Definition: Chara.cs:2585
int MaxSummon
Definition: Chara.cs:732
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
Definition: Chara.cs:2541
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Chara.cs:5588
void SetSummon(int duration)
Definition: Chara.cs:2597
GraphicSetting graphic
Definition: CoreConfig.cs:615
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
static World world
Definition: EClass.cs:41
Definition: EInput.cs:8
static bool isShiftDown
Definition: EInput.cs:272
static void Create(Point center, int radius, int count, Action< int, Point > onComplete)
Definition: EffectMeteor.cs:37
static void CreateComet(Point center, Action< int, Point > onComplete, Color color)
Definition: EffectMeteor.cs:68
static Element Void
Definition: ELEMENT.cs:247
static bool Has(string id)
Definition: LangGame.cs:99
Point GetRandomSurface(int x, int z, int radius, bool walkable=true, bool allowWater=false)
Definition: MapBounds.cs:182
List< Point > ListPointsInArc(Point center, Point to, int radius, float angle)
Definition: Map.cs:2368
void SetEffect(int x, int z, CellEffect effect=null)
Definition: Map.cs:1554
List< Point > ListPointsInLine(Point center, Point to, int radius, bool returnOnBlocked=true)
Definition: Map.cs:2385
List< Point > ListPointsInCircle(Point center, float radius, bool mustBeWalkable=true, bool los=true)
Definition: Map.cs:2324
int z
Definition: Point.cs:39
List< Chara > Charas
Definition: Point.cs:340
Effect PlayEffect(string id)
Definition: Point.cs:1254
Definition: Shaker.cs:5
static void ShakeCam(string id="default", float magnitude=1f)
Definition: Shaker.cs:25
SourceRace races
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:3915
bool HasField(int idEle)
Definition: Zone.cs:3069
override int DangerLv
Definition: Zone.cs:112
Chara origin
Definition: ActRef.cs:11

References EClass._map, EClass._zone, Zone.AddCard(), Chara.AddCondition(), angle, Card.c_uidMaster, Point.cell, Card.Chara, Map.charas, Point.Charas, Color, EClass.Colors, Core.config, Point.Copy(), EClass.core, Zone.CountMinions(), Element.Create(), EffectMeteor.Create(), CharaGen.Create(), EffectMeteor.CreateComet(), CharaGen.CreateFromElement(), CharaGen.CreateFromFilter(), DamageEle(), Zone.DangerLv, World.date, EClass.debug, Debug, Chara.Die(), CoreConfig.GraphicSetting.disableShake, ColorProfile.elementColors, CoreDebug.enable, Card.Evalue(), Card.ExistsOnMap, SpawnListChara.Get(), BaseTileMap.GetColorInt(), Point.GetNearestPoint(), Point.GetRandomPoint(), MapBounds.GetRandomSurface(), Date.GetRaw(), CoreConfig.graphic, LangGame.Has(), Point.HasBlock, Chara.HasCondition(), Zone.HasField(), Chara.HasMinion(), Card.HasTag(), Card.HaveFur(), Card.id, Element.id, if(), Chara.IsAliveInCurrentZone, Card.IsInMutterDistance(), Chara.IsPC, Chara.IsPCParty, EInput.isShiftDown, Cell.IsTopWaterAndNoSnow, Point.IsValid, item, Map.ListPointsInArc(), Map.ListPointsInCircle(), Map.ListPointsInLine(), Card.LV, Chara.MainElement, Chara.MakeMinion(), Chara.MaxSummon, Card.ModExp(), Element.Name, Effect.Play(), Point.PlayEffect(), Card.PlayEffect(), Point.PlaySound(), Card.PlaySound(), Card.pos, SourceManager.races, Card.rarity, Card.ResistLv(), EClass.rnd(), Msg.Say(), Card.Say(), CardBlueprint.Set(), Map.SetEffect(), Card.SetInt(), Card.SetLv(), Chara.SetMainElement(), Chara.SetSummon(), Shaker.ShakeCam(), Element.source, EClass.sources, 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(), ActMissileBarrage.Perform(), ActMissileBarrage2.Perform(), ActRanged.Perform(), ActZap.Perform(), AttackProcess.ProcAbility(), AI_UseCrafter.Run(), and StanceSongEnd.TickSong().

◆ 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 3029 of file ActEffect.cs.

3030 {
3032 string netMsg = GameLang.Parse("wish".langGame(), thirdPerson: true, name, s);
3033 List<WishItem> list = new List<WishItem>();
3034 long wishLv = 10 + power / 4;
3035 int wishValue = MathEx.ClampToInt(5000 + (long)power * 50L);
3036 if (state >= BlessedState.Blessed)
3037 {
3038 wishLv = wishLv * 150 / 100;
3039 }
3040 else if (state <= BlessedState.Cursed)
3041 {
3042 wishLv = wishLv * 150 / 100;
3043 wishValue = 1;
3044 }
3045 Debug.Log(power + "/" + wishValue);
3046 string _s = s.ToLower();
3047 foreach (CardRow r in EClass.sources.cards.rows)
3048 {
3049 if (r.HasTag(CTAG.godArtifact))
3050 {
3051 bool flag = false;
3052 foreach (Religion item in EClass.game.religions.list)
3053 {
3054 if (item.giftRank >= 2 && item.IsValidArtifact(r.id))
3055 {
3056 flag = true;
3057 }
3058 }
3059 if (!flag)
3060 {
3061 continue;
3062 }
3063 }
3064 else if (r.quality >= 4 || r.HasTag(CTAG.noWish))
3065 {
3066 switch (r.id)
3067 {
3068 case "medal":
3069 case "plat":
3070 case "money":
3071 case "money2":
3072 break;
3073 default:
3074 continue;
3075 }
3076 }
3077 if (r.isChara)
3078 {
3079 continue;
3080 }
3081 string text = r.GetName().ToLower();
3082 int score = Compare(_s, text);
3083 if (score == 0)
3084 {
3085 continue;
3086 }
3087 list.Add(new WishItem
3088 {
3089 score = score,
3090 n = text,
3091 action = delegate
3092 {
3093 Debug.Log(r.id);
3094 SourceCategory.Row category = EClass.sources.cards.map[r.id].Category;
3095 if (category.IsChildOf("weapon") || category.IsChildOf("armor") || category.IsChildOf("ranged"))
3096 {
3097 CardBlueprint.SetRarity(Rarity.Legendary);
3098 }
3099 Thing thing = ThingGen.Create(r.id, -1, MathEx.ClampToInt(wishLv));
3100 int num = 1;
3101 int price = thing.GetPrice(CurrencyType.Money, sell: false, PriceType.Tourism);
3102 bool flag2 = thing.trait is TraitDeed || thing.rarity >= Rarity.Artifact || thing.source._origin == "artifact_summon";
3103 switch (thing.id)
3104 {
3105 case "rod_wish":
3106 thing.c_charges = 0;
3107 break;
3108 case "money":
3109 num = EClass.rndHalf(wishValue * 3);
3110 break;
3111 case "plat":
3112 num = EClass.rndHalf(wishValue / 500 + 4);
3113 break;
3114 case "money2":
3115 num = EClass.rndHalf(wishValue / 500 + 4);
3116 break;
3117 case "medal":
3118 num = EClass.rndHalf(wishValue / 2000 + 4);
3119 break;
3120 default:
3121 if (!flag2 && thing.trait.CanStack)
3122 {
3123 int num2 = wishValue;
3124 num2 -= price;
3125 for (int i = 1; i < 1000; i++)
3126 {
3127 int num3 = price + i * 2 * (price + 500);
3128 if (num3 > 0 && num2 > num3)
3129 {
3130 num++;
3131 num2 -= num3;
3132 }
3133 }
3134 }
3135 break;
3136 }
3137 if (price > 2500 && num > 3)
3138 {
3139 num = 3 + (int)Mathf.Sqrt(num - 3);
3140 }
3141 if (price > 5000 && num > 2)
3142 {
3143 num = 2 + (int)Mathf.Sqrt(num - 2) / 2;
3144 }
3145 if (price > 10000 && num > 1)
3146 {
3147 num = 1 + Mathf.Min((int)Mathf.Sqrt(num - 1) / 3, 2);
3148 }
3149 if (num < 1)
3150 {
3151 num = 1;
3152 }
3153 thing.SetNum(num);
3154 Debug.Log(_s + "/" + num + "/" + score);
3155 if (thing.HasTag(CTAG.godArtifact))
3156 {
3157 EClass.game.religions.Reforge(thing.id);
3158 }
3159 else
3160 {
3161 EClass._zone.AddCard(thing, EClass.pc.pos);
3162 }
3163 netMsg = netMsg + Lang.space + GameLang.Parse("wishNet".langGame(), Msg.IsThirdPerson(thing), Msg.GetName(thing).ToTitleCase());
3164 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
3165 Msg.Say("dropReward");
3166 }
3167 });
3168 }
3169 if (list.Count == 0)
3170 {
3171 netMsg = netMsg + Lang.space + "wishFail".langGame();
3172 Net.SendChat(name, netMsg, ChatCategory.Wish, Lang.langCode);
3173 Msg.Say("wishFail");
3174 return false;
3175 }
3176 list.Sort((WishItem a, WishItem b) => b.score - a.score);
3177 foreach (WishItem item2 in list)
3178 {
3179 Debug.Log(item2.score + "/" + s + "/" + item2.n);
3180 }
3181 list[0].action();
3182 return true;
3183 }
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:3185
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
static string Parse(string text, bool thirdPerson, string val1, string val2=null, string val3=null, string val4=null)
Definition: GameLang.cs:177
static string langCode
Definition: Lang.cs:29
static int ClampToInt(long a)
Definition: MathEx.cs:25
static bool IsThirdPerson(Card c)
Definition: Msg.cs:296
static ThirstPersonInfo thirdPerson1
Definition: Msg.cs:6
static string GetName(Card c)
Definition: Msg.cs:279
Definition: Net.cs:12
static async UniTask< bool > SendChat(string name, string msg, ChatCategory cat, string idLang)
Definition: Net.cs:335
Thing Reforge(string id, Point pos=null, bool first=true)
List< Religion > list
bool HasTag(CTAG _tag)
Definition: RenderRow.cs:125
List< CardRow > rows
Definition: SourceCard.cs:7
Dictionary< string, CardRow > map
Definition: SourceCard.cs:9
SourceCard cards
override int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Thing.cs:829
void Set(string n)
virtual SourceElement.Row source
Definition: TraitScroll.cs:5

References EClass._zone, Zone.AddCard(), SourceManager.cards, MathEx.ClampToInt(), Compare(), ThingGen.Create(), Debug, EClass.game, Msg.GetName(), CardRow.GetName(), Thing.GetPrice(), RenderRow.HasTag(), CardRow.id, if(), CardRow.isChara, Msg.IsThirdPerson(), item, Lang.langCode, ReligionManager.list, SourceCard.map, GameLang.Parse(), EClass.pc, Card.pos, CardRow.quality, ReligionManager.Reforge(), Game.religions, SourceCard.rows, Msg.Say(), 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

◆ 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: