"Ram attack" for moloch, endworm attack tweaking, improved watcher sprite
This commit is contained in:
@@ -44,12 +44,12 @@
|
|||||||
|
|
||||||
<limb id = "8" width="50" height="320" impacttolerance="100.0">
|
<limb id = "8" width="50" height="320" impacttolerance="100.0">
|
||||||
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="755,552,137,470" depth="0.08" origin="0.5,0.5"/>
|
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="755,552,137,470" depth="0.08" origin="0.5,0.5"/>
|
||||||
<attack type="PinchCW" range="800" duration="0.5" damage="30" stun="5.0" structuredamage="500" damagetype="slash"/>
|
<attack type="PinchCCW" range="800" duration="0.5" damage="30" stun="5.0" structuredamage="500" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
<limb id = "9" width="50" height="320" impacttolerance="100.0">
|
<limb id = "9" width="50" height="320" impacttolerance="100.0">
|
||||||
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="892,552,137,470" depth="0.08" origin="0.6,0.5"/>
|
<sprite texture="Content/Characters/Endworm/endworm.png" sourcerect="892,552,137,470" depth="0.08" origin="0.6,0.5"/>
|
||||||
<attack type="PinchCCW" range="800" duration="0.5" damage="30" stun="5.0" structuredamage="500" damagetype="slash"/>
|
<attack type="PinchCW" range="800" duration="0.5" damage="30" stun="5.0" structuredamage="500" damagetype="slash"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<!-- head -->
|
<!-- head -->
|
||||||
<limb id = "0" radius="230" height="500" type="Head" steerforce="1.0" flip="true" armorsector="0.0,180.0" armorvalue="100.0">
|
<limb id = "0" radius="230" height="500" type="Head" steerforce="1.0" flip="true" armorsector="0.0,180.0" armorvalue="100.0">
|
||||||
<sprite texture="Content/Characters/Moloch/moloch.png" sourcerect="0,0,628,1024" depth="0.02" origin ="0.4,0.5"/>
|
<sprite texture="Content/Characters/Moloch/moloch.png" sourcerect="0,0,628,1024" depth="0.02" origin ="0.4,0.5"/>
|
||||||
|
<attack type="Hit" range="700" duration="0.2" force="400" damagetype="blunt"/>
|
||||||
</limb>
|
</limb>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 207 KiB After Width: | Height: | Size: 210 KiB |
@@ -344,6 +344,23 @@ namespace Barotrauma
|
|||||||
|
|
||||||
steeringManager.SteeringSeek(attackPosition + (limb.SimPosition-SimPosition), 5.0f);
|
steeringManager.SteeringSeek(attackPosition + (limb.SimPosition-SimPosition), 5.0f);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case AttackType.Hit:
|
||||||
|
damageTarget = (wallAttackPos != Vector2.Zero && targetEntity != null) ? targetEntity : selectedAiTarget.Entity as IDamageable;
|
||||||
|
|
||||||
|
if (damageTarget == null)
|
||||||
|
{
|
||||||
|
attackTimer = limb.attack.Duration;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ConvertUnits.ToDisplayUnits(Vector2.Distance(limb.SimPosition, attackPosition)) < limb.attack.Range)
|
||||||
|
{
|
||||||
|
attackTimer += deltaTime;
|
||||||
|
limb.body.ApplyForce(limb.Mass * limb.attack.Force * Vector2.Normalize(attackPosition - limb.SimPosition));
|
||||||
|
}
|
||||||
|
|
||||||
|
steeringManager.SteeringSeek(attackPosition + (limb.SimPosition-SimPosition), 5.0f);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
attackTimer = limb.attack.Duration;
|
attackTimer = limb.attack.Duration;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public enum AttackType
|
public enum AttackType
|
||||||
{
|
{
|
||||||
None, PinchCW, PinchCCW
|
None, PinchCW, PinchCCW, Hit
|
||||||
}
|
}
|
||||||
|
|
||||||
struct AttackResult
|
struct AttackResult
|
||||||
@@ -47,6 +47,8 @@ namespace Barotrauma
|
|||||||
private readonly float damage;
|
private readonly float damage;
|
||||||
private readonly float bleedingDamage;
|
private readonly float bleedingDamage;
|
||||||
|
|
||||||
|
public readonly float Force;
|
||||||
|
|
||||||
private Sound sound;
|
private Sound sound;
|
||||||
|
|
||||||
private ParticleEmitterPrefab particleEmitterPrefab;
|
private ParticleEmitterPrefab particleEmitterPrefab;
|
||||||
@@ -101,6 +103,8 @@ namespace Barotrauma
|
|||||||
structureDamage = ToolBox.GetAttributeFloat(element, "structuredamage", 0.0f);
|
structureDamage = ToolBox.GetAttributeFloat(element, "structuredamage", 0.0f);
|
||||||
bleedingDamage = ToolBox.GetAttributeFloat(element, "bleedingdamage", 0.0f);
|
bleedingDamage = ToolBox.GetAttributeFloat(element, "bleedingdamage", 0.0f);
|
||||||
|
|
||||||
|
Force = ToolBox.GetAttributeFloat(element,"force", 0.0f);
|
||||||
|
|
||||||
Stun = ToolBox.GetAttributeFloat(element, "stun", 0.0f);
|
Stun = ToolBox.GetAttributeFloat(element, "stun", 0.0f);
|
||||||
|
|
||||||
string soundPath = ToolBox.GetAttributeString(element, "sound", "");
|
string soundPath = ToolBox.GetAttributeString(element, "sound", "");
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
//using Microsoft.Xna.Framework;
|
|
||||||
//using Microsoft.Xna.Framework.Graphics;
|
|
||||||
//using System;
|
|
||||||
//using System.Collections.Generic;
|
|
||||||
//using System.Linq;
|
|
||||||
//using System.Text;
|
|
||||||
//using System.Xml.Linq;
|
|
||||||
|
|
||||||
//namespace Subsurface.Items.Components
|
|
||||||
//{
|
|
||||||
// class Label : ItemComponent
|
|
||||||
// {
|
|
||||||
// GUITextBox textBox;
|
|
||||||
|
|
||||||
// private string text;
|
|
||||||
|
|
||||||
// [HasDefaultValue("", true)]
|
|
||||||
// public string Text
|
|
||||||
// {
|
|
||||||
// get { return text; }
|
|
||||||
// set
|
|
||||||
// {
|
|
||||||
// text = value;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public Label(Item item, XElement element)
|
|
||||||
// : base(item, element)
|
|
||||||
// {
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override bool Select(Character Character)
|
|
||||||
// {
|
|
||||||
// if (textBox == null)
|
|
||||||
// {
|
|
||||||
// textBox = new GUITextBox(Rectangle.Empty, GUI.Style, GuiFrame);
|
|
||||||
// textBox.Wrap = true;
|
|
||||||
// textBox.OnTextChanged = TextChanged;
|
|
||||||
// textBox.LimitText = true;
|
|
||||||
|
|
||||||
// GUIButton button = new GUIButton(new Rectangle(0,0,100,15), "OK", null, Alignment.BottomRight, GUI.Style, GuiFrame);
|
|
||||||
// button.OnClicked = Close;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// textBox.Text = text;
|
|
||||||
|
|
||||||
// textBox.Select();
|
|
||||||
|
|
||||||
// return base.Select(Character);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override void DrawHUD(SpriteBatch spriteBatch, Character Character)
|
|
||||||
// {
|
|
||||||
// //isActive = true;
|
|
||||||
// GuiFrame.Update((float)Physics.step);
|
|
||||||
// GuiFrame.Draw(spriteBatch);
|
|
||||||
|
|
||||||
// //int width = 300, height = 300;
|
|
||||||
// //int x = Game1.GraphicsWidth / 2 - width / 2;
|
|
||||||
// //int y = Game1.GraphicsHeight / 2 - height / 2 - 50;
|
|
||||||
|
|
||||||
// //GUI.DrawRectangle(spriteBatch, new Rectangle(x, y, width, height), Color.Black, true);
|
|
||||||
// if (!textBox.Selected) Character.SelectedConstruction = null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private bool TextChanged(GUITextBox textBox, string text)
|
|
||||||
// {
|
|
||||||
// this.text = text;
|
|
||||||
// item.NewComponentEvent(this, true);
|
|
||||||
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private bool Close(GUIButton button, object obj)
|
|
||||||
// {
|
|
||||||
// textBox.Deselect();
|
|
||||||
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override void FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetOutgoingMessage message)
|
|
||||||
// {
|
|
||||||
// message.Write(Text);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetIncomingMessage message)
|
|
||||||
// {
|
|
||||||
// string newText = "";
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// newText = message.ReadString();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// catch (Exception e)
|
|
||||||
// {
|
|
||||||
//#if DEBUG
|
|
||||||
// DebugConsole.ThrowError("invalid network message", e);
|
|
||||||
//#endif
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Text = newText;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
Reference in New Issue
Block a user