-
Notifications
You must be signed in to change notification settings - Fork 0
/
SpecialEvent.cs
156 lines (124 loc) · 5.49 KB
/
SpecialEvent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/*******************************************************************************
*
* Space Trader for Windows 1.00
*
* Copyright (C) 2016 Keith Banner, All Rights Reserved
*
* Port to Windows by David Pierron & Jay French
* Original coding by Pieter Spronck, Sam Anderson, Samuel Goldstein, Matt Lee
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* If you'd like a copy of the GNU General Public License, go to
* http://www.gnu.org/copyleft/gpl.html.
*
* You can contact the author at [email protected]
*
******************************************************************************/
namespace SpaceTrader
{
public class SpecialEvent
{
#region Constants
public const int MoonCost = 500000;
public const int StatusArtifactNotStarted = 0;
public const int StatusArtifactOnBoard = 1;
public const int StatusArtifactDone = 2;
public const int StatusDragonflyNotStarted = 0;
public const int StatusDragonflyFlyBaratas = 1;
public const int StatusDragonflyFlyMelina = 2;
public const int StatusDragonflyFlyRegulas = 3;
public const int StatusDragonflyFlyZalkon = 4;
public const int StatusDragonflyDestroyed = 5;
public const int StatusDragonflyDone = 6;
public const int StatusExperimentNotStarted = 0;
public const int StatusExperimentStarted = 1;
public const int StatusExperimentDate = 11;
public const int StatusExperimentPerformed = 12;
public const int StatusExperimentCancelled = 13;
public const int StatusGemulonNotStarted = 0;
public const int StatusGemulonStarted = 1;
public const int StatusGemulonDate = 7;
public const int StatusGemulonTooLate = 8;
public const int StatusGemulonFuel = 9;
public const int StatusGemulonDone = 10;
public const int StatusJaporiNotStarted = 0;
public const int StatusJaporiInTransit = 1;
public const int StatusJaporiDone = 2;
public const int StatusJarekNotStarted = 0;
public const int StatusJarekStarted = 1;
public const int StatusJarekImpatient = 11;
public const int StatusJarekDone = 12;
public const int StatusMoonNotStarted = 0;
public const int StatusMoonBought = 1;
public const int StatusMoonDone = 2;
public const int StatusPrincessNotStarted = 0;
public const int StatusPrincessFlyCentauri = 1;
public const int StatusPrincessFlyInthara = 2;
public const int StatusPrincessFlyQonos = 3;
public const int StatusPrincessRescued = 4;
public const int StatusPrincessImpatient = 14;
public const int StatusPrincessReturned = 15;
public const int StatusPrincessDone = 16;
public const int StatusReactorNotStarted = 0;
public const int StatusReactorFuelOk = 1;
public const int StatusReactorDate = 20;
public const int StatusReactorDelivered = 21;
public const int StatusReactorDone = 22;
public const int StatusScarabNotStarted = 0;
public const int StatusScarabHunting = 1;
public const int StatusScarabDestroyed = 2;
public const int StatusScarabDone = 3;
public const int StatusSculptureNotStarted = 0;
public const int StatusSculptureInTransit = 1;
public const int StatusSculptureDelivered = 2;
public const int StatusSculptureDone = 3;
public const int StatusSpaceMonsterNotStarted = 0;
public const int StatusSpaceMonsterAtAcamar = 1;
public const int StatusSpaceMonsterDestroyed = 2;
public const int StatusSpaceMonsterDone = 3;
public const int StatusWildNotStarted = 0;
public const int StatusWildStarted = 1;
public const int StatusWildImpatient = 11;
public const int StatusWildDone = 12;
#endregion
#region Member Declarations
#endregion
#region Methods
public SpecialEvent(SpecialEventType type, int price, int occurrence, bool messageOnly)
{
Type = type;
Price = price;
Occurrence = occurrence;
MessageOnly = messageOnly;
}
#endregion
#region Properties
public StarSystem Location
{
get
{
StarSystem location = null;
StarSystem[] universe = Game.CurrentGame.Universe;
for (int i = 0; i < universe.Length && location == null; i++)
if (universe[i].SpecialEventType == Type)
location = universe[i];
return location;
}
}
public bool MessageOnly { get; }
public int Occurrence { get; }
public int Price { get; }
public string String => Strings.SpecialEventStrings[(int)Type];
public string Title => Strings.SpecialEventTitles[(int)Type];
public SpecialEventType Type { get; }
#endregion
}
}