11 public override int PerformDistance
17 return Act.CC.body.GetMeleeDistance();
25 public override bool ResetAxis
34 public bool HideHint(
Card c)
36 return EClass.pc.isBlind || c ==
null || (c.isChara && !
EClass.pc.CanSee(c));
40 public override string GetHintText(
string str =
"")
46 public override string GetTextSmall(
Card c)
48 if (!this.HideHint(c))
50 return base.GetTextSmall(c);
56 public override CursorInfo GetCursorIcon(
Card c)
58 if (!this.HideHint(c))
60 return CursorSystem.IconMelee;
66 public override bool ShowMouseHint(
Card c)
68 return !this.HideHint(c);
73 public override bool CanPressRepeat
82 public override bool CanPerform()
84 if (
Act.TC ==
null || !
Act.TC.IsAliveInCurrentZone)
88 if (
Act.CC.Dist(
Act.TC) >
this.PerformDistance)
92 if (this.PerformDistance == 1)
94 if (!
Act.CC.CanInteractTo(
Act.TC))
99 else if (!
Act.CC.CanSeeLos(
Act.TC, -1,
false))
103 return base.CanPerform();
107 public override bool Perform()
109 return this.Attack(1f,
false);
113 public bool Attack(
float dmgMulti = 1f,
bool maxRoll =
false)
115 ActMelee.<>c__DisplayClass13_0 CS$<>8__locals1;
116 CS$<>8__locals1.dmgMulti = dmgMulti;
117 CS$<>8__locals1.maxRoll = maxRoll;
118 Act.CC.combatCount = 10;
120 Act.CC.renderer.NextFrame();
123 Act.CC.Say(
"fear",
Act.CC,
Act.TC,
null,
null);
126 EInput.Consume(
true, 1);
130 Act.CC.renderer.PlayAnime(AnimeID.Attack,
Act.TC);
134 Chara chara = tc.Chara;
137 chara.RequestProtection(
Act.CC, delegate(
Chara c)
144 if (effect !=
null && effect.id == 6 &&
EClass.rnd(2) == 0)
146 Act.CC.PlaySound(
"miss", 1f,
true);
147 Act.CC.Say(
"abMistOfDarkness_miss",
Act.CC,
null,
null);
150 CS$<>8__locals1.hasHit =
false;
152 CS$<>8__locals1.usedTalisman =
false;
153 CS$<>8__locals1.count = 0;
154 int num =
Act.CC.Dist(
Act.TC);
157 if (
Act.TC ==
null || !
Act.TC.IsAliveInCurrentZone)
161 if (bodySlot.thing !=
null && bodySlot.elementId == 35 && bodySlot.thing.source.offense.Length >= 2)
163 ActMelee.<>c__DisplayClass13_1 CS$<>8__locals2;
164 CS$<>8__locals2.w = bodySlot.thing;
165 if (num <= 1 || num <= CS$<>8__locals2.w.Evalue(666) + 1)
168 if (CS$<>8__locals2.w.IsMeleeWithAmmo &&
Act.CC.IsPC && CS$<>8__locals2.w.c_ammo <= 0 && !
Act.CC.HasCondition<
ConReload>())
170 ActRanged.TryReload(CS$<>8__locals2.w,
null);
172 int num2 = (CS$<>8__locals2.w ==
null) ? 0 : CS$<>8__locals2.w.Evalue(606);
173 if (CS$<>8__locals2.w !=
null)
175 CS$<>8__locals2.w.Evalue(607);
177 List<Point> list =
EClass._map.ListPointsInLine(
Act.CC.pos,
Act.TC.pos, num2 / 10 + ((num2 % 10 >
EClass.rnd(10)) ? 1 : 0) + 1);
178 ActMelee.<Attack>g__Attack|13_1(
Act.TC,
Act.TP, ref CS$<>8__locals1, ref CS$<>8__locals2);
182 foreach (
Point point
in list)
184 if (!point.Equals(obj))
186 Chara firstChara = point.FirstChara;
187 if (firstChara !=
null && firstChara.IsHostile(
Act.CC))
189 ActMelee.<Attack>g__Attack|13_1(point.FirstChara, point, ref CS$<>8__locals1, ref CS$<>8__locals2);
194 int count = CS$<>8__locals1.count;
195 CS$<>8__locals1.count = count + 1;
202 if (
AttackProcess.Current.Perform(CS$<>8__locals1.count, CS$<>8__locals1.hasHit, CS$<>8__locals1.dmgMulti, CS$<>8__locals1.maxRoll))
204 CS$<>8__locals1.hasHit =
true;
206 Act.CC.DoHostileAction(
Act.TC,
false);
208 if (
EClass.core.config.game.waitOnMelee)
212 if (!CS$<>8__locals1.hasHit)
214 Act.CC.PlaySound(
"miss", 1f,
true);
225 internal static void <Attack>g__Attack|13_1(
Card _tc,
Point _tp, ref
ActMelee.<>c__DisplayClass13_0 A_2, ref
ActMelee.<>c__DisplayClass13_1 A_3)
230 bool flag =
AttackProcess.Current.Perform(A_2.count, A_2.hasHit, A_2.dmgMulti, A_2.maxRoll);
235 if (A_3.w.c_ammo > 0 && !
Act.CC.HasCondition<
ConReload>())
238 TraitAmmo traitAmmo = (A_3.w.ammoData ==
null) ?
null : (A_3.w.ammoData.trait as
TraitAmmo);
239 if (traitAmmo !=
null)
242 if (traitAmmoTalisman !=
null)
245 if (flag && !A_2.usedTalisman &&
Act.TC !=
null &&
Act.TC.IsAliveInCurrentZone)
247 Element element =
Act.CC.elements.GetElement(traitAmmoTalisman.owner.refVal);
248 Act act = ((element !=
null) ? element.act :
null) ??
ACT.Create(traitAmmoTalisman.owner.refVal);
249 Act.powerMod = traitAmmo.owner.encLV;
250 Debug.Log(
Act.powerMod);
253 A_2.usedTalisman =
true;
255 int spellExp =
Act.CC.elements.GetSpellExp(
Act.CC, act, 200);
256 Act.CC.ModExp(act.id, spellExp);
265 int c_ammo = w.c_ammo;
266 w.c_ammo = c_ammo - 1;
267 if (A_3.w.ammoData !=
null)
269 A_3.w.ammoData.Num = A_3.w.c_ammo;
271 if (A_3.w.c_ammo <= 0)
274 A_3.w.ammoData =
null;
279 Act.CC.DoHostileAction(
Act.TC,
false);