It is currently Sun Dec 17, 2017 7:45 am

All times are UTC + 9:30 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Graves *updated w/ 4star COP*
PostPosted: Wed Dec 20, 2006 12:20 pm 
Offline
User avatar

Joined: Thu Sep 21, 2006 6:48 am
Posts: 3681
Location: Location, Location
lol, time for them to get put in and result in a million new errors.

ON THAT NOTE:

Graves requires one line of code to be rewritten in the Unit code:

There's a big chunk of code that is 90% comment >_>. Remove the first part of the if statement so it looks like
Code:
/*
 *Graves.java
 *Author: Albert Lai
 *Contributors:
 *You're in grave danger! Ho ho ho!
 *You're digging your own grave! Hee hee hee!
 */

import java.util.Random;

public class Graves extends CO{
   
    //constructor
    public Graves() {
        name = "Graves";
        id = 36;
       
        String[] COPowerx =
        {"Fear is a valuble tool. I suggest you learn how to use it.",
        "Do you desire death that greatly?",
        "You must give everything if you want to win.",
        "You are ill prepared to face me.",
        "A valiant effort. But futile, nonetheless.",
        "Prepare yourself." };
       
        String[] Victoryx =
        {"That was it? ...I overestimated you.",
        "Such a victory was... so rudely forced",
        //replace victory with rape, and this would be an excellent victory quote
        "Lives could have been spared had you just accepted your fate." };
       
        String[] Swapx =
        {"Fear the shadow that rises to meet you.",
        "I will show you fear in a handful of dust."};
       
        COPower = COPowerx;
        Victory = Victoryx;
        Swap = Swapx;
       
        //No special tags
        String[] TagCOsx = {"Ain", "Hawke", "Thanatos", "Mina", "Falcone", "Eagle", "Adder", "Ember", "Rachel", "Nell"}; //Names of COs with special tags
        String[] TagNamesx = {"Ideal", "Antagonistic Desire", "Desecrate", "Dehabilitate", "Memento Mori" , "Dual Strike", "Dual Strike", "Dual Strike", "Dual Strike", "Dual Strike"}; //Names of the corresponding Tags
        int[] TagStarsx = {2,2,1,1,1,0,0,0,0,0}; //Number of stars for each special tag.
        int[] TagPercentx = {120, 120,115,110,110,90,85,85,85,80}; //Percent for each special tag.
        //Here's to you, Mr. Massive-amounts-of-tags (chorus: he has a million different tag partners!)
       
        TagCOs = TagCOsx;
        TagNames = TagNamesx;
        TagStars = TagStarsx;
        TagPercent = TagPercentx;
       
        COPName = "Plague";
        SCOPName = "Perdition";
        COPStars = 4.0;
        maxStars = 7.0;
        this.army = army;
        style = PARALLEL_GALAXY;
//I sure am a boring CO. >_> *is shot*
    }
   
//used to get the attack bonus for damage calculation
    public int getAtk(Unit attacker, Unit defender){
        if(SCOP||COP)
        {
            if(defender.getDisplayHP()==10)
                return 100;
            else
                return 110;
        }
        if(defender.getDisplayHP()==10)
            return 90;
        else
            return 100;
       
    }
   
    public void setChange(Unit u){
       
    }
   
    public void unChange(Unit u){
       
    }
   
   
//used to get the defense bonus for damage calculation
    public int getDef(Unit attacker, Unit defender){
        if(SCOP || COP)return 110;
        return 100;
    }
   
//carries out Blandie's CO Power, called by CO.activateCOP()
    public void COPower(){
        COP = true;
       
        Army[] armies = army.getBattle().getArmies();
        Unit[] u = army.getUnits();
        for(int i = 0; i < armies.length; i++){
            if(armies[i].getSide() != army.getSide() && armies[i].getUnits() != null){
                u = armies[i].getUnits();
                for(int s = 0; s < u.length; s++){
                    if(u[s].getClass() != null){
                        if(!u[s].isInTransport()){
                            //Damages and paralyzes
                            u[s].damage(10, false);
                            if(u[s].getDisplayHP()<=3)
                                u[s].paralyzed = true;
                            }
                        }
                     else
                        return;
                }
            }
        }
    }
   
//carries out Blandie's Super CO Power, called by CO.activateSCOP()
    public void superCOPower(){
        SCOP = true;
        Army[] armies = army.getBattle().getArmies();
        Unit[] u = army.getUnits();
        for(int i = 0; i < armies.length; i++){
            if(armies[i].getSide() != army.getSide() && armies[i].getUnits() != null){
                u = armies[i].getUnits();
                for(int s = 0; s < u.length; s++){
                    if(u[s].getClass() != null){
                        if(!u[s].isInTransport()){
                            //Damages and paralyzes
                            u[s].damage(20, false);
                            if(u[s].getDisplayHP()<=4)
                                u[s].paralyzed = true;
                            }
                        }
                     else
                        return;
                }
            }
        }
    }
   
//used to deactivate Blandie's CO Power the next day
    public void deactivateCOP(){
        COP = false;
    }
   
//used to deactivate Blandie's Super CO Power the next day
    public void deactivateSCOP(){
        SCOP = false;
    }
   
    public void afterCounter(Unit attacker, Unit defender, int damage, boolean destroy, boolean attack)
    {
        if(!destroy)
        {
            if(attack)
            {
                if(SCOP){
                    if(defender.getDisplayHP()<=4)
                        defender.paralyzed = true;
                }
                if(COP){
                    if(defender.getDisplayHP()<=3)
                        defender.paralyzed = true;
                }
                if(defender.getDisplayHP()<=2)
                {defender.paralyzed = true;}
            }
            else
            {
            if(damage>0) //If the defending unit (that's Graves) has dealt damage
                {
                if(attacker.getDisplayHP()<=2)
                    attacker.paralyzed = true;
                if(COP)
                    if(attacker.getDisplayHP()<=3)
                        attacker.paralyzed = true;
                if(SCOP)
                    if(attacker.getDisplayHP()<=4)
                        attacker.paralyzed = true;
                }
            }
        }
    }
}


_________________
"I got this [dragon tattoo] while a teenager. I met the greatest girl in the world and now I'm married. Problem is, she's afraid of dragons. I've started getting it removed. Will take years."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 9:30 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Blue Moon by Trent © 2007
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group