@@ -29,6 +29,7 @@ public partial class frmMain : Form
29
29
public const int EFFECT_ON_EVERYONE = 0 ;
30
30
public const int EFFECT_ON_SELECTED = 1 ;
31
31
public const int EFFECT_ON_RANDOM = 2 ;
32
+ public const int notAppliedModifier = - 1000 ;
32
33
33
34
//Finish Variables
34
35
@@ -498,47 +499,45 @@ private string SaveResponse(string respText)
498
499
return "We couldn't find the response option \" " + respText + "\" - Sorry!" ;
499
500
}
500
501
501
-
502
- //TODO - Save the Response! Woo!
503
502
// Global Stats (Resource Modifiers)
504
503
List < int > globalStats = new List < int > ( ) ;
505
504
if ( foodModB . Checked ) { globalStats . Add ( ( int ) foodMod . Value ) ; }
506
- else { globalStats . Add ( - 1 ) ; }
505
+ else { globalStats . Add ( notAppliedModifier ) ; }
507
506
if ( waterModB . Checked ) { globalStats . Add ( ( int ) waterMod . Value ) ; }
508
- else { globalStats . Add ( - 1 ) ; }
507
+ else { globalStats . Add ( notAppliedModifier ) ; }
509
508
if ( vModB . Checked ) { globalStats . Add ( ( int ) valueMod . Value ) ; }
510
- else { globalStats . Add ( - 1 ) ; }
509
+ else { globalStats . Add ( notAppliedModifier ) ; }
511
510
if ( ammoModB . Checked ) { globalStats . Add ( ( int ) ammoMod . Value ) ; }
512
- else { globalStats . Add ( - 1 ) ; }
511
+ else { globalStats . Add ( notAppliedModifier ) ; }
513
512
if ( medModB . Checked ) { globalStats . Add ( ( int ) medMod . Value ) ; }
514
- else { globalStats . Add ( - 1 ) ; }
513
+ else { globalStats . Add ( notAppliedModifier ) ; }
515
514
if ( moraleModB . Checked ) { globalStats . Add ( ( int ) moraleMod . Value ) ; }
516
- else { globalStats . Add ( - 1 ) ; }
515
+ else { globalStats . Add ( notAppliedModifier ) ; }
517
516
if ( staminaModB . Checked ) { globalStats . Add ( ( int ) staminaMod . Value ) ; }
518
- else { globalStats . Add ( - 1 ) ; }
517
+ else { globalStats . Add ( notAppliedModifier ) ; }
519
518
if ( valueModB . Checked ) { globalStats . Add ( ( int ) packMod . Value ) ; }
520
- else { globalStats . Add ( - 1 ) ; }
519
+ else { globalStats . Add ( notAppliedModifier ) ; }
521
520
522
521
responseToEdit . myMap [ Keys . RESOURCE_MODIFIERS_KEY ] = globalStats ;
523
522
524
523
// Member Stats (Party Stat Modifiers)
525
524
List < int > memberStats = new List < int > ( ) ;
526
525
if ( marksModB . Checked ) { memberStats . Add ( ( int ) markMod . Value ) ; }
527
- else { memberStats . Add ( - 1 ) ; }
526
+ else { memberStats . Add ( notAppliedModifier ) ; }
528
527
if ( percModB . Checked ) { memberStats . Add ( ( int ) percMod . Value ) ; }
529
- else { memberStats . Add ( - 1 ) ; }
528
+ else { memberStats . Add ( notAppliedModifier ) ; }
530
529
if ( tacticsModB . Checked ) { memberStats . Add ( ( int ) tacticsMod . Value ) ; }
531
- else { memberStats . Add ( - 1 ) ; }
530
+ else { memberStats . Add ( notAppliedModifier ) ; }
532
531
if ( loyalModB . Checked ) { memberStats . Add ( ( int ) loyalMod . Value ) ; }
533
- else { memberStats . Add ( - 1 ) ; }
532
+ else { memberStats . Add ( notAppliedModifier ) ; }
534
533
if ( agilityModB . Checked ) { memberStats . Add ( ( int ) agilityMod . Value ) ; }
535
- else { memberStats . Add ( - 1 ) ; }
534
+ else { memberStats . Add ( notAppliedModifier ) ; }
536
535
if ( strengthModB . Checked ) { memberStats . Add ( ( int ) strengthMod . Value ) ; }
537
- else { memberStats . Add ( - 1 ) ; }
536
+ else { memberStats . Add ( notAppliedModifier ) ; }
538
537
if ( diploModB . Checked ) { memberStats . Add ( ( int ) diploMod . Value ) ; }
539
- else { memberStats . Add ( - 1 ) ; }
538
+ else { memberStats . Add ( notAppliedModifier ) ; }
540
539
if ( knowModB . Checked ) { memberStats . Add ( ( int ) knowMod . Value ) ; }
541
- else { memberStats . Add ( - 1 ) ; }
540
+ else { memberStats . Add ( notAppliedModifier ) ; }
542
541
543
542
responseToEdit . myMap [ Keys . PARTY_STAT_MODIFIERS_KEY ] = memberStats ;
544
543
@@ -676,10 +675,6 @@ private string SaveResponse(string respText)
676
675
// REWARD_DISPERSE_WIN_KEY
677
676
responseToEdit . myMap [ Keys . REWARD_DISPERSE_WIN_KEY ] = comboBoxWinApplication . SelectedIndex ;
678
677
679
-
680
-
681
-
682
-
683
678
return "" ;
684
679
}
685
680
@@ -697,8 +692,169 @@ private string LoadResponse(string toLoad)
697
692
return "We couldn't find the response option \" " + toLoad + "\" - Sorry!" ;
698
693
}
699
694
695
+ // Global Stats (Resource Modifiers)
696
+ List < int > globalStats = ( List < int > ) ( responseToLoad . myMap [ Keys . RESOURCE_MODIFIERS_KEY ] ) ;
697
+ if ( globalStats [ 0 ] == notAppliedModifier ) { foodMod . Value = 0 ; } else { foodMod . Value = globalStats [ 0 ] ; }
698
+ foodModB . Checked = ( globalStats [ 0 ] != notAppliedModifier ) ;
699
+ if ( globalStats [ 1 ] == notAppliedModifier ) { waterMod . Value = 0 ; } else { waterMod . Value = globalStats [ 1 ] ; }
700
+ waterModB . Checked = ( globalStats [ 1 ] != notAppliedModifier ) ;
701
+ if ( globalStats [ 2 ] == notAppliedModifier ) { valueMod . Value = 0 ; } else { valueMod . Value = globalStats [ 2 ] ; }
702
+ vModB . Checked = ( globalStats [ 2 ] != notAppliedModifier ) ;
703
+ if ( globalStats [ 3 ] == notAppliedModifier ) { ammoMod . Value = 0 ; } else { ammoMod . Value = globalStats [ 3 ] ; }
704
+ ammoModB . Checked = ( globalStats [ 3 ] != notAppliedModifier ) ;
705
+ if ( globalStats [ 4 ] == notAppliedModifier ) { medMod . Value = 0 ; } else { medMod . Value = globalStats [ 4 ] ; }
706
+ medModB . Checked = ( globalStats [ 4 ] != notAppliedModifier ) ;
707
+ if ( globalStats [ 5 ] == notAppliedModifier ) { moraleMod . Value = 0 ; } else { moraleMod . Value = globalStats [ 5 ] ; }
708
+ moraleModB . Checked = ( globalStats [ 5 ] != notAppliedModifier ) ;
709
+ if ( globalStats [ 6 ] == notAppliedModifier ) { staminaMod . Value = 0 ; } else { staminaMod . Value = globalStats [ 6 ] ; }
710
+ staminaModB . Checked = ( globalStats [ 6 ] != notAppliedModifier ) ;
711
+ if ( globalStats [ 7 ] == notAppliedModifier ) { packMod . Value = 0 ; } else { packMod . Value = globalStats [ 7 ] ; }
712
+ valueModB . Checked = ( globalStats [ 7 ] != notAppliedModifier ) ;
713
+
714
+
715
+ // Member Stats (Party Stat Modifiers)
716
+ List < int > memberStats = ( List < int > ) ( responseToLoad . myMap [ Keys . PARTY_STAT_MODIFIERS_KEY ] ) ;
717
+ if ( memberStats [ 0 ] == notAppliedModifier ) { markMod . Value = 0 ; } else { markMod . Value = memberStats [ 0 ] ; }
718
+ marksModB . Checked = ( memberStats [ 0 ] != notAppliedModifier ) ;
719
+ if ( memberStats [ 1 ] == notAppliedModifier ) { percMod . Value = 0 ; } else { percMod . Value = memberStats [ 1 ] ; }
720
+ percModB . Checked = ( memberStats [ 1 ] != notAppliedModifier ) ;
721
+ if ( memberStats [ 2 ] == notAppliedModifier ) { tacticsMod . Value = 0 ; } else { tacticsMod . Value = memberStats [ 2 ] ; }
722
+ tacticsModB . Checked = ( memberStats [ 2 ] != notAppliedModifier ) ;
723
+ if ( memberStats [ 3 ] == notAppliedModifier ) { loyalMod . Value = 0 ; } else { loyalMod . Value = memberStats [ 3 ] ; }
724
+ loyalModB . Checked = ( memberStats [ 3 ] != notAppliedModifier ) ;
725
+ if ( memberStats [ 4 ] == notAppliedModifier ) { agilityMod . Value = 0 ; } else { agilityMod . Value = memberStats [ 4 ] ; }
726
+ agilityModB . Checked = ( memberStats [ 4 ] != notAppliedModifier ) ;
727
+ if ( memberStats [ 5 ] == notAppliedModifier ) { strengthMod . Value = 0 ; } else { strengthMod . Value = memberStats [ 5 ] ; }
728
+ strengthModB . Checked = ( memberStats [ 5 ] != notAppliedModifier ) ;
729
+ if ( memberStats [ 6 ] == notAppliedModifier ) { diploMod . Value = 0 ; } else { diploMod . Value = memberStats [ 6 ] ; }
730
+ diploModB . Checked = ( memberStats [ 6 ] != notAppliedModifier ) ;
731
+ if ( memberStats [ 7 ] == notAppliedModifier ) { knowMod . Value = 0 ; } else { knowMod . Value = memberStats [ 7 ] ; }
732
+ knowModB . Checked = ( memberStats [ 7 ] != notAppliedModifier ) ;
733
+
734
+
735
+ // Global Variable Requirements (Resource Stat Requirement)
736
+ List < int > resourceStatReq = ( List < int > ) ( responseToLoad . myMap [ Keys . RESOURCE_STAT_REQUIREMENT_KEY ] ) ;
737
+ foodReq . Value = resourceStatReq [ 0 ] ;
738
+ waterReq . Value = resourceStatReq [ 1 ] ;
739
+ valueReq . Value = resourceStatReq [ 2 ] ;
740
+ ammoReq . Value = resourceStatReq [ 3 ] ;
741
+ medReq . Value = resourceStatReq [ 4 ] ;
742
+ moraleReq . Value = resourceStatReq [ 5 ] ;
743
+ staminaReq . Value = resourceStatReq [ 6 ] ;
744
+ packReq . Value = resourceStatReq [ 7 ] ;
745
+
746
+ // Party Member Requirements (Party Stat Requirement)
747
+ List < int > partyMemReq = ( List < int > ) responseToLoad . myMap [ Keys . PARTY_STAT_REQUIREMENT_KEY ] ;
748
+ marksReq . Value = partyMemReq [ 0 ] ;
749
+ percReq . Value = partyMemReq [ 1 ] ;
750
+ tacticsReq . Value = partyMemReq [ 2 ] ;
751
+ loyalReq . Value = partyMemReq [ 3 ] ;
752
+ agilityReq . Value = partyMemReq [ 4 ] ;
753
+ strengthReq . Value = partyMemReq [ 5 ] ;
754
+ diploReq . Value = partyMemReq [ 6 ] ;
755
+ knowReq . Value = partyMemReq [ 7 ] ;
756
+
757
+ // Lose Global Stats (Lose Resource Change)
758
+ List < int > loseGlobal = ( List < int > ) responseToLoad . myMap [ Keys . LOSE_RESOURCE_CHANGE_KEY ] ;
759
+ foodLose . Value = loseGlobal [ 0 ] ;
760
+ waterLose . Value = loseGlobal [ 1 ] ;
761
+ valueLose . Value = loseGlobal [ 2 ] ;
762
+ ammoLose . Value = loseGlobal [ 3 ] ;
763
+ medLose . Value = loseGlobal [ 4 ] ;
764
+ moraleLose . Value = loseGlobal [ 5 ] ;
765
+ staminaLose . Value = loseGlobal [ 6 ] ;
766
+ packLose . Value = loseGlobal [ 7 ] ;
767
+
768
+
769
+ // Lose Member Stats (Lose Party Stat Change)
770
+ List < int > loseMember = ( List < int > ) responseToLoad . myMap [ Keys . LOSE_PARTY_STAT_CHANGE_KEY ] ;
771
+ markLose . Value = loseMember [ 0 ] ;
772
+ percLose . Value = loseMember [ 1 ] ;
773
+ tacticsLose . Value = loseMember [ 2 ] ;
774
+ loyalLose . Value = loseMember [ 3 ] ;
775
+ agilityLose . Value = loseMember [ 4 ] ;
776
+ strengthLose . Value = loseMember [ 5 ] ;
777
+ diploLose . Value = loseMember [ 6 ] ;
778
+ knowLose . Value = loseMember [ 7 ] ;
779
+
780
+
781
+ // Win Global Stats (Win Resource Change)
782
+ List < int > winGlobal = ( List < int > ) responseToLoad . myMap [ Keys . WIN_RESOURCE_CHANGE_KEY ] ;
783
+ foodWin . Value = winGlobal [ 0 ] ;
784
+ waterWin . Value = winGlobal [ 1 ] ;
785
+ valueWin . Value = winGlobal [ 2 ] ;
786
+ ammoWin . Value = winGlobal [ 3 ] ;
787
+ medWin . Value = winGlobal [ 4 ] ;
788
+ moraleWin . Value = winGlobal [ 5 ] ;
789
+ staminaWin . Value = winGlobal [ 6 ] ;
790
+ packWin . Value = winGlobal [ 7 ] ;
791
+
792
+
793
+ // Win Member Stats (WIN_PARTY_STAT_CHANGE_KEY)
794
+ List < int > winMember = ( List < int > ) responseToLoad . myMap [ Keys . WIN_PARTY_STAT_CHANGE_KEY ] ;
795
+ marksWin . Value = winMember [ 0 ] ;
796
+ percWin . Value = winMember [ 1 ] ;
797
+ tacticsWin . Value = winMember [ 2 ] ;
798
+ loyalWin . Value = winMember [ 3 ] ;
799
+ agilityWin . Value = winMember [ 4 ] ;
800
+ strengthWin . Value = winMember [ 5 ] ;
801
+ diploWin . Value = winMember [ 6 ] ;
802
+ knowWin . Value = winMember [ 7 ] ;
803
+
700
804
701
- //TODO - Load the Response! Hooray!
805
+ // Cost Resource Stats (RESOURCE_STAT_COST_KEY)
806
+ List < int > costResource = ( List < int > ) responseToLoad . myMap [ Keys . RESOURCE_STAT_COST_KEY ] ;
807
+ foodCost . Value = costResource [ 0 ] ;
808
+ waterCost . Value = costResource [ 1 ] ;
809
+ valueCost . Value = costResource [ 2 ] ;
810
+ ammoCost . Value = costResource [ 3 ] ;
811
+ medCost . Value = costResource [ 4 ] ;
812
+ moraleCost . Value = costResource [ 5 ] ;
813
+ staminaCost . Value = costResource [ 6 ] ;
814
+ packCost . Value = costResource [ 7 ] ;
815
+
816
+
817
+ // Cost Member Stats (PARTY_STAT_COST_KEY)
818
+ List < int > costMember = ( List < int > ) responseToLoad . myMap [ Keys . PARTY_STAT_COST_KEY ] ;
819
+ marksCost . Value = costMember [ 0 ] ;
820
+ percCost . Value = costMember [ 1 ] ;
821
+ tacticsCost . Value = costMember [ 2 ] ;
822
+ loyalCost . Value = costMember [ 3 ] ;
823
+ agilityCost . Value = costMember [ 4 ] ;
824
+ strengthCost . Value = costMember [ 5 ] ;
825
+ diploCost . Value = costMember [ 6 ] ;
826
+ knowCost . Value = costMember [ 7 ] ;
827
+
828
+
829
+ // Win Text (WIN_TEXT_KEY)
830
+ winText . Text = ( string ) responseToLoad . myMap [ Keys . WIN_TEXT_KEY ] ;
831
+
832
+ // Lose Text (LOSE_TEXT_KEY)
833
+ loseText . Text = ( string ) responseToLoad . myMap [ Keys . LOSE_TEXT_KEY ] ;
834
+
835
+ // Pass Text (PASS_TEXT_KEY)
836
+ passText . Text = ( string ) responseToLoad . myMap [ Keys . PASS_TEXT_KEY ] ;
837
+
838
+ // KILL_PERSON_LOSE_KEY
839
+ chkKillLose . Checked = ( bool ) responseToLoad . myMap [ Keys . KILL_PERSON_LOSE_KEY ] ;
840
+
841
+ // KILL_PERSON_WIN_KEY
842
+ chkWinKill . Checked = ( bool ) responseToLoad . myMap [ Keys . KILL_PERSON_WIN_KEY ] ;
843
+
844
+ // WIN_FOLLOW_UP_KEY
845
+ winFollowUp . Text = ( string ) responseToLoad . myMap [ Keys . WIN_FOLLOW_UP_KEY ] ;
846
+
847
+ // LOSE_FOLLOW_UP_KEY
848
+ loseFollowUp . Text = ( string ) responseToLoad . myMap [ Keys . LOSE_FOLLOW_UP_KEY ] ;
849
+
850
+ // PASS_FOLLOW_UP_KEY
851
+ passFollowUp . Text = ( string ) responseToLoad . myMap [ Keys . PASS_FOLLOW_UP_KEY ] ;
852
+
853
+ // REWARD_DISPERSE_LOSE_KEY
854
+ comboBoxLoseApplication . SelectedIndex = ( int ) responseToLoad . myMap [ Keys . REWARD_DISPERSE_LOSE_KEY ] ;
855
+
856
+ // REWARD_DISPERSE_WIN_KEY
857
+ comboBoxWinApplication . SelectedIndex = ( int ) responseToLoad . myMap [ Keys . REWARD_DISPERSE_WIN_KEY ] ;
702
858
703
859
704
860
return "" ;
0 commit comments