Login    Forum    Search    FAQ

Board index » Scenarios & Scripting




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Suggestions / help
 Post Posted: Wed Apr 14, 2010 10:35 am 
Offline

Joined: Mon Mar 02, 2009 11:00 am
Posts: 150
I haven't been able to get addTokens() to work, i've tried things like addTokens("Range Token",2), addTokens("Range",2), and addTokens("Sleep",2); but it hasnt worked.

When a figure is taken, doesExist() returns false.

I had a very strange bug where an entity i created and undimmed would become aloft for some reason.

I noticed the AI was recently updated, I wonder if it would be possible to choose which AI a script would use.

Also I used to have problems where on a preset map my novice adventurer would always gain the same stat tokens. (adding a dimwitted manticore made the tokens more random). I dont know if this is still a problem with the new ai.

Suggestions:

It seems very easy to accidentally delete a script, a confirmation popup or undo button would be nice.

Two separate public script lists, one just for people who want to play scripts that does not show the code and one for example scripts.

For the sake of completeness some functions that someone might find useful:
Player location.getControler();
void ent.heal(int delta);
void ent.setAloft(bool aloft);
bool ent.isType(string typeName);
int ent.getStat(string statName);

These could also be card functions if someone wanted to use them in isDeckValid().
string ent.getDomain();
int ent.getCost();
string ent.getRarity();


For fun functions:
void ent.rename(string newName);
string player.getName();
void player.giveAcheivement(String name, String image) //restricted use
void ent.makeInvincible(bool true);

And if you're really lazy you can implement ent.setAbilities(); and have the players create the next set for you.

_________________
ȁ̎̉̈̂̎͋̈́̍n͂͑̿ͥͣ́̓ġͤ͑ͯe͌̓̊ͩ͗̅l̽̓ͬͬͥ̊͗aͣ̔̃ͧ̓̾̾t͊̑̆hͤ͆̓̉̌ͣ̚e̋ͩ͒̈́ĭ̌̒̎ͧ̓̋ͪs̋ͤͧ̅̇̋̎ͫ̂̾ͨ̽̄ͫͯt͒͐̌ͭ̂̃ͪ̽ͣ͗̒ͣ


Top 
 Profile  
 
 Post subject: Re: Suggestions / help
 Post Posted: Wed Apr 14, 2010 12:54 pm 
Offline

Joined: Tue Jan 08, 2008 2:07 am
Posts: 1045
Expanded the addToken description:

some common tokens: attack,maxhp,vision,speed,range
// also: age,work,entrench,sleep,vigor,spawn,soul,termite
// you can look in helpers/counters.xml for a complete list
// Example: ent.addToken("attack",1);
// it is case sensitive

> When a figure is taken, doesExist() returns false.
yeah it doesn't exist anymore

> I had a very strange bug where an entity i created and undimmed would become aloft for some reason.
Are you creating it from an aloft Location?

Quote:
I noticed the AI was recently updated, I wonder if it would be possible to choose which AI a script would use.

The scripts are using the same AI that the download client has. You want to be able to use the weaker Flash AI?

Quote:
Also I used to have problems where on a preset map my novice adventurer would always gain the same stat tokens. (adding a dimwitted manticore made the tokens more random). I dont know if this is still a problem with the new ai.


I'll fix this in the next patch.

> string player.getName();
The server doesn't actually have the player's name you can still display their name though by going:
string msg="{u,";
msg += player.getID();
msg += "}";
and sending msg to the client.

> bool ent.isType(string typeName);
this exists as isType(EnityType );

Let me know if you need any of the other functions and I'll add them.


Top 
 Profile  
 
 Post subject: Re: Suggestions / help
 Post Posted: Tue May 11, 2010 7:20 am 
Offline

Joined: Fri Nov 13, 2009 8:26 am
Posts: 139
// return the round number
int getRound();

// getters and setters should always be available. "add*" is fine, but unnecessary in the base API.
Player.setFlux( int flux );
Player.setGlory( int glory );
Entity.setToken( string token, int num );
Entity.setHealth( int health );

// aliases for getCurHealth and numTokens
int Entity.getHealth();
int Entity.getToken( string token );

// is this location visible to player p?
bool Location.isVisible( Player p );

// is this entity visible to player p? always true for global enchants.
bool Entity.isVisible( Player p );


Top 
 Profile  
 
 Post subject: Re: Suggestions / help
 Post Posted: Tue May 18, 2010 4:46 am 
Offline

Joined: Fri Nov 13, 2009 8:26 am
Posts: 139
// domain of card, e.g., "sylvan" or "unaligned"
string Card.getDomainType();

// number of domains to cast
string Card.getDomainNum();

// casting cost of card
int Card.getFlux();


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

Board index » Scenarios & Scripting


Who is online

Users browsing this forum: No registered users and 3 guests

 
 

 
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