Add function;fix bug

Add config dialog in magictower edit
fix a bug in magictower