100 {
101 Act.CC.combatCount = 10;
105 {
108 {
110 }
111 return true;
112 }
115 {
116 Act.TC = c;
117 })).GetValueOrDefault();
120 if (effect !=
null && effect.
id == 6 &&
EClass.
rnd(2) == 0)
121 {
124 return true;
125 }
126 bool hasHit = false;
127 bool usedWeapon = false;
128 bool usedTalisman = false;
129 int count = 0;
135 {
136 _Attack(slot);
137 }
138 if (!usedWeapon)
139 {
140 _Attack(null);
141 }
143 {
145 }
146 if (!hasHit)
147 {
149 }
151 {
153 }
154 return true;
156 {
157 Act.TC = orgTC;
158 Act.TP = orgPos;
160 int splash;
161 int chaser;
162 int flurry;
163 int frustration;
164 int feint;
165 int knockback;
166 int mod_talisman;
168 {
169 w = null;
170 if (slot != null)
171 {
173 {
174 return;
175 }
177 }
179 if (!
UseWeaponDist || dist <= 1 || dist <= num || intercepted)
180 {
181 int num2 = GetWeaponEnc(606, addSelfEnc: false);
182 int scatter = GetWeaponEnc(607, addSelfEnc: false);
183 splash = GetWeaponEnc(608, addSelfEnc: true);
184 chaser = GetWeaponEnc(620, addSelfEnc: true);
185 flurry = GetWeaponEnc(621, addSelfEnc: true);
186 frustration = GetWeaponEnc(624, addSelfEnc: true);
187 int num3 = GetWeaponEnc(622, addSelfEnc: true);
188 feint = GetWeaponEnc(623, addSelfEnc: true);
189 knockback = GetWeaponEnc(603, addSelfEnc: true);
190 mod_talisman = GetWeaponEnc(609, addSelfEnc: true);
192 if (w != null)
193 {
195 {
197 {
198 return;
199 }
200 num2 = (scatter = (splash = (num3 = 0)));
201 }
202 usedWeapon = true;
204 {
206 }
207 }
208 AttackWithFlurry(
Act.
TC,
Act.
TP, 1f, subAttack:
false);
209 if (num2 > 0)
210 {
212 {
213 if (!
item.Equals(orgPos))
214 {
217 {
218 AttackWithFlurry(firstChara,
item, 1f, subAttack:
false);
219 }
220 }
221 }
222 }
223 else if (scatter > 0)
224 {
226 {
228 {
229 Chara firstChara2 = p.FirstChara;
230 if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
231 {
232 AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
233 }
234 }
235 });
236 }
237 else if (num3 > 0)
238 {
239 List<Point> list = new List<Point>();
241 {
243 {
244 list.Add(p.Copy());
245 }
246 });
247 list.Shuffle();
248 int num4 = 0;
249 for (
int i = 0; i < 9 && num3 >
EClass.
rnd(10 + (
int)Mathf.Pow(3f, i + 2)); i++)
250 {
251 num4++;
252 }
253 foreach (
Point item2
in list)
254 {
256 {
258 {
259 break;
260 }
262 {
263 AttackWithFlurry(item3, item2, 1f, subAttack: true);
264 num4--;
265 }
266 }
267 }
268 }
269 count++;
270 }
271 }
273 {
274 Act.TC = _tc;
275 Act.TP = _tp;
277 int num5 = 1;
278 if (chaser > 0)
279 {
280 for (int j = 0; j < 10; j++)
281 {
282 if (chaser >
EClass.
rnd(4 + (
int)Mathf.Pow(4f, j + 2)))
283 {
284 num5++;
285 }
286 }
287 }
288 bool flag = false;
289 for (int k = 0; k < num5; k++)
290 {
292 {
293 break;
294 }
296 {
297 break;
298 }
299 if (k > 0)
300 {
302 }
304 if (!flag && frustration > 0 && 10f + 2f * Mathf.Sqrt(frustration) > (
float)
EClass.
rnd(100))
305 {
306 AttackProcess.Current.critFury = true;
308 AttackProcess.Current.critFury = false;
309 }
311 {
312 break;
313 }
314 }
315 Act.TC = _tc;
316 Act.TP = _tp;
318 {
319 bool flag2 = true;
322 {
323 flag2 = false;
325 {
329 {
330 usedTalisman = true;
331 flag2 = true;
332 if (mod_talisman > 0 && Mathf.Min(10f + Mathf.Sqrt(mod_talisman) * 5f, 90f) > (
float)
EClass.
rnd(100))
333 {
334 flag2 = false;
335 }
338 }
339 Act.powerMod = 100;
340 }
341 }
342 if (flag2)
343 {
346 {
347 w.ammoData.Num = w.
c_ammo;
348 }
350 {
351 w.c_ammo = 0;
352 w.ammoData = null;
353 }
355 }
356 }
357 Act.TC = _tc;
359 {
361 if (feint > 0 && 10f + 4f * Mathf.Sqrt(feint) > (float)
EClass.
rnd(100))
362 {
364 }
365 }
366 if (splash > 0)
367 {
369 {
371 {
372 return;
373 }
375 {
378 }
380 {
382 {
386 }
387 }
388 });
389 }
391 {
393 bool flag3 = Act.CC.id == "tsunami";
395 {
398 if (flag3)
399 {
402 }
403 }
404 else if (flag3)
405 {
410 {
414 }
416 }
417 }
418 }
419 void AttackWithFlurry(
Card _tc,
Point _tp,
float mtp,
bool subAttack)
420 {
421 int num7 = 1;
422 if (flurry > 0)
423 {
424 for (
int l = 0; l < 10 && flurry >
EClass.
rnd(25 + (
int)Mathf.Pow(5f, l + 2)); l++)
425 {
426 num7++;
427 }
428 }
429 for (int m = 0; m < num7; m++)
430 {
432 {
433 break;
434 }
436 {
437 break;
438 }
439 if (m > 0)
440 {
442 }
443 Attack(_tc, _tp, mtp, subAttack);
444 }
445 }
446 int GetWeaponEnc(int ele, bool addSelfEnc)
447 {
449 }
450 }
451 }
static Act Create(int id)
virtual bool UseWeaponDist
static bool TryReload(Thing weapon, Thing ammo=null)
void Prepare(Chara _CC, Thing _weapon, Card _TC=null, Point _TP=null, int _attackIndex=0, bool _isThrow=false)
bool Perform(int count, bool hasHit, float dmgMulti=1f, bool maxRoll=false, bool subAttack=false)
static AttackProcess Current
int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
static int GetWeaponEnc(Chara CC, Thing w, int ele, bool addSelfEnc=false)
void PlayAnime(AnimeID id, bool force)
virtual void SetFirst(bool first, Vector3 pos)
ElementContainerCard elements
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
bool HasElement(int ele, int req=1)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
virtual int ApplyProtection(int dmg, int mod=100)
virtual bool IsAliveInCurrentZone
void ModExp(string alias, int a)
void Say(string lang, string ref1=null, string ref2=null)
override bool IsAliveInCurrentZone
MoveResult TryMoveFrom(Point p)
Condition AddCondition(string id, int p=100, bool force=false)
bool RequestProtection(Chara attacker, Action< Chara > action)
bool HasCondition(string alias)
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
void DoHostileAction(Card _tg, bool immediate=false)
override void LookAt(Card c)
static void Wait(float a, Card c)
int GetSpellExp(Chara c, Element e, int costMod=100)
Element GetElement(string alias)
static void SetDirty(Thing t)
List< Point > ListPointsInLine(Point center, Point to, int radius)
List< Card > ListCards(bool includeMasked=false)
Point Set(int _x, int _z)
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
bool Equals(int _x, int _z)
Effect PlayEffect(string id)
void Animate(AnimeID id, bool animeBlock=false)
virtual bool CanBeAttacked