Elin Decompiled Documentation EA 23.153 Nightly
Loading...
Searching...
No Matches
ActMelee Class Reference
Inheritance diagram for ActMelee:
ActBaseAttack Act Element EClass ActMeleeBladeStorm ActMeleeSwarm ActRush

Public Member Functions

bool HideHint (Card c)
 
override string GetHintText (string str="")
 
override string GetTextSmall (Card c)
 
override CursorInfo GetCursorIcon (Card c)
 
override bool ShowMouseHint (Card c)
 
override bool CanPerform ()
 
override bool Perform ()
 
bool Attack (float dmgMulti=1f, bool maxRoll=false)
 
- Public Member Functions inherited from Act
virtual CursorInfo GetCursorIcon (Card c)
 
virtual MultiSprite GetStateIcon ()
 
override Sprite GetSprite ()
 
virtual bool ShowMouseHint (Card c)
 
virtual bool IsValidTC (Card c)
 
virtual string GetHintText (string str="")
 
virtual string GetText (string str="")
 
virtual string GetTextSmall (Card c)
 
bool IsTargetHostileParty ()
 
virtual Color GetActPlanColor ()
 
virtual bool Perform ()
 
virtual bool CanPerform ()
 
bool Perform (Chara _cc, Card _tc=null, Point _tp=null)
 
bool CanPerform (Chara _cc, Card _tc=null, Point _tp=null)
 
virtual bool IsToolValid ()
 
new void SetImage (Image image)
 
virtual void OnMarkMapHighlights ()
 
virtual bool ShouldMapHighlight (Point p)
 
- Public Member Functions inherited from Element
virtual SourceElement.Row GetSource ()
 
virtual int GetSourcePotential (int v)
 
virtual Sprite GetSprite ()
 
int GetMaterialSourceValue (Thing t, int v)
 
virtual int GetSourceValue (int v, int lv, SourceValueType type)
 
virtual Sprite GetIcon (string suffix="")
 
bool IsActive (Card c)
 
int SortVal (bool charaSheet=false)
 
virtual bool CanLink (ElementContainer owner)
 
bool HasTag (string tag)
 
void SetImage (Image i)
 
virtual string GetDetail ()
 
bool IsFactionElement (Chara c)
 
Element GetParent (Card c)
 
void WriteNote (UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
 
void WriteNoteWithRef (UINote n, ElementContainer owner, Action< UINote > onWriteNote, Element refEle)
 
void _WriteNote (UINote n, Chara c, Act act)
 
void AddHeaderAbility (UINote n)
 
void _WriteNote (UINote n, ElementContainer owner, Action< UINote > onWriteNote, bool isRef, bool addHeader=true)
 
void AddEncNote (UINote n, Card Card, ElementContainer.NoteMode mode=ElementContainer.NoteMode.Default, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
 
virtual void OnWriteNote (UINote n, ElementContainer owner)
 
virtual void OnChangeValue ()
 
void CheckLevelBonus (ElementContainer owner, UINote n=null)
 
int GetSortVal (UIList.SortMode m)
 
virtual Act.Cost GetCost (Chara c)
 
virtual int GetPower (Card c)
 
virtual void SetTextValue (UIText text)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Properties

virtual float BaseDmgMTP [get]
 
virtual bool UseWeaponDist [get]
 
override int PerformDistance [get]
 
override bool ResetAxis [get]
 
override bool CanPressRepeat [get]
 
- Properties inherited from Act
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual CursorInfo CursorIcon [get]
 
virtual string ID [get]
 
virtual bool IsAct [get]
 
virtual bool WillEndTurn [get]
 
virtual bool CloseLayers [get]
 
virtual int LeftHand [get]
 
virtual int RightHand [get]
 
virtual int ElementPowerMod [get]
 
virtual bool ShowMapHighlight [get]
 
virtual bool ShowMapHighlightBlock [get]
 
virtual bool PickHeldOnStart [get]
 
virtual bool DropHeldOnStart [get]
 
virtual bool CanPressRepeat [get]
 
virtual bool CanAutofire [get]
 
virtual bool ResetAxis [get]
 
virtual bool RequireTool [get]
 
virtual bool IsHostileAct [get]
 
virtual bool HideRightInfo [get]
 
virtual bool HaveLongPressAction [get]
 
virtual float Radius [get]
 
virtual int PerformDistance [get]
 
virtual int MaxRadius [get]
 
virtual TargetType TargetType [get]
 
virtual bool LocalAct [get]
 
virtual bool CanRapidFire [get]
 
virtual float RapidDelay [get]
 
virtual bool ShowAuto [get]
 
virtual bool IsCrime [get]
 
- Properties inherited from Element
SourceElement.Row source [get]
 
virtual int DisplayValue [get]
 
virtual int MinValue [get]
 
int Value [get]
 
int ValueWithoutLink [get]
 
virtual int MinPotential [get]
 
int Potential [get]
 
virtual bool CanGainExp [get]
 
bool IsFlag [get]
 
virtual string Name [get]
 
virtual string FullName [get]
 
virtual int ExpToNext [get]
 
virtual bool UseExpMod [get]
 
virtual int CostTrain [get]
 
virtual int CostLearn [get]
 
virtual bool ShowXP [get]
 
virtual bool ShowMsgOnValueChanged [get]
 
virtual bool ShowValue [get]
 
virtual bool ShowPotential [get]
 
virtual bool UsePotential [get]
 
virtual bool PotentialAsStock [get]
 
virtual bool ShowRelativeAttribute [get]
 
virtual bool ShowBonuses [get]
 
virtual string ShortName [get]
 
bool IsGlobalElement [get]
 
bool IsFactionWideElement [get]
 
bool IsPartyWideElement [get]
 
virtual bool ShowEncNumber [get]
 
bool IsTrait [get]
 
bool IsFoodTrait [get]
 
bool IsFoodTraitMain [get]
 
bool IsMainAttribute [get]
 
Act act [get]
 
- 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]
 

Additional Inherited Members

- Public Types inherited from Act
enum  CostType { None , MP , SP }
 
- Static Public Member Functions inherited from Act
static void SetReference (Chara _cc, Card _tc=null, Point _tp=null)
 
static void SetTool (Thing t)
 
- Static Public Member Functions inherited from Element
static string GetName (string alias)
 
static SourceElement.Row Get (int id)
 
static Dictionary< int, int > GetElementMap (int[] list)
 
static Dictionary< int, int > GetElementMap (int[] list, Dictionary< int, int > map)
 
static SourceElement.Row GetRandomElement (int lv=1)
 
static Element Create (int id, int v=0)
 
static Element Create (string id, int v=1)
 
static int GetId (string alias)
 
static int GetResistLv (int v)
 
static int GetResistDamage (int dmg, int v, int power=0)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Public Attributes inherited from Element
SourceElement.Row _source
 
int id
 
int vBase
 
int vExp
 
int vPotential
 
int vTempPotential
 
int vLink
 
int vSource
 
int vSourcePotential
 
ElementContainer owner
 
- Static Public Attributes inherited from Act
static Chara CC
 
static Card TC
 
static Point TP = new Point()
 
static Thing TOOL
 
static int powerMod = 100
 
static bool forcePt
 
static Act CurrentAct
 
- Static Public Attributes inherited from Element
const int Div = 5
 
static Element Void = new Element()
 
static int[] List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 }
 
static int[] List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 }
 
static int[] List_Body = new int[4] { 70, 72, 71, 77 }
 
static int[] List_Mind = new int[4] { 74, 75, 76, 73 }
 
static List< SourceElement.RowListElements = new List<SourceElement.Row>()
 
static List< SourceElement.RowListAttackElements = new List<SourceElement.Row>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 4 of file ActMelee.cs.

Member Function Documentation

◆ Attack()

bool ActMelee.Attack ( float  dmgMulti = 1f,
bool  maxRoll = false 
)
inline

Definition at line 99 of file ActMelee.cs.

100 {
101 Act.CC.combatCount = 10;
102 Act.CC.LookAt(Act.TC);
104 if (Act.CC.HasCondition<ConFear>())
105 {
106 Act.CC.Say("fear", Act.CC, Act.TC);
107 if (Act.CC.IsPC)
108 {
109 EInput.Consume(consumeAxis: true);
110 }
111 return true;
112 }
114 Act.TC?.Chara?.RequestProtection(Act.CC, delegate(Chara c)
115 {
116 Act.TC = c;
117 });
118 Act.TP.Set(Act.TC.pos);
119 CellEffect effect = Act.TP.cell.effect;
120 if (effect != null && effect.id == 6 && EClass.rnd(2) == 0)
121 {
122 Act.CC.PlaySound("miss");
123 Act.CC.Say("abMistOfDarkness_miss", Act.CC);
124 return true;
125 }
126 bool hasHit = false;
127 bool usedWeapon = false;
128 bool usedTalisman = false;
129 int count = 0;
130 int dist = Act.CC.Dist(Act.TC);
131 Point orgPos = Act.TC.pos.Copy();
132 Card orgTC = Act.TC;
134 foreach (BodySlot slot in Act.CC.body.slots)
135 {
136 _Attack(slot);
137 }
138 if (!usedWeapon)
139 {
140 _Attack(null);
141 }
143 {
144 EClass.Wait(0.25f, Act.CC);
145 }
146 if (!hasHit)
147 {
148 Act.CC.PlaySound("miss");
149 }
150 if (EClass.rnd(2) == 0)
151 {
152 Act.CC.RemoveCondition<ConInvisibility>();
153 }
154 return true;
155 void _Attack(BodySlot slot)
156 {
157 Act.TC = orgTC;
158 Act.TP = orgPos;
159 Thing w;
160 int splash;
161 int chaser;
162 int flurry;
163 int frustration;
164 int feint;
165 int knockback;
166 int mod_talisman;
167 if (Act.TC != null && Act.TC.IsAliveInCurrentZone)
168 {
169 w = null;
170 if (slot != null)
171 {
172 if (slot.thing == null || slot.elementId != 35 || slot.thing.source.offense.Length < 2)
173 {
174 return;
175 }
176 w = slot.thing;
177 }
178 int num = 1 + Mathf.Max(Act.CC.Evalue(666), (w != null) ? w.Evalue(666) : 0);
179 if (!UseWeaponDist || dist <= 1 || dist <= num)
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);
191 List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
192 if (w != null)
193 {
194 if (safety)
195 {
196 if (!w.HasElement(486))
197 {
198 return;
199 }
200 num2 = (scatter = (splash = (num3 = 0)));
201 }
202 usedWeapon = true;
203 if (w.IsMeleeWithAmmo && Act.CC.IsPC && w.c_ammo <= 0 && !Act.CC.HasCondition<ConReload>())
204 {
206 }
207 }
208 AttackWithFlurry(Act.TC, Act.TP, 1f, subAttack: false);
209 if (num2 > 0)
210 {
211 foreach (Point item in list2)
212 {
213 if (!item.Equals(orgPos))
214 {
215 Chara firstChara = item.FirstChara;
216 if (firstChara != null && firstChara.IsHostile(Act.CC))
217 {
218 AttackWithFlurry(firstChara, item, 1f, subAttack: false);
219 }
220 }
221 }
222 }
223 else if (scatter > 0)
224 {
225 Act.TP.ForeachNeighbor(delegate(Point p)
226 {
227 if (!p.Equals(orgPos))
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>();
240 Act.TP.ForeachNeighbor(delegate(Point p)
241 {
242 list.Add(p.Copy());
243 });
244 list.Shuffle();
245 int num4 = 0;
246 for (int i = 0; i < 9 && num3 > EClass.rnd(10 + (int)Mathf.Pow(3f, i + 2)); i++)
247 {
248 num4++;
249 }
250 foreach (Point item2 in list)
251 {
252 foreach (Card item3 in item2.ListCards().Copy())
253 {
254 if (num4 <= 0 || !Act.CC.IsAliveInCurrentZone)
255 {
256 break;
257 }
258 if (item3.trait.CanBeAttacked || (item3.isChara && item3.Chara.IsHostile(Act.CC)))
259 {
260 AttackWithFlurry(item3, item2, 1f, subAttack: true);
261 num4--;
262 }
263 }
264 }
265 }
266 count++;
267 }
268 }
269 void Attack(Card _tc, Point _tp, float mtp, bool subAttack)
270 {
271 Act.TC = _tc;
272 Act.TP = _tp;
274 int num5 = 1;
275 if (chaser > 0)
276 {
277 for (int j = 0; j < 10; j++)
278 {
279 if (chaser > EClass.rnd(4 + (int)Mathf.Pow(4f, j + 2)))
280 {
281 num5++;
282 }
283 }
284 }
285 bool flag = false;
286 for (int k = 0; k < num5; k++)
287 {
289 {
290 break;
291 }
293 {
294 break;
295 }
296 if (k > 0)
297 {
298 Act.CC.Say("attack_chaser");
299 }
300 flag = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp * BaseDmgMTP, maxRoll, subAttack);
301 if (!flag && frustration > 0 && 10f + 2f * Mathf.Sqrt(frustration) > (float)EClass.rnd(100))
302 {
303 AttackProcess.Current.critFury = true;
304 flag = AttackProcess.Current.Perform(count, hasHit, dmgMulti * mtp, maxRoll, subAttack);
305 AttackProcess.Current.critFury = false;
306 }
308 {
309 break;
310 }
311 }
312 Act.TC = _tc;
313 Act.TP = _tp;
314 if (w != null && w.c_ammo > 0 && !Act.CC.HasCondition<ConReload>() && !safety)
315 {
316 bool flag2 = true;
317 TraitAmmo traitAmmo = ((w.ammoData == null) ? null : (w.ammoData.trait as TraitAmmo));
318 if (traitAmmo != null && traitAmmo is TraitAmmoTalisman traitAmmoTalisman)
319 {
320 flag2 = false;
321 if (flag && !usedTalisman && Act.TC != null && Act.TC.IsAliveInCurrentZone)
322 {
323 Act act = Act.CC.elements.GetElement(traitAmmoTalisman.owner.refVal)?.act ?? ACT.Create(traitAmmoTalisman.owner.refVal);
324 Act.powerMod = traitAmmo.owner.encLV;
325 if (act.Perform(Act.CC, Act.TC, Act.TP))
326 {
327 usedTalisman = true;
328 flag2 = true;
329 if (mod_talisman > 0 && Mathf.Min(10f + Mathf.Sqrt(mod_talisman) * 5f, 90f) > (float)EClass.rnd(100))
330 {
331 flag2 = false;
332 }
333 int spellExp = Act.CC.elements.GetSpellExp(Act.CC, act, 200);
334 Act.CC.ModExp(act.id, spellExp);
335 }
336 Act.powerMod = 100;
337 }
338 }
339 if (flag2)
340 {
341 w.c_ammo--;
342 if (w.ammoData != null)
343 {
344 w.ammoData.Num = w.c_ammo;
345 }
346 if (w.c_ammo <= 0)
347 {
348 w.c_ammo = 0;
349 w.ammoData = null;
350 }
352 }
353 }
354 Act.TC = _tc;
356 {
358 if (feint > 0 && 10f + 4f * Mathf.Sqrt(feint) > (float)EClass.rnd(100))
359 {
360 Act.TC.Chara.AddCondition<ConSupress>(100 + 5 * (int)Mathf.Sqrt(feint));
361 }
362 }
363 if (splash > 0)
364 {
365 Act.TP.ForeachNeighbor(delegate(Point p)
366 {
367 if (p.Equals(Act.TP) || p.Equals(Act.CC.pos))
368 {
369 return;
370 }
371 if (!p.IsBlocked)
372 {
373 p.PlayEffect("smoke_shockwave");
374 p.Copy().Animate(AnimeID.QuakeMini, animeBlock: true);
375 }
376 foreach (Card item4 in p.ListCards())
377 {
378 if ((item4.trait.CanBeAttacked || (item4.isChara && item4.Chara.IsHostile(Act.CC))) && !item4.HasElement(430))
379 {
380 int rawDamage2 = AttackProcess.Current.GetRawDamage(0.1f + 0.05f * Mathf.Sqrt(splash), crit: false, maxRoll: false);
381 rawDamage2 = item4.ApplyProtection(rawDamage2);
382 item4.DamageHP(rawDamage2, 0, 100, AttackSource.Shockwave, Act.CC);
383 }
384 }
385 });
386 }
387 if (Act.TC.isChara && !Act.TC.HasCondition<ConGravity>() && Act.TC.ExistsOnMap && knockback > 0 && knockback * 2 + 15 > EClass.rnd(100) && !Act.TC.isRestrained)
388 {
390 bool flag3 = Act.CC.id == "tsunami";
391 if (num6 == Card.MoveResult.Success)
392 {
393 Act.TC.renderer.SetFirst(first: true);
394 Act.TC.PlaySound("wave_hit_small");
395 if (flag3)
396 {
397 Act.TC.Chara.AddCondition<ConParalyze>(20, force: true);
398 Act.TC.Chara.AddCondition<ConSuffocation>(100, force: true);
399 }
400 }
401 else if (flag3)
402 {
403 Act.TC.PlaySound("wave_hit");
404 Act.TC.pos.PlayEffect("wave_hit");
405 Act.TC.Chara.AddCondition<ConSuffocation>(200, force: true);
406 if (!Act.TC.HasElement(430))
407 {
408 int rawDamage = AttackProcess.Current.GetRawDamage(1f, crit: false, maxRoll: false);
409 rawDamage = Act.TC.ApplyProtection(rawDamage);
410 Act.TC.DamageHP(rawDamage, 0, 100, AttackSource.Shockwave, Act.CC);
411 }
412 Act.CC.Die();
413 }
414 }
415 }
416 void AttackWithFlurry(Card _tc, Point _tp, float mtp, bool subAttack)
417 {
418 int num7 = 1;
419 if (flurry > 0)
420 {
421 for (int l = 0; l < 10 && flurry > EClass.rnd(25 + (int)Mathf.Pow(5f, l + 2)); l++)
422 {
423 num7++;
424 }
425 }
426 for (int m = 0; m < num7; m++)
427 {
429 {
430 break;
431 }
432 if (!_tc.IsAliveInCurrentZone)
433 {
434 break;
435 }
436 if (m > 0)
437 {
438 Act.CC.Say("attack_flurry");
439 }
440 Attack(_tc, _tp, mtp, subAttack);
441 }
442 }
443 int GetWeaponEnc(int ele, bool addSelfEnc)
444 {
445 return AttackProcess.GetWeaponEnc(Act.CC, w, ele, addSelfEnc);
446 }
447 }
448 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
Definition: ACT.cs:6
static Act Create(int id)
Definition: ACT.cs:36
virtual float BaseDmgMTP
Definition: ActMelee.cs:6
virtual bool UseWeaponDist
Definition: ActMelee.cs:8
static bool TryReload(Thing weapon, Thing ammo=null)
Definition: ActRanged.cs:343
Definition: ACT.cs:62
virtual bool Perform()
Definition: ACT.cs:266
static Card TC
Definition: ACT.cs:79
static Point TP
Definition: ACT.cs:81
static Chara CC
Definition: ACT.cs:77
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
Definition: AttackProcess.cs:8
int GetRawDamage(float dmgMulti, bool crit, bool maxRoll)
static int GetWeaponEnc(Chara CC, Thing w, int ele, bool addSelfEnc=false)
int elementId
Definition: BodySlot.cs:6
Thing thing
Definition: BodySlot.cs:8
void PlayAnime(AnimeID id, bool force)
virtual void NextFrame()
virtual void SetFirst(bool first, Vector3 pos)
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2208
virtual Chara Chara
Definition: Card.cs:2006
ElementContainerCard elements
Definition: Card.cs:37
int c_ammo
Definition: Card.cs:1421
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:3908
bool HasElement(int ele, int req=1)
Definition: Card.cs:5566
bool isRestrained
Definition: Card.cs:550
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5776
Thing ammoData
Definition: Card.cs:1745
Point pos
Definition: Card.cs:55
virtual int ApplyProtection(int dmg, int mod=100)
Definition: Card.cs:3883
Trait trait
Definition: Card.cs:49
int encLV
Definition: Card.cs:310
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2063
MoveResult
Definition: Card.cs:13
virtual bool isChara
Definition: Card.cs:2019
int Evalue(int ele)
Definition: Card.cs:2507
int Dist(Card c)
Definition: Card.cs:7235
void ModExp(string alias, int a)
Definition: Card.cs:2584
CardRenderer renderer
Definition: Card.cs:57
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6423
CellEffect effect
Definition: Cell.cs:94
List< BodySlot > slots
Definition: CharaBody.cs:8
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:557
CharaBody body
Definition: Chara.cs:94
MoveResult TryMoveFrom(Point p)
Definition: Chara.cs:2454
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:8559
override bool IsPC
Definition: Chara.cs:608
bool HasCondition(string alias)
Definition: Chara.cs:8716
override void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None)
Definition: Chara.cs:4897
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:5857
void RequestProtection(Chara attacker, Action< Chara > action)
Definition: Chara.cs:7771
bool IsHostile()
Definition: Chara.cs:6034
override void LookAt(Card c)
Definition: Chara.cs:3303
new GameConfig game
Definition: CoreConfig.cs:600
CoreConfig config
Definition: Core.cs:70
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:58
static Core core
Definition: EClass.cs:6
static void Wait(float a, Card c)
Definition: EClass.cs:97
static Map _map
Definition: EClass.cs:18
Definition: EInput.cs:8
static void Consume(int _skipFrame)
Definition: EInput.cs:656
int GetSpellExp(Chara c, Element e, int costMod=100)
Element GetElement(string alias)
int id
Definition: ELEMENT.cs:248
Act act
Definition: ELEMENT.cs:392
static void SetDirty(Thing t)
List< Point > ListPointsInLine(Point center, Point to, int radius)
Definition: Map.cs:2304
Definition: Point.cs:9
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1031
Point Copy()
Definition: Point.cs:479
Point Set(int _x, int _z)
Definition: Point.cs:491
void ForeachNeighbor(Action< Point > action, bool diagonal=true)
Definition: Point.cs:1377
bool IsBlocked
Definition: Point.cs:351
bool Equals(int _x, int _z)
Definition: Point.cs:940
Effect PlayEffect(string id)
Definition: Point.cs:1228
Cell cell
Definition: Point.cs:51
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1282
Definition: Thing.cs:8
SourceThing.Row source
Definition: Thing.cs:11
bool IsMeleeWithAmmo
Definition: Thing.cs:20
virtual bool CanBeAttacked
Definition: Trait.cs:163
Card owner
Definition: Trait.cs:26

References EClass._map, Element.act, Chara.AddCondition(), Point.Animate(), Card.ApplyProtection(), Attack, BaseDmgMTP, Chara.body, Card.c_ammo, Trait.CanBeAttacked, Act.CC, Point.cell, Card.Chara, Core.config, EInput.Consume(), Point.Copy(), EClass.core, ACT.Create(), AttackProcess.Current, Card.DamageHP(), Chara.Die(), Card.Dist(), Chara.DoHostileAction(), Cell.effect, BodySlot.elementId, Card.elements, Card.encLV, Point.Equals(), Card.Evalue(), Point.ForeachNeighbor(), CoreConfig.game, ElementContainer.GetElement(), AttackProcess.GetRawDamage(), ElementContainer.GetSpellExp(), AttackProcess.GetWeaponEnc(), Chara.HasCondition(), Card.HasElement(), CellEffect.id, Element.id, Card.IsAliveInCurrentZone, Chara.IsAliveInCurrentZone, Point.IsBlocked, Card.isChara, Chara.IsHostile(), Thing.IsMeleeWithAmmo, Chara.IsPC, Card.IsPCFactionOrMinion, Card.isRestrained, item, Point.ListCards(), Map.ListPointsInLine(), Chara.LookAt(), Card.ModExp(), CardRenderer.NextFrame(), Trait.owner, Act.Perform(), AttackProcess.Perform(), CardRenderer.PlayAnime(), Point.PlayEffect(), Card.PlaySound(), Card.pos, AttackProcess.Prepare(), Card.renderer, Chara.RequestProtection(), EClass.rnd(), safety, Card.Say(), Point.Set(), LayerInventory.SetDirty(), CardRenderer.SetFirst(), CharaBody.slots, Thing.source, Act.TC, BodySlot.thing, Act.TP, Card.trait, Chara.TryMoveFrom(), ActRanged.TryReload(), UseWeaponDist, EClass.Wait(), and CoreConfig.GameConfig.waitOnMelee.

◆ CanPerform()

override bool ActMelee.CanPerform ( )
inlinevirtual

Reimplemented from Act.

Reimplemented in ActRush.

Definition at line 67 of file ActMelee.cs.

68 {
69 if (Act.TC == null || !Act.TC.IsAliveInCurrentZone)
70 {
71 return false;
72 }
74 {
75 return false;
76 }
77 if (PerformDistance == 1)
78 {
80 {
81 return false;
82 }
83 }
84 else if (!Act.CC.CanSeeLos(Act.TC))
85 {
86 return false;
87 }
88 return base.CanPerform();
89 }
override int PerformDistance
Definition: ActMelee.cs:11
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1102
bool CanInteractTo(Card c)
Definition: Chara.cs:2293

References Chara.CanInteractTo(), Chara.CanSeeLos(), Act.CC, Card.Dist(), Card.IsAliveInCurrentZone, PerformDistance, Act.TC, and UseWeaponDist.

Referenced by ActMultihit.CanPerform().

◆ GetCursorIcon()

override CursorInfo ActMelee.GetCursorIcon ( Card  c)
inlinevirtual

Reimplemented from Act.

Definition at line 53 of file ActMelee.cs.

54 {
55 if (!HideHint(c))
56 {
58 }
59 return null;
60 }
bool HideHint(Card c)
Definition: ActMelee.cs:26
static CursorInfo IconMelee

References HideHint(), and CursorSystem.IconMelee.

◆ GetHintText()

override string ActMelee.GetHintText ( string  str = "")
inlinevirtual

Reimplemented from Act.

Definition at line 39 of file ActMelee.cs.

40 {
41 return "";
42 }

◆ GetTextSmall()

override string ActMelee.GetTextSmall ( Card  c)
inlinevirtual

Reimplemented from Act.

Definition at line 44 of file ActMelee.cs.

45 {
46 if (!HideHint(c))
47 {
48 return base.GetTextSmall(c);
49 }
50 return null;
51 }

References HideHint().

◆ HideHint()

bool ActMelee.HideHint ( Card  c)
inline

Definition at line 26 of file ActMelee.cs.

27 {
28 if (!EClass.pc.isBlind && c != null)
29 {
30 if (c.isChara)
31 {
32 return !EClass.pc.CanSee(c);
33 }
34 return false;
35 }
36 return true;
37 }
bool CanSee(Card c)
Definition: Chara.cs:1070
bool isBlind
Definition: Chara.cs:130
static Chara pc
Definition: EClass.cs:14

References Chara.CanSee(), Chara.isBlind, Card.isChara, and EClass.pc.

Referenced by GetCursorIcon(), GetTextSmall(), and ShowMouseHint().

◆ Perform()

override bool ActMelee.Perform ( )
inlinevirtual

Reimplemented from Act.

Reimplemented in ActRush.

Definition at line 91 of file ActMelee.cs.

92 {
93 Act.CurrentAct = this;
94 bool result = Attack();
95 Act.CurrentAct = null;
96 return result;
97 }

References Attack.

Referenced by AI_PracticeDummy.CreateProgress(), TraitTrainingDummy.IdleUse(), ActMultihit.Perform(), and ActSwarm.Perform().

◆ ShowMouseHint()

override bool ActMelee.ShowMouseHint ( Card  c)
inlinevirtual

Reimplemented from Act.

Definition at line 62 of file ActMelee.cs.

63 {
64 return !HideHint(c);
65 }

References HideHint().

Property Documentation

◆ BaseDmgMTP

virtual float ActMelee.BaseDmgMTP
get

Definition at line 6 of file ActMelee.cs.

Referenced by Attack().

◆ CanPressRepeat

override bool ActMelee.CanPressRepeat
get

Definition at line 24 of file ActMelee.cs.

◆ PerformDistance

override int ActMelee.PerformDistance
get

Definition at line 10 of file ActMelee.cs.

11 {
12 get
13 {
14 if (Act.CC != null)
15 {
16 return Act.CC.body.GetMeleeDistance();
17 }
18 return 1;
19 }
20 }
int GetMeleeDistance()
Definition: CharaBody.cs:420

Referenced by CanPerform().

◆ ResetAxis

override bool ActMelee.ResetAxis
get

Definition at line 22 of file ActMelee.cs.

◆ UseWeaponDist

virtual bool ActMelee.UseWeaponDist
get

Definition at line 8 of file ActMelee.cs.

Referenced by Attack(), and CanPerform().


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