public static int alldie() { foreach (var obj in ObjList.ListVicinity(PartyLeader.GetLocation(), ObjectListFilter.OLC_CRITTERS)) { if (!(GameSystems.Party.PartyMembers).Contains(obj) && obj.GetNameId() != 14455) { obj.KillWithDeathEffect(); } } // damage_dice = dice_new( '104d20' ) // obj.damage( OBJ_HANDLE_NULL, 0, damage_dice ) return(1); }
public static bool check_for_protection_from_spells(SpellTarget[] t_list, int check) { holder = GameSystems.MapObject.CreateObject(14629, PartyLeader.GetLocation()); holder2 = GameSystems.MapObject.CreateObject(14629, PartyLeader.GetLocation()); var ret = false; foreach (var obj in t_list) { var prot_obj = obj.Object.FindItemByProto(6400); while (prot_obj != null && !is_spell_flag_set(prot_obj, Co8SpellFlag.ProtectionFromSpells)) { prot_obj.ClearItemFlag(ItemFlag.NO_DROP); holder.GetItem(prot_obj); prot_obj = obj.Object.FindItemByProto(6400); } var get_back_obj = holder.FindItemByProto(6400); while (get_back_obj != null) { obj.Object.GetItem(get_back_obj); get_back_obj.SetItemFlag(ItemFlag.NO_DROP); get_back_obj = holder.FindItemByProto(6400); } if (prot_obj != null) { ret = true; has_obj_list.Add(obj.Object); prot_obj.ClearItemFlag(ItemFlag.NO_DROP); holder2.GetItem(prot_obj); var new_obj = GameSystems.MapObject.CreateObject(6400, PartyLeader.GetLocation()); set_spell_flag(new_obj, Co8SpellFlag.ProtectionFromSpells); objs_to_destroy_list.Add(new_obj); new_obj.AddConditionToItem("Saving Throw Resistance Bonus", 0, 8); new_obj.AddConditionToItem("Saving Throw Resistance Bonus", 1, 8); new_obj.AddConditionToItem("Saving Throw Resistance Bonus", 2, 8); obj.Object.GetItem(new_obj); } } holder.Destroy(); if (!ret) { holder2.Destroy(); } return(ret); }
public static void NighInvulnerable() { massabset(0, 24); var necklace = GameSystems.MapObject.CreateObject(6239, PartyLeader.GetLocation()); var sword1 = GameSystems.MapObject.CreateObject(4599, PartyLeader.GetLocation()); var sword2 = GameSystems.MapObject.CreateObject(4599, PartyLeader.GetLocation()); var helm = GameSystems.MapObject.CreateObject(6036, PartyLeader.GetLocation()); necklace.AddConditionToItem("Ring of freedom of movement", 0, 0); necklace.AddConditionToItem("Amulet of Mighty Fists", 5, 5); necklace.AddConditionToItem("Weapon Enhancement Bonus", 5, 0); // necklace.item_condition_add_with_args( 'Weapon Holy', 0, 0 ) // necklace.item_condition_add_with_args( 'Weapon Lawful', 0, 0 ) necklace.AddConditionToItem("Weapon Silver", 0, 0); // necklace.condition_add_with_args( 'Thieves Tools Masterwork', 0, 0) // sword.item_condition_add_with_args( 'Weapon Lawful', 0, 0 ) // sword.item_condition_add_with_args( 'Weapon Silver', 0, 0 ) PartyLeader.GetItem(necklace); PartyLeader.GetItem(sword1); PartyLeader.GetItem(sword2); PartyLeader.GetItem(helm); PartyLeader.AddCondition("Monster Regeneration 5", 0, 0); PartyLeader.AddCondition("Monster Subdual Immunity", 0, 0); PartyLeader.AddCondition("Monster Energy Immunity", "Fire", 0); PartyLeader.AddCondition("Monster Energy Immunity", "Cold", 0); PartyLeader.AddCondition("Monster Energy Immunity", "Electricity", 0); PartyLeader.AddCondition("Monster Energy Immunity", "Acid", 0); PartyLeader.AddCondition("Monster Confusion Immunity", 0, 0); PartyLeader.AddCondition("Monster Stable", 0, 0); PartyLeader.AddCondition("Monster Untripable", 0, 0); PartyLeader.AddCondition("Monster Plant", 0, 0); PartyLeader.AddCondition("Monster Poison Immunity", 0, 0); PartyLeader.AddCondition("Saving Throw Resistance Bonus", 0, 10); PartyLeader.AddCondition("Saving Throw Resistance Bonus", 1, 10); PartyLeader.AddCondition("Saving Throw Resistance Bonus", 2, 10); PartyLeader.AddCondition("Weapon Holy", 0, 0); PartyLeader.AddCondition("Weapon Lawful", 0, 0); PartyLeader.AddCondition("Weapon Silver", 0, 0); PartyLeader.SetInt(obj_f.speed_run, 2); PartyLeader.AdjustMoney(+90000000); AttachParticles("Orb-Summon-Air-Elemental", PartyLeader); return; }
public static locXY loc() { return(PartyLeader.GetLocation()); }