23 return (
int)((float)this.hours * 0.8f);
33 return (
int)((float)this.hours * 1.2f);
43 return (
"ex" + this.type.ToString()).lang();
50 this.branch = _branch;
54 public void OnCreate()
59 case ExpeditionType.Search:
62 case ExpeditionType.Training:
65 case ExpeditionType.Explore:
68 case ExpeditionType.Hunt:
80 this.hours = Rand.Range(this.MinHour, this.MaxHour);
82 WidgetPopText.Say(
"expeditionStart".lang(this.chara.Name,
this.strType,
null,
null,
null), FontColor.Default,
null);
83 EClass.Branch.Log(
"bExpeditionStart", this.chara, this.strType,
null,
null);
84 if (this.chara.IsInActiveZone)
86 Msg.Say(
"bExpeditionStart", this.chara, this.strType,
null,
null);
88 this.chara.MoveZone(
"somewhere");
92 public void OnAdvanceHour()
104 this.branch.expeditions.dict.Remove(this.uidChara);
105 this.chara.MoveZone(this.chara.homeZone,
ZoneTransition.EnterState.Auto);
106 WidgetPopText.Say(
"expeditionEnd".lang(this.chara.Name,
this.strType,
null,
null,
null), FontColor.Default,
null);
107 this.branch.Log(
"bExpeditionEnd", this.chara, this.strType,
null,
null);
108 if (this.chara.IsInActiveZone)
110 Msg.Say(
"bExpeditionEnd", this.chara, this.strType,
null,
null);
112 ExpeditionType expeditionType = this.type;
113 if (expeditionType != ExpeditionType.Search)
115 if (expeditionType != ExpeditionType.Explore)
119 this.chara.GetWorkSummary().progress = 100;
123 foreach (
Zone zone
in EClass.world.region.ListZonesInRadius(
this.branch.owner, 10))
128 WidgetPopText.Say(
"discoverZone".lang(zone.Name,
null,
null,
null,
null), FontColor.Great,
null);
131 Zone zone2 =
EClass.world.region.CreateRandomSite(this.chara.homeZone, 8,
null,
true);
134 zone2.isKnown =
true;
135 WidgetPopText.Say(
"discoverZone".lang(zone2.Name,
null,
null,
null,
null), FontColor.Great,
null);
145 expedition.uidChara = c.uid;
146 expedition.type = type;
147 expedition.SetOwner(c.homeBranch);
148 expedition.OnCreate();
162 public ExpeditionType type;