public override void Run(Combat.Character character) { Int32? amount = EvaluationHelper.AsInt32(character, Amount, null); Boolean cankill = EvaluationHelper.AsBoolean(character, CanKill, true); Boolean absolute = EvaluationHelper.AsBoolean(character, Absolute, false); if (amount == null) { return; } Int32 scaledamount = amount.Value; if (absolute == false) { scaledamount = (Int32)(scaledamount / character.DefensiveInfo.DefenseMultiplier); } character.Life += scaledamount; if (cankill == false && character.Life == 0) { character.Life = 1; } }
public override void Run(Combat.Character character) { var amount = EvaluationHelper.AsInt32(character, Amount, null); var targetId = EvaluationHelper.AsInt32(character, TargetId, int.MinValue); var cankill = EvaluationHelper.AsBoolean(character, CanKill, true); var absolute = EvaluationHelper.AsBoolean(character, Absolute, false); if (amount == null) { return; } foreach (var target in character.GetTargets(targetId)) { var newamount = amount.Value; if (absolute == false && newamount < 0) { newamount = (int)(newamount * character.OffensiveInfo.AttackMultiplier); newamount = (int)(newamount / target.DefensiveInfo.DefenseMultiplier); } target.Life += newamount; if (target.Life == 0 && cankill == false) { target.Life = 1; } } }
public override void Run(Combat.Character character) { Int32? statenumber = EvaluationHelper.AsInt32(character, StateNumber, null); Boolean?playercontrol = EvaluationHelper.AsBoolean(character, Control, null); Int32? animationnumber = EvaluationHelper.AsInt32(character, AnimationNumber, null); if (statenumber == null) { return; } character.StateManager.ChangeState(statenumber.Value); if (playercontrol != null) { if (playercontrol == true) { character.PlayerControl = PlayerControl.InControl; } if (playercontrol == false) { character.PlayerControl = PlayerControl.NoControl; } } if (animationnumber != null) { character.SetLocalAnimation(animationnumber.Value, 0); } }
public override void Run(Combat.Character character) { Int32?varindex = EvaluationHelper.AsInt32(character, IntNumber, null); if (varindex == null) { return; } Int32 min = 0; Int32 max = 1; if (GetRange(character, out min, out max) == false) { return; } if (min > max) { Misc.Swap(ref min, ref max); } Int32 randomvalue = StateSystem.GetSubSystem <Random>().NewInt(min, max); if (character.Variables.SetInteger(varindex.Value, false, randomvalue) == false) { } }
public override void Run(Combat.Character character) { Int32 animationnumber = EvaluationHelper.AsInt32(character, AnimationNumber, 0); Boolean drawunder = EvaluationHelper.AsBoolean(character, DrawUnder, false); Point offset = EvaluationHelper.AsPoint(character, DrawPosition, new Point(0, 0)); Int32 randomdisplacement = EvaluationHelper.AsInt32(character, RandomDisplacement, 0); Combat.ExplodData data = new xnaMugen.Combat.ExplodData(); data.Scale = Vector2.One; data.AnimationNumber = animationnumber; data.CommonAnimation = true; data.Location = (Vector2)offset; data.PositionType = PositionType.P1; data.RemoveTime = -2; data.DrawOnTop = false; data.OwnPalFx = true; data.SpritePriority = (drawunder == true) ? -9 : 9; data.Random = new Point(randomdisplacement / 2, randomdisplacement / 2); data.Transparency = new Blending(); data.Creator = character; data.Offseter = character; Combat.Explod explod = new Combat.Explod(character.Engine, data); if (explod.IsValid == true) { explod.Engine.Entities.Add(explod); } }
public override void Run(Combat.Character character) { Int32 time = EvaluationHelper.AsInt32(character, Time, 1); Int32 target_id = EvaluationHelper.AsInt32(character, TargetId, Int32.MinValue); Vector2 offset = EvaluationHelper.AsVector2(character, Position, new Vector2(0, 0)); foreach (Combat.Character target in character.GetTargets(target_id)) { switch (BindPosition) { case BindToTargetPostion.Mid: offset += target.BasePlayer.Constants.Midposition; break; case BindToTargetPostion.Head: offset += target.BasePlayer.Constants.Headposition; break; case BindToTargetPostion.None: case BindToTargetPostion.Foot: default: break; } character.Bind.Set(target, offset, time, 0, false); break; } }
public override void Run(Combat.Character character) { SoundId?soundid = EvaluationHelper.AsSoundId(character, SoundId, null); Int32 volume = EvaluationHelper.AsInt32(character, Volume, 0); Int32 channelindex = EvaluationHelper.AsInt32(character, ChannelNumber, -1); Boolean priority = EvaluationHelper.AsBoolean(character, ChannelPriority, false); Single frequencymultiplier = EvaluationHelper.AsSingle(character, FrequencyMultiplier, 1.0f); Boolean loop = EvaluationHelper.AsBoolean(character, LoopSound, false); Int32? pan = EvaluationHelper.AsInt32(character, PanSound, null); Int32? abspan = EvaluationHelper.AsInt32(character, PanSoundAbsolute, null); if (soundid == null) { return; } Audio.SoundManager soundmanager = SoundId.IsCommon(false) ? character.Engine.CommonSounds : character.SoundManager; Audio.Channel channel = soundmanager.Play(channelindex, soundid.Value, priority, volume, frequencymultiplier, loop); if (channel != null && pan != null) { channel.RelativePan(pan.Value); } if (channel != null && abspan != null) { channel.AbsolutePan(abspan.Value); } }
public override void Run(Combat.Character character) { var color = EvaluationHelper.AsVector3(character, ScreenColor, Vector3.One); var time = EvaluationHelper.AsInt32(character, Time, 1); var underflag = EvaluationHelper.AsBoolean(character, Under, false); character.Engine.EnvironmentColor.Setup(color, time, underflag); }
public override void Run(Combat.Character character) { var spritepriority = EvaluationHelper.AsInt32(character, Priority, 0); spritepriority = Misc.Clamp(spritepriority, -5, 5); character.DrawOrder = spritepriority; }
public override void Run(Combat.Character character) { var distance = EvaluationHelper.AsInt32(character, GuardDistance, null); if (distance != null && character.OffensiveInfo.ActiveHitDef) { character.OffensiveInfo.HitDef.GuardDistance = distance.Value; } }
public override void Run(Combat.Character character) { Int32?power = EvaluationHelper.AsInt32(character, Power, null); if (power != null) { character.BasePlayer.Power = power.Value; } }
public static int Data_Guard_Sparkno(Character character, ref bool error) { if (character == null) { error = true; return(0); } return(EvaluationHelper.AsInt32(character, character.BasePlayer.Constants.DefaultGuardSparkNumber, -1)); }
public override void Run(Combat.Character character) { Int32 explod_id = EvaluationHelper.AsInt32(character, Id, Int32.MinValue); Int32 time = EvaluationHelper.AsInt32(character, Time, 1); foreach (Combat.Explod explod in character.GetExplods(explod_id)) { explod.Data.BindTime = time; } }
public override void Run(Combat.Character character) { var explodId = EvaluationHelper.AsInt32(character, Id, int.MinValue); var time = EvaluationHelper.AsInt32(character, Time, 1); foreach (var explod in character.GetExplods(explodId)) { explod.Data.BindTime = time; } }
public static Int32 Data_Guard_Sparkno(Object state, ref Boolean error) { Combat.Character character = state as Combat.Character; if (character == null) { error = true; return(0); } return(EvaluationHelper.AsInt32(character, character.BasePlayer.Constants.DefaultGuardSparkNumber, -1)); }
public override void Run(Combat.Character character) { Int32 time = EvaluationHelper.AsInt32(character, Time, -2); Vector3 paladd = EvaluationHelper.AsVector3(character, PaletteColorAdd, new Vector3(0, 0, 0)); Vector3 palmul = EvaluationHelper.AsVector3(character, PaletteColorMultiply, new Vector3(255, 255, 255)); Vector4 sinadd = EvaluationHelper.AsVector4(character, PaletteColorSineAdd, new Vector4(0, 0, 0, 1)); Boolean invert = EvaluationHelper.AsBoolean(character, PaletteColorInversion, false); Int32 basecolor = EvaluationHelper.AsInt32(character, PaletteColor, 255); character.PaletteFx.Set(time, paladd, palmul, sinadd, invert, basecolor / 255.0f); }
public override void Run(Combat.Character character) { var hits = EvaluationHelper.AsInt32(character, Hits, null); if (hits == null || hits <= 0) { return; } character.Team.Display.ComboCounter.AddHits(hits.Value); }
public override void Run(Combat.Character character) { Int32 explod_id = EvaluationHelper.AsInt32(character, ExplodId, Int32.MinValue); List <Combat.Explod> removelist = new List <Combat.Explod>(character.GetExplods(explod_id)); foreach (Combat.Explod explod in removelist) { explod.Kill(); } }
public override void Run(Combat.Character character) { var explodId = EvaluationHelper.AsInt32(character, ExplodId, int.MinValue); var removelist = new List <Combat.Explod>(character.GetExplods(explodId)); foreach (var explod in removelist) { explod.Kill(); } }
public override void Run(Combat.Character character) { var time = EvaluationHelper.AsInt32(character, Time, 1); var targetId = EvaluationHelper.AsInt32(character, TargetId, int.MinValue); var position = EvaluationHelper.AsVector2(character, Position, new Vector2(0, 0)); foreach (var target in character.GetTargets(targetId)) { target.Bind.Set(character, position, time, 0, true); } }
public override void Run(Combat.Character character) { var amount = EvaluationHelper.AsInt32(character, Amount, null); if (amount == null) { return; } character.Life = amount.Value; }
public void OnHit(HitDefinition hitdef, Character attacker, Boolean blocked) { if (hitdef == null) { throw new ArgumentNullException("hitdef"); } if (attacker == null) { throw new ArgumentNullException("attacker"); } Boolean alreadyfalling = IsFalling; HitDef.Set(hitdef); Attacker = attacker; Blocked = blocked; if (alreadyfalling == true) { HitDef.Fall = true; } else { m_character.JugglePoints = m_character.BasePlayer.Constants.AirJuggle; } HitCount = (m_character.MoveType == MoveType.BeingHit) ? HitCount + 1 : 1; HitStateType = m_character.StateType; m_character.DrawOrder = HitDef.P2SpritePriority; m_character.PlayerControl = PlayerControl.NoControl; m_character.MoveType = MoveType.BeingHit; if (blocked == true) { HitShakeTime = HitDef.GuardShakeTime; m_character.BasePlayer.Power += HitDef.P2GuardPowerAdjustment; } else { HitShakeTime = HitDef.ShakeTime; m_character.BasePlayer.Power += HitDef.P2HitPowerAdjustment; m_character.PaletteFx.Set(HitDef.PalFxTime, HitDef.PalFxAdd, HitDef.PalFxMul, HitDef.PalFxSinAdd, HitDef.PalFxInvert, HitDef.PalFxBaseColor); if (IsFalling == true) { Int32 neededjugglepoints = EvaluationHelper.AsInt32(Attacker, Attacker.StateManager.CurrentState.JugglePoints, 0); m_character.JugglePoints -= neededjugglepoints; } } }
public override void Run(Combat.Character character) { var time = EvaluationHelper.AsInt32(character, DisplayTime, null); if (time != null) { character.AfterImages.ModifyDisplayTime(time.Value); } else { character.AfterImages.IsActive = false; } }
public override void Run(Combat.Character character) { var helperName = Name ?? character.BasePlayer.Profile.DisplayName + "'s Helper"; var helperId = EvaluationHelper.AsInt32(character, Id, 0); var positionOffset = (Vector2)EvaluationHelper.AsPoint(character, Position, new Point(0, 0)); var facingflag = EvaluationHelper.AsInt32(character, Facing, 1); var statenumber = EvaluationHelper.AsInt32(character, StateNumber, 0); var keycontrol = EvaluationHelper.AsBoolean(character, KeyControl, false); var ownpalette = EvaluationHelper.AsBoolean(character, OwnPalette, false); var supermovetime = EvaluationHelper.AsInt32(character, SuperMoveTime, 0); var pausemovetime = EvaluationHelper.AsInt32(character, PauseMoveTime, 0); var scalex = EvaluationHelper.AsSingle(character, XScale, character.BasePlayer.Constants.Scale.X); var scaley = EvaluationHelper.AsSingle(character, YScale, character.BasePlayer.Constants.Scale.Y); var groundfront = EvaluationHelper.AsInt32(character, GroundFrontSize, character.BasePlayer.Constants.GroundFront); var groundback = EvaluationHelper.AsInt32(character, GroundBackSize, character.BasePlayer.Constants.GroundBack); var airfront = EvaluationHelper.AsInt32(character, AirFrontSize, character.BasePlayer.Constants.Airfront); var airback = EvaluationHelper.AsInt32(character, AirBackSize, character.BasePlayer.Constants.Airback); var height = EvaluationHelper.AsInt32(character, Height, character.BasePlayer.Constants.Height); var projectilescaling = EvaluationHelper.AsBoolean(character, ProjectileScaling, character.BasePlayer.Constants.ProjectileScaling); var headposition = (Vector2)EvaluationHelper.AsPoint(character, HeadPosition, (Point)character.BasePlayer.Constants.Headposition); var midposition = (Vector2)EvaluationHelper.AsPoint(character, MiddlePosition, (Point)character.BasePlayer.Constants.Midposition); var shadowoffset = EvaluationHelper.AsInt32(character, ShadowOffset, character.BasePlayer.Constants.Shadowoffset); var data = new Combat.HelperData(); data.Name = helperName; data.HelperId = helperId; data.Type = HelperType; data.FacingFlag = facingflag; data.PositionType = PositionType; data.CreationOffset = positionOffset; data.KeyControl = keycontrol; data.OwnPaletteFx = ownpalette; data.InitialStateNumber = statenumber; data.Scale = new Vector2(scalex, scaley); data.GroundFront = groundfront; data.GroundBack = groundback; data.AirFront = airfront; data.AirBack = airback; data.Height = height; data.SuperPauseTime = supermovetime; data.PauseTime = pausemovetime; data.ProjectileScaling = projectilescaling; data.HeadPosition = headposition; data.MidPosition = midposition; data.ShadowOffset = shadowoffset; var helper = new Combat.Helper(character.Engine, character, data); helper.Engine.Entities.Add(helper); }
public override void Run(Combat.Character character) { int?time = EvaluationHelper.AsInt32(character, Time, 30); var buffertime = EvaluationHelper.AsInt32(character, EndCommandBufferTime, 0); var movetime = EvaluationHelper.AsInt32(character, MoveTime, 0); var pausebg = EvaluationHelper.AsBoolean(character, PauseBackgrounds, true); var power = EvaluationHelper.AsInt32(character, PowerAdd, 0); #warning Documentation states that default should be 30. Testing looks to be 100. var animationnumber = EvaluationHelper.AsInt32(character, AnimationNumber, 100); var soundid = EvaluationHelper.AsSoundId(character, SoundId, null); var animationposition = EvaluationHelper.AsPoint(character, AnimationPosition, new Point(0, 0)); var darkenscreen = EvaluationHelper.AsBoolean(character, DarkenScreen, true); var p2defmul = EvaluationHelper.AsSingle(character, P2DefenseMultiplier, null); var unhittable = EvaluationHelper.AsBoolean(character, Unhittable, true); if (time == null) { return; } var pause = character.Engine.SuperPause; pause.Set(character, time.Value, buffertime, movetime, false, pausebg); character.BasePlayer.Power += power; var data = new Combat.ExplodData(); data.PositionType = PositionType.P1; data.Location = (Vector2)animationposition; data.RemoveTime = -2; data.CommonAnimation = EvaluationHelper.IsCommon(AnimationNumber, true); data.AnimationNumber = animationnumber; data.Scale = Vector2.One; data.SuperMove = true; data.Creator = character; data.Offseter = character; data.DrawOnTop = true; var explod = new Combat.Explod(character.Engine, data); if (explod.IsValid) { explod.Engine.Entities.Add(explod); } if (soundid != null) { Audio.SoundManager soundmanager = SoundId.IsCommon(true) ? character.Engine.CommonSounds : character.SoundManager; soundmanager.Play(soundid.Value); } }
public override void Run(Combat.Character character) { var time = EvaluationHelper.AsInt32(character, Time, null); var buffertime = EvaluationHelper.AsInt32(character, EndCommandBufferTime, 0); var movetime = EvaluationHelper.AsInt32(character, MoveTime, 0); var pausebg = EvaluationHelper.AsBoolean(character, PauseBackgrounds, true); if (time == null) { return; } character.Engine.Pause.Set(character, time.Value, buffertime, movetime, false, pausebg); }
public override void Run(Combat.Character character) { var slotnumber = EvaluationHelper.AsInt32(character, SlotNumber, 0); var statenumber = EvaluationHelper.AsInt32(character, StateNumber, int.MinValue); var time = EvaluationHelper.AsInt32(character, Time, 1); var forceair = EvaluationHelper.AsBoolean(character, ForceAir, false); if (slotnumber < 0 || slotnumber > 7) { return; } character.DefensiveInfo.HitOverrides[slotnumber].Set(Override, statenumber, time, forceair); }
public override void Run(Combat.Character character) { var time = EvaluationHelper.AsInt32(character, Time, 1); if (HitAttribute1 != null) { character.DefensiveInfo.HitBy1.Set(HitAttribute1, time, true); } if (HitAttribute2 != null) { character.DefensiveInfo.HitBy2.Set(HitAttribute2, time, true); } }
public override void Run(Combat.Character character) { Combat.Helper helper = character as Combat.Helper; if (helper == null) { return; } Int32 time = EvaluationHelper.AsInt32(character, Time, 1); Int32 facing = EvaluationHelper.AsInt32(character, Facing, 0); Vector2 offset = EvaluationHelper.AsVector2(character, Position, new Vector2(0, 0)); helper.Bind.Set(helper.BasePlayer, offset, time, facing, false); }
public override void Run(Combat.Character character) { var helper = character as Combat.Helper; if (helper == null) { return; } if (IntNumber != null) { var index = EvaluationHelper.AsInt32(character, IntNumber, null); var value = EvaluationHelper.AsInt32(character, Value, null); if (index != null && value != null && helper.Parent.Variables.AddInteger(index.Value, false, value.Value) == false) { } } if (FloatNumber != null) { var index = EvaluationHelper.AsInt32(character, FloatNumber, null); var value = EvaluationHelper.AsSingle(character, Value, null); if (index != null && value != null && helper.Parent.Variables.AddFloat(index.Value, false, value.Value) == false) { } } if (SystemIntNumber != null) { var index = EvaluationHelper.AsInt32(character, SystemIntNumber, null); var value = EvaluationHelper.AsInt32(character, Value, null); if (index != null && value != null && helper.Parent.Variables.AddInteger(index.Value, true, value.Value) == false) { } } if (SystemFloatNumber != null) { var index = EvaluationHelper.AsInt32(character, SystemFloatNumber, null); var value = EvaluationHelper.AsSingle(character, Value, null); if (index != null && value != null && helper.Parent.Variables.AddFloat(index.Value, true, value.Value) == false) { } } }