diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index afa844d7..5e988058 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/1.6/1.6/Defs/Effects/WulaFleckDefs.xml b/1.6/1.6/Defs/Effects/WulaFleckDefs.xml index e7152636..cc005a9d 100644 --- a/1.6/1.6/Defs/Effects/WulaFleckDefs.xml +++ b/1.6/1.6/Defs/Effects/WulaFleckDefs.xml @@ -3,15 +3,15 @@ WULA_GunTail_Plasma Projectile - 0.50 - 1 - 1.2 - 0.025 + 0.2 + 0.1 + 0.2 + 5 Wula/Mote/WULA_GunTail_Plasma MoteGlow - 4.25 - (179,127,67,155) + 2.5 + (109, 208, 117, 155) diff --git a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml index 8fe1b576..ff0bd734 100644 --- a/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml +++ b/1.6/1.6/Defs/PawnKinds/PawnKinds_Wula.xml @@ -245,6 +245,43 @@
  • Wula_AI_Rocket_Panzer_Weapon
  • + + Wula_AI_Panzer_Destroyer + + Wula_AI_Panzer_Destroyer + 500 + false + PlayerColony + false + true + + Wula/Things/Wula_Mech_Mobile_Factory/Flying/Wula_Mech_Mobile_Factory_Flying_ + 1 + 1 + 2 + false + + +
  • + + Wula/Things/Wula_AI_Heavy_Panzer/Bodies/Naked_Thin + Wula/Things/WULA_Cat/AllegianceOverlays/None + CutoutWithOverlay + Graphic_Multi + 9 + + (1.4, 1.8, 1.4) + + +
  • +
    + 99999~99999 + + 0.7 + +
  • Wula_AI_Panzer_Destroyer_Weapon
  • +
    +
    Wula_Mech_Mobile_Shield diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml index 7843e7df..bf33c124 100644 --- a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml +++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_FE_Machine_Weapon.xml @@ -367,7 +367,7 @@ Wula_AI_Heavy_Panzer_Turret_Weapon - HAp-6"巨戟"的炮塔,两门可以洞穿护盾的晶化炮就是为打击护盾目标量身定做的。 + HAp-6"巨戟"的炮塔,两门高射速晶化炮可以在对抗强大装甲目标和大量软目标间取得平衡。 None true Ultra @@ -391,7 +391,7 @@ Bullet_Wula_AI_Heavy_Panzer_Turret_Weapon 0 5.9 - 60 + 52 1 2 4 @@ -649,6 +649,150 @@ + + Wula_AI_Panzer_Destroyer_Turret_Weapon + + HDp-1"冥波"的炮塔,其粒子炮可以洞穿那些最厚的护甲防御。 + None + true + Ultra + + Wula/Weapon/WULA_WM_Panzer_Turret + Graphic_Single + 3 + + 0.33 + + 150 + 1 + 2 + 2 + 2 + + +
  • + WulaFallenEmpire.Verb_TurretOffestShoot + true + Bullet_Wula_AI_Panzer_Destroyer_Turret_Weapon + 0 + 8.9 + 79 + 8 + 1 + 8 + true + WULA_MW_Mass_Drivers_Shootingsound + GunTail_Heavy + 18 + false +
  • +
    + +
  • + +
  • (0, -4.1)
  • + + +
    +
    + + Bullet_Wula_AI_Panzer_Destroyer_Turret_Weapon + + WulaFallenEmpire.Projectile_ExplosiveWithDirectHit + +
  • + Vaporize + 350 + 2 + Explosion_Vaporize +
  • +
  • + WULA_GunTail_Plasma + 3 +
  • +
    + Normal + True + + Wula/Projectile/WULA_Plasma_Proj + Graphic_Single + MoteGlow + (109, 208, 117, 255) + (2.5,3) + + + WULA_GiantBomb + 45 + 60 + 6 + 1.5 + true + Artillery_HitThickRoof + MortarBomb_Explode + MortarRound_PreImpact + MortarRound_Ambient + 10 + Filth_BlastMark + +
    + + Wula_AI_Panzer_Destroyer_Main_Weapon + + HDp-1"冥波"车体上的测距器,可以确保其炮塔在可以开火的最佳距离,被其瞄准的目标会成为炮塔的优先攻击目标。 + Normal + Spacer + None + true + Wula/Projectile/WULA_Shrapnel + + Wula/Weapon/WULA_Weapon_Empty + Graphic_Single + 1.35 + + Interact_Rifle + + + 2500 + + 8 + 1 + 1 + 1 + 1 + 0.1 + + +
  • + WulaFallenEmpire.Verb_RangeChecker + true + Bullet_ChargeRifle + 8.9 + 79 + 0.2 + 1 + 0 + + + true + +
  • +
    + + 1 + + +
  • Wula_AI_Panzer_Destroyer_Weapon
  • +
    + + +
  • + +
  • Wula_AI_Panzer_Destroyer
  • + + +
    +
    Wula_Psi_Titan_Beam diff --git a/1.6/1.6/Defs/ThingDefs_Races/WULA_Mechunit_Race.xml b/1.6/1.6/Defs/ThingDefs_Races/WULA_Mechunit_Race.xml index 73406ed7..6fb23b94 100644 --- a/1.6/1.6/Defs/ThingDefs_Races/WULA_Mechunit_Race.xml +++ b/1.6/1.6/Defs/ThingDefs_Races/WULA_Mechunit_Race.xml @@ -180,7 +180,7 @@ Wula/UI/Commands/WULA_ExitCrew --> -
  • +
  • true 1 @@ -448,7 +448,7 @@ Wula/UI/Commands/WULA_Enter_Mech Wula/UI/Commands/WULA_Exit_Mech
  • -
  • +
  • true 1 @@ -612,6 +612,274 @@
  • + + Wula_AI_Panzer_Destroyer + + 乌拉帝国的中型战争机械,以悬浮的方式穿梭于战场之上,拥有一门射速缓慢但射程极远、威力强大的电浆炮,足以威胁那些最厚实的装甲单位。 + + 2 + 2 + 0 + + 9999 + 0 + + 1.25 + 1.25 + 2 + + 4 + + + 300 + 18 + 2 + + + 300 + 18 + 2 + + + WULA_AI_Heavy_Panzer_Body + 20 + Wula_Battle_Mech_With_1_Pilot + 10 + + 1 + + +
  • + + +
  • Blunt
  • + + 360 + 8 + Torso + true + +
    + +
  • + 0 + Wula_AI_Panzer_Destroyer_Turret_Weapon + 20 + 0 + 3 + true + 8.2 + + + +
  • + PawnRenderNode_TurretGun + PawnRenderNodeWorker_TurretGun + Body + (8, 8) + 20 + Any + + + -90 + + + -90 + + + -90 + + + 90 + + +
  • + + +
  • + + + DraftedAndMove + + + WULA_Hover_FlyNorth + WULA_Hover_FlyEast + WULA_Hover_FlySouth +
  • + +
  • + 1 + MechPilot + + 0.1 + + Wula/UI/Commands/WULA_Enter_Mech + Wula/UI/Commands/WULA_Exit_Mech +
  • + +
  • + true + 1 + + 10 + + + ConstructMetal +
  • +
  • + Wula_AI_Panzer_Destroyer_Main_Weapon +
  • +
  • + true + false + + 1.0 + true + false + 3 + + +
  • + Wula_PIA_Light_Unit + 1 + false +
  • + + +
  • + 0 + 1 +
  • + + + + + +
  • + 0.1 + 120~180 + true + + 11.5 + Flame + 5 + 2 + 0.25 + true + true + true + 1 + + Explosion_Bomb + + true + true + 0 +
  • + + + +
  • + + 1.0 + 2.0 + 15 + 3 + + + 2 + + + true + true + + + Blunt + 1 + 0.1 + + + MeleeHit_BladelinkZeusHammer + + + Blunt + 15 + 4 + true + + MeleeHit_BladelinkZeusHammer + + + PawnFlyer + + PawnFlyerLand + + + true + 1 + 60 + Wula_TerrainBlocked + + + false + false + false +
  • +
    +
    Wula_Mech_Mobile_Shield @@ -724,7 +992,7 @@ Wula/UI/Commands/WULA_Enter_Mech Wula/UI/Commands/WULA_Exit_Mech -
  • +
  • true 1 @@ -1197,7 +1465,7 @@ Wula/UI/Commands/WULA_Enter_Mech Wula/UI/Commands/WULA_Exit_Mech
  • -
  • +
  • true 1 diff --git a/Content/Textures/Wula/Mote/WULA_GunTail_Plasma.png b/Content/Textures/Wula/Mote/WULA_GunTail_Plasma.png index 15b909be..31767872 100644 Binary files a/Content/Textures/Wula/Mote/WULA_GunTail_Plasma.png and b/Content/Textures/Wula/Mote/WULA_GunTail_Plasma.png differ diff --git a/Content/Textures/Wula/Mote/WULA_Plasma_Proj.png b/Content/Textures/Wula/Mote/WULA_Plasma_Proj.png new file mode 100644 index 00000000..683c980b Binary files /dev/null and b/Content/Textures/Wula/Mote/WULA_Plasma_Proj.png differ diff --git a/Content/Textures/Wula/Projectile/WULA_Plasma_Proj.png b/Content/Textures/Wula/Projectile/WULA_Plasma_Proj.png new file mode 100644 index 00000000..683c980b Binary files /dev/null and b/Content/Textures/Wula/Projectile/WULA_Plasma_Proj.png differ diff --git a/Source/WulaFallenEmpire/Projectiles/Projectile_ExplosiveWithDirectHit.cs b/Source/WulaFallenEmpire/Projectiles/Projectile_ExplosiveWithDirectHit.cs index 7a94cebe..8333cbdf 100644 --- a/Source/WulaFallenEmpire/Projectiles/Projectile_ExplosiveWithDirectHit.cs +++ b/Source/WulaFallenEmpire/Projectiles/Projectile_ExplosiveWithDirectHit.cs @@ -1,6 +1,7 @@ +using RimWorld; using System; using System.Collections.Generic; -using RimWorld; +using UnityEngine; using Verse; using Verse.Sound; @@ -13,7 +14,72 @@ namespace WulaFallenEmpire { // 缓存ModExtension private ProjectileExtension_DirectHit directHitExtension = null; - + private TrackingBulletDef trackingDefInt; + private int Fleck_MakeFleckTick; + private Vector3 lastTickPosition; + + public TrackingBulletDef TrackingDef + { + get + { + if (trackingDefInt == null) + { + trackingDefInt = def.GetModExtension(); + if (trackingDefInt == null) + { + Log.ErrorOnce($"TrackingBulletDef for {this.def.defName} is null. Creating a default instance.", this.thingIDNumber ^ 0x12345678); + this.trackingDefInt = new TrackingBulletDef(); + } + } + return trackingDefInt; + } + } + public override void Launch(Thing launcher, Vector3 origin, LocalTargetInfo usedTarget, LocalTargetInfo intendedTarget, ProjectileHitFlags hitFlags, bool preventFriendlyFire = false, Thing equipment = null, ThingDef targetCoverDef = null) + { + base.Launch(launcher, origin, usedTarget, intendedTarget, hitFlags, preventFriendlyFire, equipment, targetCoverDef); + lastTickPosition = origin; + } + + protected override void Tick() + { + base.Tick(); + + // 处理拖尾特效 + if (TrackingDef != null && TrackingDef.tailFleckDef != null) + { + Fleck_MakeFleckTick++; + if (Fleck_MakeFleckTick >= TrackingDef.fleckDelayTicks) + { + if (Fleck_MakeFleckTick >= (TrackingDef.fleckDelayTicks + TrackingDef.fleckMakeFleckTickMax)) + { + Fleck_MakeFleckTick = TrackingDef.fleckDelayTicks; + } + + Map map = base.Map; + int randomInRange = TrackingDef.fleckMakeFleckNum.RandomInRange; + Vector3 currentPosition = base.ExactPosition; + Vector3 previousPosition = lastTickPosition; + + for (int i = 0; i < randomInRange; i++) + { + float num = (currentPosition - previousPosition).AngleFlat(); + float velocityAngle = TrackingDef.fleckAngle.RandomInRange + num; + float randomInRange2 = TrackingDef.fleckScale.RandomInRange; + float randomInRange3 = TrackingDef.fleckSpeed.RandomInRange; + + FleckCreationData dataStatic = FleckMaker.GetDataStatic(currentPosition, map, TrackingDef.tailFleckDef, randomInRange2); + dataStatic.rotation = (currentPosition - previousPosition).AngleFlat(); + dataStatic.rotationRate = TrackingDef.fleckRotation.RandomInRange; + dataStatic.velocityAngle = velocityAngle; + dataStatic.velocitySpeed = randomInRange3; + map.flecks.CreateFleck(dataStatic); + } + } + } + lastTickPosition = base.ExactPosition; + } + + // 标记是否已经应用了直击伤害 private bool directDamageApplied = false; @@ -21,6 +87,20 @@ namespace WulaFallenEmpire { base.ExposeData(); Scribe_Values.Look(ref directDamageApplied, "directDamageApplied", false); + Scribe_Values.Look(ref Fleck_MakeFleckTick, "Fleck_MakeFleckTick", 0); + Scribe_Values.Look(ref lastTickPosition, "lastTickPosition", Vector3.zero); + if (Scribe.mode == LoadSaveMode.PostLoadInit) + { + if (this.trackingDefInt == null) + { + this.trackingDefInt = this.def.GetModExtension(); + if (this.trackingDefInt == null) + { + Log.ErrorOnce($"TrackingBulletDef is null for projectile {this.def.defName} after PostLoadInit. Creating a default instance.", this.thingIDNumber ^ 0x12345678); + this.trackingDefInt = new TrackingBulletDef(); + } + } + } } protected override void Impact(Thing hitThing, bool blockedByShield = false) diff --git a/木精灵.ini b/木精灵.ini new file mode 100644 index 00000000..6c199c7c --- /dev/null +++ b/木精灵.ini @@ -0,0 +1,9 @@ +木精灵 + +居住在边缘世界的尖耳朵白皮精灵,种族擅长射击、种植、驯兽,不擅长挖矿。 +崇尚自然的力量。整个社会停留在中世纪时期,树木会为精灵带来好心情。 +厌恶破坏自然(砍树和挖矿),不会去做这些工作。 +开局会携带精灵母树种子,这种母树是精灵的核心生产工具,可以升级解锁科技,可以产出多种种子,种下后可以获得持续的矿物、木材产出,获得树人侍从和防御塔等 +本家矿物产量很低,但是科技不需要金属 +擅长弓箭、标枪和长枪,装备围绕木制装备设计 +树人是精灵的伙伴,拥有强大的承伤能力,可以作为前排,但是没什么输出能力,高级树人可以通过镇压大范围敌人来减速拉住敌人。平常不吃东西,受伤会吞噬树木恢复血量