Skip to content

Commit

Permalink
Fixes #11
Browse files Browse the repository at this point in the history
Fixed Glide Suit's inability to stop (if you could get it started)
Rebalanced/Optimized Crossbow
Rebalanced Terrible Terror AI
Rebalanced Night Fury AI
Fixed Dragon Damage Source naming
Fixed incorrectly named Jack'o'Lantern name
  • Loading branch information
Spartan322 committed Nov 3, 2015
1 parent ed23c52 commit 1ec635a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -24,7 +24,7 @@ idea {

apply plugin: 'forge'

version = "1.7.10-10.13.2.1230F-1.0.1R"
version = "1.7.10-10.13.2.1230F-1.0.2R"
group= "com.httymd" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "HTTYMD"

Expand Down
2 changes: 1 addition & 1 deletion java/com/httymd/entity/dragon/EntityNightFury.java
Expand Up @@ -37,7 +37,7 @@ public EntityNightFury(World world) {
// Ground
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true));
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.3D, 50F, 5F));
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.1D, 8F, 40F));
this.tasks.addTask(4, new EntityAITempt(this, 0.5, Items.fish, true));
this.tasks.addTask(4, new EntityAIMate(this, 1.0D));
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
Expand Down
2 changes: 1 addition & 1 deletion java/com/httymd/entity/dragon/EntityTerribleTerror.java
Expand Up @@ -32,7 +32,7 @@ public EntityTerribleTerror(World world) {
this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAILeapAtTarget(this, 0.4F));
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 0.8D, false));
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.1D, 30F, 5F));
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.1D, 5F, 20F));
this.tasks.addTask(5, new EntityAITempt(this, 0.6D, Items.fish, true));
this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
this.tasks.addTask(7, new EntityAIWander(this, 0.8D));
Expand Down
10 changes: 5 additions & 5 deletions java/com/httymd/item/ItemGlideArmor.java
Expand Up @@ -33,11 +33,11 @@ protected int[] getRequiredSlotsForFlight() {

public boolean isFlyable(EntityLivingBase entity) {
boolean flag = entity != null
&& (!entity.onGround || !entity.isInWater() || !entity.isInsideOfMaterial(Material.lava));

&& (!entity.onGround && !entity.isInWater() && !entity.isInsideOfMaterial(Material.lava));
if (entity instanceof EntityPlayer)
flag = flag && ((EntityPlayer) entity).capabilities.isFlying;

flag = flag && !((EntityPlayer) entity).capabilities.isFlying;
for (int slot : this.getRequiredSlotsForFlight()) {
ItemStack armor = entity.getEquipmentInSlot(slot + 1);
flag = flag && (armor != null && armor.getItem() instanceof ItemGlideArmor);
Expand All @@ -46,7 +46,7 @@ public boolean isFlyable(EntityLivingBase entity) {
}

public boolean canGlide(EntityLivingBase entity, ItemStack stack) {
boolean flag = !entity.isClientWorld() && this.isFlyable(entity)
boolean flag = this.isFlyable(entity)
&& ((entity.motionY < -1.0 && entity.moveForward >= 0.1 && entity.isSneaking())
|| this.isGliding(stack));
return flag;
Expand Down
7 changes: 4 additions & 3 deletions java/com/httymd/item/ItemWeaponCrossbow.java
Expand Up @@ -32,6 +32,7 @@ public class ItemWeaponCrossbow extends ItemExtension {
public static final String NBT_POWER = "BowStoredPower";

public static final float RESET_POWER = 0.0F;
public static final float MAX_POWER = 1.7F;

public final ArrayList<String> iconList = new ArrayList<String>();

Expand Down Expand Up @@ -146,16 +147,16 @@ public void onStopUsing(ItemStack item, World world, EntityLivingBase entity, in

durationDelta = event.charge;
if (pullInventory(entity, item, Items.arrow)) {
float arrowPower = (float) durationDelta / 20;
float arrowPower = (float) (durationDelta * 0.05F);
arrowPower = ((arrowPower * arrowPower + arrowPower * 2) / 3) * 2;

if ((double) arrowPower < 0.1D) {
insertToInventory(entity, new ItemStack(Items.arrow));
return;
}

if (arrowPower > 2) {
arrowPower = 2;
if (arrowPower > MAX_POWER) {
arrowPower = MAX_POWER;
}

this.setBowPower(item, arrowPower);
Expand Down
2 changes: 1 addition & 1 deletion java/com/httymd/util/DragonDamageSource.java
Expand Up @@ -35,7 +35,7 @@ public static EntityDamageSource getProjectileFireDamage(Entity attacker, Entity
}

public static EntityDamageSource getDirectDamage(Entity attacker) {
return new EntityDamageSource(Utils.getModString("dragon.direct." + rng.nextInt(2)+1), attacker);
return new EntityDamageSource(Utils.getModString("dragon.direct." + Integer.toString(rng.nextInt(2)+1)), attacker);
}

}
Binary file added releases/HTTYMD-1.7.10-10.13.2.1230F-1.0.2R.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion resources/assets/httymd/lang/en_US.lang
Expand Up @@ -112,7 +112,7 @@ httymd:name.random.murderer=%s the Murderer
httymd:name.random.nut=%s the Nut
httymd:name.random.jerk=%s the Jerk
httymd:name.random.melon=%s the Melon
httymd:name.random.jackolatern=%s the Jack'o'Latern
httymd:name.random.jackolatern=%s the Jack'o'Lantern
httymd:name.random.blind=%s the Blind
httymd:name.random.crazy=%s the Crazy
httymd:name.random.freak=%s the Freak
Expand Down
2 changes: 1 addition & 1 deletion resources/mcmod.info
Expand Up @@ -2,7 +2,7 @@
"modid": "httymd",
"name": "How to Train Your Minecraft Dragon",
"description": "The Mod based on How to Train your Dragon (movie) which adds everything from the franchise. From small daggers to Boss Dragons and everything in betweens. Try out Hiccups Glide Suit or the Crossbow, or you could fly your very own, loyal dragon named what you want them to.",
"version": "1.0.1",
"version": "1.0.2",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",
Expand Down

0 comments on commit 1ec635a

Please sign in to comment.