93 {
94 Act.CC.combatCount = 10;
98 {
101 {
103 }
104 return true;
105 }
108 {
109 Act.TC = c;
110 });
112 if (effect !=
null && effect.
id == 6 &&
EClass.
rnd(2) == 0)
113 {
116 return true;
117 }
118 bool hasHit = false;
119 bool usedWeapon = false;
120 bool usedTalisman = false;
121 int count = 0;
126 {
127 _Attack(slot);
128 }
129 if (!usedWeapon)
130 {
131 _Attack(null);
132 }
134 {
136 }
137 if (!hasHit)
138 {
140 }
142 {
144 }
145 return true;
147 {
148 Act.TC = orgTC;
149 Act.TP = orgPos;
151 int splash;
152 int chaser;
153 int flurry;
154 int frustration;
155 int feint;
157 {
158 w = null;
159 if (slot != null)
160 {
162 {
163 return;
164 }
166 }
168 if (dist <= 1 || dist <= num)
169 {
170 if (w != null)
171 {
172 usedWeapon = true;
174 {
176 }
177 }
178 int num2 = GetWeaponEnc(606, addSelfEnc: false);
179 int scatter = GetWeaponEnc(607, addSelfEnc: false);
180 splash = GetWeaponEnc(608, addSelfEnc: true);
181 chaser = GetWeaponEnc(620, addSelfEnc: true);
182 flurry = GetWeaponEnc(621, addSelfEnc: true);
183 frustration = GetWeaponEnc(624, addSelfEnc: true);
184 int num3 = GetWeaponEnc(622, addSelfEnc: true);
185 feint = GetWeaponEnc(623, addSelfEnc: true);
187 AttackWithFlurry(
Act.
TC,
Act.
TP, 1f, subAttack:
false);
188 if (num2 > 0)
189 {
191 {
192 if (!
item.Equals(orgPos))
193 {
196 {
197 AttackWithFlurry(firstChara,
item, 1f, subAttack:
false);
198 }
199 }
200 }
201 }
202 else if (scatter > 0)
203 {
205 {
207 {
208 Chara firstChara2 = p.FirstChara;
209 if (firstChara2 != null && firstChara2.IsHostile(Act.CC))
210 {
211 AttackWithFlurry(firstChara2, p, Mathf.Min(0.5f + 0.05f * Mathf.Sqrt(scatter), 1f + 0.01f * Mathf.Sqrt(scatter)), subAttack: true);
212 }
213 }
214 });
215 }
216 else if (num3 > 0)
217 {
218 List<Point> list = new List<Point>();
220 {
222 });
223 list.Shuffle();
224 int num4 = 0;
225 for (
int i = 0; i < 9 && num3 >
EClass.
rnd(10 + (
int)Mathf.Pow(3f, i + 2)); i++)
226 {
227 num4++;
228 }
229 foreach (
Point item2
in list)
230 {
232 {
234 {
235 break;
236 }
238 {
239 AttackWithFlurry(item3, item2, 1f, subAttack: true);
240 num4--;
241 }
242 }
243 }
244 }
245 count++;
246 }
247 }
249 {
250 Act.TC = _tc;
251 Act.TP = _tp;
253 int num5 = 1;
254 if (chaser > 0)
255 {
256 for (int j = 0; j < 10; j++)
257 {
258 if (chaser >
EClass.
rnd(4 + (
int)Mathf.Pow(4f, j + 2)))
259 {
260 num5++;
261 }
262 }
263 }
264 bool flag = false;
265 for (int k = 0; k < num5; k++)
266 {
267 if (k > 0)
268 {
270 }
272 if (!flag && frustration > 0 && 10f + 2f * Mathf.Sqrt(frustration) > (
float)
EClass.
rnd(100))
273 {
274 AttackProcess.Current.critFury = true;
276 AttackProcess.Current.critFury = false;
277 }
279 {
280 break;
281 }
282 }
284 {
285 bool flag2 = true;
288 {
289 flag2 = false;
291 {
295 {
296 usedTalisman = true;
297 flag2 = true;
300 }
301 Act.powerMod = 100;
302 }
303 }
304 if (flag2)
305 {
308 {
309 w.ammoData.Num = w.
c_ammo;
310 }
312 {
313 w.c_ammo = 0;
314 w.ammoData = null;
315 }
317 }
318 }
319 Act.TC = _tc;
321 {
323 if (feint > 0 && 10f + 4f * Mathf.Sqrt(feint) > (float)
EClass.
rnd(100))
324 {
326 }
327 }
328 if (splash > 0)
329 {
331 {
333 {
334 return;
335 }
337 {
340 }
342 {
344 {
348 }
349 }
350 });
351 }
352 }
353 void AttackWithFlurry(
Card _tc,
Point _tp,
float mtp,
bool subAttack)
354 {
355 int num6 = 1;
356 if (flurry > 0)
357 {
358 for (
int l = 0; l < 10 && flurry >
EClass.
rnd(25 + (
int)Mathf.Pow(5f, l + 2)); l++)
359 {
360 num6++;
361 }
362 }
363 for (int m = 0; m < num6; m++)
364 {
366 {
367 break;
368 }
370 {
371 break;
372 }
373 if (m > 0)
374 {
376 }
377 Attack(_tc, _tp, mtp, subAttack);
378 }
379 }
380 int GetWeaponEnc(int ele, bool addSelfEnc)
381 {
383 }
384 }
385 }
static Act Create(int id)
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)
void PlayAnime(AnimeID id, bool force)
ElementContainerCard elements
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
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
Condition AddCondition(string id, int p=100, bool force=false)
bool HasCondition(string alias)
void DoHostileAction(Card _tg, bool immediate=false)
void RequestProtection(Chara attacker, Action< Chara > action)
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)
ElementContainerFaction charaElements
static void SetDirty(Thing t)
List< Point > ListPointsInLine(Point center, Point to, int radius)
List< Card > ListCards(bool includeMasked=false)
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