This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/dev'
- Loading branch information
Showing
43 changed files
with
2,135 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
src/main/java/cn/paindar/academymonster/ability/AIElectronMissile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package cn.paindar.academymonster.ability; | ||
|
||
import cn.lambdalib.util.generic.VecUtils; | ||
import cn.lambdalib.util.helper.Motion3D; | ||
import cn.lambdalib.util.mc.EntitySelectors; | ||
import cn.lambdalib.util.mc.WorldUtils; | ||
import cn.paindar.academymonster.entity.EntityMdBallNative; | ||
import cn.paindar.academymonster.network.NetworkManager; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.entity.player.EntityPlayerMP; | ||
import net.minecraft.util.Vec3; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import static cn.lambdalib.util.generic.MathUtils.lerpf; | ||
|
||
/** | ||
* Created by Paindar on 2017/3/12. | ||
*/ | ||
public class AIElectronMissile extends BaseSkill | ||
{ | ||
private List<EntityMdBallNative> ballList=new ArrayList<>(); | ||
private int freq; | ||
private int time; | ||
private int maxTick; | ||
private float range; | ||
private float damage; | ||
public AIElectronMissile(EntityLivingBase speller, float exp) | ||
{ | ||
super(speller, (int)lerpf(800,400,exp), exp, "meltdowner.electron_missile"); | ||
freq=(int)lerpf(20,10,exp); | ||
maxTick=(int)lerpf(100,200,exp); | ||
range=(int)lerpf(8,12,exp); | ||
damage=lerpf(5,12,exp); | ||
} | ||
|
||
@Override | ||
public void spell() | ||
{ | ||
if(!available()) | ||
return; | ||
isChanting=true; | ||
time=0; | ||
} | ||
|
||
@Override | ||
public void onTick() | ||
{ | ||
if(!isChanting) | ||
return; | ||
|
||
time++; | ||
if(speller.isDead || time>=maxTick) | ||
{ | ||
isChanting=false; | ||
super.spell(); | ||
for(EntityMdBallNative ball:ballList) | ||
{ | ||
ball.setDead(); | ||
} | ||
} | ||
if(time%freq==0) | ||
{ | ||
EntityMdBallNative ball=new EntityMdBallNative(speller,2333333); | ||
ballList.add(ball); | ||
speller.worldObj.spawnEntityInWorld(ball); | ||
} | ||
List<Entity> list=WorldUtils.getEntities(speller,range,EntitySelectors.exclude(speller).and(EntitySelectors.living())); | ||
if(!list.isEmpty() && !ballList.isEmpty()) | ||
{ | ||
Vec3 str= VecUtils.vec(ballList.get(0).posX, ballList.get(0).posY, ballList.get(0).posZ); | ||
Vec3 dst=new Motion3D(list.get(0),5,true).getPosVec(); | ||
attack((EntityLivingBase) list.get(0), damage); | ||
list= WorldUtils.getEntities(speller, 25, EntitySelectors.player()); | ||
for(Entity e:list) | ||
{ | ||
NetworkManager.sendMdRayEffectTo(str,dst,(EntityPlayerMP)e); | ||
} | ||
ballList.get(0).setDead(); | ||
ballList.remove(0); | ||
} | ||
} | ||
|
||
public float getMaxDistance(){return range;} | ||
} |
75 changes: 75 additions & 0 deletions
75
src/main/java/cn/paindar/academymonster/ability/AIFlashing.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package cn.paindar.academymonster.ability; | ||
|
||
import cn.lambdalib.util.mc.EntitySelectors; | ||
import cn.lambdalib.util.mc.WorldUtils; | ||
import cn.paindar.academymonster.network.NetworkManager; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.entity.player.EntityPlayerMP; | ||
|
||
import java.util.List; | ||
|
||
import static cn.lambdalib.util.generic.MathUtils.lerpf; | ||
|
||
/** | ||
* Created by voidcl on 2017/3/10. | ||
*/ | ||
public class AIFlashing extends BaseSkill{ | ||
private float maxDistance; | ||
private int time; | ||
private int maxtime; | ||
private int ilCD=0; | ||
public AIFlashing(EntityLivingBase speller, float exp) { | ||
super(speller,(int)lerpf(200, 100, exp), exp,"teleporter.flashing"); | ||
time=0; | ||
maxtime=60; | ||
maxDistance=lerpf(3,10, getSkillExp()); | ||
} | ||
|
||
public float getMaxDistance(){return maxDistance;} | ||
|
||
@Override | ||
public boolean available() | ||
{ | ||
return isChanting || !isSkillInCooldown(); | ||
} | ||
|
||
public void spell(double x, double y, double z) | ||
{ | ||
if((!isChanting && isSkillInCooldown())||ilCD>0) | ||
return; | ||
if(speller.isRiding()) | ||
speller.mountEntity(null); | ||
speller.setPositionAndUpdate(x,y,z); | ||
if(!isChanting){ | ||
isChanting=true; | ||
time=0; | ||
} | ||
speller.fallDistance = 0; | ||
ilCD=5; | ||
if(!speller.worldObj.isRemote) | ||
{ | ||
List<Entity> list= WorldUtils.getEntities(speller, 25, EntitySelectors.player()); | ||
for(Entity e:list) | ||
{ | ||
NetworkManager.sendSoundTo("tp.tp",speller,.5f,(EntityPlayerMP)e); | ||
} | ||
} | ||
} | ||
@Override | ||
protected void onTick() | ||
{ | ||
if(!isChanting) | ||
{ | ||
return; | ||
} | ||
if(time>=maxtime) | ||
{ | ||
isChanting=false; | ||
super.spell(); | ||
return; | ||
} | ||
if(ilCD>0) ilCD--; | ||
time ++; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.