Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ZonePreEnterBout.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3
5{
6 public Chara target;
7
8 public override void Execute()
9 {
10 Debug.Log(EClass._zone);
11 Debug.Log(EClass._map);
13 Point point = EClass._map.GetCenterPos().GetNearestPoint(allowBlock: false, allowChara: false) ?? EClass._map.GetCenterPos();
14 Debug.Log(point?.ToString() + "/" + target);
15 if (target == null)
16 {
17 Debug.LogError("exception: Target is Null");
18 return;
19 }
21 {
22 state = ZoneTransition.EnterState.Exact,
23 x = point.x,
24 z = point.z
25 });
26 EClass._zone.SetBGM(102);
27 Debug.Log(target.pos);
28 List<Chara> list = new List<Chara> { target };
29 for (int i = 0; i < EClass.pc.party.members.Count - 1; i++)
30 {
31 Chara chara = CharaGen.CreateFromFilter("c_neutral", target.LV + 10);
32 Debug.Log(chara);
33 chara.ChangeRarity(Rarity.Superior);
34 if (chara.LV < target.LV)
35 {
36 chara.SetLv(target.LV);
37 }
38 EClass._zone.AddCard(chara, target.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? target.pos);
39 list.Add(chara);
40 }
41 Debug.Log(list.Count);
42 foreach (Chara item in list)
43 {
44 Hostility c_originalHostility = (item.hostility = Hostility.Enemy);
45 item.c_originalHostility = c_originalHostility;
46 item.SetEnemy(EClass.pc);
47 item.HealAll();
48 }
49 }
50}
Hostility
Definition: Hostility.cs:2
Rarity
Definition: Rarity.cs:2
Card SetLv(int a)
Definition: Card.cs:2735
Point pos
Definition: Card.cs:55
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:2878
int LV
Definition: Card.cs:370
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
Definition: Chara.cs:10
override void ChangeRarity(Rarity r)
Definition: Chara.cs:1214
void MoveZone(string alias)
Definition: Chara.cs:3010
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static Map _map
Definition: EClass.cs:18
static Chara pc
Definition: EClass.cs:14
Point GetCenterPos()
Definition: MapBounds.cs:52
Definition: Point.cs:9
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false)
Definition: Point.cs:595
override void Execute()
void SetBGM(List< int > ids, bool refresh=true)
Definition: Zone.cs:2706
Card AddCard(Card t, Point point)
Definition: Zone.cs:1893