Game For ECE 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Revision:
14:7225da81314a
Parent:
7:862062ffca62
--- a/spells.cpp	Thu Dec 02 20:16:28 2021 +0000
+++ b/spells.cpp	Fri Dec 03 08:45:49 2021 +0000
@@ -10,41 +10,85 @@
     char line1[] = "Water";
     char line2[] = "Fire";
     char line3[] = "Earth";
-    vertical_speech(line1,line2,line3);
-    
+    vertical_speech1(line1,line2,line3);
+
+
+}
+void init_store(){
+    char line1[] = "Pot$4";
+    char line2[] = "Elx$5";
+    char line3[] = "Frt$2";
+    vertical_speech2(line1,line2,line3);
     
 }
+int spell_used;
 
 int spell()
 {
 
-    int spell_used;
     
+
     GameInputs inputs = read_inputs();
-    if (!inputs.b1) {
+
+    if (!inputs.b1 ) {
         erase_vertical_speech_bubble();
         char line1[] = "You Cast:";
         char line2[] = "Earth";
         horizontal_speech2(line1,line2);
-
-        return spell_used = EARTH;
+        spell_used = EARTH;
     }
-    if (!inputs.b2) {
+    if (!inputs.b2 ) {
         erase_vertical_speech_bubble();
         char line1[] = "You Cast:";
         char line2[] = "Fire";
         horizontal_speech2(line1,line2);
-
-        return spell_used = AIR;
+        spell_used = FIRE;
     }
-     if (!inputs.b3) {
+    if (!inputs.b3 ) {
         erase_vertical_speech_bubble();
         char line1[] = "You Cast:";
         char line2[] = "Water";
         horizontal_speech2(line1,line2);
-
-        return spell_used = WATER;
+        spell_used = WATER;
     }
     
+    return spell_used;
 
 }
+int dinero;
+
+int store()
+{  
+  
+
+    GameInputs inputs = read_inputs();
+    if (!inputs.b1 ) {
+        erase_vertical_speech_bubble();
+        char line1[] = "You Chose:";
+        char line2[] = "Fruit";
+        horizontal_speech2(line1,line2);
+        
+         dinero = FRT;
+        
+
+    }
+    if (!inputs.b2 ) {
+        erase_vertical_speech_bubble();
+        char line1[] = "You Chose:";
+        char line2[] = "Elixer";
+        horizontal_speech2(line1,line2);
+        
+         dinero = ELX;
+    }
+    if (!inputs.b3) {
+        erase_vertical_speech_bubble();
+        char line1[] = "You Chose:";
+        char line2[] = "Potion";
+        horizontal_speech2(line1,line2);
+        
+         dinero = POT;
+    }
+    
+    return dinero;
+
+}