private void CreateLine(EntityBase entity) { EntityBase parent; if (this.line == null) { this.line = GameLogic.EffectGet("Effect/Attributes/LifeLine"); this.line.transform.SetParent(GameNode.m_PoolParent.transform); this.mLineCtrl = this.line.GetComponent <LifeLineCtrl>(); this.mLineCtrl.mCacheEvent = new Action(this.CacheEvent); } this.mLineCtrl.UpdateEntity(base.m_Entity, entity); this.hit = MathDxx.CeilToInt(this.attackratio * base.m_Entity.m_EntityData.attribute.AttackValue.ValueCount); entity.m_EntityData.ExcuteBuffs(base.m_Entity, base.BuffID, base.buff_data.Attribute, (float)-this.hit); if (this.m_EntityBaby != null) { parent = this.m_EntityBaby.GetParent(); } else { parent = base.m_Entity; } this.hprecover = MathDxx.CeilToInt(this.hprecoverratio * parent.m_EntityData.attribute.GetHPBase()); parent.m_EntityData.ExcuteBuffs(base.m_Entity, base.BuffID, base.buff_data.Attribute, (float)this.hprecover); }
public BulletTransmit(EntityBase entity, int bulletid, bool clear = false) { this.m_Entity = entity; this.weapondata = LocalModelManager.Instance.Weapon_weapon.GetBeanById(bulletid); this.mThunderRatio = 1f; this.attackratio = 1f; if (this.m_Entity == null) { this.attribute = new EntityAttributeBase(); } else { if (!clear) { this.attribute = new EntityAttributeBase(this.m_Entity.m_Data.CharID); this.m_Entity.m_EntityData.attribute.AttributeTo(this.attribute); this.CritRate = this.attribute.CritRate.Value; this.CritSuperRate = this.attribute.CritSuperRate.Value; this.mThroughEnemy = this.m_Entity.m_EntityData.ThroughEnemy; this.mThroughRatio = this.m_Entity.m_EntityData.ThroughRatio; this.mDebuffList = this.m_Entity.GetDebuffList(); this.mHitCreate2 = this.m_Entity.m_EntityData.HitCreate2; this.mHitCreate2Percent = this.m_Entity.m_EntityData.mHitCreate2Percent; this.mHitSputter = this.m_Entity.m_EntityData.BulletSputter; this.trailType = this.m_Entity.m_EntityData.ArrowTrailType; this.headType = this.m_Entity.m_EntityData.ArrowHeadType; } else { this.Clear(); } this.attack = MathDxx.CeilToInt((float)this.m_Entity.m_EntityData.GetAttack(this.weapondata.Attack)); } }
public HitStruct GetAttackStruct() { long num = MathDxx.CeilToInt(this.attack * this.attackratio); this.m_AttackStruct.before_hit = -num; this.m_AttackStruct.type = HitType.Normal; return(this.m_AttackStruct); }
private void CreateBombOne() { Vector3 endpos = this.get_random_position(); BulletBombDodge dodge = GameLogic.Release.Bullet.CreateBullet(null, 0xbda, endpos + new Vector3(0f, 21f, 0f), 0f) as BulletBombDodge; dodge.SetEndPos(endpos); dodge.SetTarget(null, 1); dodge.mBulletTransmit.SetAttack((long)MathDxx.CeilToInt(0.35f * GameLogic.Self.m_EntityData.MaxHP)); }
private void OnLight45(EntityBase target) { if (target != null) { BulletBase base2 = GameLogic.Release.Bullet.CreateBullet(base.m_Entity, 0xbc5, target.m_Body.EffectMask.transform.position, 0f); base2.AddCantHit(target); base2.mBulletTransmit.SetAttack((long)MathDxx.CeilToInt(this.hitratio * base.m_Entity.m_EntityData.GetAttackBase())); } }
private void Update() { if (this.mData.showui) { float num = Updater.AliveTime - this.starttime; float num2 = this.mData.lasttime - num; this.set_time(MathDxx.CeilToInt(num2)); } }
private void OnAttack() { EntityBase target = GameLogic.Release.Entity.GetNearEntity(base.m_Entity, this.range, false); if (target != null) { GameLogic.Release.MapEffect.Get("Game/SkillPrefab/SkillAlone1042_One").transform.position = target.m_Body.EffectMask.transform.position; long beforehit = -((long)MathDxx.CeilToInt(base.m_Entity.m_EntityData.GetAttackBase() * this.hitratio)); GameLogic.SendHit_Skill(target, beforehit); } }
private void GetRandomGold(ref List <BattleDropData> list, Soldier_soldier data) { int dropDataGold = GameLogic.Hold.BattleData.mModeData.GetDropDataGold(data); List <Drop_GoldModel.DropGold> dropList = LocalModelManager.Instance.Drop_Gold.GetDropList(dropDataGold); int num2 = 0; int count = dropList.Count; while (num2 < count) { int num4 = MathDxx.CeilToInt((dropList[num2].Gold * (1f + GameLogic.SelfAttribute.InGameGold.Value)) * LocalModelManager.Instance.Stage_Level_stagechapter.GetGoldRate()); list.Add(new BattleDropData(FoodType.eGold, num4)); num2++; } }
private void Update() { if (this.bStart) { this.starttime -= Updater.deltaIgnoreTime; if (this.second != MathDxx.CeilToInt(this.starttime)) { this.second = MathDxx.CeilToInt(this.starttime); if (this.second >= 0) { GameLogic.Hold.Sound.PlayUI(SoundUIType.eRebornSecond); } this.Text_Time.text = this.second.ToString(); } if (this.second < 0) { this.bStart = false; this.CloseWindow(); } } }
private void ShowBossDeadEvent() { if (this.roomList[this.currentRoomID].IsBossRoom && !this.IsLastRoom()) { if (GameLogic.Self != null) { long change = GameLogic.Self.m_EntityData.attribute.KillBossShield.Value; GameLogic.Self.m_EntityData.UpdateShieldValueChange(change); float num2 = GameLogic.Self.m_EntityData.attribute.KillBossShieldPercent.Value; long num3 = MathDxx.CeilToInt(GameLogic.Self.m_EntityData.attribute.GetHPBase() * num2); GameLogic.Self.m_EntityData.UpdateShieldValueChange(num3); } int num4 = GameLogic.Random(0, 100); int goodsID = 0x2329; if ((num4 < this.mDemonRatio) || GameLogic.Self.m_EntityData.GetOnlyDemon()) { goodsID = 0x2330; } GameLogic.Release.MapCreatorCtrl.CreateOneGoods(goodsID, 5, 3); } }
private void OnAttack() { if (GameLogic.Random((float)0f, (float)100f) <= this.createweight) { GameLogic.Release.MapCreatorCtrl.RandomItem(base.m_Entity.position, 100, out float num, out float num2); Vector3 endpos = new Vector3(num, 0f, num2); GameLogic.Release.Bullet.CreateSlopeBullet(base.m_Entity, this.bulletid, endpos + new Vector3(0f, 21f, 0f), endpos).mBulletTransmit.SetAttack((long)MathDxx.CeilToInt(this.hitratio * base.m_Entity.m_EntityData.GetAttackBase())); } }
protected override void TriggerEnter(EntityBase entity) { int num = MathDxx.CeilToInt(base.m_Entity.m_EntityData.attribute.AttackValue.Value * base.args[0]); GameLogic.SendHit_Skill(entity, (long)-num); }
private void OnAttack() { EntityBase base2 = GameLogic.Release.Entity.FindCanAttackRandom(base.m_Entity); if (base2 != null) { float rota = Utils.getAngle(base2.position - base.m_Entity.position) + GameLogic.Random((float)-10f, (float)10f); float num2 = Vector3.Distance(base2.position, base.m_Entity.position) - 1f; Vector3 pos = base2.position + (new Vector3(MathDxx.Sin(rota + 180f), 0f, MathDxx.Cos(rota + 180f)) * num2); pos.y = 1f; GameLogic.Release.Bullet.CreateBullet(base.m_Entity, this.bulletid, pos, rota).mBulletTransmit.SetAttack((long)MathDxx.CeilToInt(this.hitratio * base.m_Entity.m_EntityData.GetAttackBase())); } }
private void OnAttack() { Vector3 position = base.m_Entity.position; float angle = GameLogic.Random((float)0f, (float)360f); Vector3 vector2 = new Vector3(MathDxx.Sin(angle), 1f, MathDxx.Cos(angle)) * 2f; float rota = GameLogic.Random((float)0f, (float)360f); GameLogic.Release.Bullet.CreateBullet(base.m_Entity, 0xbc4, position + vector2, rota).mBulletTransmit.SetAttack((long)MathDxx.CeilToInt(this.hitratio * base.m_Entity.m_EntityData.GetAttackBase())); }