public Ghost(gridCoordinate sGridCoord, ContentManager sCont, int sIndex) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { my_Texture = cont.Load <Texture2D>("Enemies/ghost"); max_hitPoints = 12; hitPoints = max_hitPoints; min_damage = 1; max_damage = 3; dmg_type = Attack.Damage.Frost; //SENSORY base_sight_range = 4; can_hear = true; sounds_i_can_hear.Add(SoundPulse.Sound_Types.Voidwraith_Scream); base_listen_threshold.Add(1); set_senses_to_baseline(); //OTHER my_name = "Ghost"; melee_dodge = 50; ranged_dodge = 50; corporeal = false; set_initial_dodge_values(); }
public Gorewolf(gridCoordinate sGridCoord, ContentManager sCont, int sIndex) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { my_Texture = cont.Load <Texture2D>("Enemies/goreWolf"); max_hitPoints = 22; hitPoints = max_hitPoints; armorPoints = 0; min_damage = 2; max_damage = 4; dmg_type = Attack.Damage.Slashing; //SENSORY base_smell_range = 5; base_smell_threshold = 5; can_hear = true; sounds_i_can_hear.Add(SoundPulse.Sound_Types.Voidwraith_Scream); base_listen_threshold.Add(1); set_senses_to_baseline(); //OTHER my_name = "Gorewolf"; melee_dodge = 25; ranged_dodge = 15; savage_cooldown = 0; set_initial_dodge_values(); }
public bool is_spot_free(gridCoordinate targetpoint, Floor fl, Player pl, bool corporeal) { bool spot_free = true; if (corporeal) { spot_free = (!am_i_on_player(targetpoint, pl) && fl.isWalkable(targetpoint) && !fl.am_i_on_other_monster(targetpoint, my_Index)); } else { spot_free = (!am_i_on_player(targetpoint, pl) && !fl.am_i_on_other_monster(targetpoint, my_Index) && !fl.is_void_tile(targetpoint)); } bool door_opened = false; if (smart_monster) { fl.open_door_here(targetpoint, out door_opened); } if (smart_monster && !door_opened) { int DoodadID = -1; fl.is_destroyable_Doodad_here(targetpoint, out DoodadID); fl.damage_Doodad(rGen.Next(min_damage, max_damage + 1), DoodadID); } return(spot_free); }
public MossyPatch(int s_w_val, int s_h_val, gridCoordinate s_grid_pos, ref Random s_r_gen) { grid_position = s_grid_pos; width = s_w_val; height = s_h_val; rGen = s_r_gen; mossConfig = new List <List <bool> >(); for (int x = 0; x < width; x++) { List <bool> nextColumn = generate_new_column(); if (x == 0) { mossConfig.Add(nextColumn); } else { if (!test_for_valid_pattern(nextColumn, x - 1)) { while (!test_for_valid_pattern(nextColumn, x - 1)) { nextColumn = generate_new_column(); } } mossConfig.Add(nextColumn); } } }
public HollowKnight(gridCoordinate sGridCoord, ContentManager sCont, int sIndex) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { my_Texture = cont.Load <Texture2D>("Enemies/hollowKnight_idle"); can_hear = true; max_hitPoints = 5; hitPoints = max_hitPoints; armorPoints = 22; min_damage = 1; max_damage = 3; dmg_type = Attack.Damage.Piercing; //SENSORY sounds_i_can_hear.Add(SoundPulse.Sound_Types.Player); base_listen_threshold.Add(8); set_senses_to_baseline(); //OTHER speed_denominator = 1; my_name = "Hollow Knight"; melee_dodge = 5; ranged_dodge = 95; armor_effectiveness = 95; set_initial_dodge_values(); dodge_values_degrade = false; }
public Armored_Skeleton(gridCoordinate sGridCoord, ContentManager sCont, int sIndex, Armor_Skeleton_Weapon wType) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { my_weapon_type = wType; switch (my_weapon_type) { case Armor_Skeleton_Weapon.Greatsword: my_Texture = cont.Load <Texture2D>("Enemies/armored_skeleton_swordsman"); min_damage = 3; max_damage = 5; dmg_type = Attack.Damage.Slashing; break; case Armor_Skeleton_Weapon.Crossbow: my_Texture = cont.Load <Texture2D>("Enemies/armored_skeleton_crossbowman"); min_damage = 2; max_damage = 5; dmg_type = Attack.Damage.Piercing; break; case Armor_Skeleton_Weapon.Halberd: my_Texture = cont.Load <Texture2D>("Enemies/armored_skeleton_halberdier"); min_damage = 2; max_damage = 4; dmg_type = Attack.Damage.Piercing; break; case Armor_Skeleton_Weapon.Magic: my_Texture = cont.Load <Texture2D>("Enemies/armored_skeleton_elementalmage"); min_damage = 1; max_damage = 1; dmg_type = Attack.Damage.Crushing; break; } max_hitPoints = 18; hitPoints = max_hitPoints; armorPoints = 20; last_seen_player_at = new gridCoordinate(my_grid_coords[0]); //SENSORY base_sight_range = 5; can_hear = true; sounds_i_can_hear.Add(SoundPulse.Sound_Types.Player); sounds_i_can_hear.Add(SoundPulse.Sound_Types.Voidwraith_Scream); base_listen_threshold.Add(7); base_listen_threshold.Add(1); set_senses_to_baseline(); //OTHER my_name = "Skeleton"; melee_dodge = 15; ranged_dodge = 15; armor_effectiveness = 70; acid_cloud_cooldown = 0; set_initial_dodge_values(); smart_monster = true; }
public ZombieFanatic(gridCoordinate sGridCoord, ContentManager sCont, int sIndex) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { my_Texture = cont.Load <Texture2D>("Enemies/zombie_fanatic"); max_hitPoints = 15; hitPoints = max_hitPoints; armorPoints = 20; min_damage = 2; max_damage = 3; dmg_type = Attack.Damage.Slashing; //SENSORY base_sight_range = 4; can_hear = true; sounds_i_can_hear.Add(SoundPulse.Sound_Types.Voidwraith_Scream); sounds_i_can_hear.Add(SoundPulse.Sound_Types.Fanatic_Scream); base_listen_threshold.Add(1); base_listen_threshold.Add(1); set_senses_to_baseline(); //OTHER speed_denominator = 1; my_name = "Zombie Fanatic"; melee_dodge = 10; ranged_dodge = 5; armor_effectiveness = 50; last_seen_player_at = my_grid_coords[0]; set_initial_dodge_values(); smart_monster = true; }
public Zombie(gridCoordinate sGridCoord, ContentManager sCont, int sIndex) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { my_Texture = cont.Load <Texture2D>("Enemies/lolzombie"); max_hitPoints = 10; hitPoints = max_hitPoints; min_damage = 1; max_damage = 1; dmg_type = Attack.Damage.Crushing; //SENSORY base_sight_range = 3; can_hear = true; sounds_i_can_hear.Add(SoundPulse.Sound_Types.Voidwraith_Scream); sounds_i_can_hear.Add(SoundPulse.Sound_Types.Fanatic_Scream); base_listen_threshold.Add(1); base_listen_threshold.Add(1); set_senses_to_baseline(); //OTHER my_name = "Zombie"; melee_dodge = 0; ranged_dodge = 0; set_initial_dodge_values(); }
public bool is_doodad_within(Floor fl, int radius, Doodad.Doodad_Type target_doodad) { int doodad_index = 0; while (fl.Doodad_by_index(doodad_index) != null) { Doodad d = fl.Doodad_by_index(doodad_index); if (d.get_my_doodad_type() == target_doodad) { gridCoordinate doodad_gcoord = d.get_g_coord(); for (int i = 0; i < my_grid_coords.Count; i++) { if (doodad_gcoord.x >= (my_grid_coords[i].x - radius) && doodad_gcoord.x <= (my_grid_coords[i].x + radius) && doodad_gcoord.y >= (my_grid_coords[i].y - radius) && doodad_gcoord.y <= (my_grid_coords[i].y + radius)) { return(true); } } } doodad_index++; } return(false); }
public VisionRay(gridCoordinate my_start_gridC, gridCoordinate my_end_gridC) { my_start_coordinate = new gridCoordinate(my_start_gridC); my_end_coordinate = new gridCoordinate(my_end_gridC); my_current_position = new Vector2((my_start_gridC.x * 32) + 16, (my_start_gridC.y * 32) + 16); my_end_position = new Vector2((my_end_gridC.x * 32) + 16, (my_end_gridC.y * 32) + 16); }
public Goldpile(gridCoordinate sGridCoord, ContentManager sCont, int sQuan) { cont = sCont; my_grid_coord = sGridCoord; my_Position = new Vector2(sGridCoord.x * 32, sGridCoord.y * 32); my_quantity = sQuan; }
public void fire_crossbow(Floor fl, gridCoordinate target_GC) { Projectile prj = new Projectile(my_grid_coords[0], target_GC, Projectile.projectile_type.Crossbow_Bolt, ref cont, true, Scroll.Atk_Area_Type.singleTile); prj.set_damage_range(min_damage, max_damage); prj.set_damage_type(dmg_type); fl.create_new_projectile(prj); }
public void cast_flamebolt(Floor fl, gridCoordinate target_GC) { Projectile prj = new Projectile(my_grid_coords[0], target_GC, Projectile.projectile_type.Flamebolt, ref cont, true, Scroll.Atk_Area_Type.singleTile); prj.set_damage_range(flamebolt_min_damage, flamebolt_max_damage); prj.set_damage_type(flamebolt_dmg_type); fl.create_new_projectile(prj); fl.consume_mana(flamebolt_mana_cost); }
public void cast_frostbolt(Floor fl, gridCoordinate target_GC) { fl.addmsg("The Necromancer fires a frostbolt at you!"); Projectile prj = new Projectile(randomly_chosen_personal_coord(), target_GC, Projectile.projectile_type.Frostbolt, ref cont, true, Scroll.Atk_Area_Type.singleTile); prj.set_damage_range(min_damage, max_damage); prj.set_damage_type(dmg_type); fl.create_new_projectile(prj); fl.consume_mana(frostbolt_manacost); }
public void fire_arrow(Floor fl, gridCoordinate target_GC) { Projectile prj = new Projectile(randomly_chosen_personal_coord(), target_GC, Projectile.projectile_type.Arrow, ref cont, true, Scroll.Atk_Area_Type.singleTile); prj.set_damage_range(min_damage, max_damage); prj.set_damage_type(dmg_type); fl.create_new_projectile(prj); }
public void render_doodads_to_board(ref List <Doodad> fl_doodads, ContentManager cmgr) { for (int i = 0; i < doodad_list.Count; i++) { gridCoordinate doodad_coord = doodad_list[i].Value; gridCoordinate new_doodad_coord = new gridCoordinate(doodad_coord.x + startXPos, doodad_coord.y + startYPos); fl_doodads.Add(new Doodad(doodad_list[i].Key, cmgr, new_doodad_coord, fl_doodads.Count)); } }
//Lake only //Chasm only /// <summary> /// Constructor to initalize NaturalFeature as a River. /// </summary> /// <param name="river_start"></param> /// <param name="river_end"></param> /// <param name="deep_thick"></param> /// <param name="shallow_thick"></param> /// <param name="bank_thick"></param> public NaturalFeature(gridCoordinate river_start, gridCoordinate river_end, int deep_thick, int shallow_thick, int bank_thick) { river_startCoord = river_start; river_endCoord = river_end; deepwater_thickness = deep_thick; shallow_thickness = shallow_thick; banks_thickness = bank_thick; my_fType = Feature_Type.River; }
public Necromancer(gridCoordinate sGridCoord, ContentManager sCont, int sIndex, int rank = 1) : base(sGridCoord, sCont, sIndex, Monster_Size.Normal) { female = false; int gender_roll = rGen.Next(2); if (gender_roll == 0) { my_Texture = sCont.Load <Texture2D>("Enemies/necromancer_male"); pronoun = "him"; min_melee_damage = 1; max_melee_damage = 3; melee_damage_type = Attack.Damage.Crushing; } else { female = true; my_Texture = sCont.Load <Texture2D>("Enemies/necromancer_female"); pronoun = "her"; min_melee_damage = 1; max_melee_damage = 4; melee_damage_type = Attack.Damage.Slashing; } max_hitPoints = 34; hitPoints = max_hitPoints; armorPoints = 5; min_acidsplash_dmg = 1; max_acidsplash_dmg = 2; acid_splash_dmgtyp = Attack.Damage.Acid; min_damage = 2; max_damage = 6; dmg_type = Attack.Damage.Frost; can_hear = true; frostbolt_range = 4; acidsplash_range = 5; can_create_major = rank > 1; //Sensory base_sight_range = 2; sounds_i_can_hear.Add(SoundPulse.Sound_Types.Player); base_listen_threshold.Add(8); set_senses_to_baseline(); melee_dodge = 5; ranged_dodge = 5; armor_effectiveness = 10; set_initial_dodge_values(); smart_monster = true; }
public void fire_singletarget_bonespear(Floor fl, gridCoordinate target_GC) { fl.addmsg("The Boneyard spits a bone spear at you!"); Projectile bs = new Projectile(randomly_chosen_personal_coord(), target_GC, Projectile.projectile_type.Bonespear, ref cont, true, Scroll.Atk_Area_Type.singleTile); bs.set_damage_range(bone_spear_mindmg, bone_spear_maxdmg); bs.set_damage_type(bone_spear_dmgtyp); fl.create_new_projectile(bs); }
public void fire_flamebolt(Floor fl, gridCoordinate target_GC) { Projectile prj = new Projectile(randomly_chosen_personal_coord(), target_GC, Projectile.projectile_type.Flamebolt, ref cont, true, Scroll.Atk_Area_Type.singleTile); prj.set_damage_range(flamebolt_min_dmg, flamebolt_max_dmg); prj.set_damage_type(flamebolt_dmg_type); fl.create_new_projectile(prj); fl.consume_mana(flamebolt_mana_cost); }
public void render_monsters_to_board(ref List <Monster> fl_monsters, Floor fl) { for (int i = 0; i < monster_list.Count; i++) { string monster_name = monster_list[i].Key; gridCoordinate monster_coord = monster_list[i].Value; gridCoordinate new_monster_coord = new gridCoordinate(monster_coord.x + startXPos, monster_coord.y + startYPos); monster_list[i] = new KeyValuePair <string, gridCoordinate>(monster_name, new_monster_coord); } fl.add_specific_monsters(monster_list); }
public RACursor(Texture2D sRAText, Texture2D sCAText, Texture2D sBAText, Texture2D sSPText, gridCoordinate sGrid_c) { my_grid_coord = sGrid_c; my_position = new Vector2(my_grid_coord.x * 32, my_grid_coord.y * 32); my_RA_texture = sRAText; my_CA_texture = sCAText; my_BA_texture = sBAText; my_SP_texture = sSPText; my_active_texture = my_RA_texture; am_i_visible = false; }
public List <gridCoordinate> acid_splash_matrix(gridCoordinate target_coord) { List <gridCoordinate> splash_matrix = new List <gridCoordinate>(); splash_matrix.Add(target_coord); splash_matrix.Add(new gridCoordinate(target_coord.x - 1, target_coord.y)); splash_matrix.Add(new gridCoordinate(target_coord.x + 1, target_coord.y)); splash_matrix.Add(new gridCoordinate(target_coord.x, target_coord.y + 1)); splash_matrix.Add(new gridCoordinate(target_coord.x, target_coord.y - 1)); return(splash_matrix); }
public void cast_acid_splash(Floor fl, gridCoordinate target_GC) { fl.addmsg("The Necromancer tosses a glob of acid at you!"); Projectile prj = new Projectile(randomly_chosen_personal_coord(), target_GC, Projectile.projectile_type.AcidCloud, ref cont, true, Scroll.Atk_Area_Type.smallfixedAOE); prj.set_small_AOE_matrix(acid_splash_matrix(target_GC)); prj.set_damage_range(min_acidsplash_dmg, max_acidsplash_dmg); prj.set_damage_type(acid_splash_dmgtyp); fl.create_new_projectile(prj); acid_splash_cooldown = 5; fl.consume_mana(acidsplash_manacost); }
public void execute_cleave_attack(Player pl, Floor fl, int x_difference, int y_difference) { gridCoordinate playerCoord = new gridCoordinate(pl.get_my_grid_C()); fl.addmsg("The Red Knight swings its sword in a wide arc!"); pl.take_damage(generate_cleave_attack(), fl, "RArm"); pl.take_damage(generate_cleave_attack(), fl, "Chest"); pl.take_damage(generate_cleave_attack(), fl, "LArm"); fl.add_specific_effect(Floor.specific_effect.Cleave, playerCoord); if (x_difference == -1) { if (y_difference == 1) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x + 1, playerCoord.y)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y - 1)); } else if (y_difference == 0) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y - 1)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y + 1)); } else if (y_difference == -1) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x + 1, playerCoord.y)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y + 1)); } } else if (x_difference == 1) { if (y_difference == 1) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x - 1, playerCoord.y)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y - 1)); } else if (y_difference == 0) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y - 1)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y + 1)); } else if (y_difference == -1) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x - 1, playerCoord.y)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x, playerCoord.y + 1)); } } else if (x_difference == 0) { cleave_splash_damage(fl, new gridCoordinate(playerCoord.x - 1, playerCoord.y)); cleave_splash_damage(fl, new gridCoordinate(playerCoord.x + 1, playerCoord.y)); } }
public Popup(string txt, popup_msg_color clr, SpriteFont fnt, gridCoordinate g_c) { my_text = txt; my_font = fnt; float x_position = ((g_c.x * 32) + 16) - (fnt.MeasureString(txt).X / 2); float y_position = g_c.y * 32 + 16 - (fnt.LineSpacing); my_position = new Vector2(x_position, y_position); gc_origin = new gridCoordinate(g_c); assign_color(clr); }
public Popup(string txt, popup_msg_color clr, SpriteFont fnt, Vector2 s_position) { my_text = txt; my_font = fnt; float x_position = s_position.X - (fnt.MeasureString(txt).X / 2); float y_position = s_position.Y = s_position.Y - (fnt.LineSpacing); my_position = new Vector2(x_position, y_position); gc_origin = new gridCoordinate((int)Math.Round(s_position.X), (int)Math.Round(s_position.Y)); assign_color(clr); }
public SoundPulse(gridCoordinate start_grid_C, gridCoordinate sOrigin, int sDirection, int sStr, ref Random srGen, int sMultiplications, Sound_Types sType, List <gridCoordinate> sPath) { my_grid_position = new gridCoordinate(start_grid_C); my_direction = sDirection; strength = sStr; sound_origin = new gridCoordinate(sOrigin); my_path_taken = new List <gridCoordinate>(sPath); rGen = srGen; multiplications_remaining = sMultiplications; my_type = sType; }
public void cast_acid_cloud(Floor fl, gridCoordinate target_GC) { Projectile prj = new Projectile(my_grid_coords[0], target_GC, Projectile.projectile_type.AcidCloud, ref cont, true, Scroll.Atk_Area_Type.cloudAOE); prj.set_AOE_size(3); prj.set_damage_range(acidcloud_min_damage, acidcloud_max_damage); prj.set_damage_type(acidcloud_dmg_type); fl.create_new_projectile(prj); fl.consume_mana(acidcloud_mana_cost); acid_cloud_cooldown = 5; }
public FloorBuilder(ref List <List <Tile> > map, ref List <Monster> mons, ref List <Doodad> doods, ref List <Goldpile> dollars, ref gridCoordinate entrance, ref gridCoordinate exit) { floorTiles = map; badguys = mons; props = doods; money = dollars; dungeon_entrance_coord = entrance; dungeon_exit_coord = exit; master_texture_list = new List <KeyValuePair <Texture2D, Tile.Tile_Type> >(); }