View difference between Paste ID: SEF8L6Lx and 80FgDzSG
SHOW: | | - or go back to the newest paste.
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
7
namespace Razeldas_D_and_D_C_Builder
8
{
9
    class Program
10
    {
11
12
        static int STR;
13
        static int DEX;
14-
            Console.SetWindowSize(60, 50);
14+
        static int CON;
15-
            Console.WriteLine("What would you like to name your Charactor? :");
15+
        static int INT;
16-
            string cname = Console.ReadLine();
16+
        static int WIS;
17
        static int CHA;
18-
            Console.WriteLine("What is the Race of this Charactor? :");
18+
        static int STRmod;
19-
            string crace = Console.ReadLine();
19+
        static int DEXmod;
20
        static int CONmod;
21
        static int INTmod;
22-
            int STR = rnd.Next(1, 21);
22+
        static int WISmod;
23-
            int DEX = rnd.Next(1, 21);
23+
        static int CHAmod;
24-
            int CON = rnd.Next(1, 21);
24+
        static int clvl2;
25-
            int INT = rnd.Next(1, 21);
25+
        static string chclass;
26-
            int WIS = rnd.Next(1, 21);
26+
        static string cname;
27-
            int CHA = rnd.Next(1, 21);
27+
        static string crace;
28
29-
            int STRmod;
29+
30-
            int DEXmod;
30+
31-
            int CONmod;
31+
32-
            int INTmod;
32+
33-
            int WISmod;
33+
            intro_image();
34-
            int CHAmod;
34+
35-
            int clvl2;
35+
36-
            String chclass;
36+
            Console.WriteLine(" What would you like to name your Charactor? :");
37
            Console.WriteLine();
38
            cname = Console.ReadLine();
39
            
40
            Console.WriteLine();
41-
            Ch_Class(out STRmod, out DEXmod, out CONmod, out INTmod, out WISmod, out CHAmod,out chclass);
41+
42
            Console.WriteLine(" What is the Race of this Charactor? :");
43
            Console.WriteLine();
44-
            output(STR, DEX, CON, INT, WIS, CHA, STRmod, DEXmod, CONmod, INTmod, WISmod, CHAmod, cname, crace, chclass, clvl2);
44+
            crace = Console.ReadLine();
45
46
            Random rnd = new Random();
47
            STR = rnd.Next(1, 21);
48
            DEX = rnd.Next(1, 21);
49
            CON = rnd.Next(1, 21);
50
            INT = rnd.Next(1, 21);
51
            WIS = rnd.Next(1, 21);
52
            CHA = rnd.Next(1, 21);
53
54
            clevel(STR, out STR,DEX,out DEX,CON,out CON,INT,out INT,WIS,out WIS,CHA,out CHA,out clvl2);
55
56-
                Console.WriteLine("What Level is this Character starting out at? (defalt 1)");
56+
            Ch_Class();
57
58
            output();
59
60
        }
61
62
        static void clevel(int STR1, out int STR, int DEX1, out int DEX, int CON1, out int CON, int INT1, out int INT, int WIS1, out int WIS,int CHA1,out int CHA,out int clvl2)
63
        {
64
            int rp = 0;
65
            do
66
            {
67
                String clvl1 = "1";
68
                Console.WriteLine(" What Level is this Character starting out at? (defalt 1)");
69
                Console.WriteLine();
70
                clvl1 = Console.ReadLine();
71
                clvl2 = 1;
72
                try
73
                {
74
                    clvl2 = Convert.ToInt32(clvl1);
75
                }
76-
                    Console.WriteLine("D&D dose not go higher then 20");
76+
77
                {
78
                    Console.WriteLine();
79
                }
80
                catch (OverflowException e)
81
                {
82
                    Console.WriteLine();
83
                }
84
                
85
86
                if (clvl2 > 20)
87
                {
88
                    rp = +1;
89
                    Console.WriteLine(" D&D levels do not go higher then 20");
90
                    STR = STR1;
91
                    DEX = DEX1;
92
                    CON = CON1;
93
                    INT = INT1;
94
                    WIS = WIS1;
95
                    CHA = CHA1;
96
                    clvl2 = 1;
97
                }
98
                else if (clvl2 > 1 )
99
                {
100
                    rp = +1;
101
                    STR = STR1 + clvl2;
102
                    DEX = DEX1 + clvl2;
103
                    CON = CON1 + clvl2;
104
                    INT = INT1 + clvl2;
105
                    WIS = WIS1 + clvl2;
106
                    CHA = CHA1 + clvl2;
107
                }
108
                else
109
                {
110
                    rp = +1;
111
                    STR = STR1;
112-
        static void Ch_Class(out int STRmod, out int DEXmod, out int CONmod, out int INTmod, out int WISmod, out int CHAmod, out String chclass)
112+
113
                    CON = CON1;
114
                    INT = INT1;
115-
            Console.WriteLine("Select a Class Type:");
115+
116-
            Console.WriteLine("A: Warror");
116+
117-
            Console.WriteLine("B: Wizard");
117+
118-
            Console.WriteLine("C: Bard");
118+
119
             } while(rp < 0);
120
               
121
122
123
        }
124
125
        static void Ch_Class()
126
        {
127
            Console.WriteLine();
128
            Console.WriteLine(" Select a Class Type:");
129
            Console.WriteLine(" A: Warror");
130
            Console.WriteLine(" B: Wizard");
131
            Console.WriteLine(" C: Bard");
132
            int selection = 0;
133
            selection = (int)Console.ReadKey().Key;
134
135
            
136
            if (selection == 65) //a Selected
137
            {
138
                STRmod = 0 + 2;
139
                DEXmod = 0 + 2;
140
                CONmod = 0 + 1;
141
                INTmod = 0 - 3;
142
                WISmod = 0 - 2;
143
                CHAmod = 0 - 4;
144
                chclass = "Warror";
145
            }
146
            else if (selection == 66) // b Selected
147
            {
148
                STRmod = 0 - 2;
149
                DEXmod = 0 - 2;
150
                CONmod = 0 - 1;
151
                INTmod = 0 + 4;
152
                WISmod = 0 + 2;
153
                CHAmod = 0 - 4;
154
                chclass = "Wizard";
155
            }
156
            else if (selection == 67) // c Selected
157
            {
158
                STRmod = 0 - 2;
159
                DEXmod = 0 - 2;
160
                CONmod = 0 + 1;
161
                INTmod = 0 + 1;
162
                WISmod = 0 + 3;
163
                CHAmod = 0 + 2;
164
                chclass = "Bard";
165
            }
166
            else
167
            {
168
                STRmod = 0;
169
                DEXmod = 0;
170-
        static void output(int STR,int DEX, int CON, int INT,int WIS, int CHA, int STRmod, int DEXmod, int CONmod, int INTmod, int WISmod, int CHAmod, string cname, string crace, string chclass, int clvl2)
170+
171
                INTmod = 0;
172
                WISmod = 0;
173
                CHAmod = 0;
174
                chclass = "None";
175
            }
176
177
            Console.WriteLine(Environment.NewLine);
178
179
180
181
        }
182
183
        static void output()
184
        {
185
            Console.Clear();
186
187
            string STR2 = STR.ToString("00");
188
            string DEX2 = DEX.ToString("00");
189
            string CON2 = CON.ToString("00");
190
            string INT2 = INT.ToString("00");
191
            string WIS2 = WIS.ToString("00");
192
            string CHA2 = CHA.ToString("00");
193
194
            int TSTR = STR + STRmod;
195
            int TDEX = DEX + DEXmod;
196
            int TCON = CON + CONmod;
197
            int TINT = INT + INTmod;
198
            int TWIS = WIS + WISmod;
199
            int TCHA = CHA + CHAmod;
200
201
            string TSTR2 = TSTR.ToString("00");
202
            string TDEX2 = TDEX.ToString("00");
203
            string TCON2 = TCON.ToString("00");
204
            string TINT2 = TINT.ToString("00");
205
            string TWIS2 = TWIS.ToString("00");
206
            string TCHA2 = TCHA.ToString("00");
207
208
            String STRmod2;
209
            STR_PosNeg(STRmod, out STRmod2);
210
211
            String DEXmod2;
212
            STR_PosNeg(DEXmod, out DEXmod2);
213
214
            String CONmod2;
215
            STR_PosNeg(CONmod, out CONmod2);
216
217
            String INTmod2;
218
            STR_PosNeg(INTmod, out INTmod2);
219
220
            String WISmod2;
221
            STR_PosNeg(WISmod, out WISmod2);
222
223
            String CHAmod2;
224
            STR_PosNeg(CHAmod, out CHAmod2);
225
226
            Console.WriteLine();
227
            Console.WriteLine(" Character Name: {0}", cname);
228
            Console.WriteLine(" Level: {0}", clvl2);
229
            Console.WriteLine(" Race: {0}", crace);
230
            Console.WriteLine(" Class: {0}", chclass);
231
            Console.WriteLine();
232
            Console.WriteLine(" ***************************************");
233
            Console.WriteLine(" ***************************************");
234
            Console.WriteLine(" ** Ability Name          | MOD | New **");
235
            Console.WriteLine(" ***************************************");
236
            Console.WriteLine(" ** Strength        =  {0} |  {1} |  {2} **", STR2,STRmod2,TSTR2);
237
            Console.WriteLine(" ** Dexterity       =  {0} |  {1} |  {2} **", DEX2,DEXmod2,TDEX2);
238
            Console.WriteLine(" ** Constitution    =  {0} |  {1} |  {2} **", CON2,CONmod2,TCON2);
239
            Console.WriteLine(" ** Intelligence    =  {0} |  {1} |  {2} **", INT2,INTmod2,TINT2);
240
            Console.WriteLine(" ** Wisdom          =  {0} |  {1} |  {2} **", WIS2,WISmod2,TWIS2);
241
            Console.WriteLine(" ** Charisma        =  {0} |  {1} |  {2} **", CHA2,CHAmod2,TCHA2);
242
            Console.WriteLine(" ***************************************");
243
            Console.WriteLine(" ***************************************");
244
            Console.WriteLine();
245
            Console.WriteLine(" Press ENTER to close.");
246
            string quit1 = Console.ReadLine();
247
        }
248
249
        static void STR_PosNeg(int STRmod, out String STRmod2)
250
        {
251
            if (STRmod > 0)
252
            {
253
                STRmod2 = STRmod.ToString("+0");
254
            }
255
            else
256
            {
257
                STRmod2 = STRmod.ToString();
258
            }
259
        }
260
261
        static void DEX_PosNeg(int DEXmod, out String DEXmod2)
262
        {
263
            if (DEXmod > 0)
264
            {
265
                DEXmod2 = DEXmod.ToString("+0");
266
            }
267
            else
268
            {
269
                DEXmod2 = DEXmod.ToString();
270
            }
271
        }
272
273
        static void CON_PosNeg(int CONmod, out String CONmod2)
274
        {
275
            if (CONmod > 0)
276
            {
277
                CONmod2 = CONmod.ToString("+0");
278
            }
279
            else
280
            {
281
                CONmod2 = CONmod.ToString();
282
            }
283
        }
284
285
        static void INT_PosNeg(int INTmod, out String INTmod2)
286
        {
287
            if (INTmod > 0)
288
            {
289
                INTmod2 = INTmod.ToString("+0");
290
            }
291
            else
292
            {
293
                INTmod2 = INTmod.ToString();
294
            }
295
        }
296
297
        static void WIS_PosNeg(int WISmod, out String WISmod2)
298
        {
299
            if (WISmod > 0)
300
            {
301
                WISmod2 = WISmod.ToString("+0");
302
            }
303
            else
304
            {
305
                WISmod2 = WISmod.ToString();
306
            }
307
        }
308
309
        static void CHA_PosNeg(int CHAmod, out String CHAmod2)
310
        {
311
            if (CHAmod > 0)
312
            {
313
                CHAmod2 = CHAmod.ToString("+0");
314
            }
315
            else
316
            {
317
                CHAmod2 = CHAmod.ToString();
318
            }
319
        }
320
321
        static void intro_image()
322
        {
323
            Console.WriteLine(" *****************************************");
324
            Console.WriteLine(" *****************************************");
325
            Console.WriteLine(" **  :::::::::   :::::::     :::::::::  **");
326
            Console.WriteLine(" **  :+:    :+: :+:   :+:    :+:    :+: **");
327
            Console.WriteLine(" **  +:+    +:+  +:+ +:+     +:+    +:+ **");
328
            Console.WriteLine(" **  +#+    +:+   +#++:  ++# +#+    +:+ **");
329
            Console.WriteLine(" **  +#+    +#+  +#+ +#+#+#  +#+    +#+ **");
330
            Console.WriteLine(" **  #+#    #+# #+#   #+#+   #+#    #+# **");
331
            Console.WriteLine(" **  #########   ##########  #########  **");
332
            Console.WriteLine(" *****************************************");
333
            Console.WriteLine(" *****************************************");
334
        }
335
336
        }
337
}