@@ -15,23 +15,23 @@ public partial class EventDatabase
1515 [ "EVENT_EVENT1_OPTION1" , "EVENT_EVENT1_OPTION2" , "EVENT_EVENT1_OPTION3" ] ,
1616 [ "EVENT_EVENT1_OUTCOME1" , "EVENT_EVENT1_OUTCOME2" , "EVENT_EVENT1_OUTCOME3" ] ,
1717 [
18- ( ) =>
18+ ( self ) =>
1919 {
2020 int randIndex = StageProducer . GlobalRng . RandiRange (
2121 0 ,
2222 StageProducer . PlayerStats . CurNotes . Length
2323 ) ;
2424 StageProducer . PlayerStats . RemoveNote ( randIndex ) ;
2525 } ,
26- ( ) =>
26+ ( self ) =>
2727 {
2828 int randIndex = StageProducer . GlobalRng . RandiRange (
2929 0 ,
3030 StageProducer . PlayerStats . CurRelics . Length
3131 ) ;
3232 StageProducer . PlayerStats . RemoveRelic ( randIndex ) ;
3333 } ,
34- ( ) =>
34+ ( self ) =>
3535 {
3636 StageProducer . PlayerStats . Money /= 2 ;
3737 } ,
@@ -43,5 +43,68 @@ public partial class EventDatabase
4343 ( ) => StageProducer . PlayerStats . Money > 0 ,
4444 ]
4545 ) ,
46+ new EventTemplate (
47+ 1 ,
48+ "EVENT_EVENT2_DESC" ,
49+ [ "EVENT_EVENT2_OPTION1" , "EVENT_EVENT2_OPTION2" ] ,
50+ [ "" , "EVENT_EVENT1_OUTCOME1" ] ,
51+ [
52+ ( self ) =>
53+ {
54+ StageProducer . PlayerStats . Money -= 20 ;
55+ // [do nothing, get money back, win money, get note, get relic, heal]
56+ int spinOutcome = ( int )
57+ StageProducer . GlobalRng . RandWeighted ( [ 13 , 8 , 5 , 5 , 3 , 3 ] ) ;
58+ switch ( spinOutcome )
59+ {
60+ case 0 : //do nothing AKA lose
61+ GD . Print ( "owned lol" ) ;
62+ self . OutcomeDescriptions [ 0 ] = "EVENT_EVENT1_OUTCOME2" ;
63+ break ;
64+ case 1 : // get money back
65+ GD . Print ( "refund" ) ;
66+ self . OutcomeDescriptions [ 0 ] = "EVENT_EVENT1_OUTCOME3" ;
67+ StageProducer . PlayerStats . Money += 20 ;
68+ break ;
69+ case 2 : // get triple money
70+ GD . Print ( "triple money" ) ;
71+ self . OutcomeDescriptions [ 0 ] = "EVENT_EVENT1_OUTCOME4" ;
72+ StageProducer . PlayerStats . Money += 60 ;
73+ break ;
74+ case 3 : // get random note
75+ GD . Print ( "random note" ) ;
76+ self . OutcomeDescriptions [ 0 ] = "EVENT_EVENT1_OUTCOME5" ;
77+ StageProducer . PlayerStats . AddNote (
78+ Scribe . GetRandomRewardNotes ( 1 , StageProducer . CurRoom + 10 ) [ 0 ]
79+ ) ;
80+ break ;
81+ case 4 : // get random relic
82+ GD . Print ( "random relic" ) ;
83+ self . OutcomeDescriptions [ 0 ] = "EVENT_EVENT1_OUTCOME6" ;
84+ StageProducer . PlayerStats . AddRelic (
85+ Scribe . GetRandomRelics (
86+ 1 ,
87+ StageProducer . CurRoom + 10 ,
88+ StageProducer . PlayerStats . RarityOdds
89+ ) [ 0 ]
90+ ) ;
91+ break ;
92+ case 5 :
93+ GD . Print ( "heal" ) ;
94+ self . OutcomeDescriptions [ 0 ] = "EVENT_EVENT1_OUTCOME7" ;
95+ StageProducer . PlayerStats . CurrentHealth = Math . Max (
96+ StageProducer . PlayerStats . CurrentHealth + 20 ,
97+ StageProducer . PlayerStats . MaxHealth
98+ ) ;
99+ break ;
100+ }
101+ } ,
102+ ( self ) => {
103+ //does nothing
104+ } ,
105+ ] ,
106+ GD . Load < Texture2D > ( "res://Classes/Events/Assets/TEMP.png" ) ,
107+ [ ( ) => StageProducer . PlayerStats . Money > 20 , ( ) => true ]
108+ ) ,
46109 } ;
47110}
0 commit comments