public void Com_PA_TreatDisease_Medic( int player, int city, int treat_Type ) { // remove all cubes of this type PD_Game_Operators.GO_Remove_All_InfectionCubes_OfType_FromCity( this, city, treat_Type ); if (this.GQ_Is_DiseaseCured_OR_Eradicated(treat_Type)) { // check if disease is eradicated... int remaining_cubes_this_type = map_elements.available_infection_cubes__per__type[treat_Type]; // if disease eradicated -> set marker to 2 if (remaining_cubes_this_type == 0) { game_state_counter.disease_states[treat_Type] = 2; } } }
public void Medic_MoveTreat( int city ) { // if player is a medic: if (this.GQ_CurrentPlayer_Role() == PD_Player_Roles.Medic) { List <int> typesOfInfectionCubesOnTargetLocation = this.GQ_InfectionCubeTypes_OnCity( city ); foreach (var type in typesOfInfectionCubesOnTargetLocation) { // if this type has been cured: if (this.GQ_Is_DiseaseCured_OR_Eradicated(type)) { PD_Game_Operators.GO_Remove_All_InfectionCubes_OfType_FromCity( this, city, type ); // create the supposed (auto) action PA_TreatDisease_Medic_Auto actionToStore = new PA_TreatDisease_Medic_Auto( this.GQ_CurrentPlayer(), city, type ); // store the action in the game actions history PlayerActionsHistory.Add(actionToStore); } } } }
public void Medic_AutoTreat_AfterDiscoverCure(int curedDiseaaseType) { int medicLocation = this.GQ_Medic_Location(); if (medicLocation != -1) { List <int> infectionCubeTypes_OnMedicLocation = this.GQ_InfectionCubeTypes_OnCity(medicLocation); if (infectionCubeTypes_OnMedicLocation.Contains(curedDiseaaseType)) { // remove all cubes of this type from medic's location PD_Game_Operators.GO_Remove_All_InfectionCubes_OfType_FromCity( this, medicLocation, curedDiseaaseType ); } } }