本文整理汇总了C#中Spell类的典型用法代码示例。如果您正苦于以下问题:C# Spell类的具体用法?C# Spell怎么用?C# Spell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Spell类属于命名空间,在下文中一共展示了Spell类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SpellShapeshiftFormSelector
public SpellShapeshiftFormSelector(Spell spell, bool stance)
{
InitializeComponent();
_spell = spell;
_stance = stance;
Load();
}
示例2: Do
public override void Do(Mage caster, Spell origin_spell)
{
SEDispelOldestSlot dispel = Instantiate(this);
dispel.StartCoroutine(dispel.UpdateDispel(caster));
base.Do(caster, origin_spell);
}
示例3: Start
public void Start()
{
player = GameMainReferences.Instance.PlayerCharacter;
_spell = player.GetSpellAtIndex(_spellIndex);
ChangeSpellIcon(_spell);
player.OnSpellChanged += OnSpellChanged;
}
示例4: Input
public Input(Obj_AI_Base _target, Spell s, Vector3 _from, Vector3 _rangeCheckFrom)
{
Target = _target;
SpellDelay = s.Delay;
SpellMissileSpeed = s.Speed;
SpellWidth = s.Width;
SpellRange = s.Range;
SpellCollisionable = s.Collision;
SpellSkillShotType = s.Type;
Path = Target.GetWaypoints();
if (Target is Obj_AI_Hero)
{
Obj_AI_Hero t = Target as Obj_AI_Hero;
AvgReactionTime = t.AvgMovChangeTime();
LastMovChangeTime = t.LastMovChangeTime();
AvgPathLenght = t.AvgPathLenght();
}
else
{
AvgReactionTime = 0;
LastMovChangeTime = 0;
AvgPathLenght = 0;
}
From = _from;
RangeCheckFrom = _rangeCheckFrom;
}
示例5: CureMezzSpellHandler
// constructor
public CureMezzSpellHandler(GameLiving caster, Spell spell, SpellLine line)
: base(caster, spell, line)
{
// RR4: now it's a list
m_spellTypesToRemove = new List<string>();
m_spellTypesToRemove.Add("Mesmerize");
}
示例6: TriggerSpellRefresh
/// <summary>
/// Triggers a spell refresh event. The spell refresh indicates that the spells destroy timer has been refreshed.
/// Typically this will be an attached spell refreshing the timer.
/// </summary>
/// <param name="obj"></param>
private void TriggerSpellRefresh(Spell obj)
{
if(OnSpellRefresh != null)
{
OnSpellRefresh();
}
}
示例7: SpellDamage
public SpellDamage(Spell.SpellBase spell, float[] spellDamageValue, float[] spellDamageModifier, DamageType damageType)
{
Spell = spell;
SpellDamageValue = spellDamageValue;
SpellDamageModifier = spellDamageModifier;
DamageType = damageType;
}
示例8: MagicInfo
public MagicInfo (BinaryReader reader, int version = int.MaxValue, int Customversion = int.MaxValue)
{
Name = reader.ReadString();
Spell = (Spell)reader.ReadByte();
BaseCost = reader.ReadByte();
LevelCost = reader.ReadByte();
Icon = reader.ReadByte();
Level1 = reader.ReadByte();
Level2 = reader.ReadByte();
Level3 = reader.ReadByte();
Need1 = reader.ReadUInt16();
Need2 = reader.ReadUInt16();
Need3 = reader.ReadUInt16();
DelayBase = reader.ReadUInt32();
DelayReduction = reader.ReadUInt32();
PowerBase = reader.ReadUInt16();
PowerBonus = reader.ReadUInt16();
MPowerBase = reader.ReadUInt16();
MPowerBonus = reader.ReadUInt16();
if (version > 66)
Range = reader.ReadByte();
if (version > 70)
{
MultiplierBase = reader.ReadSingle();
MultiplierBonus = reader.ReadSingle();
}
}
示例9: SearingPetEffect
private int currentTick = 0; // Count ticks
public SearingPetEffect(GamePlayer owner)
: base(RealmAbilities.SearingPetAbility.DURATION)
{
EffectOwner = owner;
// Build spell
DBSpell tSpell = new DBSpell();
tSpell.AllowAdd = false;
tSpell.Description = "Damage the target.";
tSpell.Name = "PBAoE damage";
tSpell.Target = "Enemy";
tSpell.Radius = 0;
tSpell.Range = WorldMgr.VISIBILITY_DISTANCE;
tSpell.CastTime = 0;
tSpell.Duration = 0;
tSpell.Frequency = 0;
tSpell.Pulse = 0;
tSpell.Uninterruptible = true;
tSpell.Type = "DirectDamage";
tSpell.Damage = spellDamage;
tSpell.DamageType = (int)eDamageType.Heat;
tSpell.Value = 0;
tSpell.Icon = 476; // not official effect
tSpell.ClientEffect = 476; // not official effect
petSpell = new Spell(tSpell, 1);
petSpellLine = new SpellLine("RAs", "RealmAbilitys", "RealmAbilitys", true);
}
示例10: LoadOKTW
public void LoadOKTW()
{
Q = new Spell(SpellSlot.Q);
E = new Spell(SpellSlot.E);
W = new Spell(SpellSlot.W);
R = new Spell(SpellSlot.R);
Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWard", "Auto Ward").SetValue(true));
Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("autoBuy", "Auto buy blue trinket after lvl 6").SetValue(false));
Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWardBlue", "Auto Blue Trinket").SetValue(true));
Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWardCombo", "Only combo mode").SetValue(true));
Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWardPink", "Auto VisionWard, OracleLens").SetValue(true));
foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
{
if (hero.IsEnemy)
{
if (hero.ChampionName == "Rengar")
rengar = true;
if (hero.ChampionName == "Vayne")
Vayne = hero;
}
}
Game.OnUpdate += Game_OnUpdate;
Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
GameObject.OnCreate +=GameObject_OnCreate;
GameObject.OnDelete += GameObject_OnDelete;
}
示例11: InitPositionInfo
public static PositionInfo InitPositionInfo(Vector2 pos, float extraDelayBuffer, float extraEvadeDistance, Vector2 lastMovePos, Spell lowestEvadeTimeSpell) //clean this shit up
{
var extraDist = Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("ExtraCPADistance").GetValue<Slider>().Value;
var posInfo = canHeroWalkToPos(pos, myHero.MoveSpeed, extraDelayBuffer + Game.Ping, extraDist);
posInfo.isDangerousPos = CheckDangerousPos(pos, 6);
posInfo.hasExtraDistance = extraEvadeDistance > 0 ? CheckDangerousPos(pos, extraEvadeDistance) : false;// ? 1 : 0;
posInfo.closestDistance = posInfo.distanceToMouse;
posInfo.intersectionTime = GetIntersectTime(lowestEvadeTimeSpell, myHero.ServerPosition.To2D(), pos);
posInfo.distanceToMouse = pos.Distance(lastMovePos);
posInfo.posDistToChamps = GetDistanceToChampions(pos);
if (Evade.menu.SubMenu("MiscSettings").SubMenu("FastEvade").Item("RejectMinDistance").GetValue<Slider>().Value > 0
&& Evade.menu.SubMenu("MiscSettings").SubMenu("FastEvade").Item("RejectMinDistance").GetValue<Slider>().Value >
posInfo.closestDistance) //reject closestdistance
{
posInfo.rejectPosition = true;
}
if (Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("MinComfortZone").GetValue<Slider>().Value >
posInfo.posDistToChamps)
{
posInfo.hasComfortZone = false;
}
return posInfo;
}
示例12: GetAttackRange
public static TileGroup GetAttackRange(Unit caster, Spell spell)
{
List<Tile> AttackRange = new List<Tile>();
AttackRange.Add(caster.CurrentTile);
for (int ii = spell.MaxRange; ii > 0; ii--)
{
for (int jj = AttackRange.Count - 1; jj >= 0; jj--)
{
Tile rootTile = AttackRange[jj];
foreach (Tile curTile in rootTile.NeighboringTiles.Tiles)
{
if (!AttackRange.Contains(curTile))
{
AttackRange.Add(curTile);
}
}
}
}
for (int ii = AttackRange.Count - 1; ii >= 0; ii--)
{
if(Knowledge.NaiveDistance(caster.CurrentTile, AttackRange[ii]) < spell.MinRange)
{
AttackRange.RemoveAt(ii);
}
}
return new TileGroup(AttackRange);
}
示例13: SpellState
public SpellState(Spell spellToTrack, byte priority)
{
TrackedSpell = spellToTrack;
_Cooldown = 0M;
_ActiveOnTarget = 0M;
Priority = priority;
}
示例14: OnGameLoad
private static void OnGameLoad(EventArgs args)
{
if (Player.ChampionName != "Riven") return;
Game.PrintChat("Hoola Riven - Loaded Successfully, Good Luck! :):)");
Q = new Spell(SpellSlot.Q);
W = new Spell(SpellSlot.W);
E = new Spell(SpellSlot.E, 300);
R = new Spell(SpellSlot.R, 900);
R.SetSkillshot(0.25f, 45, 1600, false, SkillshotType.SkillshotCone);
OnMenuLoad();
Timer = new Render.Text("Q Expiry => " + ((double)(LastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 140, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.MidnightBlue, "calibri");
Timer2 = new Render.Text("R Expiry => " + (((double)LastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 60, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.IndianRed, "calibri");
Game.OnUpdate += OnTick;
Drawing.OnDraw += Drawing_OnDraw;
Drawing.OnEndScene += Drawing_OnEndScene;
Obj_AI_Base.OnProcessSpellCast += OnCast;
Obj_AI_Base.OnDoCast += OnDoCast;
Obj_AI_Base.OnDoCast += OnDoCastLC;
Obj_AI_Base.OnPlayAnimation += OnPlay;
Obj_AI_Base.OnProcessSpellCast += OnCasting;
Interrupter2.OnInterruptableTarget += Interrupt;
}
示例15: Apply
protected override void Apply()
{
var channel = m_aura.Controller as SpellChannel;
SpellCast origCast = null;
if (spell == null)
{
if (channel != null)
{
origCast = channel.Cast;
}
else
{
origCast = m_aura.Auras.Owner.SpellCast;
}
spell = m_spellEffect.TriggerSpell;
if (spell == null)
{
LogManager.GetCurrentClassLogger().Warn("Found invalid periodic TriggerSpell in Spell {0} ({1}) ",
m_aura.Spell,
(uint)m_spellEffect.TriggerSpellId);
return;
}
}
SpellCast.ValidateAndTriggerNew(spell, m_aura.CasterReference, Owner, Owner, channel, origCast != null ? origCast.UsedItem : null,
null, m_spellEffect);
}