Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
TaskDig Class Reference
Inheritance diagram for TaskDig:
BaseTaskHarvest TaskDesignation TaskPoint ISyncScreen Task IInspect AIAct Act Element EClass

Public Types

enum  Mode { Default , Ramp , RemoveFloor }
 
- Public Types inherited from BaseTaskHarvest
enum  HarvestType {
  Floor , Block , Obj , Thing ,
  Disassemble
}
 
- Public Types inherited from AIAct
enum  Status { Running , Fail , Success }
 
- Public Types inherited from Act
enum  CostType { None , MP , SP }
 
- Public Types inherited from IInspect
enum  NoteMode { Default , Recipe , Product , Info }
 

Public Member Functions

override string GetTextSmall (Card c)
 
override void OnCreateProgress (Progress_Custom p)
 
override HitResult GetHitResult ()
 
Thing GetTreasureMap ()
 
override void OnProgressComplete ()
 
- Public Member Functions inherited from BaseTaskHarvest
virtual string GetBaseText (string str)
 
override string GetTextSmall (Card c)
 
override string GetText (string str="")
 
void SetTarget (Chara c, Thing _tool=null)
 
int GetToolEfficiency (Thing t, SourceMaterial.Row mat)
 
override bool CanProgress ()
 
int[] GetToolEfficiency (SourceMaterial.Row mat)
 
string GetTextDifficulty ()
 
- Public Member Functions inherited from TaskDesignation
virtual string GetTextOrbit ()
 
bool PointHasOtherDesignation ()
 
virtual void DrawMarker (int x, int z, RenderParam p)
 
virtual void Draw (int x, int z, RenderParam p)
 
virtual void OnEnterScreen ()
 
virtual void OnLeaveScreen ()
 
virtual void TrySpawnOrbit ()
 
void DespawnOrbit ()
 
- Public Member Functions inherited from TaskPoint
override bool CanManualCancel ()
 
override bool CanPerform ()
 
override bool _CanPerformTask (Chara chara, int radius)
 
override IEnumerable< StatusRun ()
 
void OnInspect ()
 
void WriteNote (UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
 
- Public Member Functions inherited from Task
virtual HitResult GetHitResult ()
 
override void OnSuccess ()
 
void TryLater (int min=30)
 
Status Destroy ()
 
virtual void OnDestroy ()
 
override Status Cancel ()
 
override void OnReset ()
 
override bool CanProgress ()
 
bool CanPerformTask (Chara chara, int radius)
 
virtual bool _CanPerformTask (Chara chara, int radius)
 
virtual void OnAdd ()
 
void ToggleSuspend ()
 
- Public Member Functions inherited from AIAct
override string ToString ()
 
override MultiSprite GetStateIcon ()
 
virtual bool ShouldAllyAttack (Chara tg)
 
virtual Point GetDestination ()
 
AIProgress GetProgress ()
 
string GetCurrentActionText ()
 
override bool IsToolValid ()
 
virtual void OnStart ()
 
void SetOwner (Chara c)
 
virtual void OnSetOwner ()
 
void SetChild (AIAct seq, Func< Status > _onChildFail=null)
 
void Start ()
 
override bool Perform ()
 
Status Restart ()
 
Status Success (Action action=null)
 
virtual void OnSuccess ()
 
bool TryCancel (Card c)
 
virtual Status Cancel ()
 
virtual void OnCancel ()
 
virtual void OnCancelOrSuccess ()
 
virtual bool CanManualCancel ()
 
Status KeepRunning ()
 
void Reset ()
 
virtual void OnReset ()
 
Status Tick ()
 
virtual IEnumerable< StatusRun ()
 
Status TickChild ()
 
Status Do (AIAct _seq, Func< Status > _onChildFail=null)
 
Status DoGotoInteraction (Point pos, Func< Status > _onChildFail=null)
 
Status DoGoto (Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
 
Status DoGoto (Card card, Func< Status > _onChildFail=null)
 
Status DoGoto (Card card, int dist, Func< Status > _onChildFail=null)
 
Status DoGotoSpot (Card card, Func< Status > _onChildFail=null)
 
Status DoGoto< T > (Func< Status > _onChildFail=null)
 
Status DoGotoSpot< T > (Func< Status > _onChildFail=null, bool ignoreAccessType=false)
 
Status DoGrab (Card card, int num=-1, bool pickHeld=false, Func< Status > _onChildFail=null)
 
Status DoGrab< T > ()
 
Status DoProgress ()
 
Status DoIdle (int repeat=3)
 
Status DoWait (int count=1)
 
virtual AIProgress CreateProgress ()
 
virtual void OnCreateProgress (Progress_Custom p)
 
virtual bool CanProgress ()
 
virtual void OnBeforeProgress ()
 
virtual void OnProgress ()
 
virtual void OnProgressComplete ()
 
void SimulateZone (int days)
 
virtual void OnSimulateZone (int days)
 
virtual void OnSimulatePosition ()
 
- 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)
 
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)
 
void WriteNote (UINote n, Action< UINote > onWriteNote=null, NoteMode mode=NoteMode.Default, Recipe recipe=null)
 
void OnInspect ()
 
void OnEnterScreen ()
 
void OnLeaveScreen ()
 

Public Attributes

Mode mode
 
int ramp = 3
 
- Public Attributes inherited from BaseTaskHarvest
Thing target
 
Element reqElement
 
int matHardness
 
int idEle
 
int reqLv
 
int toolLv
 
int maxProgress
 
int efficiency
 
int difficulty
 
int effectFrame = 1
 
bool isToolRequired
 
Thing tool
 
- Public Attributes inherited from TaskDesignation
long sync
 
bool isSynced
 
TCOrbitTask orbit
 
- Public Attributes inherited from TaskPoint
Point pos = new Point()
 
bool isRepeated
 
- Public Attributes inherited from Task
TaskList taskList
 
bool isDestroyed
 
int nextTry
 
bool suspended
 
- Public Attributes inherited from AIAct
new Chara owner
 
Status status
 
IEnumerator< StatusEnumerator
 
AIAct child
 
AIAct parent
 
byte restartCount
 
Func< StatusonChildFail
 
Func< bool > isFail
 
- 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
 

Properties

override HarvestType harvestType [get]
 
override int RightHand [get]
 
override bool IsHostileAct [get]
 
override bool LocalAct [get]
 
override int destDist [get]
 
override bool destIgnoreConnection [get]
 
override CursorInfo CursorIcon [get]
 
- Properties inherited from BaseTaskHarvest
bool IsTooHard [get]
 
bool IsHarvest [get]
 
virtual bool CanReapSeed [get]
 
virtual HarvestType harvestType [get]
 
virtual bool IsGrowth [get]
 
override bool CanPressRepeat [get]
 
override int LeftHand [get]
 
override CursorInfo CursorIcon [get]
 
- Properties inherited from TaskDesignation
override bool HasProgress [get]
 
virtual int idMarker [get]
 
virtual int W [get]
 
virtual int H [get]
 
virtual bool ShowOrbit [get]
 
virtual bool Working [get]
 
override bool ShowAuto [get]
 
override CursorInfo CursorIcon [get]
 
TaskManager.Designations Designations [get]
 
long Sync [get]
 
- Properties inherited from TaskPoint
override bool HasProgress [get]
 
virtual int destDist [get]
 
virtual bool destIgnoreConnection [get]
 
virtual bool isBlock [get]
 
virtual bool Loop [get]
 
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 
- Properties inherited from Task
override TargetType TargetType [get]
 
- Properties inherited from AIAct
virtual bool IsRunning [get]
 
bool IsChildRunning [get]
 
bool IsMoveAI [get]
 
virtual int MaxRestart [get]
 
virtual new string Name [get]
 
virtual MultiSprite stateIcon [get]
 
virtual Sprite actionIcon [get]
 
virtual bool IsNoGoal [get]
 
virtual bool IsAutoTurn [get]
 
virtual bool IsIdle [get]
 
virtual bool CancelOnAggro [get]
 
virtual bool PushChara [get]
 
virtual int MaxProgress [get]
 
virtual bool ShowProgress [get]
 
virtual bool UseTurbo [get]
 
virtual int CurrentProgress [get]
 
virtual bool ShowCursor [get]
 
virtual bool CancelWhenDamaged [get]
 
virtual bool CancelWhenMoved [get]
 
virtual bool InformCancel [get]
 
virtual Thing RenderThing [get]
 
AIAct Current [get]
 
override bool IsAct [get]
 
override bool ShowPotential [get]
 
override bool UsePotential [get]
 
override bool ShowRelativeAttribute [get]
 
virtual bool HasProgress [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]
 
- Properties inherited from IInspect
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 
- Properties inherited from ISyncScreen
long Sync [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseTaskHarvest
static Thing GetBestTool (Chara c, Point p)
 
static int GetReqEle (string _raw)
 
- 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 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)
 
- 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 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 1 of file TaskDig.cs.

Member Enumeration Documentation

◆ Mode

Enumerator
Default 
Ramp 
RemoveFloor 

Definition at line 3 of file TaskDig.cs.

Member Function Documentation

◆ GetHitResult()

override HitResult TaskDig.GetHitResult ( )
inlinevirtual

Reimplemented from Task.

Definition at line 83 of file TaskDig.cs.

84 {
85 if (EClass._zone.IsRegion && GetTreasureMap() != null)
86 {
87 return HitResult.Valid;
88 }
89 if (mode == Mode.RemoveFloor)
90 {
92 {
93 if (pos.matFloor.category == "soil")
94 {
95 return HitResult.Valid;
96 }
97 return HitResult.Default;
98 }
99 if (EClass._zone.IsSkyLevel && (pos.Installed != null || pos.Charas.Count >= 2 || (pos.HasChara && pos.FirstChara != EClass.pc)))
100 {
101 return HitResult.Invalid;
102 }
104 {
105 return HitResult.Invalid;
106 }
107 if (!pos.HasBridge && pos.sourceFloor.id == 40)
108 {
109 return HitResult.Invalid;
110 }
111 return HitResult.Valid;
112 }
113 if (pos.HasBridge)
114 {
115 if (pos.HasObj)
116 {
117 return HitResult.Warning;
118 }
119 return HitResult.Valid;
120 }
121 return HitResult.Default;
122 }
HitResult
Definition: HitResult.cs:2
Definition: EClass.cs:5
static Zone _zone
Definition: EClass.cs:20
static Chara pc
Definition: EClass.cs:14
Thing Installed
Definition: Point.cs:303
SourceMaterial.Row matFloor
Definition: Point.cs:57
bool HasBridge
Definition: Point.cs:209
bool IsWater
Definition: Point.cs:129
List< Chara > Charas
Definition: Point.cs:316
SourceFloor.Row sourceFloor
Definition: Point.cs:65
bool HasObj
Definition: Point.cs:137
Chara FirstChara
Definition: Point.cs:264
bool HasBlock
Definition: Point.cs:141
bool IsInBounds
Definition: Point.cs:104
bool HasChara
Definition: Point.cs:226
virtual bool IsRegion
Definition: Spatial.cs:501
Thing GetTreasureMap()
Definition: TaskDig.cs:124
Mode
Definition: TaskDig.cs:4
Mode mode
Definition: TaskDig.cs:10
Point pos
Definition: TaskPoint.cs:11
virtual bool IsSkyLevel
Definition: Zone.cs:262
bool IsPCFaction
Definition: Zone.cs:464

References EClass._zone, Point.Charas, Point.FirstChara, GetTreasureMap(), Point.HasBlock, Point.HasBridge, Point.HasChara, Point.HasObj, Point.Installed, Point.IsInBounds, Zone.IsPCFaction, Spatial.IsRegion, Zone.IsSkyLevel, Point.IsWater, Point.matFloor, mode, EClass.pc, TaskPoint.pos, and Point.sourceFloor.

◆ GetTextSmall()

override string TaskDig.GetTextSmall ( Card  c)
inlinevirtual

Reimplemented from BaseTaskHarvest.

Definition at line 42 of file TaskDig.cs.

43 {
44 if (!pos.cell.HasBridge)
45 {
46 return pos.cell.GetFloorName();
47 }
48 return pos.cell.GetBridgeName();
49 }
bool HasBridge
Definition: Cell.cs:671
string GetBridgeName()
Definition: Cell.cs:1595
string GetFloorName()
Definition: Cell.cs:1590
Cell cell
Definition: Point.cs:51

References Point.cell, Cell.GetBridgeName(), Cell.GetFloorName(), Cell.HasBridge, and TaskPoint.pos.

◆ GetTreasureMap()

Thing TaskDig.GetTreasureMap ( )
inline

Definition at line 124 of file TaskDig.cs.

125 {
127 {
128 TraitScrollMapTreasure traitScrollMapTreasure = item.trait as TraitScrollMapTreasure;
129 if (pos.Equals(traitScrollMapTreasure.GetDest(fix: true)))
130 {
131 return item;
132 }
133 }
134 return null;
135 }
Trait trait
Definition: Card.cs:49
ThingContainer things
Definition: Card.cs:34
bool Equals(int _x, int _z)
Definition: Point.cs:924
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
Definition: Thing.cs:8
Point GetDest(bool fix=false)

References Point.Equals(), TraitScrollMapTreasure.GetDest(), item, ThingContainer.List(), EClass.pc, TaskPoint.pos, Card.things, and Card.trait.

Referenced by GetHitResult(), and OnProgressComplete().

◆ OnCreateProgress()

override void TaskDig.OnCreateProgress ( Progress_Custom  p)
inlinevirtual

Reimplemented from AIAct.

Definition at line 51 of file TaskDig.cs.

52 {
54 p.textHint = pos.cell.GetFloorName();
55 p.maxProgress = maxProgress;
56 p.onProgressBegin = delegate
57 {
58 if (base.IsTooHard)
59 {
61 p.Cancel();
62 }
63 else if (owner.Tool != null)
64 {
65 owner.Say("dig_start", owner, owner.Tool);
66 }
67 };
68 p.onProgress = delegate
69 {
70 SourceMaterial.Row row = (pos.cell.HasBridge ? pos.cell.matBridge : pos.cell.matFloor);
72 row.PlayHitEffect(pos);
73 row.AddBlood(pos);
74 owner.elements.ModExp(230, 5);
76 if (EClass._zone.IsCrime(owner, this))
77 {
79 }
80 };
81 }
virtual Status Cancel()
Definition: AIAct.cs:291
new Chara owner
Definition: AIAct.cs:14
void SetTarget(Chara c, Thing _tool=null)
virtual void NextFrame()
ElementContainerCard elements
Definition: Card.cs:37
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5404
Thing Tool
Definition: Card.cs:2270
Point pos
Definition: Card.cs:55
CardRenderer renderer
Definition: Card.cs:57
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
SourceMaterial.Row matFloor
Definition: Cell.cs:1032
void ModExp(int ele, int a, bool chain=false)
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Definition: Point.cs:845
string GetSoundImpact(RenderRow c=null)
void AddBlood(Point p, int a=1)
void PlayHitEffect(Point p, int emit=2)
bool IsCrime(Chara c, Act act)
Definition: Zone.cs:3259

References EClass._zone, SourceMaterial.Row.AddBlood(), AIAct.Cancel(), Point.cell, Card.elements, Cell.GetBridgeName(), Cell.GetFloorName(), SourceMaterial.Row.GetSoundImpact(), Cell.HasBridge, Zone.IsCrime(), Cell.matFloor, BaseTaskHarvest.maxProgress, ElementContainer.ModExp(), CardRenderer.NextFrame(), AIAct.owner, SourceMaterial.Row.PlayHitEffect(), Card.PlaySound(), Card.pos, TaskPoint.pos, Card.renderer, Card.Say(), BaseTaskHarvest.SetTarget(), Card.Tool, and Point.TryWitnessCrime().

◆ OnProgressComplete()

override void TaskDig.OnProgressComplete ( )
inlinevirtual

Reimplemented from AIAct.

Definition at line 137 of file TaskDig.cs.

138 {
139 string idRecipe = (pos.HasBridge ? pos.sourceBridge.RecipeID : pos.sourceFloor.RecipeID);
140 int num = (pos.HasBridge ? pos.matBridge.hardness : pos.matFloor.hardness);
142 {
143 Thing map = GetTreasureMap();
144 if (map != null || EClass.debug.enable)
145 {
146 if (map == null)
147 {
148 map = ThingGen.Create("map_treasure", -1, EClass.pc.LV);
149 }
150 SE.Play("ding_skill");
151 Msg.Say("digTreasure");
152 Rand.UseSeed(map.refVal, delegate
153 {
154 Thing thing = ThingGen.CreateTreasure("chest_treasure", map.LV);
155 EClass._zone.AddCard(thing, EClass.pc.pos);
156 ThingGen.TryLickChest(thing);
157 });
158 map.Destroy();
159 EClass.player.willAutoSave = true;
160 return;
161 }
162 }
163 switch (mode)
164 {
165 case Mode.Default:
167 break;
168 case Mode.RemoveFloor:
170 pos.Animate(AnimeID.Dig, animeBlock: true);
171 if (!owner.IsAgent)
172 {
173 owner.elements.ModExp(230, 20 + num / 2);
174 }
175 break;
176 case Mode.Ramp:
178 break;
179 }
180 if (EClass._zone.IsCrime(owner, this))
181 {
183 }
184 if (EClass.rnd(2) == 0)
185 {
186 owner.stamina.Mod(-1);
187 }
188 if (owner != null)
189 {
190 if (owner.IsPC)
191 {
193 }
195 {
197 }
198 }
199 }
AnimeID
Definition: AnimeID.cs:2
bool IsAgent
Definition: Card.cs:2109
int refVal
Definition: Card.cs:190
void Destroy()
Definition: Card.cs:4538
int LV
Definition: Card.cs:370
override bool IsAliveInCurrentZone
Definition: Chara.cs:546
override bool IsPC
Definition: Chara.cs:597
Stats stamina
Definition: Chara.cs:955
void FallFromZone()
Definition: Chara.cs:3185
bool enable
Definition: CoreDebug.cs:285
static int rnd(int a)
Definition: EClass.cs:50
static Map _map
Definition: EClass.cs:18
static Player player
Definition: EClass.cs:12
static CoreDebug debug
Definition: EClass.cs:48
void SetBridge(int x, int z, int height=0, int idMat=0, int idBridge=0, int dir=0)
Definition: Map.cs:966
void MineFloor(Point point, Chara c=null, bool recoverBlock=false, bool removePlatform=true)
Definition: Map.cs:1739
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
RecipeManager recipes
Definition: Player.cs:898
void ModKarma(int a)
Definition: Player.cs:2289
bool IsSky
Definition: Point.cs:212
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
void Animate(AnimeID id, bool animeBlock=false)
Definition: Point.cs:1266
Definition: Rand.cs:4
static void UseSeed(int seed, Action action)
Definition: Rand.cs:22
void ComeUpWithRecipe(string idRecipe, int chanceForRandomRecipe=0)
virtual void Mod(int a)
Definition: Stats.cs:135
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53

References EClass._map, EClass._zone, Point.Animate(), RecipeManager.ComeUpWithRecipe(), ThingGen.Create(), EClass.debug, Card.Destroy(), Card.elements, CoreDebug.enable, Chara.FallFromZone(), GetTreasureMap(), Card.IsAgent, Chara.IsAliveInCurrentZone, Zone.IsCrime(), Chara.IsPC, Spatial.IsRegion, Point.IsSky, Zone.IsSkyLevel, Card.LV, Point.matFloor, Map.MineFloor(), Stats.Mod(), mode, ElementContainer.ModExp(), Player.ModKarma(), AIAct.owner, EClass.pc, EClass.player, Card.pos, TaskPoint.pos, Player.recipes, Card.refVal, EClass.rnd(), Msg.Say(), Map.SetBridge(), Point.sourceFloor, Chara.stamina, Rand.UseSeed(), Point.x, and Point.z.

Member Data Documentation

◆ mode

Mode TaskDig.mode

Definition at line 10 of file TaskDig.cs.

Referenced by GetHitResult(), and OnProgressComplete().

◆ ramp

int TaskDig.ramp = 3

Definition at line 12 of file TaskDig.cs.

Property Documentation

◆ CursorIcon

override CursorInfo TaskDig.CursorIcon
get

Definition at line 40 of file TaskDig.cs.

◆ destDist

override int TaskDig.destDist
get

Definition at line 22 of file TaskDig.cs.

23 {
24 get
25 {
27 {
29 {
30 return 1;
31 }
32 return 0;
33 }
34 return 1;
35 }
36 }

◆ destIgnoreConnection

override bool TaskDig.destIgnoreConnection
get

Definition at line 38 of file TaskDig.cs.

◆ harvestType

override HarvestType TaskDig.harvestType
get

Definition at line 14 of file TaskDig.cs.

◆ IsHostileAct

override bool TaskDig.IsHostileAct
get

Definition at line 18 of file TaskDig.cs.

◆ LocalAct

override bool TaskDig.LocalAct
get

Definition at line 20 of file TaskDig.cs.

◆ RightHand

override int TaskDig.RightHand
get

Definition at line 16 of file TaskDig.cs.


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