Beispiel #1
0
        public Character FilterEntityAsCharacter(Entity entity, AffectTeam team)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            var c = entity as Character;

            if (c == null || c == this)
            {
                return(null);
            }

            if ((team & AffectTeam.Enemy) != AffectTeam.Enemy && Team != c.Team)
            {
                return(null);
            }
            if ((team & AffectTeam.Friendly) != AffectTeam.Friendly && Team == c.Team)
            {
                return(null);
            }

            return(c);
        }
Beispiel #2
0
        public HitDef(StateSystem statesystem, String label, TextSection textsection)
            : base(statesystem, label, textsection)
        {
            m_hitattr = textsection.GetAttribute<Combat.HitAttribute>("attr", null);
            m_hitflag = textsection.GetAttribute<Combat.HitFlag>("hitflag", Combat.HitFlag.Default);
            m_guardflag = textsection.GetAttribute<Combat.HitFlag>("guardflag", Combat.HitFlag.Default);
            m_affectteam = textsection.GetAttribute<AffectTeam>("affectteam", AffectTeam.Enemy);
            m_hitanimtype = textsection.GetAttribute<HitAnimationType>("animtype", HitAnimationType.Light);
            m_airhitanimtype = textsection.GetAttribute<HitAnimationType>("air.animtype", HitAnimationType);
            m_fallhitanimtype = textsection.GetAttribute<HitAnimationType>("fall.animtype", (AirHitAnimationType == HitAnimationType.Up) ? HitAnimationType.Up : HitAnimationType.Back);
            m_priority = textsection.GetAttribute<Combat.HitPriority>("priority", Combat.HitPriority.Default);
            m_damage = textsection.GetAttribute<Evaluation.Expression>("damage", null);
            m_pausetime = textsection.GetAttribute<Evaluation.Expression>("pausetime", null);
            m_guardpausetime = textsection.GetAttribute<Evaluation.Expression>("guard.pausetime", null);
            m_sparknumber = textsection.GetAttribute<Evaluation.PrefixedExpression>("sparkno", null);
            m_guardsparknumber = textsection.GetAttribute<Evaluation.PrefixedExpression>("guard.sparkno", null);
            m_sparkposition = textsection.GetAttribute<Evaluation.Expression>("sparkxy", null);
            m_hitsound = textsection.GetAttribute<Evaluation.PrefixedExpression>("hitsound", null);
            m_guardhitsound = textsection.GetAttribute<Evaluation.PrefixedExpression>("guardsound", null);
            m_attackeffect = textsection.GetAttribute<AttackEffect>("ground.type", AttackEffect.High);
            m_aireffect = textsection.GetAttribute<AttackEffect>("air.type", GroundAttackEffect);
            m_groundslidetime = textsection.GetAttribute<Evaluation.Expression>("ground.slidetime", null);
            m_guardslidetime = textsection.GetAttribute<Evaluation.Expression>("guard.slidetime", null);
            m_groundhittime = textsection.GetAttribute<Evaluation.Expression>("ground.hittime", null);
            m_guardhittime = textsection.GetAttribute<Evaluation.Expression>("guard.hittime", null);
            m_airhittime = textsection.GetAttribute<Evaluation.Expression>("air.hittime", null);
            m_guardctrltime = textsection.GetAttribute<Evaluation.Expression>("guard.ctrltime", null);
            m_guarddistance = textsection.GetAttribute<Evaluation.Expression>("guard.dist", null);
            m_yaccel = textsection.GetAttribute<Evaluation.Expression>("yaccel", null);
            m_groundvelocity = textsection.GetAttribute<Evaluation.Expression>("ground.velocity", null);
            m_guardvelocity = textsection.GetAttribute<Evaluation.Expression>("guard.velocity", null);
            m_airvelocity = textsection.GetAttribute<Evaluation.Expression>("air.velocity", null);
            m_airguardvelocity = textsection.GetAttribute<Evaluation.Expression>("airguard.velocity", null);
            m_groundcornerpushoff = textsection.GetAttribute<Evaluation.Expression>("ground.cornerpush.veloff", null);
            m_aircornerpushoff = textsection.GetAttribute<Evaluation.Expression>("air.cornerpush.veloff", null);
            m_downcornerpushoff = textsection.GetAttribute<Evaluation.Expression>("down.cornerpush.veloff", null);
            m_guardcornerpushoff = textsection.GetAttribute<Evaluation.Expression>("guard.cornerpush.veloff", null);
            m_airguardcornerpushoff = textsection.GetAttribute<Evaluation.Expression>("airguard.cornerpush.veloff", null);
            m_airguardctrltime = textsection.GetAttribute<Evaluation.Expression>("airguard.ctrltime", null);
            m_airjuggle = textsection.GetAttribute<Evaluation.Expression>("air.juggle", null);
            m_mindistance = textsection.GetAttribute<Evaluation.Expression>("mindist", null);
            m_maxdistance = textsection.GetAttribute<Evaluation.Expression>("maxdist", null);
            m_snap = textsection.GetAttribute<Evaluation.Expression>("snap", null);
            m_p1spritepriority = textsection.GetAttribute<Evaluation.Expression>("p1sprpriority", null);
            m_p2spritepriority = textsection.GetAttribute<Evaluation.Expression>("p2sprpriority", null);
            m_p1facing = textsection.GetAttribute<Evaluation.Expression>("p1facing", null);
            m_p1getp2facing = textsection.GetAttribute<Evaluation.Expression>("p1getp2facing", null);
            m_p2facing = textsection.GetAttribute<Evaluation.Expression>("p2facing", null);
            m_p1statenumber = textsection.GetAttribute<Evaluation.Expression>("p1stateno", null);
            m_p2statenumber = textsection.GetAttribute<Evaluation.Expression>("p2stateno", null);
            m_p2getp1state = textsection.GetAttribute<Evaluation.Expression>("p2getp1state", null);
            m_forcestand = textsection.GetAttribute<Evaluation.Expression>("forcestand", null);
            m_fall = textsection.GetAttribute<Evaluation.Expression>("fall", null);
            m_fallxvelocity = textsection.GetAttribute<Evaluation.Expression>("fall.xvelocity", null);
            m_fallyvelocity = textsection.GetAttribute<Evaluation.Expression>("fall.yvelocity", null);
            m_fallrecover = textsection.GetAttribute<Evaluation.Expression>("fall.recover", null);
            m_fallrecovertime = textsection.GetAttribute<Evaluation.Expression>("fall.recovertime", null);
            m_falldamage = textsection.GetAttribute<Evaluation.Expression>("fall.damage", null);
            m_airfall = textsection.GetAttribute<Evaluation.Expression>("air.fall", null);
            m_downvelocity = textsection.GetAttribute<Evaluation.Expression>("down.velocity", null);
            m_downhittime = textsection.GetAttribute<Evaluation.Expression>("down.hittime", null);
            m_downbounce = textsection.GetAttribute<Evaluation.Expression>("down.bounce", null);
            m_targetid = textsection.GetAttribute<Evaluation.Expression>("id", null);
            m_chainid = textsection.GetAttribute<Evaluation.Expression>("chainid", null);
            m_nochainid = textsection.GetAttribute<Evaluation.Expression>("nochainid", null);
            m_hitonce = textsection.GetAttribute<Evaluation.Expression>("hitonce", null);
            m_kill = textsection.GetAttribute<Evaluation.Expression>("kill", null);
            m_guardkill = textsection.GetAttribute<Evaluation.Expression>("guard.kill", null);
            m_fallkill = textsection.GetAttribute<Evaluation.Expression>("fall.kill", null);
            m_numberofhits = textsection.GetAttribute<Evaluation.Expression>("numhits", null);
            m_p1powerincrease = textsection.GetAttribute<Evaluation.Expression>("getpower", null);
            m_p2powerincrease = textsection.GetAttribute<Evaluation.Expression>("givepower", null);
            m_paltime = textsection.GetAttribute<Evaluation.Expression>("palfx.time", null);
            m_palmul = textsection.GetAttribute<Evaluation.Expression>("palfx.mul", null);
            m_paladd = textsection.GetAttribute<Evaluation.Expression>("palfx.add", null);
            m_palsinadd = textsection.GetAttribute<Evaluation.Expression>("palfx.sinadd", null);
            m_palinvert = textsection.GetAttribute<Evaluation.Expression>("palfx.invertall", null);
            m_palcolor = textsection.GetAttribute<Evaluation.Expression>("palfx.color", null);
            m_shaketime = textsection.GetAttribute<Evaluation.Expression>("envshake.time", null);
            m_shakefreq = textsection.GetAttribute<Evaluation.Expression>("envshake.freq", null);
            m_shakeamplitude = textsection.GetAttribute<Evaluation.Expression>("envshake.ampl", null);
            m_shakephaseoffset = textsection.GetAttribute<Evaluation.Expression>("envshake.phase", null);
            m_fallshaketime = textsection.GetAttribute<Evaluation.Expression>("fall.envshake.time", null);
            m_fallshakefreq = textsection.GetAttribute<Evaluation.Expression>("fall.envshake.freq", null);
            m_fallshakeamplitude = textsection.GetAttribute<Evaluation.Expression>("fall.envshake.ampl", null);
            m_fallshakephaseoffset = textsection.GetAttribute<Evaluation.Expression>("fall.envshake.phase", null);
            m_attackwidth = textsection.GetAttribute<Evaluation.Expression>("attack.width", null);

            #warning Note this.
            #if EMULATE_ENGINE_BUG
            if (m_hitanimtype == HitAnimationType.Back) m_hitanimtype = HitAnimationType.Hard;

            m_palcolor = null;
            #endif
        }
Beispiel #3
0
		public Character FilterEntityAsCharacter(Entity entity, AffectTeam team)
		{
			if (entity == null) throw new ArgumentNullException("entity");

			Character c = entity as Character;
			if (c == null || c == this) return null;

			if (((team & AffectTeam.Enemy) != AffectTeam.Enemy) && (Team != c.Team)) return null;
			if (((team & AffectTeam.Friendly) != AffectTeam.Friendly) && (Team == c.Team)) return null;

			return c;
		}